mirror of
https://github.com/ION606/selmerBot.git
synced 2026-05-15 05:36:54 +00:00
Updated the way the verification system works and added custom admin role integration
This commit is contained in:
@@ -8,24 +8,26 @@ module.exports = {
|
||||
const arg = interaction.options.data[0];
|
||||
const guild = bot.guilds.cache.get(interaction.guildId);
|
||||
|
||||
if (!checkRole(bot, guild, interaction.user.id)) { return interaction.reply('Insufficient Permissions!'); }
|
||||
checkRole(bot, guild, interaction.user.id).then((isAllowed) => {
|
||||
if (isAllowed) { return interaction.reply('Insufficient Permissions!'); }
|
||||
|
||||
var channel;
|
||||
if (arg) {
|
||||
channel = arg.channel;
|
||||
} else {
|
||||
channel = interaction.channel;
|
||||
}
|
||||
var channel;
|
||||
if (arg) {
|
||||
channel = arg.channel;
|
||||
} else {
|
||||
channel = interaction.channel;
|
||||
}
|
||||
|
||||
let role = interaction.guild.roles.cache.find(r => r.name === "@everyone");
|
||||
channel.permissionOverwrites.edit(role.id, {
|
||||
VIEW_CHANNEL: true,
|
||||
SEND_MESSAGES: false,
|
||||
READ_MESSAGE_HISTORY: true,
|
||||
ATTACH_FILES: false
|
||||
let role = interaction.guild.roles.cache.find(r => r.name === "@everyone");
|
||||
channel.permissionOverwrites.edit(role.id, {
|
||||
VIEW_CHANNEL: true,
|
||||
SEND_MESSAGES: false,
|
||||
READ_MESSAGE_HISTORY: true,
|
||||
ATTACH_FILES: false
|
||||
});
|
||||
|
||||
interaction.reply(`${channel} has been locked!`);
|
||||
});
|
||||
|
||||
interaction.reply(`${channel} has been locked!`);
|
||||
},
|
||||
options: [{name: 'channel', description: 'The channel to lock (defaults to current channel)', type: Constants.ApplicationCommandOptionTypes.CHANNEL, required: false}]
|
||||
}
|
||||
Reference in New Issue
Block a user