コード例 #1
0
ファイル: TriviaModule.cs プロジェクト: randianb/MonkeyBot
        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);
            }
        }
コード例 #2
0
ファイル: TriviaModule.cs プロジェクト: MarkusKgit/MonkeyBot
        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 :(");
            }
        }