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

+11 -14
View File
@@ -25,21 +25,18 @@ module.exports = new Command({
permission: "SEND_MESSAGES",
async run(interaction) {
let SupportStaff =
interaction.guild.roles.cache.find(
(adminRole) => adminRole.name === supportbot.Staff
) ||
interaction.guild.roles.cache.find(
(staffRole) => staffRole.id === supportbot.Staff
let SupportStaff = interaction.guild.roles.cache.find(
(adminRole) =>
adminRole.name === supportbot.Staff || staffRole.id === supportbot.Staff
);
let AdminStaff = interaction.guild.roles.cache.find(
(adminRole) =>
adminRole.name === supportbot.Admin || adminRole.id === supportbot.Admin
);
if (!SupportStaff || !Admins)
return interaction.reply(
"Some roles seem to be missing!\nPlease check for errors when starting the bot."
);
let AdminStaff =
interaction.guild.roles.cache.find(
(adminRole) => adminRole.name === supportbot.Admin
) ||
interaction.guild.roles.cache.find(
(adminRole) => adminRole.id === supportbot.Admin
);
let botCommands = "";
botCommands += `**/${cmdconfig.HelpCommand}** ${cmdconfig.HelpCommandDesc}\n`;
botCommands += `**/${cmdconfig.InfoCommand}** ${cmdconfig.InfoCommandDesc}\n`;