diff --git a/src/common/shorters/users.ts b/src/common/shorters/users.ts index 9a3ea7b..6e30316 100644 --- a/src/common/shorters/users.ts +++ b/src/common/shorters/users.ts @@ -35,38 +35,4 @@ export class UsersShorter extends BaseShorter { async write(userId: string, body: MessageCreateBodyRequest) { return (await this.client.users.createDM(userId)).messages.write(body); } - - get users() { - return { - createDM: async (userId: string, force = false) => { - if (!force) { - const dm = await this.client.cache.channels?.get(userId); - if (dm) return dm as DMChannel; - } - const data = await this.client.proxy.users('@me').channels.post({ - body: { recipient_id: userId }, - }); - await this.client.cache.channels?.set(userId, '@me', data); - return new DMChannel(this.client, data); - }, - deleteDM: async (userId: string, reason?: string) => { - const res = await this.client.proxy.channels(userId).delete({ reason }); - await this.client.cache.channels?.removeIfNI(BaseChannel.__intent__('@me'), res.id, '@me'); - return new DMChannel(this.client, res); - }, - fetch: async (userId: string, force = false) => { - if (!force) { - const user = await this.client.cache.users?.get(userId); - if (user) return user; - } - - const data = await this.client.proxy.users(userId).get(); - await this.client.cache.users?.patch(userId, data); - return new User(this.client, data); - }, - write: async (userId: string, body: MessageCreateBodyRequest) => { - return (await this.client.users.createDM(userId)).messages.write(body); - }, - }; - } }