diff --git a/commands/Administration/automod.js b/commands/Administration/automod.js index b8fa37ca..8e2ad2c5 100644 --- a/commands/Administration/automod.js +++ b/commands/Administration/automod.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, PermissionFlagsBits, ChannelType } = require("discord.js"); +const { SlashCommandBuilder, PermissionsBitField, ChannelType } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Automod extends BaseCommand { @@ -16,7 +16,7 @@ class Automod extends BaseCommand { "ru": client.translate("administration/automod:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageGuild) .addBooleanOption(option => option.setName("state") .setDescription(client.translate("common:STATE")) .setDescriptionLocalizations({ diff --git a/commands/Administration/autorole.js b/commands/Administration/autorole.js index 44a62b0b..b59b40c2 100644 --- a/commands/Administration/autorole.js +++ b/commands/Administration/autorole.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Autorole extends BaseCommand { @@ -16,7 +16,7 @@ class Autorole extends BaseCommand { "ru": client.translate("administration/autorole:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageGuild) .addBooleanOption(option => option.setName("state") .setDescription(client.translate("common:STATE")) .setDescriptionLocalizations({ diff --git a/commands/Administration/config.js b/commands/Administration/config.js index 8179275b..46851c2e 100644 --- a/commands/Administration/config.js +++ b/commands/Administration/config.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, EmbedBuilder, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Config extends BaseCommand { @@ -16,7 +16,7 @@ class Config extends BaseCommand { "ru": client.translate("administration/config:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageGuild) .addSubcommand(subcommand => subcommand.setName("list") .setDescription(client.translate("administration/config:LIST")) .setDescriptionLocalizations({ diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index 5f33db22..785a0365 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Goodbye extends BaseCommand { @@ -16,7 +16,7 @@ class Goodbye extends BaseCommand { "ru": client.translate("administration/goodbye:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageGuild) .addSubcommand(subcommand => subcommand.setName("test") .setDescription(client.translate("administration/goodbye:TEST")) .setDescriptionLocalizations({ diff --git a/commands/Administration/selectroles.js b/commands/Administration/selectroles.js index a7a7c0a3..d9047c94 100644 --- a/commands/Administration/selectroles.js +++ b/commands/Administration/selectroles.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, PermissionFlagsBits, ActionRowBuilder, StringSelectMenuBuilder } = require("discord.js"); +const { SlashCommandBuilder, PermissionsBitField, ActionRowBuilder, StringSelectMenuBuilder } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Selectroles extends BaseCommand { @@ -16,7 +16,7 @@ class Selectroles extends BaseCommand { "ru": client.translate("administration/selectroles:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageGuild) .addSubcommand(subcommand => subcommand.setName("message") .setDescription(client.translate("administration/selectroles:MESSAGE")) .setDescriptionLocalizations({ diff --git a/commands/Administration/set.js b/commands/Administration/set.js index aaca9346..89a90d2c 100644 --- a/commands/Administration/set.js +++ b/commands/Administration/set.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Set extends BaseCommand { @@ -16,7 +16,7 @@ class Set extends BaseCommand { "ru": client.translate("administration/set:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageGuild) .addStringOption(option => option.setName("type") .setDescription(client.translate("owner/debug:TYPE")) .setDescriptionLocalizations({ diff --git a/commands/Administration/setlang.js b/commands/Administration/setlang.js index 2c237ccc..e6c99215 100644 --- a/commands/Administration/setlang.js +++ b/commands/Administration/setlang.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Setlang extends BaseCommand { @@ -16,7 +16,7 @@ class Setlang extends BaseCommand { "ru": client.translate("administration/setlang:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageGuild) .addStringOption(option => option.setName("language") .setDescription(client.translate("common:LANGUAGE")) .setDescriptionLocalizations({ diff --git a/commands/Administration/stealemoji.js b/commands/Administration/stealemoji.js index 6df513d3..750c51a6 100644 --- a/commands/Administration/stealemoji.js +++ b/commands/Administration/stealemoji.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, parseEmoji, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, parseEmoji, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Stealemoji extends BaseCommand { @@ -16,7 +16,7 @@ class Stealemoji extends BaseCommand { "ru": client.translate("administration/stealemoji:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageGuild) .addStringOption(option => option.setName("emoji") .setDescription(client.translate("common:EMOJI")) .setDescriptionLocalizations({ diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index c1104baf..aab9115e 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Welcome extends BaseCommand { @@ -16,7 +16,7 @@ class Welcome extends BaseCommand { "ru": client.translate("administration/welcome:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageGuild) .addSubcommand(subcommand => subcommand.setName("test") .setDescription(client.translate("administration/goodbye:TEST")) .setDescriptionLocalizations({ diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index 445469fb..6114c237 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Clear extends BaseCommand { @@ -16,7 +16,7 @@ class Clear extends BaseCommand { "ru": client.translate("moderation/clear:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageMessages) .addStringOption(option => option.setName("option") .setDescription(client.translate("moderation/clear:OPTION")) .setDescriptionLocalizations({ diff --git a/commands/Moderation/clearwarns.js b/commands/Moderation/clearwarns.js index cd22f432..58fa7a34 100644 --- a/commands/Moderation/clearwarns.js +++ b/commands/Moderation/clearwarns.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Clearwarns extends BaseCommand { @@ -16,7 +16,7 @@ class Clearwarns extends BaseCommand { "ru": client.translate("moderation/clearwarns:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageMessages) .addUserOption(option => option.setName("user") .setDescription(client.translate("common:USER")) .setDescriptionLocalizations({ diff --git a/commands/Moderation/giveaway.js b/commands/Moderation/giveaway.js index 27e90f85..08513c47 100644 --- a/commands/Moderation/giveaway.js +++ b/commands/Moderation/giveaway.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"), ms = require("ms"); @@ -17,7 +17,7 @@ class Giveaway extends BaseCommand { "ru": client.translate("moderation/giveaway:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageMessages) .addSubcommand(subcommand => subcommand.setName("create") .setDescription(client.translate("moderation/giveaway:CREATE")) .setDescriptionLocalizations({ diff --git a/commands/Moderation/poll.js b/commands/Moderation/poll.js index e1662c14..ffa94a1e 100644 --- a/commands/Moderation/poll.js +++ b/commands/Moderation/poll.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Poll extends BaseCommand { @@ -16,7 +16,7 @@ class Poll extends BaseCommand { "ru": client.translate("moderation/poll:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageMessages) .addStringOption(option => option.setName("question") .setDescription(client.translate("moderation/poll:QUESTION")) .setDescriptionLocalizations({ diff --git a/commands/Moderation/unban.js b/commands/Moderation/unban.js index 315fa04f..77d3631d 100644 --- a/commands/Moderation/unban.js +++ b/commands/Moderation/unban.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, PermissionFlagsBits } = require("discord.js"); +const { SlashCommandBuilder, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Unban extends BaseCommand { @@ -16,7 +16,7 @@ class Unban extends BaseCommand { "ru": client.translate("moderation/unban:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageMessages) .addStringOption(option => option.setName("user_id") .setDescription(client.translate("common:USER_ID")) .setDescriptionLocalizations({ diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index 0e1ee31a..f800d1f0 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -1,4 +1,4 @@ -const { ContextMenuCommandBuilder, ModalBuilder, EmbedBuilder, ActionRowBuilder, TextInputBuilder, ApplicationCommandType, PermissionFlagsBits, TextInputStyle } = require("discord.js"); +const { ContextMenuCommandBuilder, ModalBuilder, EmbedBuilder, ActionRowBuilder, TextInputBuilder, ApplicationCommandType, PermissionsBitField, TextInputStyle } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Warn extends BaseCommand { @@ -12,7 +12,7 @@ class Warn extends BaseCommand { .setName("warn") .setType(ApplicationCommandType.User) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages), + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageMessages), aliases: [], dirname: __dirname, ownerOnly: false, diff --git a/commands/Moderation/warns.js b/commands/Moderation/warns.js index fa6ae2ab..bec76b79 100644 --- a/commands/Moderation/warns.js +++ b/commands/Moderation/warns.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder } = require("discord.js"); +const { SlashCommandBuilder, PermissionsBitField, EmbedBuilder } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Warns extends BaseCommand { @@ -16,7 +16,7 @@ class Warns extends BaseCommand { "ru": client.translate("moderation/warns:DESCRIPTION", null, "ru-RU"), }) .setDMPermission(false) - .setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages) + .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageMessages) .addUserOption(option => option.setName("user") .setDescription(client.translate("common:USER")) .setDescriptionLocalizations({