diff --git a/deps.ts b/deps.ts index 36dee4f6..10f8a058 100644 --- a/deps.ts +++ b/deps.ts @@ -1,4 +1,4 @@ -export { EventEmitter } from 'https://deno.land/x/event@2.0.0/mod.ts' +export { EventEmitter } from 'jsr:@denosaurs/event@2.0.2' export { decompress_with as unzlib } from 'npm:@evan/wasm@0.0.95/target/zlib/node.mjs' export { walk } from 'jsr:@std/fs@0.217/walk' export { join } from 'node:path' diff --git a/src/structures/webhook.ts b/src/structures/webhook.ts index 8fa5fefe..237afa45 100644 --- a/src/structures/webhook.ts +++ b/src/structures/webhook.ts @@ -204,10 +204,10 @@ export class Webhook { } } ): Promise { - await this.client?.rest.patch( + await this.rest.patch( WEBHOOK_MESSAGE( this.id, - (this.token ?? this.client.token) as string, + (this.token ?? this.client?.token) as string, typeof message === 'string' ? message : message.id ), data @@ -216,10 +216,10 @@ export class Webhook { } async deleteMessage(message: string | Message): Promise { - await this.client?.rest.delete( + await this.rest.delete( WEBHOOK_MESSAGE( this.id, - (this.token ?? this.client.token) as string, + (this.token ?? this.client?.token) as string, typeof message === 'string' ? message : message.id ) )