コード例 #1
0
ファイル: KandoraContext.cs プロジェクト: Mystouille/kandora
        public async Task AddPendingGame(CommandContext ctx, DiscordMessage msg, PendingGame game)
        {
            await msg.CreateReactionAsync(DiscordEmoji.FromName(ctx.Client, Reactions.OK));

            await msg.CreateReactionAsync(DiscordEmoji.FromName(ctx.Client, Reactions.NO));

            PendingGames.Add(msg.Id, game);
        }
コード例 #2
0
 public async static Task OnReaction(DiscordClient sender, DiscordMessage msg, DiscordEmoji emoji, DiscordUser user, bool added)
 {
     if (kanContext.PendingGames.ContainsKey(msg.Id))
     {
         await PendingGame.OnPendingGameReaction(sender, msg, emoji, user, added);
     }
     else if (kanContext.OngoingProblems.ContainsKey(msg.Id))
     {
         await OngoingProblem.OnProblemReaction(sender, msg, emoji, user, added);
     }
 }