use onlyOfficersSearch config
This commit is contained in:
1 file changed
+4
@@ -40,6 +40,10 @@ module.exports = {
|
|||||||
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
return interaction.send({ content: `You are not allowed to use the bot in this channel.` });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GuildDB.onlyOfficersSearch && client.exists(GuildDB.officerRole) && !interaction.member.roles.includes(GuildDB.officerRole)) {
|
||||||
|
return interaction.send({ content: 'You don\'t have the permissions to use this command.' });
|
||||||
|
}
|
||||||
|
|
||||||
let targetUserID = args[0].value.replace('<@!', '').replace('>', '');
|
let targetUserID = args[0].value.replace('<@!', '').replace('>', '');
|
||||||
let targetUserInventory = await client.dbo.collection("inventories").findOne({"inventory.userID":targetUserID}).then(inventory => inventory);
|
let targetUserInventory = await client.dbo.collection("inventories").findOne({"inventory.userID":targetUserID}).then(inventory => inventory);
|
||||||
let inventory;
|
let inventory;
|
||||||
|
|||||||
Reference in new issue
Block a user