Convert spaces to tabs

This commit is contained in:
SileNce5k 2021-04-21 18:36:52 +02:00
parent 4576eec78a
commit db04c07c60
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
17 changed files with 327 additions and 327 deletions

View file

@ -1,35 +1,35 @@
module.exports = function (text, guild) {
let id = "";
let ismention = false;
if (
text.substring(0, 2) == "<@" &&
text.substring(text.length - 1, text.length) == ">"
) {
let start = 2;
if (text.substring(0, 3) == "<@!") start = 3;
id = text.substring(start, text.length - 1);
ismention = true;
} else {
if (!isNaN(text)) {
id = text;
}
}
if (!ismention) {
guild.members.cache.each(function (guildMember, guildMemberID) {
let compare = text.toLowerCase();
if (guildMember.user.username.toLowerCase().includes(compare)) {
id = guildMemberID;
return;
}
if (guildMember.nickname) {
if (guildMember.nickname.toLowerCase().includes(compare)) {
id = guildMemberID;
return;
}
}
});
}
return id;
let id = "";
let ismention = false;
if (
text.substring(0, 2) == "<@" &&
text.substring(text.length - 1, text.length) == ">"
) {
let start = 2;
if (text.substring(0, 3) == "<@!") start = 3;
id = text.substring(start, text.length - 1);
ismention = true;
} else {
if (!isNaN(text)) {
id = text;
}
}
if (!ismention) {
guild.members.cache.each(function (guildMember, guildMemberID) {
let compare = text.toLowerCase();
if (guildMember.user.username.toLowerCase().includes(compare)) {
id = guildMemberID;
return;
}
if (guildMember.nickname) {
if (guildMember.nickname.toLowerCase().includes(compare)) {
id = guildMemberID;
return;
}
}
});
}
return id;
}