Exemplo n.º 1
0
        public async ValueTask <DiscordUserPacket[]> GetReactionsAsync(
            ulong channelId,
            ulong messageId,
            DiscordEmoji emoji)
        {
            var response = await RestClient.GetAsync(
                DiscordApiRoutes.MessageReaction(channelId, messageId, emoji))
                           .ConfigureAwait(false);

            HandleErrors(response);
            return(JsonHelper.Deserialize <DiscordUserPacket[]>(response.Body));
        }
Exemplo n.º 2
0
        public async ValueTask DeleteReactionAsync(
            ulong channelId,
            ulong messageId,
            DiscordEmoji emoji,
            ulong userId)
        {
            var response = await RestClient.DeleteAsync(
                DiscordApiRoutes.MessageReaction(channelId, messageId, emoji, userId))
                           .ConfigureAwait(false);

            HandleErrors(response);
        }