Beispiel #1
0
        public async Task StartTriviaAsync([Summary("The number of questions to play.")] int questionAmount = 10)
        {
            var success = await triviaService.StartTriviaAsync(questionAmount, Context as SocketCommandContext).ConfigureAwait(false);

            if (!success)
            {
                await ReplyAsync("Trivia could not be started :(").ConfigureAwait(false);
            }
        }
Beispiel #2
0
        public async Task StartTriviaAsync(CommandContext ctx, [Description("The number of questions to play.")] int questionAmount = 10)
        {
            bool success = await _triviaService.StartTriviaAsync(ctx.Guild.Id, ctx.Channel.Id, questionAmount);

            if (!success)
            {
                await ctx.RespondAsync("Trivia could not be started :(");
            }
        }