mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Beautify code style
This commit is contained in:
@@ -849,9 +849,7 @@ var InternalClient = (function () {
|
||||
|
||||
InternalClient.prototype.deleteMessages = function deleteMessages(_messages) {
|
||||
if (!_messages instanceof Array) return Promise.reject(new Error("Messages provided must be in an array"));
|
||||
if (_messages.length < 1) return Promise.reject(new Error("You must provide at least one message to delete"));else if (_messages.length === 1) {
|
||||
return this.deleteMessage(_messages[0]);
|
||||
}
|
||||
if (_messages.length < 1) return Promise.reject(new Error("You must provide at least one message to delete"));else if (_messages.length === 1) return this.deleteMessage(_messages[0]);
|
||||
|
||||
var messages = [];
|
||||
var channel;
|
||||
@@ -871,10 +869,7 @@ var InternalClient = (function () {
|
||||
|
||||
var message = this.resolver.resolveMessage(_message);
|
||||
if (!message) return Promise.reject(new Error("Something other than a message could not be resolved in the array..."));
|
||||
|
||||
if (!message.server) {
|
||||
return Promise.reject(new Error("You can only bulk delete messages on guild channels"));
|
||||
}
|
||||
if (!message.server) return Promise.reject(new Error("You can only bulk delete messages on guild channels"));
|
||||
|
||||
// ensure same channel
|
||||
if (!channel) {
|
||||
|
||||
Reference in New Issue
Block a user