This commit is contained in:
Nicolás Serna 2022-08-05 14:56:14 -03:00
parent 44d2ddc515
commit 972f688144

View File

@ -115,7 +115,9 @@ export abstract class BaseChannel implements Model {
* @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));
const deleted = await this.session.rest.delete<DiscordChannel>(CHANNEL(channelId ?? this.id));
return ChannelFactory.from(this.session, deleted);
}
toString(): string {