mirror of
https://github.com/danbulant/Shasha
synced 2026-05-24 12:22:00 +00:00
bug fix
This commit is contained in:
parent
996d0775a1
commit
07882ee2c8
1 changed files with 6 additions and 15 deletions
|
|
@ -25,7 +25,7 @@ module.exports = class avatar extends commando.Command {
|
|||
errLog(docErr, msg, this.client);
|
||||
}
|
||||
const footerQuote = r?.["settings"]?.defaultEmbed?.footerQuote;
|
||||
const withPerm = arg.trim().split(/,+/);
|
||||
const args = arg.trim().split(/,+/);
|
||||
const option = arg.trim().split(/(\-\-)+/);
|
||||
let user, avatar, member, show;
|
||||
let [allEmb, multipleMemMes, dupliCheck] = [[], [], []];
|
||||
|
|
@ -33,14 +33,10 @@ module.exports = class avatar extends commando.Command {
|
|||
user = msg.guild ? msg.guild.member(msg.author) : msg.author;
|
||||
avatar = msg.author.displayAvatarURL({size:4096,dynamic:true});
|
||||
}
|
||||
let args;
|
||||
if (!msg.guild || msg.guild.member(msg.author).hasPermission("MANAGE_MESSAGES")) {
|
||||
args = withPerm;
|
||||
} else {
|
||||
if (withPerm.length < 2) {
|
||||
args = withPerm;
|
||||
} else {
|
||||
args = withPerm[0];
|
||||
let onceOnly = false;
|
||||
if (msg.guild && !msg.guild.member(msg.author).hasPermission("MANAGE_MESSAGES")) {
|
||||
onceOnly = true;
|
||||
if (args.length > 1) {
|
||||
trySend(this.client, msg, "Manage messages permission required to show two or more avatar at once!");
|
||||
}
|
||||
}
|
||||
|
|
@ -54,15 +50,10 @@ module.exports = class avatar extends commando.Command {
|
|||
}
|
||||
}
|
||||
if (arg) {
|
||||
let onceOnly = false;
|
||||
for(const theAvThis of args) {
|
||||
let avThis = theAvThis.replace(/\-\-show *\d*/i, "");
|
||||
if (avThis.length === 1) {
|
||||
avThis = args.replace(/\-\-show *\d*/i, "");
|
||||
onceOnly = true;
|
||||
if (avThis.length === 1) {
|
||||
return trySend(this.client, msg, "One character for searching member isn't allowed <:catstareLife:794930503076675584>");
|
||||
}
|
||||
return trySend(this.client, msg, "One character for searching member isn't allowed <:catstareLife:794930503076675584>");
|
||||
}
|
||||
let uID = cleanMentionID(avThis.trim());
|
||||
if (uID.length > 1) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue