diff --git a/packages/core/src/structures/channels.ts b/packages/core/src/structures/channels.ts index b6e36ee..01f2bb4 100644 --- a/packages/core/src/structures/channels.ts +++ b/packages/core/src/structures/channels.ts @@ -109,6 +109,15 @@ export abstract class BaseChannel implements Model { return ChannelFactory.from(this.session, channel); } + /** + * Deletes a channel. + * @param channelId The channel id to delete. + * @link https://discord.com/developers/docs/topics/gateway#channel-delete + */ + async delete(channelId?: Snowflake): Promise { + return await this.session.rest.delete(CHANNEL(channelId ?? this.id)); + } + toString(): string { return `<#${this.id}>`; }