bot admin
This commit is contained in:
3 files changed
+118
-15
No files matched your search
@@ -68,6 +68,13 @@ module.exports = {
|
||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||
}
|
||||
|
||||
const permissions = bitfieldCalculator.permissions(interaction.member.permissions);
|
||||
let canUseCommand = false;
|
||||
|
||||
if (permissions.includes("MANAGE_GUILD")) canUseCommand = true;
|
||||
if (client.exists(GuildDB.botAdmin) && interaction.member.roles.includes(GuildDB.botAdmin)) canUseCommand = true;
|
||||
if (!canUseCommand) return interaction.send('You don\'t have the permissions to use this command.');
|
||||
|
||||
let targetUserID = args[0].options[0].value.replace('<@!', '').replace('>', '');
|
||||
let banking = await client.dbo.collection("banks").findOne({"account.userID": targetUserID}).then(banking => banking);
|
||||
|
||||
|
||||
Reference in new issue
Block a user