/// <summary> /// Gets a message's reactions /// </summary> /// <param name="channelId">ID of the channel</param> /// <param name="messageId">ID of the message</param> /// <param name="reaction">The reaction</param> /// <param name="limit">Max amount of reactions to receive</param> /// <param name="afterId">Reaction ID to offset from</param> public static IReadOnlyList <DiscordUser> GetMessageReactions(this DiscordClient client, ulong channelId, ulong messageId, ReactionQuery query) { return(client.GetMessageReactionsAsync(channelId, messageId, query).GetAwaiter().GetResult()); }
/// <summary> /// Gets instances of a reaction to a message /// </summary> /// <param name="reaction">The reaction</param> /// <param name="limit">Max amount of reactions to receive</param> /// <param name="afterId">The reaction ID to offset from</param> public IReadOnlyList <DiscordUser> GetReactions(ReactionQuery query) { return(GetReactionsAsync(query).GetAwaiter().GetResult()); }
public static async Task <IReadOnlyList <DiscordUser> > GetMessageReactionsAsync(this DiscordClient client, ulong channelId, ulong messageId, ReactionQuery query) { return((await client.HttpClient.GetAsync($"/channels/{channelId}/messages/{messageId}/reactions/{query.ReactionName}{(query.ReactionId.HasValue ? ":" + query.ReactionId.Value : "")}?limit={query.Limit}&after={query.AfterId}")) .Deserialize <IReadOnlyList <DiscordUser> >().SetClientsInList(client)); }
public async Task <IReadOnlyList <DiscordUser> > GetReactionsAsync(ReactionQuery query) { return(await Client.GetMessageReactionsAsync(Channel.Id, Id, query)); }