Moar - rip commit history

This commit is contained in:
ayntee
2021-04-12 22:37:00 +04:00
parent 7a021ac0d6
commit 999217eb3f
3 changed files with 18 additions and 11 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
import { rest } from "../../rest/rest.ts";
import { User } from "../../types/users/user.ts";
import { Collection } from "../../util/collection.ts";
import { endpoints } from "../../util/constants.ts";
@@ -7,13 +8,13 @@ export async function getReactions(
channelId: string,
messageId: string,
reaction: string,
options?: DiscordGetReactionsParams,
options?: DiscordGetReactions,
) {
const users = (await rest.runMethod(
"get",
endpoints.CHANNEL_MESSAGE_REACTION(channelId, messageId, reaction),
options,
)) as UserPayload[];
)) as User[];
return new Collection(users.map((user) => [user.id, user]));
}