Transitioned all Misc, audio, Selmer Specific, admin, anime/manga, and inventory commands to Slash Command format. The RSS and reactionrole commands are still broken and all game commands are still in message format due to compications

This commit is contained in:
ION606
2022-09-27 16:45:50 -04:00
parent a190a250a6
commit e1002d748d
45 changed files with 1951 additions and 1058 deletions
+32 -14
View File
@@ -1,18 +1,36 @@
module.exports = {
name: 'serverLock',
description: 'Lock ***ALL CHANNELS*** for everyone with the "everyone" role - ***SERVER OWNER ONLY. FOR EMERGENCY USE ONLY***',
execute(message, args, Discord, Client, bot) {
const guild = bot.guilds.cache.get(message.guild.id);
name: 'serverlock',
description: 'Lock ALL CHANNELS for everyone with the "everyone" role - SERVER OWNER ONLY!',
execute(interaction, Discord, Client, bot) {
if (interaction.guild.ownerId != interaction.user.id) { return interaction.reply('Insufficient Permissions!'); }
if (guild.ownerId != message.author.id) { return message.reply('Insufficient Permissions!'); }
const role = interaction.guild.roles.cache.find(r => r.name === "@everyone");
const arr = [];
message.guild.channels.cache.forEach(ch => {
channel.permissionOverwrites.edit(message.guild.roles.everyone.id, {
VIEW_CHANNEL: false,
SEND_MESSAGES: false,
READ_MESSAGE_HISTORY: false,
ATTACH_FILES: false
});
interaction.guild.channels.cache.forEach(channel => {
if (channel.permissionsFor(role).has("SEND_MESSAGES")) {
channel.permissionOverwrites.edit(role.id, {
VIEW_CHANNEL: true,
SEND_MESSAGES: false,
READ_MESSAGE_HISTORY: true,
ATTACH_FILES: false
});
//Maybe add the message to the array to be edited/deleted after unlock
if (channel.type == 'GUILD_TEXT') {
channel.send(`***CHANNEL LOCKED BY ${interaction.user}***`);
}
arr.push(channel.id);
}
});
}
}
bot.lockedChannels.set(interaction.guildId, arr);
interaction.reply(`***SERVER LOCKED BY ${interaction.user}***`);
}, options: []
}
// interaction.reply(```diff
// - SERVER LOCKED
// ```);