mirror of
https://github.com/danbulant/Shasha
synced 2026-07-08 12:31:15 +00:00
AV HAS BUG???
This commit is contained in:
parent
2e28c90c9e
commit
9734ba8f23
1 changed files with 15 additions and 13 deletions
|
|
@ -39,12 +39,14 @@ module.exports = class avatar extends commando.Command {
|
||||||
for (const theAvThis of args) {
|
for (const theAvThis of args) {
|
||||||
let avThis = theAvThis.replace(/(?<!\\)--s +\d+/, "");
|
let avThis = theAvThis.replace(/(?<!\\)--s +\d+/, "");
|
||||||
let uID = cleanMentionID(avThis.trim());
|
let uID = cleanMentionID(avThis.trim());
|
||||||
if (uID.length > 0) {
|
if (uID?.length > 0) {
|
||||||
let ree = [];
|
let ree = [];
|
||||||
if (/^\d{17,19}$/.test(uID)) {
|
if (/^\d{17,19}$/.test(uID)) {
|
||||||
const findmem = msg.guild?.member(uID);
|
const findmem = msg.guild?.member(uID);
|
||||||
if (findmem) ree.push(findmem.user); else this.client.users.fetch(uID).then(fetchUser => ree.push(fetchUser)).catch(() => {});
|
console.log(findmem);
|
||||||
|
if (findmem) ree.push(findmem.user); else await this.client.users.fetch(uID).then(fetchUser => ree.push(fetchUser)).catch(() => { });
|
||||||
} else ree = findMemberRegEx(msg, uID).map(r => r.user);
|
} else ree = findMemberRegEx(msg, uID).map(r => r.user);
|
||||||
|
console.log(ree);
|
||||||
if (ree.length > 0) {
|
if (ree.length > 0) {
|
||||||
const duplicateRes = dupliCheck.findIndex(yes => yes === ree[0].id);
|
const duplicateRes = dupliCheck.findIndex(yes => yes === ree[0].id);
|
||||||
if (duplicateRes !== -1) {
|
if (duplicateRes !== -1) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue