mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
feat(WebhookClient): allow creation of clients via URLs (#6192)
This commit is contained in:
13
typings/index.d.ts
vendored
13
typings/index.d.ts
vendored
@@ -1900,7 +1900,7 @@ export class Webhook extends WebhookMixin() {
|
||||
}
|
||||
|
||||
export class WebhookClient extends WebhookMixin(BaseClient) {
|
||||
public constructor(id: Snowflake, token: string, options?: WebhookClientOptions);
|
||||
public constructor(data: WebhookClientData, options?: WebhookClientOptions);
|
||||
public client: this;
|
||||
public options: WebhookClientOptions;
|
||||
public token: string;
|
||||
@@ -4350,6 +4350,17 @@ export type VerificationLevel = keyof typeof VerificationLevels;
|
||||
|
||||
export type VoiceBasedChannelTypes = 'GUILD_VOICE' | 'GUILD_STAGE_VOICE';
|
||||
|
||||
export type WebhookClientData = WebhookClientDataIdWithToken | WebhookClientDataURL;
|
||||
|
||||
export interface WebhookClientDataIdWithToken {
|
||||
id: Snowflake;
|
||||
token: string;
|
||||
}
|
||||
|
||||
export interface WebhookClientDataURL {
|
||||
url: string;
|
||||
}
|
||||
|
||||
export type WebhookClientOptions = Pick<
|
||||
ClientOptions,
|
||||
'allowedMentions' | 'restTimeOffset' | 'restRequestTimeout' | 'retryLimit' | 'http'
|
||||
|
||||
Reference in New Issue
Block a user