mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-22 00:34:41 +12:00
types(InteractionWebhook): Add client
(#9997)
types(InteractionWebhook): add `client` Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
parent
cbbbfb9823
commit
30f6a5fc56
2 changed files with 2 additions and 0 deletions
1
packages/discord.js/typings/index.d.ts
vendored
1
packages/discord.js/typings/index.d.ts
vendored
|
@ -1921,6 +1921,7 @@ export class InteractionCollector<Interaction extends CollectedInteraction> exte
|
||||||
|
|
||||||
export class InteractionWebhook extends PartialWebhookMixin() {
|
export class InteractionWebhook extends PartialWebhookMixin() {
|
||||||
public constructor(client: Client<true>, id: Snowflake, token: string);
|
public constructor(client: Client<true>, id: Snowflake, token: string);
|
||||||
|
public readonly client: Client<true>;
|
||||||
public token: string;
|
public token: string;
|
||||||
public send(options: string | MessagePayload | InteractionReplyOptions): Promise<Message>;
|
public send(options: string | MessagePayload | InteractionReplyOptions): Promise<Message>;
|
||||||
public editMessage(
|
public editMessage(
|
||||||
|
|
|
@ -2279,6 +2279,7 @@ expectType<Promise<APIMessage>>(webhookClient.send('content'));
|
||||||
expectType<Promise<APIMessage>>(webhookClient.editMessage(snowflake, 'content'));
|
expectType<Promise<APIMessage>>(webhookClient.editMessage(snowflake, 'content'));
|
||||||
expectType<Promise<APIMessage>>(webhookClient.fetchMessage(snowflake));
|
expectType<Promise<APIMessage>>(webhookClient.fetchMessage(snowflake));
|
||||||
|
|
||||||
|
expectType<Client<true>>(interactionWebhook.client);
|
||||||
expectType<Promise<Message>>(interactionWebhook.send('content'));
|
expectType<Promise<Message>>(interactionWebhook.send('content'));
|
||||||
expectType<Promise<Message>>(interactionWebhook.editMessage(snowflake, 'content'));
|
expectType<Promise<Message>>(interactionWebhook.editMessage(snowflake, 'content'));
|
||||||
expectType<Promise<Message>>(interactionWebhook.fetchMessage(snowflake));
|
expectType<Promise<Message>>(interactionWebhook.fetchMessage(snowflake));
|
||||||
|
|
Loading…
Reference in a new issue