Added message.edit(content)

This commit is contained in:
hydrabolt
2016-04-24 17:30:58 +01:00
parent 618d8bb957
commit e9d7dfaee3
7 changed files with 88 additions and 10 deletions

View File

@@ -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;