update/verify user has role
This commit is contained in:
1 parent
e1c599d3c6
commit
8d5584d097
10 files changed
+74
-849
No files matched your search
@@ -17,6 +17,9 @@ module.exports = {
|
||||
* @param {*} param3
|
||||
*/
|
||||
run: async (client, message) => {
|
||||
let useCommand = await client.verifyUseCommand(GuildDB.serverID, message.member.roles.cache, false);
|
||||
if (!useCommand) return message.channel.send("You don't have permission to use this command");
|
||||
|
||||
let user = await client.dbo.collection("users").findOne({"user.discord.id":message.author.id}).then(user => user);
|
||||
if (!user) return message.channel.send(`You are not logged in.`);
|
||||
if (user.user.activeCommunity==null) return message.channel.send(`You must join a community to use this command.`);
|
||||
@@ -72,6 +75,9 @@ module.exports = {
|
||||
if (GuildDB.customChannelStatus==true&&!GuildDB.allowedChannels.includes(interaction.channel_id)) {
|
||||
return interaction.send(`You are not allowed to use the bot in this channel.`);
|
||||
}
|
||||
|
||||
let useCommand = await client.verifyUseCommand(GuildDB.serverID, interaction.member.roles, true);
|
||||
if (!useCommand) return interaction.send("You don't have permission to use this command");
|
||||
|
||||
let user = await client.dbo.collection("users").findOne({"user.discord.id":interaction.member.user.id}).then(user => user);
|
||||
if (!user) return interaction.send(`You are not logged in.`);
|
||||
|
||||
Reference in new issue
Block a user