コード例 #1
0
ファイル: BaseModule.cs プロジェクト: martindevans/Mute
            public async Task <bool> HandleCallbackAsync(SocketReaction reaction)
            {
                // Remove the reaction so the button can be pressed again
                await _message.RemoveReactionAsync(reaction.Emote, reaction.UserId);

                var redraw = false;

                if (reaction.Emote.Name == SkipBackward)
                {
                    await _items.GotoStart();

                    redraw = true;
                }
                else if (reaction.Emote.Name == MoveBackward)
                {
                    redraw = await _items.MoveBackward();
                }
                else if (reaction.Emote.Name == MoveForward)
                {
                    redraw = await _items.MoveForward();
                }

                if (redraw)
                {
                    await Draw();
                }

                return(false);
            }