mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
Simplified client.rest.methods.DeleteMessage, now only takes a message instead of a channel and a message.
This commit is contained in:
@@ -48,9 +48,9 @@ class RESTMethods{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteMessage(channel, message) {
|
DeleteMessage(message) {
|
||||||
return new Promise((resolve, reject) => {
|
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 => {
|
.then(data => {
|
||||||
resolve(this.rest.client.actions.MessageDelete.handle({
|
resolve(this.rest.client.actions.MessageDelete.handle({
|
||||||
id: message.id,
|
id: message.id,
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
delete() {
|
delete() {
|
||||||
return this.client.rest.methods.DeleteMessage(this.channel, this);
|
return this.client.rest.methods.DeleteMessage(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user