feat(Client): add deleteWebhook method (#9777)

* feat(Client): deleteWebhook method

* Update packages/discord.js/src/client/Client.js

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>

* chore: suggested changes

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Jaw0r3k
2023-08-17 18:12:05 +02:00
committed by GitHub
parent 24fbb11ba2
commit d90ba8dce8
3 changed files with 25 additions and 5 deletions

View File

@@ -969,6 +969,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
public voice: ClientVoiceManager;
public ws: WebSocketManager;
public destroy(): Promise<void>;
public deleteWebhook(id: Snowflake, options?: WebhookDeleteOptions): Promise<void>;
public fetchGuildPreview(guild: GuildResolvable): Promise<GuildPreview>;
public fetchInvite(invite: InviteResolvable, options?: ClientFetchInviteOptions): Promise<Invite>;
public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>;
@@ -6403,6 +6404,11 @@ export interface WebhookClientDataURL {
export type WebhookClientOptions = Pick<ClientOptions, 'allowedMentions' | 'rest'>;
export interface WebhookDeleteOptions {
token?: string;
reason?: string;
}
export interface WebhookEditOptions {
name?: string;
avatar?: BufferResolvable | null;