diff --git a/commands/devel.js b/commands/devel.js index 4c30acf..bfd2659 100644 --- a/commands/devel.js +++ b/commands/devel.js @@ -14,10 +14,6 @@ module.exports = { data: new SlashCommandBuilder() .setName('devel') .setDescription('Admin command.') - .addSubcommand(subcommand => - subcommand - .setName('dbclearnonguildmembers') - .setDescription('Clears the database of non-guild members.')) .addSubcommand(subcommand => subcommand .setName('reload') @@ -34,10 +30,6 @@ module.exports = { option .setName('count') .setDescription('Count of messages to purge reactions from.'))) - .addSubcommand(subcommand => - subcommand - .setName('updatemutedrolepermissions') - .setDescription('Update the permissions of the muted role.')) .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) .setDMPermission(false), @@ -49,32 +41,6 @@ module.exports = { const guild = interaction.guild; const embedColor = Number(color.replace("#", "0x")); - if (subcommand === 'dbclearnonguildmembers') { - - await interaction.deferReply({ ephemeral: true }) - - if (user.id !== dev) { - interaction.editReply({ content: 'Due to you not screwing something up this command is restricted to only ' + userMentioned, ephemeral: true }) - return - } - - const slothPixel = "https://api.slothpixel.me/api/guilds/" - const verifiedUsers = await verify.find() - - verifiedUsers.forEach(async (user) => { - - const userGuild = await fetch(slothPixel + user.uuid); - - if (userGuild.data.id !== hypixelGuildID) { - await verify.deleteOne({ uuid: user.uuid }) - } - - }) - - interaction.editReply({ content: 'Done!', ephemeral: true }) - - } - if (subcommand === 'reload') { const { exec } = require('child_process'); @@ -137,45 +103,5 @@ module.exports = { await interaction.editReply(`Purged reactions from ${count} message(s).`) } - - if (subcommand === 'updatemutedrolepermissions') { - - await interaction.reply({ content: 'In development', ephemeral: true }) - return - - await interaction.deferReply({ ephemeral: true }) - - const guild = interaction.guild; - const voiceChannels = guild.channels.cache.filter(channel => channel.type === ChannelType.GuildVoice); - const textChannels = guild.channels.cache.filter(channel => channel.type === ChannelType.GuildText); - const mutedRole = guild.roles.cache.get(muted); - - // for (const channel of voiceChannels) { - // await channel[1].permissionOverwrites.create(mutedRole, [ - // { - // id: mutedRole, - // deny: [PermissionFlagsBits.Speak, PermissionFlagsBits.SendMessages] - // }, - // { - // id: guild.roles.everyone, - // deny: [PermissionFlagsBits.Connect, PermissionFlagsBits.ViewChannel] - // }, - // { - // id: "722386801930797056", - // allow: [PermissionFlagsBits.Connect, PermissionFlagsBits.ViewChannel] - // } - // ]) - // } - - const channel = guild.channels.cache.get("1108161929882636380"); - - await channel.permissionOverwrites.edit("961891974472953906", { - 2097152: true, - 2048: true - }) - - await interaction.editReply({ content: 'Updated permissions for voice channels.', ephemeral: true }) - - } } }; \ No newline at end of file