This commit is contained in:
ayntee
2021-04-12 23:17:39 +04:00
2 changed files with 13 additions and 1 deletions
+2 -1
View File
@@ -2,13 +2,14 @@ import { rest } from "../../rest/rest.ts";
import { DiscordUser } from "../../types/users/user.ts"; import { DiscordUser } from "../../types/users/user.ts";
import { Collection } from "../../util/collection.ts"; import { Collection } from "../../util/collection.ts";
import { endpoints } from "../../util/constants.ts"; import { endpoints } from "../../util/constants.ts";
import {GetReactions} from "../../types/messages/message_get_reactions.ts";
/** Get a list of users that reacted with this emoji. */ /** Get a list of users that reacted with this emoji. */
export async function getReactions( export async function getReactions(
channelId: string, channelId: string,
messageId: string, messageId: string,
reaction: string, reaction: string,
options?: DiscordGetReactions, options?: GetReactions,
) { ) {
const users = (await rest.runMethod( const users = (await rest.runMethod(
"get", "get",
@@ -0,0 +1,11 @@
export interface GetReactions {
/** Get users before this user Id */
before?: string;
/** Get users after this user Id */
after?: string;
/** Max number of users to return (1-100) */
limit?: number;
}
/** https://discord.com/developers/docs/resources/channel#get-reactions-query-string-params */
export type DiscordGetReactions = GetReactions;