mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-04 01:50:08 +00:00
Added message.edit(content)
This commit is contained in:
@@ -60,6 +60,18 @@ class RESTMethods{
|
||||
.catch(reject);
|
||||
});
|
||||
}
|
||||
|
||||
UpdateMessage(message, content) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.rest.makeRequest('patch', Constants.Endpoints.CHANNEL_MESSAGE(message.channel.id, message.id), true, {
|
||||
content,
|
||||
})
|
||||
.then(data => {
|
||||
resolve(this.rest.client.actions.MessageUpdate.handle(data).updated);
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = RESTMethods;
|
||||
|
||||
Reference in New Issue
Block a user