mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 22:16:08 +00:00
Add: BaseChannel.delete
This commit is contained in:
parent
13f11b9b5e
commit
44d2ddc515
@ -109,6 +109,15 @@ export abstract class BaseChannel implements Model {
|
|||||||
return ChannelFactory.from(this.session, channel);
|
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<Channel> {
|
||||||
|
return await this.session.rest.delete<Channel>(CHANNEL(channelId ?? this.id));
|
||||||
|
}
|
||||||
|
|
||||||
toString(): string {
|
toString(): string {
|
||||||
return `<#${this.id}>`;
|
return `<#${this.id}>`;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user