mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
committed by
abalabahaha
parent
d73ebcdfd4
commit
71db8555fe
@@ -408,6 +408,22 @@ var Client = (function (_EventEmitter) {
|
||||
return this.internal.deleteMessage(message, options).then(dataCallback(callback), errorCallback(callback));
|
||||
};
|
||||
|
||||
/**
|
||||
* Bulk deletes messages (if the client has permission to)
|
||||
* @param {Array<MessageResolvable>} message the message to delete
|
||||
* @param {function(err: Error)} [callback] callback to the method
|
||||
* @returns {Promise<null, Error>} Resolves with null if the deletion was successful, otherwise rejects with an Error.
|
||||
* @example
|
||||
* // deleting messages
|
||||
* client.deleteMessages([message1, message2]);
|
||||
*/
|
||||
|
||||
Client.prototype.deleteMessages = function deleteMessages(messages) {
|
||||
var callback = arguments.length <= 1 || arguments[1] === undefined ? function () /*err, {}*/{} : arguments[1];
|
||||
|
||||
return this.internal.deleteMessages(messages).then(dataCallback(callback), errorCallback(callback));
|
||||
};
|
||||
|
||||
/**
|
||||
* Edits a previously sent message (if the client has permission to)
|
||||
* @param {MessageResolvable} message the message to edit
|
||||
|
||||
Reference in New Issue
Block a user