mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
fix permissions
This commit is contained in:
parent
ac641f9c28
commit
2ab201e1c1
16 changed files with 32 additions and 32 deletions
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue