Skip to content

Commit

Permalink
types(InteractionWebhook): Add client (#9997)
Browse files Browse the repository at this point in the history
types(InteractionWebhook): add `client`

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
Jiralite and kodiakhq[bot] authored Nov 30, 2023
1 parent cbbbfb9 commit 30f6a5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1921,6 +1921,7 @@ export class InteractionCollector<Interaction extends CollectedInteraction> exte

export class InteractionWebhook extends PartialWebhookMixin() {
public constructor(client: Client<true>, id: Snowflake, token: string);
public readonly client: Client<true>;
public token: string;
public send(options: string | MessagePayload | InteractionReplyOptions): Promise<Message>;
public editMessage(
Expand Down
1 change: 1 addition & 0 deletions packages/discord.js/typings/index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2279,6 +2279,7 @@ expectType<Promise<APIMessage>>(webhookClient.send('content'));
expectType<Promise<APIMessage>>(webhookClient.editMessage(snowflake, 'content'));
expectType<Promise<APIMessage>>(webhookClient.fetchMessage(snowflake));

expectType<Client<true>>(interactionWebhook.client);
expectType<Promise<Message>>(interactionWebhook.send('content'));
expectType<Promise<Message>>(interactionWebhook.editMessage(snowflake, 'content'));
expectType<Promise<Message>>(interactionWebhook.fetchMessage(snowflake));
Expand Down

0 comments on commit 30f6a5f

Please sign in to comment.