Better finds

This commit is contained in:
Noah committed 2021-11-21 18:42:18 -06:00
1 parent 02394e310d
commit 7eb949f109
7 files changed
+98 -126

No files matched your search

+12 -13
View File
@@ -32,19 +32,18 @@ module.exports = new Command({
permission: "SEND_MESSAGES",
async run(interaction) {
let SupportStaff =
interaction.guild.roles.cache.find(
(SupportTeam) => SupportTeam.name === supportbot.Staff
) ||
interaction.guild.roles.cache.find(
(SupportTeam) => SupportTeam.id === supportbot.Staff
);
let Admins =
interaction.guild.roles.cache.find(
(AdminUser) => AdminUser.name === supportbot.Admin
) ||
interaction.guild.roles.cache.find(
(AdminUser) => AdminUser.id === supportbot.Admin
let SupportStaff = interaction.guild.roles.cache.find(
(SupportTeam) =>
SupportTeam.name == supportbot.Staff ||
SupportTeam.id == supportbot.Staff
);
let Admins = interaction.guild.roles.cache.find(
(AdminUser) =>
AdminUser.name == supportbot.Admin || AdminUser.id == supportbot.Admin
);
if (!SupportStaff || !Admins)
return interaction.reply(
"Some roles seem to be missing!\nPlease check for errors when starting the bot."
);
const NoPerms = new Discord.MessageEmbed()