mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Added channel.delete()
This commit is contained in:
@@ -85,6 +85,17 @@ class RESTMethods{
|
||||
.catch(reject);
|
||||
});
|
||||
}
|
||||
|
||||
DeleteChannel(channel) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.rest.makeRequest('del', Constants.Endpoints.CHANNEL(channel.id), true)
|
||||
.then(data => {
|
||||
data.id = channel.id;
|
||||
resolve(this.rest.client.actions.ChannelDelete.handle(data).channel);
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = RESTMethods;
|
||||
|
||||
Reference in New Issue
Block a user