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
@@ -18,6 +18,9 @@ module.exports = {
|
||||
* @param {*} param3
|
||||
*/
|
||||
run: async (client, message, args, { GuildDB }) => {
|
||||
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");
|
||||
|
||||
if (GuildDB.customRoleStatus) {
|
||||
let userRoles = []; // TODO: get user roles
|
||||
let hasRole = await client.hasRole(userRoles, GuildDB.serverID);
|
||||
@@ -144,6 +147,10 @@ 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.`);
|
||||
let data;
|
||||
|
||||
Reference in new issue
Block a user