This commit is contained in:
JonnyBro 2022-10-13 00:05:36 +05:00
parent ba19dd7ca0
commit 7bccb1fe4d
80 changed files with 133 additions and 109 deletions

View file

@ -16,7 +16,6 @@ class Seek extends BaseCommand {
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,10 +11,6 @@ class BaseCommand {
* @type {Array<String>}
*/
this.aliases = options.aliases || [];
/**
* @type {Boolean}
*/
this.guildOnly = (options.guildOnly === true ? true : false) || false;
/**
* @type {Boolean}
*/

View file

@ -11,6 +11,7 @@ class Automod extends BaseCommand {
command: new SlashCommandBuilder()
.setName("automod")
.setDescription(client.translate("administration/automod:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addBooleanOption(option => option.setName("state")
.setDescription(client.translate("common:STATE"))
@ -20,7 +21,7 @@ class Automod extends BaseCommand {
.addChannelTypes(ChannelType.GuildText)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,6 +11,7 @@ class Autorole extends BaseCommand {
command: new SlashCommandBuilder()
.setName("autorole")
.setDescription(client.translate("administration/autorole:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addBooleanOption(option => option.setName("state")
.setDescription(client.translate("common:STATE"))
@ -19,7 +20,7 @@ class Autorole extends BaseCommand {
.setDescription(client.translate("common:ROLE"))),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,10 +11,11 @@ class Config extends BaseCommand {
command: new SlashCommandBuilder()
.setName("config")
.setDescription(client.translate("administration/config:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,6 +11,7 @@ class Goodbye extends BaseCommand {
command: new SlashCommandBuilder()
.setName("goodbye")
.setDescription(client.translate("administration/goodbye:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addSubcommand(subcommand => subcommand.setName("test")
.setDescription(client.translate("administration/goodbye:TEST"))
@ -29,7 +30,7 @@ class Goodbye extends BaseCommand {
),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,6 +11,7 @@ class Set extends BaseCommand {
command: new SlashCommandBuilder()
.setName("set")
.setDescription(client.translate("administration/set:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addStringOption(option => option.setName("type")
.setDescription(client.translate("owner/debug:TYPE"))
@ -29,7 +30,6 @@ class Set extends BaseCommand {
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,6 +11,7 @@ class Setbirthdays extends BaseCommand {
command: new SlashCommandBuilder()
.setName("setbirthdays")
.setDescription(client.translate("administration/setbirthdays:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addBooleanOption(option => option.setName("state")
.setDescription(client.translate("common:STATE"))
@ -20,7 +21,7 @@ class Setbirthdays extends BaseCommand {
.addChannelTypes(ChannelType.GuildText)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,6 +11,7 @@ class Setlang extends BaseCommand {
command: new SlashCommandBuilder()
.setName("setlang")
.setDescription(client.translate("administration/setlang:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addStringOption(option => option.setName("language")
.setDescription(client.translate("common:LANGUAGE"))
@ -21,7 +22,7 @@ class Setlang extends BaseCommand {
)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,6 +11,7 @@ class Setmodlogs extends BaseCommand {
command: new SlashCommandBuilder()
.setName("setmodlogs")
.setDescription(client.translate("administration/setmodlogs:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addBooleanOption(option => option.setName("state")
.setDescription(client.translate("common:STATE"))
@ -20,7 +21,7 @@ class Setmodlogs extends BaseCommand {
.addChannelTypes(ChannelType.GuildText)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,6 +11,7 @@ class Setnews extends BaseCommand {
command: new SlashCommandBuilder()
.setName("setnews")
.setDescription(client.translate("administration/setnews:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addBooleanOption(option => option.setName("state")
.setDescription(client.translate("common:STATE"))
@ -20,7 +21,7 @@ class Setnews extends BaseCommand {
.addChannelTypes(ChannelType.GuildText)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,6 +11,7 @@ class Setreports extends BaseCommand {
command: new SlashCommandBuilder()
.setName("setreports")
.setDescription(client.translate("administration/setreports:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addBooleanOption(option => option.setName("state")
.setDescription(client.translate("common:STATE"))
@ -20,7 +21,7 @@ class Setreports extends BaseCommand {
.addChannelTypes(ChannelType.GuildText)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,6 +11,7 @@ class Setsuggests extends BaseCommand {
command: new SlashCommandBuilder()
.setName("setsuggests")
.setDescription(client.translate("administration/setsuggests:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addBooleanOption(option => option.setName("state")
.setDescription(client.translate("common:STATE"))
@ -20,7 +21,7 @@ class Setsuggests extends BaseCommand {
.addChannelTypes(ChannelType.GuildText)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,13 +11,14 @@ class Stealemoji extends BaseCommand {
command: new SlashCommandBuilder()
.setName("stealemoji")
.setDescription(client.translate("administration/stealemoji:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addStringOption(option => option.setName("emoji")
.setDescription(client.translate("common:EMOJI"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,6 +11,7 @@ class Welcome extends BaseCommand {
command: new SlashCommandBuilder()
.setName("welcome")
.setDescription(client.translate("administration/welcome:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild)
.addSubcommand(subcommand => subcommand.setName("test")
.setDescription(client.translate("administration/goodbye:TEST"))
@ -29,7 +30,7 @@ class Welcome extends BaseCommand {
),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,11 +11,11 @@ class Achievements extends BaseCommand {
command: new SlashCommandBuilder()
.setName("achievements")
.setDescription(client.translate("economy/achievements:DESCRIPTION"))
.setDMPermission(false)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,6 +11,7 @@ class Bank extends BaseCommand {
command: new SlashCommandBuilder()
.setName("bank")
.setDescription(client.translate("economy/bank:DESCRIPTION"))
.setDMPermission(false)
.addStringOption(option => option.setName("option")
.setDescription(client.translate("economy/bank:OPTION"))
.setRequired(true)
@ -23,7 +24,6 @@ class Bank extends BaseCommand {
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,6 +11,7 @@ class Birthdate extends BaseCommand {
command: new SlashCommandBuilder()
.setName("birthdate")
.setDescription(client.translate("economy/birthdate:DESCRIPTION"))
.setDMPermission(false)
.addIntegerOption(option => option.setName("day")
.setDescription(client.translate("economy/birthdate:DAY"))
.setRequired(true))
@ -36,7 +37,6 @@ class Birthdate extends BaseCommand {
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -10,10 +10,10 @@ class Divorce extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("divorce")
.setDescription(client.translate("economy/divorce:DESCRIPTION")),
.setDescription(client.translate("economy/divorce:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,10 +11,10 @@ class ImportMee6 extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("importmee6")
.setDescription(client.translate("economy/importmee6:DESCRIPTION")),
.setDescription(client.translate("economy/importmee6:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -19,6 +19,7 @@ class Leaderboard extends BaseCommand {
command: new SlashCommandBuilder()
.setName("leaderboard")
.setDescription(client.translate("economy/leaderboard:DESCRIPTION"))
.setDMPermission(false)
.addStringOption(option => option.setName("type")
.setDescription(client.translate("owner/debug:TYPE"))
.setRequired(true)
@ -29,7 +30,6 @@ class Leaderboard extends BaseCommand {
)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -12,12 +12,12 @@ class Marry extends BaseCommand {
command: new SlashCommandBuilder()
.setName("marry")
.setDescription(client.translate("economy/marry:DESCRIPTION"))
.setDMPermission(false)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -19,11 +19,11 @@ class Money extends BaseCommand {
command: new SlashCommandBuilder()
.setName("money")
.setDescription(client.translate("economy/money:DESCRIPTION"))
.setDMPermission(false)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,10 +11,10 @@ class Number extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("number")
.setDescription(client.translate("economy/number:DESCRIPTION")),
.setDescription(client.translate("economy/number:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,6 +11,7 @@ class Pay extends BaseCommand {
command: new SlashCommandBuilder()
.setName("pay")
.setDescription(client.translate("economy/pay:DESCRIPTION"))
.setDMPermission(false)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))
.setRequired(true))
@ -19,7 +20,6 @@ class Pay extends BaseCommand {
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -19,11 +19,11 @@ class Profile extends BaseCommand {
command: new SlashCommandBuilder()
.setName("profile")
.setDescription(client.translate("economy/profile:DESCRIPTION"))
.setDMPermission(false)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,12 +11,12 @@ class Rep extends BaseCommand {
command: new SlashCommandBuilder()
.setName("rep")
.setDescription(client.translate("economy/rep:DESCRIPTION"))
.setDMPermission(false)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,6 +11,7 @@ class Rob extends BaseCommand {
command: new SlashCommandBuilder()
.setName("rob")
.setDescription(client.translate("economy/rob:DESCRIPTION"))
.setDMPermission(false)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))
.setRequired(true))
@ -19,7 +20,6 @@ class Rob extends BaseCommand {
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,12 +11,12 @@ class Setbio extends BaseCommand {
command: new SlashCommandBuilder()
.setName("setbio")
.setDescription(client.translate("economy/setbio:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("text")
.setDescription(client.translate("economy/profile:BIO"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,12 +11,12 @@ class Slots extends BaseCommand {
command: new SlashCommandBuilder()
.setName("slots")
.setDescription(client.translate("economy/slots:DESCRIPTION"))
.setDMPermission(false)
.addIntegerOption(option => option.setName("amount")
.setDescription(client.translate("common:INT"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -12,12 +12,12 @@ class TicTacToe extends BaseCommand {
command: new SlashCommandBuilder()
.setName("tictactoe")
.setDescription(client.translate("economy/tictactoe:DESCRIPTION"))
.setDMPermission(false)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,11 +11,11 @@ class Transactions extends BaseCommand {
command: new SlashCommandBuilder()
.setName("transactions")
.setDescription(client.translate("economy/transactions:DESCRIPTION"))
.setDMPermission(false)
.addBooleanOption(option => option.setName("clear")
.setDescription(client.translate("economy/transactions:CLEAR"))),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -10,10 +10,10 @@ class Work extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("work")
.setDescription(client.translate("economy/work:DESCRIPTION")),
.setDescription(client.translate("economy/work:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,12 +11,12 @@ class Eightball extends BaseCommand {
command: new SlashCommandBuilder()
.setName("8ball")
.setDescription(client.translate("fun/8ball:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("question")
.setDescription(client.translate("fun/8ball:QUESTION"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,10 +11,10 @@ class Crab extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("crab")
.setDescription(client.translate("fun/crab:DESCRIPTION")),
.setDescription(client.translate("fun/crab:DESCRIPTION"))
.setDMPermission(true),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -12,6 +12,7 @@ class LMGTFY extends BaseCommand {
command: new SlashCommandBuilder()
.setName("lmgtfy")
.setDescription(client.translate("fun/lmgtfy:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("query")
.setDescription(client.translate("fun/lmgtfy:QUERY"))
.setRequired(true))
@ -20,7 +21,6 @@ class LMGTFY extends BaseCommand {
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -12,6 +12,7 @@ class Lovecalc extends BaseCommand {
command: new SlashCommandBuilder()
.setName("lovecalc")
.setDescription(client.translate("fun/lovecalc:DESCRIPTION"))
.setDMPermission(false)
.addUserOption(option =>
option.setName("first_member")
.setDescription(client.translate("common:USER"))
@ -21,7 +22,6 @@ class Lovecalc extends BaseCommand {
.setDescription(client.translate("common:USER"))),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,10 +11,10 @@ class Memes extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("memes")
.setDescription(client.translate("fun/memes:DESCRIPTION")),
.setDescription(client.translate("fun/memes:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}
@ -49,13 +49,14 @@ class Memes extends BaseCommand {
.addOptions(tags)
);
await interaction.editReply({
const msg = await interaction.editReply({
content: interaction.translate("common:AVAILABLE_OPTIONS"),
fetchReply: true,
components: [row]
});
const filter = i => i.user.id === interaction.user.id;
const collector = interaction.channel.createMessageComponentCollector({ filter, idle: (2 * 60 * 1000) });
const collector = msg.createMessageComponentCollector({ filter, idle: (2 * 60 * 1000) });
collector.on("collect", async i => {
if (i.isSelectMenu() && i.customId === "memes_select") {

View file

@ -11,10 +11,10 @@ class Activity extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("activity")
.setDescription(client.translate("general/activity:DESCRIPTION")),
.setDescription(client.translate("general/activity:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,12 +11,12 @@ class Afk extends BaseCommand {
command: new SlashCommandBuilder()
.setName("afk")
.setDescription(client.translate("general/afk:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("message")
.setDescription(client.translate("common:MESSAGE"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -11,11 +11,11 @@ class Avatar extends BaseCommand {
command: new SlashCommandBuilder()
.setName("avatar")
.setDescription(client.translate("general/avatar:DESCRIPTION"))
.setDMPermission(true)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -11,12 +11,12 @@ class Emoji extends BaseCommand {
command: new SlashCommandBuilder()
.setName("emoji")
.setDescription(client.translate("general/emoji:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("emoji")
.setDescription(client.translate("common:EMOJI"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -11,12 +11,12 @@ class Help extends BaseCommand {
command: new SlashCommandBuilder()
.setName("help")
.setDescription(client.translate("general/help:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option =>
option.setName("command")
.setDescription(client.translate("owner/reload:COMMAND"))),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -12,12 +12,12 @@ class Minecraft extends BaseCommand {
command: new SlashCommandBuilder()
.setName("minecraft")
.setDescription(client.translate("general/minecraft:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("ip")
.setDescription(client.translate("common:IP"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -10,10 +10,10 @@ class Ping extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("ping")
.setDescription(client.translate("general/ping:DESCRIPTION")),
.setDescription(client.translate("general/ping:DESCRIPTION"))
.setDMPermission(true),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -13,6 +13,7 @@ class Remindme extends BaseCommand {
command: new SlashCommandBuilder()
.setName("remindme")
.setDescription(client.translate("general/remindme:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("time")
.setDescription(client.translate("owner/remindme:TIME"))
.setRequired(true))
@ -21,7 +22,6 @@ class Remindme extends BaseCommand {
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -11,6 +11,7 @@ class Report extends BaseCommand {
command: new SlashCommandBuilder()
.setName("report")
.setDescription(client.translate("general/report:DESCRIPTION"))
.setDMPermission(false)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))
.setRequired(true))
@ -19,7 +20,6 @@ class Report extends BaseCommand {
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -10,10 +10,10 @@ class Serverinfo extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("serverinfo")
.setDescription(client.translate("general/serverinfo:DESCRIPTION")),
.setDescription(client.translate("general/serverinfo:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -12,12 +12,12 @@ class Shorturl extends BaseCommand {
command: new SlashCommandBuilder()
.setName("shorturl")
.setDescription(client.translate("general/shorturl:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("url")
.setDescription(client.translate("general/shorturl:URL"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -10,10 +10,10 @@ class Staff extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("staff")
.setDescription(client.translate("general/staff:DESCRIPTION")),
.setDescription(client.translate("general/staff:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,10 +11,10 @@ class Stats extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("stats")
.setDescription(client.translate("general/stats:DESCRIPTION")),
.setDescription(client.translate("general/stats:DESCRIPTION"))
.setDMPermission(true),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -11,12 +11,12 @@ class Suggest extends BaseCommand {
command: new SlashCommandBuilder()
.setName("suggest")
.setDescription(client.translate("general/suggest:DESCRIPTION"))
.setDMPermission(false)
.addStringOption(option => option.setName("message")
.setDescription(client.translate("common:MESSAGE"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,11 +11,11 @@ class Userinfo extends BaseCommand {
command: new SlashCommandBuilder()
.setName("userinfo")
.setDescription(client.translate("general/userinfo:DESCRIPTION"))
.setDMPermission(false)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -12,12 +12,12 @@ class Whois extends BaseCommand {
command: new SlashCommandBuilder()
.setName("whois")
.setDescription(client.translate("general/whois:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("ip")
.setDescription(client.translate("common:IP"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: false
});
}

View file

@ -11,6 +11,7 @@ class Clear extends BaseCommand {
command: new SlashCommandBuilder()
.setName("clear")
.setDescription(client.translate("moderation/clear:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages)
.addStringOption(option => option.setName("option")
.setDescription(client.translate("moderation/clear:OPTION"))
@ -19,7 +20,7 @@ class Clear extends BaseCommand {
.setDescription(client.translate("common:USER"))),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,13 +11,14 @@ class Clearwarns extends BaseCommand {
command: new SlashCommandBuilder()
.setName("clearwarns")
.setDescription(client.translate("moderation/clearwarns:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -12,6 +12,7 @@ class Giveaway extends BaseCommand {
command: new SlashCommandBuilder()
.setName("giveaway")
.setDescription(client.translate("moderation/giveaway:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages)
.addSubcommand(subcommand => subcommand.setName("create")
.setDescription(client.translate("moderation/giveaway:CREATE"))
@ -48,7 +49,7 @@ class Giveaway extends BaseCommand {
),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,13 +11,14 @@ class Poll extends BaseCommand {
command: new SlashCommandBuilder()
.setName("poll")
.setDescription(client.translate("moderation/poll:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages)
.addStringOption(option => option.setName("question")
.setDescription(client.translate("moderation/poll:QUESTION"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,13 +11,14 @@ class Unban extends BaseCommand {
command: new SlashCommandBuilder()
.setName("unban")
.setDescription(client.translate("moderation/unban:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages)
.addStringOption(option => option.setName("user_id")
.setDescription(client.translate("moderation/unban:ID"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,10 +11,11 @@ class Warn extends BaseCommand {
command: new ContextMenuCommandBuilder()
.setName("warn")
.setType(ApplicationCommandType.User)
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -11,13 +11,14 @@ class Warns extends BaseCommand {
command: new SlashCommandBuilder()
.setName("warns")
.setDescription(client.translate("moderation/warns:DESCRIPTION"))
.setDMPermission(false)
.setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers && PermissionFlagsBits.ManageMessages)
.addUserOption(option => option.setName("user")
.setDescription(client.translate("common:USER"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true
ownerOnly: false
});
}
/**

View file

@ -10,10 +10,10 @@ class Back extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("back")
.setDescription(client.translate("music/back:DESCRIPTION")),
.setDescription(client.translate("music/back:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -12,10 +12,10 @@ class Clips extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("clips")
.setDescription(client.translate("music/clips:DESCRIPTION")),
.setDescription(client.translate("music/clips:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -12,6 +12,7 @@ class Loop extends BaseCommand {
command: new SlashCommandBuilder()
.setName("loop")
.setDescription(client.translate("music/loop:DESCRIPTION"))
.setDMPermission(false)
.addStringOption(option => option.setName("option")
.setDescription(client.translate("economy/bank:OPTION"))
.setRequired(true)
@ -23,7 +24,6 @@ class Loop extends BaseCommand {
)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,10 +11,10 @@ class Nowplaying extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("nowplaying")
.setDescription(client.translate("music/nowplaying:DESCRIPTION")),
.setDescription(client.translate("music/nowplaying:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -12,12 +12,12 @@ class Play extends BaseCommand {
command: new SlashCommandBuilder()
.setName("play")
.setDescription(client.translate("music/play:DESCRIPTION"))
.setDMPermission(false)
.addStringOption(option => option.setName("query")
.setDescription(client.translate("music/play:QUERY"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,10 +11,10 @@ class Queue extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("queue")
.setDescription(client.translate("music/queue:DESCRIPTION")),
.setDescription(client.translate("music/queue:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -10,10 +10,10 @@ class Shuffle extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("shuffle")
.setDescription(client.translate("music/shuffle:DESCRIPTION")),
.setDescription(client.translate("music/shuffle:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -10,10 +10,10 @@ class Skip extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("skip")
.setDescription(client.translate("music/skip:DESCRIPTION")),
.setDescription(client.translate("music/skip:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,12 +11,12 @@ class Skipto extends BaseCommand {
command: new SlashCommandBuilder()
.setName("skipto")
.setDescription(client.translate("music/skipto:DESCRIPTION"))
.setDMPermission(false)
.addIntegerOption(option => option.setName("position")
.setDescription(client.translate("music/skipto:POSITION"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -10,10 +10,10 @@ class Stop extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("stop")
.setDescription(client.translate("music/stop:DESCRIPTION")),
.setDescription(client.translate("music/stop:DESCRIPTION"))
.setDMPermission(false),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}

View file

@ -11,10 +11,10 @@ class NSFW extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("nsfw")
.setDescription(client.translate("nsfw/nsfw:DESCRIPTION")),
.setDescription(client.translate("nsfw/nsfw:DESCRIPTION"))
.setDMPermission(true),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: false
});
}
@ -34,7 +34,7 @@ class NSFW extends BaseCommand {
async execute(client, interaction) {
await interaction.deferReply({ ephemeral: true });
if (!interaction.channel.nsfw) return interaction.replyT("misc:NSFW_COMMAND", null, { ephemeral: true, edit: true });
if ((interaction.guildId && !interaction.channel.nsfw)) return interaction.replyT("misc:NSFW_COMMAND", null, { ephemeral: true, edit: true });
const tags = ["hentai", "ecchi", "lewdanimegirls", "hentaifemdom", "animefeets", "animebooty", "biganimetiddies", "sideoppai", "ahegao"].map(tag =>
JSON.parse(JSON.stringify({
@ -51,14 +51,15 @@ class NSFW extends BaseCommand {
.addOptions(tags)
);
await interaction.editReply({
const msg = await interaction.editReply({
content: interaction.translate("common:AVAILABLE_OPTIONS"),
ephemeral: true,
fetchReply: true,
components: [row]
});
const filter = i => i.user.id === interaction.user.id;
const collector = interaction.channel.createMessageComponentCollector({ filter, idle: (2 * 60 * 1000) });
const collector = msg.createMessageComponentCollector({ filter, idle: (2 * 60 * 1000) });
collector.on("collect", async i => {
if (i.isSelectMenu() && i.customId === "nsfw_select") {

View file

@ -11,6 +11,7 @@ class Announcement extends BaseCommand {
command: new SlashCommandBuilder()
.setName("announcement")
.setDescription(client.translate("owner/announcement:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("message")
.setDescription(client.translate("common:MESSAGE"))
.setRequired(true))
@ -19,7 +20,6 @@ class Announcement extends BaseCommand {
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: true
});
}

View file

@ -11,6 +11,7 @@ class Debug extends BaseCommand {
command: new SlashCommandBuilder()
.setName("debug")
.setDescription(client.translate("owner/debug:DESCRIPTION"))
.setDMPermission(false)
.addSubcommand(subcommand => subcommand.setName("set")
.setDescription(client.translate("owner/debug:SET"))
.addStringOption(option => option.setName("type")
@ -51,7 +52,6 @@ class Debug extends BaseCommand {
),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: true
});
}

View file

@ -11,12 +11,12 @@ class Eval extends BaseCommand {
command: new SlashCommandBuilder()
.setName("eval")
.setDescription(client.translate("owner/eval:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("code")
.setDescription(client.translate("owner/eval:CODE"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: true
});
}

View file

@ -13,12 +13,12 @@ class Reload extends BaseCommand {
command: new SlashCommandBuilder()
.setName("reload")
.setDescription(client.translate("owner/reload:DESCRIPTION"))
.setDMPermission(true)
.addStringOption(option => option.setName("command")
.setDescription(client.translate("owner/reload:COMMAND"))
.setRequired(true)),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: true
});
}

View file

@ -11,6 +11,7 @@ class Say extends BaseCommand {
command: new SlashCommandBuilder()
.setName("say")
.setDescription(client.translate("owner/say:DESCRIPTION"))
.setDMPermission(false)
.addStringOption(option => option.setName("message")
.setDescription(client.translate("common:MESSAGE"))
.setRequired(true))
@ -18,7 +19,6 @@ class Say extends BaseCommand {
.setDescription(client.translate("common:CHANNEL"))),
aliases: [],
dirname: __dirname,
guildOnly: true,
ownerOnly: true
});
}

View file

@ -10,10 +10,10 @@ class Servers extends BaseCommand {
super({
command: new SlashCommandBuilder()
.setName("servers")
.setDescription(client.translate("owner/servers:DESCRIPTION")),
.setDescription(client.translate("owner/servers:DESCRIPTION"))
.setDMPermission(true),
aliases: [],
dirname: __dirname,
guildOnly: false,
ownerOnly: true
});
}
@ -56,14 +56,15 @@ class Servers extends BaseCommand {
.setEmoji("⏹️"),
);
await interaction.editReply({
const msg = await interaction.editReply({
content: `${interaction.translate("common:PAGE")}: **${currentPage + 1}**/**${embeds.length}**`,
fetchReply: true,
embeds: [embeds[currentPage]],
components: [row]
});
const filter = i => i.user.id === interaction.user.id;
const collector = interaction.channel.createMessageComponentCollector({ filter, idle: (20 * 1000) });
const collector = msg.createMessageComponentCollector({ filter, idle: (20 * 1000) });
collector.on("collect", async i => {
if (i.isButton()) {

View file

@ -1,3 +1,10 @@
### JaBa v4.1.11
* Изменения
* Команды которые нельзя использовать в ЛС с ботом не будут там отображаться.
* Исправления
* Переписаны команды *nsfw* и *memes* для работы в ЛС с ботом.
### JaBa v4.1.10
* Добавлено
* Команда *shuffle* - Перемешать очередь.

View file

@ -1,6 +1,6 @@
{
"name": "jaba",
"version": "4.1.10",
"version": "4.1.11",
"description": "My Discord Bot",
"main": "index.js",
"private": true,