refactor(Message): remove options for Message#delete (#4999)

This commit is contained in:
Jan
2020-12-14 13:52:04 +01:00
committed by GitHub
parent 41078997ae
commit 75e6dfbfd3
3 changed files with 9 additions and 22 deletions

View File

@@ -116,14 +116,13 @@ class MessageManager extends BaseManager {
/**
* Deletes a message, even if it's not cached.
* @param {MessageResolvable} message The message to delete
* @param {string} [reason] Reason for deleting this message, if it does not belong to the client user
* @returns {Promise<void>}
*/
async delete(message, reason) {
async delete(message) {
message = this.resolveID(message);
if (!message) throw new TypeError('INVALID_TYPE', 'message', 'MessageResolvable');
await this.client.api.channels(this.channel.id).messages(message).delete({ reason });
await this.client.api.channels(this.channel.id).messages(message).delete();
}
async _fetchId(messageID, cache, force) {