mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +00:00
Simplified client.rest.methods.DeleteMessage, now only takes a message instead of a channel and a message.
This commit is contained in:
parent
1676a5e73f
commit
618d8bb957
2 changed files with 3 additions and 3 deletions
|
|
@ -48,9 +48,9 @@ class RESTMethods{
|
|||
});
|
||||
}
|
||||
|
||||
DeleteMessage(channel, message) {
|
||||
DeleteMessage(message) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.rest.makeRequest('del', Constants.Endpoints.CHANNEL_MESSAGE(channel.id, message.id), true)
|
||||
this.rest.makeRequest('del', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true)
|
||||
.then(data => {
|
||||
resolve(this.rest.client.actions.MessageDelete.handle({
|
||||
id: message.id,
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class Message {
|
|||
}
|
||||
|
||||
delete() {
|
||||
return this.client.rest.methods.DeleteMessage(this.channel, this);
|
||||
return this.client.rest.methods.DeleteMessage(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue