From 6395dd5938ee227f2ebc3d7fc92d57960bd9dc9f Mon Sep 17 00:00:00 2001 From: MARCROCK22 Date: Fri, 20 Sep 2024 00:12:54 +0000 Subject: [PATCH] fix: use .raw instead of .listRaw --- src/commands/handle.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/commands/handle.ts b/src/commands/handle.ts index fe107f4..316a6c3 100644 --- a/src/commands/handle.ts +++ b/src/commands/handle.ts @@ -510,27 +510,27 @@ export class HandleCommand { return; } - async fetchChannel(_option: CommandOptionWithType, query: string) { + fetchChannel(_option: CommandOptionWithType, query: string) { const id = query.match(/[0-9]{17,19}/g)?.[0]; if (id) return this.client.channels.raw(id); return null; } - async fetchUser(_option: CommandOptionWithType, query: string) { + fetchUser(_option: CommandOptionWithType, query: string) { const id = query.match(/[0-9]{17,19}/g)?.[0]; if (id) return this.client.users.raw(id); return null; } - async fetchMember(_option: CommandOptionWithType, query: string, guildId: string) { + fetchMember(_option: CommandOptionWithType, query: string, guildId: string) { const id = query.match(/[0-9]{17,19}/g)?.[0]; if (id) return this.client.members.raw(guildId, id); return null; } - async fetchRole(_option: CommandOptionWithType, query: string, guildId?: string) { + fetchRole(_option: CommandOptionWithType, query: string, guildId?: string) { const id = query.match(/[0-9]{17,19}/g)?.[0]; - if (id && guildId) return (await this.client.roles.listRaw(guildId)).find(x => x.id === id); + if (id && guildId) return this.client.roles.raw(guildId, id); return null; }