Ejemplo n.º 1
0
        public async Task HandleMessageAsync(ReactionReceived reaction, CancellationToken cancellationToken = default)
        {
            switch (reaction.Type)
            {
            case ReactionEventType.Added:
                await _starboardService.HandleReactionAdded(reaction.Message, reaction.Reaction)
                .ConfigureAwait(false);

                break;

            case ReactionEventType.Removed:
                await _starboardService.HandleReactionRemoved(reaction.Message, reaction.Reaction)
                .ConfigureAwait(false);

                break;

            case ReactionEventType.Cleared:
                await _starboardService.HandleReactionCleared(reaction.Message)
                .ConfigureAwait(false);

                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }