From 21a4d7f3928671cafb8b8d3f734eaaed7893096e Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Wed, 25 Aug 2021 09:03:55 +0200 Subject: [PATCH 01/29] :recycle: Start rewrite --- atlanta.js | 31 +++- base/Atlanta.js | 4 - base/Command.js | 7 +- commands/Economy/achievements.js | 75 +++++---- commands/General/translate.js | 2 +- config.sample.js | 10 -- docs/commands.md | 281 +++++++++++++++---------------- events/interactionCreate.js | 128 ++++++++++++++ helpers/autoUpdateDocs.js | 6 +- helpers/checkUnmutes.js | 2 +- helpers/constants.js | 11 ++ package.json | 11 +- 12 files changed, 358 insertions(+), 210 deletions(-) create mode 100644 events/interactionCreate.js create mode 100644 helpers/constants.js diff --git a/atlanta.js b/atlanta.js index fd573a4e4d..b2bbb559ff 100644 --- a/atlanta.js +++ b/atlanta.js @@ -5,7 +5,8 @@ const Sentry = require("@sentry/node"), fs = require("fs"), readdir = util.promisify(fs.readdir), mongoose = require("mongoose"), - chalk = require("chalk"); + chalk = require("chalk"), + synchronizeSlashCommands = require("discord-sync-commands"); const config = require("./config"); if(config.apiKeys.sentryDSN){ @@ -23,10 +24,13 @@ const Atlanta = require("./base/Atlanta"), const init = async () => { + const languages = require("./helpers/languages"); + client.translations = await languages(); + // Search for all commands const directories = await readdir("./commands/"); client.logger.log(`Loading a total of ${directories.length} categories.`, "log"); - directories.forEach(async (dir) => { + await Promise.all(directories.map(async (dir) => { const commands = await readdir("./commands/"+dir+"/"); commands.filter((cmd) => cmd.split(".").pop() === "js").forEach((cmd) => { const response = client.loadCommand("./commands/"+dir, cmd); @@ -34,6 +38,26 @@ const init = async () => { client.logger.log(response, "error"); } }); + })); + + const slashCommands = client.commands.filter((c) => c.conf.options); + console.log(slashCommands.first()); + synchronizeSlashCommands(client, slashCommands.map((command) => ({ + name: command.help.name, + description: client.translations.get("en-US")(`${command.help.category.toLowerCase()}/${command.help.name}:DESCRIPTION`), + options: command.conf.options.map((opt) => ({ + ...opt, + description: client.translations.get("en-US")(`${command.help.category.toLowerCase()}/${command.help.name}:OPT_${opt.name.toUpperCase()}_DESCRIPTION`), + options: opt.options?.map((o) => ({ + ...o, + description: client.translations.get("en-US")(`${command.help.category.toLowerCase()}/${command.help.name}:OPT_${o.name.toUpperCase()}_DESCRIPTION`) + }) + ) + }) + ) + })), { + debug: true, + guildId: config.support.id }); // Then we load events, which will include our message and ready event. @@ -55,9 +79,6 @@ const init = async () => { }).catch((err) => { client.logger.log("Unable to connect to the Mongodb database. Error:"+err, "error"); }); - - const languages = require("./helpers/languages"); - client.translations = await languages(); const autoUpdateDocs = require("./helpers/autoUpdateDocs.js"); autoUpdateDocs.update(client); diff --git a/base/Atlanta.js b/base/Atlanta.js index 1788ac3214..19368cba87 100644 --- a/base/Atlanta.js +++ b/base/Atlanta.js @@ -36,7 +36,6 @@ class Atlanta extends Client { this.customEmojis = require("../emojis.json"); // load the bot's emojis this.languages = require("../languages/language-meta.json"); // Load the bot's languages this.commands = new Collection(); // Creates new commands collection - this.aliases = new Collection(); // Creates new command aliases collection this.logger = require("../helpers/logger"); // Load the logger file this.wait = util.promisify(setTimeout); // client.wait(1000) - Wait 1 second this.functions = require("../helpers/functions"); // Load the functions file @@ -201,9 +200,6 @@ class Atlanta extends Client { props.init(this); } this.commands.set(props.help.name, props); - props.help.aliases.forEach((alias) => { - this.aliases.set(alias, props.help.name); - }); return false; } catch (e) { return `Unable to load command ${commandName}: ${e}`; diff --git a/base/Command.js b/base/Command.js index 3ee4b85c80..162a40170d 100644 --- a/base/Command.js +++ b/base/Command.js @@ -6,17 +6,16 @@ module.exports = class Command { dirname = false, enabled = true, guildOnly = false, - aliases = new Array(), botPermissions = new Array(), memberPermissions = new Array(), nsfw = false, ownerOnly = false, - cooldown = 3000 + options = null }) { const category = (dirname ? dirname.split(path.sep)[parseInt(dirname.split(path.sep).length-1, 10)] : "Other"); this.client = client; - this.conf = { enabled, guildOnly, memberPermissions, botPermissions, nsfw, ownerOnly, cooldown}; - this.help = { name, category, aliases }; + this.conf = { enabled, guildOnly, memberPermissions, botPermissions, nsfw, ownerOnly, options }; + this.help = { name, category }; } }; diff --git a/commands/Economy/achievements.js b/commands/Economy/achievements.js index f3f00874f3..b7883e2a87 100644 --- a/commands/Economy/achievements.js +++ b/commands/Economy/achievements.js @@ -1,66 +1,69 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); +const { Embed } = require("../../helpers/constants.js"); class Achievements extends Command { constructor (client) { super(client, { name: "achievements", - dirname: __dirname, + + options: [], + enabled: true, guildOnly: false, - aliases: [ "ac" ], memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 1000 + + dirname: __dirname }); } - async run (message, args, data) { + async run (interaction, translate, { userData }) { const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("economy/achievements:TITLE")) - .setColor(data.config.embed.color) - .setFooter(data.config.embed.footer); + .setAuthor(translate("economy/achievements:TITLE")) + .setColor(Embed.COLOR) + .setFooter(Embed.FOOTER); - embed.addField(message.translate("economy/achievements:SEND_CMD"), message.translate("economy/achievements:PROGRESS", { - now: data.userData.achievements.firstCommand.progress.now, - total: data.userData.achievements.firstCommand.progress.total, - percent: Math.round(100 * (data.userData.achievements.firstCommand.progress.now/data.userData.achievements.firstCommand.progress.total)) + embed.addField(translate("economy/achievements:SEND_CMD"), translate("economy/achievements:PROGRESS", { + now: userData.achievements.firstCommand.progress.now, + total: userData.achievements.firstCommand.progress.total, + percent: Math.round(100 * (userData.achievements.firstCommand.progress.now / userData.achievements.firstCommand.progress.total)) })); - embed.addField(message.translate("economy/achievements:CLAIM_SALARY"), message.translate("economy/achievements:PROGRESS", { - now: data.userData.achievements.work.progress.now, - total: data.userData.achievements.work.progress.total, - percent: Math.round(100 * (data.userData.achievements.work.progress.now/data.userData.achievements.work.progress.total)) + embed.addField(translate("economy/achievements:CLAIM_SALARY"), translate("economy/achievements:PROGRESS", { + now: userData.achievements.work.progress.now, + total: userData.achievements.work.progress.total, + percent: Math.round(100 * (userData.achievements.work.progress.now / userData.achievements.work.progress.total)) })); - embed.addField(message.translate("economy/achievements:MARRY"), message.translate("economy/achievements:PROGRESS", { - now: data.userData.achievements.married.progress.now, - total: data.userData.achievements.married.progress.total, - percent: Math.round(100 * (data.userData.achievements.married.progress.now/data.userData.achievements.married.progress.total)) + embed.addField(translate("economy/achievements:MARRY"), translate("economy/achievements:PROGRESS", { + now: userData.achievements.married.progress.now, + total: userData.achievements.married.progress.total, + percent: Math.round(100 * (userData.achievements.married.progress.now / userData.achievements.married.progress.total)) })); - embed.addField(message.translate("economy/achievements:SLOTS"), message.translate("economy/achievements:PROGRESS", { - now: data.userData.achievements.slots.progress.now, - total: data.userData.achievements.slots.progress.total, - percent: Math.round(100 * (data.userData.achievements.slots.progress.now/data.userData.achievements.slots.progress.total)) + embed.addField(translate("economy/achievements:SLOTS"), translate("economy/achievements:PROGRESS", { + now: userData.achievements.slots.progress.now, + total: userData.achievements.slots.progress.total, + percent: Math.round(100 * (userData.achievements.slots.progress.now/userData.achievements.slots.progress.total)) })); - embed.addField(message.translate("economy/achievements:TIP"), message.translate("economy/achievements:PROGRESS", { - now: data.userData.achievements.tip.progress.now, - total: data.userData.achievements.tip.progress.total, - percent: Math.round(100 * (data.userData.achievements.tip.progress.now/data.userData.achievements.tip.progress.total)) + embed.addField(translate("economy/achievements:TIP"), translate("economy/achievements:PROGRESS", { + now: userData.achievements.tip.progress.now, + total: userData.achievements.tip.progress.total, + percent: Math.round(100 * (userData.achievements.tip.progress.now/userData.achievements.tip.progress.total)) })); - embed.addField(message.translate("economy/achievements:REP"), message.translate("economy/achievements:PROGRESS", { - now: data.userData.achievements.rep.progress.now, - total: data.userData.achievements.rep.progress.total, - percent: Math.round(100 * (data.userData.achievements.rep.progress.now/data.userData.achievements.rep.progress.total)) + embed.addField(translate("economy/achievements:REP"), translate("economy/achievements:PROGRESS", { + now: userData.achievements.rep.progress.now, + total: userData.achievements.rep.progress.total, + percent: Math.round(100 * (userData.achievements.rep.progress.now/userData.achievements.rep.progress.total)) })); - embed.addField(message.translate("economy/achievements:INVITE"), message.translate("economy/achievements:PROGRESS", { - now: data.userData.achievements.invite.progress.now, - total: data.userData.achievements.invite.progress.total, - percent: Math.round(100 * (data.userData.achievements.invite.progress.now/data.userData.achievements.invite.progress.total)) + embed.addField(translate("economy/achievements:INVITE"), translate("economy/achievements:PROGRESS", { + now: userData.achievements.invite.progress.now, + total: userData.achievements.invite.progress.total, + percent: Math.round(100 * (userData.achievements.invite.progress.now/userData.achievements.invite.progress.total)) })); - message.channel.send({ embeds: [embed] }); + interaction.reply({ embeds: [embed] }); } diff --git a/commands/General/translate.js b/commands/General/translate.js index 4b80bc63b8..1feca19494 100644 --- a/commands/General/translate.js +++ b/commands/General/translate.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), - translate = require("@k3rn31p4nic/google-translate-api"); + translate = require("@iamtraction/google-translate"); const langs = ["afrikaans", "albanian", "amharic", "arabic", "armenian", "azerbaijani", "bangla", "basque", "belarusian", "bengali", "bosnian", "bulgarian", "burmese", "catalan", "cebuano", "chichewa", "corsican", "croatian", "czech", "danish", "dutch", "english", "esperanto", "estonian", "filipino", "finnish", "french", "frisian", "galician", "georgian", "german", "greek", "gujarati", "haitian creole", "hausa", "hawaiian", "hebrew", "hindi", "hmong", "hungarian", "icelandic", "igbo", "indonesian", "irish", "italian", "japanese", "javanese", "kannada", "kazakh", "khmer", "korean", "kurdish (kurmanji)", "kyrgyz", "lao", "latin", "latvian", "lithuanian", "luxembourgish", "macedonian", "malagasy", "malay", "malayalam", "maltese", "maori", "marathi", "mongolian", "myanmar (burmese)", "nepali", "norwegian", "nyanja", "pashto", "persian", "polish", "portugese", "punjabi", "romanian", "russian", "samoan", "scottish gaelic", "serbian", "sesotho", "shona", "sindhi", "sinhala", "slovak", "slovenian", "somali", "spanish", "sundanese", "swahili", "swedish", "tajik", "tamil", "telugu", "thai", "turkish", "ukrainian", "urdu", "uzbek", "vietnamese", "welsh", "xhosa", "yiddish", "yoruba", "zulu"]; diff --git a/config.sample.js b/config.sample.js index 1e8b2040b4..f25938445c 100644 --- a/config.sample.js +++ b/config.sample.js @@ -18,11 +18,6 @@ module.exports = { }, mongoDB: "mongodb://localhost:27017/AtlantaBot", // The URl of the mongodb database prefix: "*", // The default prefix for the bot - /* For the embeds (embeded messages) */ - embed: { - color: "#0091fc", // The default color for the embeds - footer: "Atlanta | Open Source" // And the default footer for the embeds - }, /* Bot's owner informations */ owner: { id: "XXXXXXXXXXX", // The ID of the bot's owner @@ -49,11 +44,6 @@ module.exports = { // SENTRY: https://sentry.io (this is not required and not recommended - you can delete the field) sentryDSN: "XXXXXXXXXXX" }, - /* The others utils links */ - others: { - github: "https://github.com/Androz2091", // Founder's github account - donate: "https://patreon.com/Androz2091" // Donate link - }, /* The Bot status */ status: [ { diff --git a/docs/commands.md b/docs/commands.md index 842e04a2ce..b79798c9a8 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -7,167 +7,166 @@ Here's the list of Atlanta commands. This one contains more than **120 commands* **Usage**: The arguments/options that the command takes in parameters **Cooldown**: The time that must elapse between each command so that it can be executed again by the user -### Images (28 commands) - -| Name | Description | Usage | Cooldown | -| ------------------- | ------------------------------------------------------- | ----------------------------------- | --------- | -| **approved** | Generates a "approved" image | approved (@member) | 5 seconds | -| **avatar** | Shows the avatar of the mentionned member | avatar (@member) | 5 seconds | -| **batslap** | Generates a "batslap" image | batslap (@member1) (@member2) | 5 seconds | -| **beautiful** | Generates a "beautiful" image | beautiful (@member) | 5 seconds | -| **bed** | Generates a "love" image using the Nekobot API | love [@member1] (@member2) | 5 seconds | -| **brazzers** | Generates a "dictator" image | dictator (@member) | 5 seconds | -| **burn** | Generates a "brazzers" image | brazzers (@member) | 5 seconds | -| **captcha** | Generates a "captcha" image using the Nekobot API | captcha (@member) | 5 seconds | -| **challenger** | Generates a "challenger" image | challenger (@member) | 5 seconds | -| **clyde** | Generates a "Clyde" message image using the Nekobot API | clyde [text] | 5 seconds | -| **dictator** | Generates a "burn" image | burn (@member) | 5 seconds | -| **facepalm** | Generates a "facepalm" image using canvas | facepalm (@member) | 5 seconds | -| **fire** | Generates a "fire" image using Amethyste API | fire (@member) | 5 seconds | -| **jail** | Generates a "jail" image using Amethyste API | jail (@member) | 5 seconds | -| **kiss** | DESCRIPTION | USAGE | 5 seconds | -| **love** | Generates a "bed" image | bed [@member1] (@member2) | 5 seconds | -| **mission** | Generates a "mission" image using Amethyste API | mission (@member) | 5 seconds | -| **phcomment** | Generates a "phcomment" image | phcomment (@member) [text] | 5 seconds | -| **qrcode** | Generates a QR code image from a given text | qrcode [text] | 3 seconds | -| **rip** | Generates a "rip" image using Nekobot API | rip (@member) | 5 seconds | -| **scary** | Generates a "scary" image using Nekobot API | scary (@member) | 5 seconds | -| **tobecontinued** | Generates a "tobecontinued" image using Nekobot API | tobecontinued (@member) | 5 seconds | -| **trash** | Generates a "trash" image | trash (@member) | 5 seconds | -| **triggered** | Generates a "triggered" image using Nekobot API | triggered (@member) | 5 seconds | -| **tweet** | Generates a "tweet" image using Nekobot API | tweet [@twitter_username] [content] | 5 seconds | -| **wanted** | Generates a "wanted" image using Nekobot API | wanted (@member) | 5 seconds | -| **wasted** | Generates a "wasted" image using Nekobot API | wasted (@member) | 5 seconds | -| **youtube-comment** | Generates a "youtube-comment" image | youtube-comment (@member) [text] | 5 seconds | +### Images (27 commands) + +| Name | Description | Usage | Cooldown | +| ------------------- | ------------------------------------------------------- | ----------------------------------- | ----------- | +| **approved** | Generates a "approved" image | approved (@member) | NaN seconds | +| **avatar** | Shows the avatar of the mentionned member | avatar (@member) | NaN seconds | +| **batslap** | Generates a "batslap" image | batslap (@member1) (@member2) | NaN seconds | +| **beautiful** | Generates a "beautiful" image | beautiful (@member) | NaN seconds | +| **bed** | Generates a "love" image using the Nekobot API | love [@member1] (@member2) | NaN seconds | +| **brazzers** | Generates a "dictator" image | dictator (@member) | NaN seconds | +| **burn** | Generates a "brazzers" image | brazzers (@member) | NaN seconds | +| **captcha** | Generates a "captcha" image using the Nekobot API | captcha (@member) | NaN seconds | +| **challenger** | Generates a "challenger" image | challenger (@member) | NaN seconds | +| **clyde** | Generates a "Clyde" message image using the Nekobot API | clyde [text] | NaN seconds | +| **dictator** | Generates a "burn" image | burn (@member) | NaN seconds | +| **facepalm** | Generates a "facepalm" image using canvas | facepalm (@member) | NaN seconds | +| **fire** | Generates a "fire" image using Amethyste API | fire (@member) | NaN seconds | +| **jail** | Generates a "jail" image using Amethyste API | jail (@member) | NaN seconds | +| **love** | Generates a "bed" image | bed [@member1] (@member2) | NaN seconds | +| **mission** | Generates a "mission" image using Amethyste API | mission (@member) | NaN seconds | +| **phcomment** | Generates a "phcomment" image | phcomment (@member) [text] | NaN seconds | +| **qrcode** | Generates a QR code image from a given text | qrcode [text] | NaN seconds | +| **rip** | Generates a "rip" image using Nekobot API | rip (@member) | NaN seconds | +| **scary** | Generates a "scary" image using Nekobot API | scary (@member) | NaN seconds | +| **tobecontinued** | Generates a "tobecontinued" image using Nekobot API | tobecontinued (@member) | NaN seconds | +| **trash** | Generates a "trash" image | trash (@member) | NaN seconds | +| **triggered** | Generates a "triggered" image using Nekobot API | triggered (@member) | NaN seconds | +| **tweet** | Generates a "tweet" image using Nekobot API | tweet [@twitter_username] [content] | NaN seconds | +| **wanted** | Generates a "wanted" image using Nekobot API | wanted (@member) | NaN seconds | +| **wasted** | Generates a "wasted" image using Nekobot API | wasted (@member) | NaN seconds | +| **youtube-comment** | Generates a "youtube-comment" image | youtube-comment (@member) [text] | NaN seconds | ### General (22 commands) -| Name | Description | Usage | Cooldown | -| ---------------- | ----------------------------------------------------------- | ------------------------------ | --------- | -| **fortnite** | Shows a player's Fortnite stats! | fortnite [psn/xbl/pc] [pseudo] | 1 seconds | -| **fortniteshop** | Shows the daily fortnite items shop! | fortniteshop | 1 seconds | -| **github** | Shows Atlanta's Github repository information! | github | 5 seconds | -| **hastebin** | Upload your text on hastebin! | hastebin [text] | 5 seconds | -| **help** | Show commands list or specific command help. | help (command) | 5 seconds | -| **invitations** | Shows the number of people you have invited to the server! | invitations (@member) | 3 seconds | -| **invite** | Shows Atlanta links! | invite (copy) | 5 seconds | -| **minecraft** | Shows information about a Minecraft server! | minecraft [ip] | 3 seconds | -| **permissions** | Displays the member's permissions in the channel | permissions (@member) | 1 seconds | -| **ping** | Show bot's ping | ping | 1 seconds | -| **quote** | Quote a message in the channel! | quote [messageID] [channel] | 5 seconds | -| **remindme** | Add a new personal reminder | remindme [message] | 3 seconds | -| **report** | Send your report to the channel defined for them! | report [@user] [reason] | 5 seconds | -| **serverinfo** | Shows information about the server! | serverinfo [ID/Name] | 3 seconds | -| **setafk** | Become AFK (members who mention you will receive a message) | setafk [reason] | 3 seconds | -| **shorturl** | Make your links shorter! | shorturl [url] | 5 seconds | -| **someone** | Pick a random member on the server! | someone | 1 seconds | -| **staff** | Shows the server staff members list! | staff | 3 seconds | -| **stats** | Shows the bot stats! | stats | 3 seconds | -| **suggest** | Send your suggestion to the defined channel! | suggest [message] | 5 seconds | -| **translate** | Translate your text! | translate [language] [message] | 8 seconds | -| **userinfo** | Shows user information! | userinfo (@user/userID) | 5 seconds | +| Name | Description | Usage | Cooldown | +| ---------------- | ----------------------------------------------------------- | ------------------------------ | ----------- | +| **fortnite** | Shows a player's Fortnite stats! | fortnite [psn/xbl/pc] [pseudo] | NaN seconds | +| **fortniteshop** | Shows the daily fortnite items shop! | fortniteshop | NaN seconds | +| **github** | Shows Atlanta's Github repository information! | github | NaN seconds | +| **hastebin** | Upload your text on hastebin! | hastebin [text] | NaN seconds | +| **help** | Show commands list or specific command help. | help (command) | NaN seconds | +| **invitations** | Shows the number of people you have invited to the server! | invitations (@member) | NaN seconds | +| **invite** | Shows Atlanta links! | invite (copy) | NaN seconds | +| **minecraft** | Shows information about a Minecraft server! | minecraft [ip] | NaN seconds | +| **permissions** | Displays the member's permissions in the channel | permissions (@member) | NaN seconds | +| **ping** | Show bot's ping | ping | NaN seconds | +| **quote** | Quote a message in the channel! | quote [messageID] [channel] | NaN seconds | +| **remindme** | Add a new personal reminder | remindme [message] | NaN seconds | +| **report** | Send your report to the channel defined for them! | report [@user] [reason] | NaN seconds | +| **serverinfo** | Shows information about the server! | serverinfo [ID/Name] | NaN seconds | +| **setafk** | Become AFK (members who mention you will receive a message) | setafk [reason] | NaN seconds | +| **shorturl** | Make your links shorter! | shorturl [url] | NaN seconds | +| **someone** | Pick a random member on the server! | someone | NaN seconds | +| **staff** | Shows the server staff members list! | staff | NaN seconds | +| **stats** | Shows the bot stats! | stats | NaN seconds | +| **suggest** | Send your suggestion to the defined channel! | suggest [message] | NaN seconds | +| **translate** | Translate your text! | translate [language] [message] | NaN seconds | +| **userinfo** | Shows user information! | userinfo (@user/userID) | NaN seconds | ### Administration (18 commands) -| Name | Description | Usage | Cooldown | -| ------------------- | ----------------------------------------------- | -------------------------------- | ---------- | -| **addcommand** | Add a custom command! | addcommand [name] [answer] | 3 seconds | -| **addemoji** | Add an emoji to the server! | addemoji [image-url] [name] | 5 seconds | -| **automod** | Toggle Discord invites automatic deletion | automod [on/off] (#channel) | 5 seconds | -| **autorole** | Toggle autorole on the server! | autorole [on/off] (role) | 5 seconds | -| **backup** | Manage your server backups in an efficient way! | backup [create/load/infos] | 30 seconds | -| **configuration** | Shows the server configuration! | configuration | 3 seconds | -| **delcommand** | Remove a custom command! | delcommand [name-of-the-command] | 3 seconds | -| **deletemod** | Toggle moderation commands auto deletion! | deletemod [on/off] | 3 seconds | -| **goodbye** | Toggle goodbye messages! | goodbye | 3 seconds | -| **ignore** | Toggle commands in a channel | ignore [channel] | 3 seconds | -| **setfortniteshop** | Set the daily Fortnite shop channel! | setfortniteshop (#channel) | 5 seconds | -| **setlang** | Change the server language! | setlang [language] | 3 seconds | -| **setmodlogs** | Set the moderation logs channel! | setmodlogs (#channel) | 3 seconds | -| **setprefix** | Set the server prefix! | setprefix [prefix] | 3 seconds | -| **setreports** | Set the reports channel! | setreports (#channel) | 3 seconds | -| **setsuggests** | Set the suggestions channel! | setsuggests (#channel) | 3 seconds | -| **slowmode** | Set a channel cooldown | slowmode [#channel] (time) | 3 seconds | -| **welcome** | Toggle welcome messages! | welcome | 3 seconds | +| Name | Description | Usage | Cooldown | +| ------------------- | ----------------------------------------------- | -------------------------------- | ----------- | +| **addcommand** | Add a custom command! | addcommand [name] [answer] | NaN seconds | +| **addemoji** | Add an emoji to the server! | addemoji [image-url] [name] | NaN seconds | +| **automod** | Toggle Discord invites automatic deletion | automod [on/off] (#channel) | NaN seconds | +| **autorole** | Toggle autorole on the server! | autorole [on/off] (role) | NaN seconds | +| **backup** | Manage your server backups in an efficient way! | backup [create/load/infos] | NaN seconds | +| **configuration** | Shows the server configuration! | configuration | NaN seconds | +| **delcommand** | Remove a custom command! | delcommand [name-of-the-command] | NaN seconds | +| **deletemod** | Toggle moderation commands auto deletion! | deletemod [on/off] | NaN seconds | +| **goodbye** | Toggle goodbye messages! | goodbye | NaN seconds | +| **ignore** | Toggle commands in a channel | ignore [channel] | NaN seconds | +| **setfortniteshop** | Set the daily Fortnite shop channel! | setfortniteshop (#channel) | NaN seconds | +| **setlang** | Change the server language! | setlang [language] | NaN seconds | +| **setmodlogs** | Set the moderation logs channel! | setmodlogs (#channel) | NaN seconds | +| **setprefix** | Set the server prefix! | setprefix [prefix] | NaN seconds | +| **setreports** | Set the reports channel! | setreports (#channel) | NaN seconds | +| **setsuggests** | Set the suggestions channel! | setsuggests (#channel) | NaN seconds | +| **slowmode** | Set a channel cooldown | slowmode [#channel] (time) | NaN seconds | +| **welcome** | Toggle welcome messages! | welcome | NaN seconds | ### Economy (15 commands) -| Name | Description | Usage | Cooldown | -| ---------------- | ------------------------------------------------------------------- | -------------------------------- | ---------- | -| **achievements** | Shows your achievements list! | achievements | 1 seconds | -| **birthdate** | Set the birthday date that appear on your profile | birthdate (date) | 1 seconds | -| **deposit** | Deposit your money in the bank | deposit [amount] | 1 seconds | -| **divorce** | Divorce the person you are currently married to! | divorce | 3 seconds | -| **leaderboard** | Shows users who have the most credits, levels or reputation points! | leaderboard [rep/levels/credits] | 5 seconds | -| **marry** | Marry someone you love! | marry [@member] | 10 seconds | -| **money** | Shows your credits | money (@member) | 1 seconds | -| **pay** | Send money to someone! | pay [@member] [amount] | 10 seconds | -| **profile** | Shows the mentioned user or author profile | profile [user] | 3 seconds | -| **rep** | Give a reputation point to someone! | rep [user] | 3 seconds | -| **rob** | Try to rob a member! | rob [@member] [amount] | 1 seconds | -| **setbio** | Change your biography! | setbio [biography] | 5 seconds | -| **slots** | The Atlanta casino | slots [amount] | 3 seconds | -| **withdraw** | Withdraw money! | withdraw [amount] | 1 seconds | -| **work** | Claim your salary! | work | 3 seconds | +| Name | Description | Usage | Cooldown | +| ---------------- | ------------------------------------------------------------------- | -------------------------------- | ----------- | +| **achievements** | Shows your achievements list! | achievements | NaN seconds | +| **birthdate** | Set the birthday date that appear on your profile | birthdate (date) | NaN seconds | +| **deposit** | Deposit your money in the bank | deposit [amount] | NaN seconds | +| **divorce** | Divorce the person you are currently married to! | divorce | NaN seconds | +| **leaderboard** | Shows users who have the most credits, levels or reputation points! | leaderboard [rep/levels/credits] | NaN seconds | +| **marry** | Marry someone you love! | marry [@member] | NaN seconds | +| **money** | Shows your credits | money (@member) | NaN seconds | +| **pay** | Send money to someone! | pay [@member] [amount] | NaN seconds | +| **profile** | Shows the mentioned user or author profile | profile [user] | NaN seconds | +| **rep** | Give a reputation point to someone! | rep [user] | NaN seconds | +| **rob** | Try to rob a member! | rob [@member] [amount] | NaN seconds | +| **setbio** | Change your biography! | setbio [biography] | NaN seconds | +| **slots** | The Atlanta casino | slots [amount] | NaN seconds | +| **withdraw** | Withdraw money! | withdraw [amount] | NaN seconds | +| **work** | Claim your salary! | work | NaN seconds | ### Moderation (14 commands) -| Name | Description | Usage | Cooldown | -| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | --------- | -| **announcement** | Send an announcement in the current channel! | announcement [text] | 3 seconds | -| **ban** | Ban the mentioned member! | ban [@user] (reason) | 3 seconds | -| **checkinvites** | Check if members have a Discord server link in their status! | checkinvites | 3 seconds | -| **clear** | Quickly delete multiple messages! | clear [number-of-messages] (@member) | 3 seconds | -| **clear-sanctions** | Clear a member sanctions! | clear-sanctions [@member] | 3 seconds | -| **giveaway** | Easily manage your giveaways! | giveaway [create/reroll/delete/end] (time) (winners count) (prize) | 5 seconds | -| **kick** | Kick the mentioned member! | kick [@member] (reason) | 3 seconds | -| **mute** | Prevents a member from sending messages and connecting to a voice chat room for a defined period of time! | mute [@member] [time] | 3 seconds | -| **poll** | Launch a survey in the current channel! | poll [question] | 3 seconds | -| **sanctions** | Displays the list of infractions committed by a member! | sanctions [@member] | 3 seconds | -| **setwarns** | Define the sanctions that members will get after a certain number of warns! | setwarns [kick/ban] [number/reset] | 3 seconds | -| **unban** | Unban the user from the server! | unban [userID/user#0000] | 3 seconds | -| **unmute** | Unmute the mentioned member! | unmute [@member] | 3 seconds | -| **warn** | Warn a member in private messages | warn [@member] [reason] | 3 seconds | +| Name | Description | Usage | Cooldown | +| ------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ----------- | +| **announcement** | Send an announcement in the current channel! | announcement [text] | NaN seconds | +| **ban** | Ban the mentioned member! | ban [@user] (reason) | NaN seconds | +| **checkinvites** | Check if members have a Discord server link in their status! | checkinvites | NaN seconds | +| **clear** | Quickly delete multiple messages! | clear [number-of-messages] (@member) | NaN seconds | +| **clear-sanctions** | Clear a member sanctions! | clear-sanctions [@member] | NaN seconds | +| **giveaway** | Easily manage your giveaways! | giveaway [create/reroll/delete/end] (time) (winners count) (prize) | NaN seconds | +| **kick** | Kick the mentioned member! | kick [@member] (reason) | NaN seconds | +| **mute** | Prevents a member from sending messages and connecting to a voice chat room for a defined period of time! | mute [@member] [time] | NaN seconds | +| **poll** | Launch a survey in the current channel! | poll [question] | NaN seconds | +| **sanctions** | Displays the list of infractions committed by a member! | sanctions [@member] | NaN seconds | +| **setwarns** | Define the sanctions that members will get after a certain number of warns! | setwarns [kick/ban] [number/reset] | NaN seconds | +| **unban** | Unban the user from the server! | unban [userID/user#0000] | NaN seconds | +| **unmute** | Unmute the mentioned member! | unmute [@member] | NaN seconds | +| **warn** | Warn a member in private messages | warn [@member] [reason] | NaN seconds | ### Music (13 commands) -| Name | Description | Usage | Cooldown | -| ------------ | ---------------------------------------------------------------------- | ------------------ | --------- | -| **autoplay** | Enable or disable the autoplay feature | autoplay | 5 seconds | -| **back** | Play back the previous song | back | 5 seconds | -| **filter** | Enable or disable a filter! | filter [filter] | 5 seconds | -| **filters** | Send the list of all the filters and their status | filters | 5 seconds | -| **lyrics** | Shows the song lyrics | lyrics [song-name] | 5 seconds | -| **np** | Shows information about the current song! | np | 5 seconds | -| **pause** | Pause the current song! | pause | 5 seconds | -| **play** | Plays music for you! | play [song] | 5 seconds | -| **queue** | Shows the server queue | queue | 5 seconds | -| **resume** | Resume the current song! | resume | 5 seconds | -| **seek** | Go forward or backward a specific amount of time in the current song!! | seek [time] | 5 seconds | -| **skip** | Skip the current song | skip | 5 seconds | -| **stop** | Stop the music | stop | 5 seconds | +| Name | Description | Usage | Cooldown | +| ------------ | ---------------------------------------------------------------------- | ------------------ | ----------- | +| **autoplay** | Enable or disable the autoplay feature | autoplay | NaN seconds | +| **back** | Play back the previous song | back | NaN seconds | +| **filter** | Enable or disable a filter! | filter [filter] | NaN seconds | +| **filters** | Send the list of all the filters and their status | filters | NaN seconds | +| **lyrics** | Shows the song lyrics | lyrics [song-name] | NaN seconds | +| **np** | Shows information about the current song! | np | NaN seconds | +| **pause** | Pause the current song! | pause | NaN seconds | +| **play** | Plays music for you! | play [song] | NaN seconds | +| **queue** | Shows the server queue | queue | NaN seconds | +| **resume** | Resume the current song! | resume | NaN seconds | +| **seek** | Go forward or backward a specific amount of time in the current song!! | seek [time] | NaN seconds | +| **skip** | Skip the current song | skip | NaN seconds | +| **stop** | Stop the music | stop | NaN seconds | ### Fun (10 commands) -| Name | Description | Usage | Cooldown | -| ------------- | --------------------------------------------------------------------------------------------- | ------------------------------- | --------- | -| **8ball** | I'm telling you the truth! | 8ball [question] | 3 seconds | -| **ascii** | Turn your text into ascii characters! | ascii [text] | 5 seconds | -| **choice** | Helps you choose between the given choices! | choice [choice1/choice2/etc...] | 5 seconds | -| **findwords** | Start a Findwords party, a game where you have to find words! | findwords | 5 seconds | -| **flip** | I roll the dice for you! | flip | 1 seconds | -| **fml** | Gets a random FML | fml | 3 seconds | -| **joke** | Gets a wonderful joke specially made for you! | joke | 3 seconds | -| **lmg** | Generate a LMGTFY link with your search | lmg [search] | 1 seconds | +| Name | Description | Usage | Cooldown | +| ------------- | --------------------------------------------------------------------------------------------- | ------------------------------- | ----------- | +| **8ball** | I'm telling you the truth! | 8ball [question] | NaN seconds | +| **ascii** | Turn your text into ascii characters! | ascii [text] | NaN seconds | +| **choice** | Helps you choose between the given choices! | choice [choice1/choice2/etc...] | NaN seconds | +| **findwords** | Start a Findwords party, a game where you have to find words! | findwords | NaN seconds | +| **flip** | I roll the dice for you! | flip | NaN seconds | +| **fml** | Gets a random FML | fml | NaN seconds | +| **joke** | Gets a wonderful joke specially made for you! | joke | NaN seconds | +| **lmg** | Generate a LMGTFY link with your search | lmg [search] | NaN seconds | | **lovecalc** | How much love is there between two people? -*This is a fun command, not to be taken seriously* | lovecalc [@member1] (@member2) | 1 seconds | -| **number** | Find the right number! | number | 5 seconds | +*This is a fun command, not to be taken seriously* | lovecalc [@member1] (@member2) | NaN seconds | +| **number** | Find the right number! | number | NaN seconds | ### Owner (3 commands) -| Name | Description | Usage | Cooldown | -| ---------------- | ----------------------- | ------------ | --------- | -| **eval** | Executes the given code | eval [code] | 3 seconds | -| **reload** | Reload a command! | reload | 3 seconds | -| **servers-list** | Show the servers list! | servers-list | 5 seconds | +| Name | Description | Usage | Cooldown | +| ---------------- | ----------------------- | ------------ | ----------- | +| **eval** | Executes the given code | eval [code] | NaN seconds | +| **reload** | Reload a command! | reload | NaN seconds | +| **servers-list** | Show the servers list! | servers-list | NaN seconds | diff --git a/events/interactionCreate.js b/events/interactionCreate.js new file mode 100644 index 0000000000..3054d1c8c8 --- /dev/null +++ b/events/interactionCreate.js @@ -0,0 +1,128 @@ +module.exports = class { + constructor (client) { + this.client = client; + } + + async run (interaction) { + + if (!interaction.isCommand()) return; + + let translate = this.client.translations.get("en-US"); + let guildData; + let memberData; + if(interaction.guild){ + // Gets guild data + guildData = await this.client.findOrCreateGuild({ id: interaction.guild.id }); + memberData = await this.client.findOrCreateMember({ id: interaction.user.id, guildID: interaction.guild.id }); + translate = this.client.translations.get(guildData.language); + } + + const userData = await this.client.findOrCreateUser({ id: interaction.user.id }); + + const command = this.client.commands.get(interaction.commandName); + if (!command) return; + + // TODO: add support for custom slash commands + + if(interaction.guild && guildData.ignoredChannels.includes(interaction.channel.id) && !interaction.member.permissions.has("MANAGE_MESSAGES")){ + interaction.reply({ + content: translate("misc:RESTRICTED_CHANNEL", { + channel: interaction.channel.toString() + }), + ephemeral: true + }); + return; + } + + if(command.conf.guildOnly && !interaction.guild){ + return interaction.reply({ + content: translate("misc:GUILD_ONLY"), + ephemeral: true + }); + } + + if(interaction.guild){ + let neededPermissions = []; + if(!command.conf.botPermissions.includes("EMBED_LINKS")){ + command.conf.botPermissions.push("EMBED_LINKS"); + } + command.conf.botPermissions.forEach((perm) => { + if(!interaction.channel.permissionsFor(interaction.guild.me).has(perm)){ + neededPermissions.push(perm); + } + }); + if(neededPermissions.length > 0){ + return interaction.reply({ + content: translate("misc:MISSING_BOT_PERMS", { + list: neededPermissions.map((p) => `\`${p}\``).join(", "), + }), + ephemeral: true + }); + } + neededPermissions = []; + command.conf.memberPermissions.forEach((perm) => { + if(!interaction.channel.permissionsFor(interaction.member).has(perm)){ + neededPermissions.push(perm); + } + }); + if(neededPermissions.length > 0){ + return interaction.reply({ + content: translate("misc:MISSING_MEMBER_PERMS", { + list: neededPermissions.map((p) => `\`${p}\``).join(", ") + }), + ephemeral: true + }); + } + if(!interaction.channel.nsfw && command.conf.nsfw){ + return interaction.reply({ + content: translate("misc:NSFW_COMMAND") + }); + } + } + + if(!command.conf.enabled){ + return interaction.reply({ + content: "misc:COMMAND_DISABLED", + ephemeral: true + }); + } + + if(command.conf.ownerOnly && interaction.user.id !== this.client.config.owner.id){ + return interaction.reply({ + content: translate("misc:OWNER_ONLY"), + ephemeral: true + }); + } + + this.client.logger.log(`${interaction.user.username} (${interaction.user.id}) ran slash command ${command.help.name}`, "cmd"); + + const log = new this.client.logs({ + commandName: command.help.name, + author: { username: interaction.user.username, discriminator: interaction.user.discriminator, id: interaction.user.id }, + guild: { name: interaction.guild ? interaction.guild.name : "dm", id: interaction.guild ? interaction.guild.id : "dm" } + }); + log.save(); + + if(!userData.achievements.firstCommand.achieved){ + userData.achievements.firstCommand.progress.now = 1; + userData.achievements.firstCommand.achieved = true; + userData.markModified("achievements.firstCommand"); + await userData.save(); + await interaction.channel.send({ files: [ + { + name: "unlocked.png", + attachment: "./assets/img/achievements/achievement_unlocked2.png" + } + ]}); + } + + try { + command.run(interaction, translate, { guildData, userData, memberData }); + } catch(e){ + console.error(e); + return interaction.reply({ + content: translate("misc:ERR_OCCURRED") + }); + } + } +}; diff --git a/helpers/autoUpdateDocs.js b/helpers/autoUpdateDocs.js index 35b017afd6..3d0257f69a 100644 --- a/helpers/autoUpdateDocs.js +++ b/helpers/autoUpdateDocs.js @@ -18,8 +18,8 @@ module.exports = { let text = `# Commands \nHere's the list of Atlanta commands. This one contains more than **${Math.floor(commands.size/10)}0 commands** in **${categories.length} categories**! \n\n#### Contents of the table \n**Name**: The name of the command \n**Description**: A brief explanation of the purpose of the command \n**Usage**: The arguments/options that the command takes in parameters \n**Cooldown**: The time that must elapse between each command so that it can be executed again by the user\n\n`; categories.sort(function(a, b){ - const aCmdsLength = commands.filter((cmd) => cmd.help.category === a).array().length; - const bCmdsLength = commands.filter((cmd) => cmd.help.category === b).array().length; + const aCmdsLength = commands.filter((cmd) => cmd.help.category === a).toJSON().length; + const bCmdsLength = commands.filter((cmd) => cmd.help.category === b).toJSON().length; if(aCmdsLength > bCmdsLength){ return -1; } else { @@ -29,7 +29,7 @@ module.exports = { const arrCat = [ [ "Name", "Description", "Usage", "Cooldown" ] ]; - const cmds = commands.filter((cmd) => cmd.help.category === cat).array(); + const cmds = commands.filter((cmd) => cmd.help.category === cat).toJSON(); text += `### ${cat} (${cmds.length} commands)\n\n`; cmds.sort(function(a, b){ if(a.help.name < b.help.name) { diff --git a/helpers/checkUnmutes.js b/helpers/checkUnmutes.js index 95efe4849b..0cec275fee 100644 --- a/helpers/checkUnmutes.js +++ b/helpers/checkUnmutes.js @@ -15,7 +15,7 @@ module.exports = { }); }); setInterval(async () => { - client.databaseCache.mutedUsers.array().filter((m) => m.mute.endDate <= Date.now()).forEach(async (memberData) => { + client.databaseCache.mutedUsers.toJSON().filter((m) => m.mute.endDate <= Date.now()).forEach(async (memberData) => { const guild = client.guilds.cache.get(memberData.guildID); if(!guild) return; const member = guild.members.cache.get(memberData.id) || await guild.members.fetch(memberData.id).catch(() => { diff --git a/helpers/constants.js b/helpers/constants.js new file mode 100644 index 0000000000..9fa49ce0ff --- /dev/null +++ b/helpers/constants.js @@ -0,0 +1,11 @@ +module.exports = { + Embed: { + COLOR: "#0091fc", // The default color for the embeds + FOOTER: "Atlanta | Open Source" // And the default footer for the embeds + }, + /* The others utils links */ + Links: { + GITHUB: "https://github.com/Androz2091", // Founder's github account + DONATE: "https://patreon.com/Androz2091" // Donate link + } +}; diff --git a/package.json b/package.json index aeba0b3b7d..b62e71bce1 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "dependencies": { "@discord-player/extractor": "^3.0.0", "@discordjs/opus": "^0.5.0", - "@k3rn31p4nic/google-translate-api": "github:k3rn31p4nic/google-translate-api", + "@iamtraction/google-translate": "^1.1.2", "@sentry/node": "6.3.6", "@sindresorhus/slugify": "^1.1.0", "amethyste-api": "github:Androz2091/amethyste-api", @@ -29,17 +29,18 @@ "blague.xyz": "^2.0.4", "btoa": "^1.2.1", "canvacord": "^5.1.0", - "canvas": "^2.6.1", + "canvas": "^2.8.0", "chalk": "^4.1.0", "colors-generator": "^0.3.4", "cron": "^1.7.2", "dblapi.js": "^2.3.0", - "discord-backup": "^2.1.19", + "discord-backup": "^3.0.1", "discord-canvas": "^1.3.2", "discord-giveaways": "^4.4.3", "discord-paginationembed": "^2.1.0", - "discord-player": "^4.1.0", - "discord.js": "discordjs/discord.js", + "discord-player": "^5.0.2", + "discord-sync-commands": "^0.2.0", + "discord.js": "^13.1.0", "ejs": "^3.1.3", "express": "^4.17.1", "express-session": "^1.17.0", From 330bdb0d3bf3baba998026085683c9e97b0bfb49 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 19:46:23 +0200 Subject: [PATCH 02/29] :bug: Some fixes --- atlanta.js | 4 +++- commands/Economy/birthdate.js | 29 +++++++++++++++++--------- docs/commands.md | 2 +- languages/en-US/economy/birthdate.json | 3 +-- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/atlanta.js b/atlanta.js index b2bbb559ff..0f21a7abc3 100644 --- a/atlanta.js +++ b/atlanta.js @@ -41,15 +41,17 @@ const init = async () => { })); const slashCommands = client.commands.filter((c) => c.conf.options); - console.log(slashCommands.first()); synchronizeSlashCommands(client, slashCommands.map((command) => ({ name: command.help.name, + type: "CHAT_INPUT", description: client.translations.get("en-US")(`${command.help.category.toLowerCase()}/${command.help.name}:DESCRIPTION`), options: command.conf.options.map((opt) => ({ ...opt, + type: opt.type, description: client.translations.get("en-US")(`${command.help.category.toLowerCase()}/${command.help.name}:OPT_${opt.name.toUpperCase()}_DESCRIPTION`), options: opt.options?.map((o) => ({ ...o, + type: opt.type, description: client.translations.get("en-US")(`${command.help.category.toLowerCase()}/${command.help.name}:OPT_${o.name.toUpperCase()}_DESCRIPTION`) }) ) diff --git a/commands/Economy/birthdate.js b/commands/Economy/birthdate.js index 2b94c3712b..52c525ef88 100644 --- a/commands/Economy/birthdate.js +++ b/commands/Economy/birthdate.js @@ -5,35 +5,44 @@ class Birthdate extends Command { constructor (client) { super(client, { name: "birthdate", + + options: [ + { + name: "date", + type: "STRING" + } + ], + dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "anniversaire" ], memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, - ownerOnly: false, - cooldown: 1000 + ownerOnly: false }); } - async run (message, args, data) { + async run (interaction, translate, data) { - const date = args[0]; - if(!date){ - return message.error("economy/birthdate:MISSING_DATE"); - } + const date = interaction.options.getString("date"); const tArgs = date.split("/"); const [day, month, year] = tArgs; if(!day || !month || !year){ - return message.error("economy/birthdate:INVALID_DATE"); + return interaction.reply({ + content: "economy/birthdate:INVALID_DATE", + ephemeral: true + }); } // Gets the string of the date const match = date.match(/\d+/g); if (!match){ - return message.error("economy/birthdate:INVALID_DATE_FORMAT"); + return interaction.reply({ + content: "economy/birthdate:INVALID_DATE_FORMAT", + ephemeral: true + }); } const tday = +match[0], tmonth = +match[1] - 1; let tyear = +match[2]; diff --git a/docs/commands.md b/docs/commands.md index b79798c9a8..23f2ed88f4 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -94,7 +94,7 @@ Here's the list of Atlanta commands. This one contains more than **120 commands* | Name | Description | Usage | Cooldown | | ---------------- | ------------------------------------------------------------------- | -------------------------------- | ----------- | | **achievements** | Shows your achievements list! | achievements | NaN seconds | -| **birthdate** | Set the birthday date that appear on your profile | birthdate (date) | NaN seconds | +| **birthdate** | Set the birthday date that appear on your profile | USAGE | NaN seconds | | **deposit** | Deposit your money in the bank | deposit [amount] | NaN seconds | | **divorce** | Divorce the person you are currently married to! | divorce | NaN seconds | | **leaderboard** | Shows users who have the most credits, levels or reputation points! | leaderboard [rep/levels/credits] | NaN seconds | diff --git a/languages/en-US/economy/birthdate.json b/languages/en-US/economy/birthdate.json index a0c3aaa4a7..ffe289985d 100644 --- a/languages/en-US/economy/birthdate.json +++ b/languages/en-US/economy/birthdate.json @@ -1,8 +1,7 @@ { "DESCRIPTION": "Set the birthday date that appear on your profile", - "USAGE": "{{prefix}}birthdate (date)", "EXAMPLES": "{{prefix}}birthdate 01/12/2000", - "MISSING_DATE": "Please enter a valid date! For example, 01/12/2000", + "OPT_DATE_DESCRIPTION": "The date you were born", "INVALID_DATE": "You must use the following date format: DD/MM/YYYY. For example, `December 1, 2000` will be `01/12/2000`.", "INVALID_DATE_FORMAT": "You must use the following date format: DD/MM/YYYY. For example, `December 1, 2000` will be `01/12/2000`.", "DATE_TOO_HIGH": "More than 80 years old? :eyes:", From 62d0ae178d8abdcbacd49a3f816dcfd5ab2ea93a Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 19:50:53 +0200 Subject: [PATCH 03/29] :recycle: Rewrite all message#error with interaction#reply --- commands/Administration/addcommand.js | 10 ++++-- commands/Administration/addemoji.js | 15 ++++++-- commands/Administration/automod.js | 5 ++- commands/Administration/autorole.js | 10 ++++-- commands/Administration/backup.js | 40 +++++++++++++++++----- commands/Administration/delcommand.js | 5 ++- commands/Administration/deletemod.js | 5 ++- commands/Administration/goodbye.js | 25 +++++++++++--- commands/Administration/ignore.js | 5 ++- commands/Administration/setfortniteshop.js | 5 ++- commands/Administration/setprefix.js | 10 ++++-- commands/Administration/slowmode.js | 15 ++++++-- commands/Administration/welcome.js | 25 +++++++++++--- commands/Economy/birthdate.js | 15 ++++++-- commands/Economy/deposit.js | 10 ++++-- commands/Economy/divorce.js | 5 ++- commands/Economy/leaderboard.js | 5 ++- commands/Economy/marry.js | 20 ++++++++--- commands/Economy/money.js | 2 +- commands/Economy/pay.js | 15 ++++++-- commands/Economy/profile.js | 5 ++- commands/Economy/rep.js | 15 ++++++-- commands/Economy/rob.js | 10 ++++-- commands/Economy/setbio.js | 10 ++++-- commands/Economy/withdraw.js | 10 ++++-- commands/Fun/8ball.js | 5 ++- commands/Fun/ascii.js | 5 ++- commands/Fun/choice.js | 10 ++++-- commands/Fun/findwords.js | 15 ++++++-- commands/Fun/fml.js | 5 ++- commands/Fun/joke.js | 5 ++- commands/Fun/lmg.js | 5 ++- commands/Fun/lovecalc.js | 10 ++++-- commands/Fun/number.js | 10 ++++-- commands/General/fortnite.js | 10 ++++-- commands/General/fortniteshop.js | 2 +- commands/General/github.js | 2 +- commands/General/hastebin.js | 15 ++++++-- commands/General/invitations.js | 10 ++++-- commands/General/minecraft.js | 5 ++- commands/General/quote.js | 20 ++++++++--- commands/General/remindme.js | 10 ++++-- commands/General/report.js | 2 +- commands/General/setafk.js | 5 ++- commands/General/shorturl.js | 10 ++++-- commands/General/someone.js | 2 +- commands/General/suggest.js | 2 +- commands/General/translate.js | 5 ++- commands/General/userinfo.js | 4 +-- commands/Images/avatar.js | 2 +- commands/Images/clyde.js | 5 ++- commands/Images/phcomment.js | 5 ++- commands/Images/qrcode.js | 5 ++- commands/Images/tweet.js | 10 ++++-- commands/Images/youtube-comment.js | 5 ++- commands/Moderation/announcement.js | 20 ++++++++--- commands/Moderation/ban.js | 25 +++++++++++--- commands/Moderation/clear-sanctions.js | 5 ++- commands/Moderation/clear.js | 10 ++++-- commands/Moderation/giveaway.js | 40 +++++++++++++++++----- commands/Moderation/kick.js | 25 +++++++++++--- commands/Moderation/mute.js | 20 ++++++++--- commands/Moderation/poll.js | 15 ++++++-- commands/Moderation/sanctions.js | 5 ++- commands/Moderation/setwarns.js | 15 ++++++-- commands/Moderation/unban.js | 5 ++- commands/Moderation/unmute.js | 5 ++- commands/Moderation/warn.js | 25 +++++++++++--- commands/Music/autoplay.js | 10 ++++-- commands/Music/back.js | 20 ++++++++--- commands/Music/filter.js | 10 ++++-- commands/Music/filters.js | 10 ++++-- commands/Music/lyrics.js | 5 ++- commands/Music/np.js | 10 ++++-- commands/Music/pause.js | 10 ++++-- commands/Music/play.js | 15 ++++++-- commands/Music/queue.js | 10 ++++-- commands/Music/resume.js | 10 ++++-- commands/Music/seek.js | 15 ++++++-- commands/Music/skip.js | 20 ++++++++--- commands/Music/stop.js | 15 ++++++-- commands/Owner/servers-list.js | 2 +- 82 files changed, 698 insertions(+), 182 deletions(-) diff --git a/commands/Administration/addcommand.js b/commands/Administration/addcommand.js index 323ce3e3cb..021c22300c 100644 --- a/commands/Administration/addcommand.js +++ b/commands/Administration/addcommand.js @@ -20,7 +20,10 @@ class Addcommand extends Command { async run (message, args, data) { if (!args[0]) - return message.error("administration/addcommand:MISSING_NAME"); + return interaction.reply({ + content: translate("administration/addcommand:MISSING_NAME"), + ephemeral: true + }); const name = args[0].split("\n")[0]; @@ -36,7 +39,10 @@ class Addcommand extends Command { const answer = (args[0].split("\n")[1] || "") + args.slice(1).join(" "); if (!answer) { - return message.error("administration/addcommand:MISSING_ANSWER"); + return interaction.reply({ + content: translate("administration/addcommand:MISSING_ANSWER"), + ephemeral: true + }); } data.guild.customCommands.push({ diff --git a/commands/Administration/addemoji.js b/commands/Administration/addemoji.js index 64eac555f9..ad860dcbad 100644 --- a/commands/Administration/addemoji.js +++ b/commands/Administration/addemoji.js @@ -21,15 +21,24 @@ class Addemoji extends Command { const URL = args[0]; if (!URL) { - return message.error("administration/addemoji:MISSING_URL"); + return interaction.reply({ + content: translate("administration/addemoji:MISSING_URL"), + ephemeral: true + }); } const name = args[1] ? args[1].replace(/[^a-z0-9]/gi, "") : null; if (!name) { - return message.error("administration/addemoji:MISSING_NAME"); + return interaction.reply({ + content: translate("administration/addemoji:MISSING_NAME"), + ephemeral: true + }); } if (name.length < 2 || name > 32) { - return message.error("administration/addemoji:INVALID_NAME"); + return interaction.reply({ + content: translate("administration/addemoji:INVALID_NAME"), + ephemeral: true + }); } message.guild.emojis diff --git a/commands/Administration/automod.js b/commands/Administration/automod.js index 7d266b28d9..3f3eca4fea 100644 --- a/commands/Administration/automod.js +++ b/commands/Administration/automod.js @@ -21,7 +21,10 @@ class Automod extends Command { const status = args[0]; if(!status || (status !== "on" && status !== "off")){ - return message.error("administration/automod:MISSING_STATUS"); + return interaction.reply({ + content: translate("administration/automod:MISSING_STATUS"), + ephemeral: true + }); } if(status === "on"){ diff --git a/commands/Administration/autorole.js b/commands/Administration/autorole.js index 5eeba56c41..ef7dfa2618 100644 --- a/commands/Administration/autorole.js +++ b/commands/Administration/autorole.js @@ -22,7 +22,10 @@ class Autorole extends Command { const status = args[0]; if(status !== "on" && status !== "off"){ - return message.error("administration/autorole:MISSING_STATUS"); + return interaction.reply({ + content: translate("administration/autorole:MISSING_STATUS"), + ephemeral: true + }); } if(status === "on"){ @@ -32,7 +35,10 @@ class Autorole extends Command { search: args.slice(1).join(" ") }); if(!role){ - return message.error("administration/autorole:MISSING_ROLE"); + return interaction.reply({ + content: translate("administration/autorole:MISSING_ROLE"), + ephemeral: true + }); } data.guild.plugins.autorole = { diff --git a/commands/Administration/backup.js b/commands/Administration/backup.js index fe62b0ecee..12914eb130 100644 --- a/commands/Administration/backup.js +++ b/commands/Administration/backup.js @@ -24,7 +24,10 @@ class Backup extends Command { const status = args[0]; if(!status){ - return message.error("administration/backup:MISSING_STATUS"); + return interaction.reply({ + content: translate("administration/backup:MISSING_STATUS"), + ephemeral: true + }); } if(status === "create"){ @@ -38,16 +41,25 @@ class Backup extends Command { backupID: backup.id })).catch(() => { backup.remove(backup.id); - message.error("misc:CANNOT_DM"); + interaction.reply({ + content: translate("misc:CANNOT_DM"), + ephemeral: true + }); }); }).catch((err) => { Sentry.captureException(err); - return message.error("misc:ERR_OCCURRED"); + return interaction.reply({ + content: translate("misc:ERR_OCCURRED"), + ephemeral: true + }); }); } else if (status === "load"){ const backupID = args[1]; if(!backupID){ - return message.error("administration/backup:MISSING_BACKUP_ID"); + return interaction.reply({ + content: translate("administration/backup:MISSING_BACKUP_ID"), + ephemeral: true + }); } backup.fetch(backupID).then(async () => { message.sendT("administration/backup:CONFIRMATION"); @@ -57,7 +69,10 @@ class Backup extends Command { errors: ["time"] }).catch(() => { // if the author of the commands does not confirm the backup loading - return message.error("administration/backup:TIMES_UP"); + return interaction.reply({ + content: translate("administration/backup:TIMES_UP"), + ephemeral: true + }); }); // When the author of the command has confirmed that he wants to load the backup on his server message.author.send(message.translate("administration/backup:START_LOADING")); @@ -69,7 +84,10 @@ class Backup extends Command { }).catch((err) => { Sentry.captureException(err); // If an error occurenced - return message.error("misc:ERR_OCCURRED"); + return interaction.reply({ + content: translate("misc:ERR_OCCURRED"), + ephemeral: true + }); }); }).catch(() => { // if the backup wasn't found @@ -80,7 +98,10 @@ class Backup extends Command { } else if (status === "info"){ const backupID = args[1]; if(!backupID){ - return message.error("administration/backup:MISSING_BACKUP_ID"); + return interaction.reply({ + content: translate("administration/backup:MISSING_BACKUP_ID"), + ephemeral: true + }); } backup.fetch(backupID).then(async (backupInfos) => { const embed = new Discord.MessageEmbed() @@ -103,7 +124,10 @@ class Backup extends Command { }); }); } else { - return message.error("administration/backup:MISSING_STATUS"); + return interaction.reply({ + content: translate("administration/backup:MISSING_STATUS"), + ephemeral: true + }); } } diff --git a/commands/Administration/delcommand.js b/commands/Administration/delcommand.js index c881d49958..8975fca8d8 100644 --- a/commands/Administration/delcommand.js +++ b/commands/Administration/delcommand.js @@ -21,7 +21,10 @@ class Delcommand extends Command { const name = args[0]; if(!name){ - return message.error("administration/delcommand:MISSING_NAME"); + return interaction.reply({ + content: translate("administration/delcommand:MISSING_NAME"), + ephemeral: true + }); } if(!data.guild.customCommands.find((c) => c.name === name)){ diff --git a/commands/Administration/deletemod.js b/commands/Administration/deletemod.js index 137c8a7299..e12755051e 100644 --- a/commands/Administration/deletemod.js +++ b/commands/Administration/deletemod.js @@ -20,7 +20,10 @@ class Deletemod extends Command { async run (message, args, data) { const status = args[0]; if(!status || status !== "on" && status !== "off"){ - return message.error("administration/deletemod:MISSING_STATUS"); + return interaction.reply({ + content: translate("administration/deletemod:MISSING_STATUS"), + ephemeral: true + }); } if(status === "on"){ data.guild.autoDeleteModCommands = true; diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index 51ba9071c2..157ebe04fa 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -32,7 +32,10 @@ class Goodbye extends Command { (!args[0] || !["edit", "off"].includes(args[0])) && data.guild.plugins.goodbye.enabled ) - return message.error("administration/goodbye:MISSING_STATUS"); + return interaction.reply({ + content: translate("administration/goodbye:MISSING_STATUS"), + ephemeral: true + }); if (args[0] === "off") { data.guild.plugins.goodbye = { @@ -78,7 +81,10 @@ class Goodbye extends Command { ) { goodbye.withImage = false; } else { - return message.error("misc:INVALID_YES_NO"); + return interaction.reply({ + content: translate("misc:INVALID_YES_NO"), + ephemeral: true + }); } data.guild.plugins.goodbye = goodbye; data.guild.markModified("plugins.goodbye"); @@ -96,7 +102,10 @@ class Goodbye extends Command { goodbye.message = msg.content; return message.sendT("administration/goodbye:FORM_3"); } - return message.error("administration/goodbye:MAX_CHARACT"); + return interaction.reply({ + content: translate("administration/goodbye:MAX_CHARACT"), + ephemeral: true + }); } // If the channel is not filled, it means the user sent it @@ -106,7 +115,10 @@ class Goodbye extends Command { channelType: "text" }); if (!channel) { - return message.error("misc:INVALID_CHANNEL"); + return interaction.reply({ + content: translate("misc:INVALID_CHANNEL"), + ephemeral: true + }); } goodbye.channel = channel.id; message.sendT("administration/goodbye:FORM_2", { @@ -119,7 +131,10 @@ class Goodbye extends Command { collector.on("end", (_, reason) => { if (reason === "time") { - return message.error("misc:TIMEOUT"); + return interaction.reply({ + content: translate("misc:TIMEOUT"), + ephemeral: true + }); } }); } diff --git a/commands/Administration/ignore.js b/commands/Administration/ignore.js index 4fd4f8499c..36f7fa8571 100644 --- a/commands/Administration/ignore.js +++ b/commands/Administration/ignore.js @@ -21,7 +21,10 @@ class Ignore extends Command { const channel = message.mentions.channels.filter((ch) => ch.type === "text" && ch.guild.id === message.guild.id).first(); if(!channel){ - return message.error("misc:INVALID_CHANNEL"); + return interaction.reply({ + content: translate("misc:INVALID_CHANNEL"), + ephemeral: true + }); } const ignored = data.guild.ignoredChannels.includes(channel.id); diff --git a/commands/Administration/setfortniteshop.js b/commands/Administration/setfortniteshop.js index 2b65c03d8d..e1bb4d2274 100644 --- a/commands/Administration/setfortniteshop.js +++ b/commands/Administration/setfortniteshop.js @@ -22,7 +22,10 @@ class Setfortniteshop extends Command { async run(message, args, data) { if (!data.config.apiKeys.fortniteFNBR || data.config.apiKeys.fortniteFNBR.length === "") { - return message.error("misc:COMMAND_DISABLED"); + return interaction.reply({ + content: translate("misc:COMMAND_DISABLED"), + ephemeral: true + }); } if (data.guild.plugins.fortniteshop && !message.mentions.channels.first() || message.mentions.channels.first() && data.guild.plugins.fortniteshop === message.mentions.channels.first().id) { diff --git a/commands/Administration/setprefix.js b/commands/Administration/setprefix.js index 9280cff69a..455cebb253 100644 --- a/commands/Administration/setprefix.js +++ b/commands/Administration/setprefix.js @@ -21,10 +21,16 @@ class Setprefix extends Command { const prefix = args[0]; if(!prefix){ - return message.error("administration/setprefix:MISSING_PREFIX"); + return interaction.reply({ + content: translate("administration/setprefix:MISSING_PREFIX"), + ephemeral: true + }); } if(prefix.length > 5){ - return message.error("administration/setprefix:TOO_LONG"); + return interaction.reply({ + content: translate("administration/setprefix:TOO_LONG"), + ephemeral: true + }); } data.guild.prefix = prefix; diff --git a/commands/Administration/slowmode.js b/commands/Administration/slowmode.js index c798e9a76c..316febd09c 100644 --- a/commands/Administration/slowmode.js +++ b/commands/Administration/slowmode.js @@ -22,12 +22,18 @@ class Slowmode extends Command { const channel = message.mentions.channels.filter((ch) => ch.type === "text" && ch.guild.id === message.guild.id).first(); if(!channel){ - return message.error("misc:INVALID_CHANNEL"); + return interaction.reply({ + content: translate("misc:INVALID_CHANNEL"), + ephemeral: true + }); } const time = args[1]; if(!time){ if(!data.guild.slowmode.channels.find((ch) => ch.id === channel.id)){ - return message.error("misc:INVALID_TIME"); + return interaction.reply({ + content: translate("misc:INVALID_TIME"), + ephemeral: true + }); } data.guild.slowmode.channels = data.guild.slowmode.channels.filter((ch) => ch.id !== channel.id); data.guild.markModified("slowmode.channels"); @@ -38,7 +44,10 @@ class Slowmode extends Command { }); } else { if(isNaN(ms(time))){ - return message.error("misc:INVALID_TIME"); + return interaction.reply({ + content: translate("misc:INVALID_TIME"), + ephemeral: true + }); } if(data.guild.slowmode.channels.find((ch) => ch.id === channel.id)){ data.guild.slowmode.channels = data.guild.slowmode.channels.filter((ch) => ch.id !== channel.id); diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index c70536cd11..32385460bb 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -32,7 +32,10 @@ class Welcome extends Command { (!args[0] || !["edit", "off"].includes(args[0])) && data.guild.plugins.welcome.enabled ) - return message.error("administration/welcome:MISSING_STATUS"); + return interaction.reply({ + content: translate("administration/welcome:MISSING_STATUS"), + ephemeral: true + }); if (args[0] === "off") { data.guild.plugins.welcome = { @@ -78,7 +81,10 @@ class Welcome extends Command { ) { welcome.withImage = false; } else { - return message.error("misc:INVALID_YES_NO"); + return interaction.reply({ + content: translate("misc:INVALID_YES_NO"), + ephemeral: true + }); } data.guild.plugins.welcome = welcome; data.guild.markModified("plugins.welcome"); @@ -96,7 +102,10 @@ class Welcome extends Command { welcome.message = msg.content; return message.sendT("administration/welcome:FORM_3"); } - return message.error("administration/goodbye:MAX_CHARACT"); + return interaction.reply({ + content: translate("administration/goodbye:MAX_CHARACT"), + ephemeral: true + }); } // If the channel is not filled, it means the user sent it @@ -106,7 +115,10 @@ class Welcome extends Command { channelType: "text" }); if (!channel) { - return message.error("misc:INVALID_CHANNEL"); + return interaction.reply({ + content: translate("misc:INVALID_CHANNEL"), + ephemeral: true + }); } welcome.channel = channel.id; message.sendT("administration/welcome:FORM_2", { @@ -119,7 +131,10 @@ class Welcome extends Command { collector.on("end", (_, reason) => { if (reason === "time") { - return message.error("misc:TIMEOUT"); + return interaction.reply({ + content: translate("misc:TIMEOUT"), + ephemeral: true + }); } }); } diff --git a/commands/Economy/birthdate.js b/commands/Economy/birthdate.js index 52c525ef88..16d7d7c38d 100644 --- a/commands/Economy/birthdate.js +++ b/commands/Economy/birthdate.js @@ -51,13 +51,22 @@ class Birthdate extends Command { } const d = new Date(tyear, tmonth, tday); if(!(tday == d.getDate() && tmonth == d.getMonth() && tyear == d.getFullYear())){ - return message.error("economy/birthdate:INVALID_DATE_FORMAT"); + return interaction.reply({ + content: translate("economy/birthdate:INVALID_DATE_FORMAT"), + ephemeral: true + }); } if(d.getTime() > Date.now()){ - return message.error("economy/birthdate:DATE_TOO_HIGH"); + return interaction.reply({ + content: translate("economy/birthdate:DATE_TOO_HIGH"), + ephemeral: true + }); } if(d.getTime() < (Date.now()-2.523e+12)){ - return message.error("economy/birthdate:DATE_TOO_LOW"); + return interaction.reply({ + content: translate("economy/birthdate:DATE_TOO_LOW"), + ephemeral: true + }); } data.userData.birthdate = d; diff --git a/commands/Economy/deposit.js b/commands/Economy/deposit.js index a0085952a5..773be177e9 100644 --- a/commands/Economy/deposit.js +++ b/commands/Economy/deposit.js @@ -22,14 +22,20 @@ class Deposit extends Command { let amount = args[0]; if(!(parseInt(data.memberData.money, 10) > 0)) { - return message.error("economy/deposit:NO_CREDIT"); + return interaction.reply({ + content: translate("economy/deposit:NO_CREDIT"), + ephemeral: true + }); } if(args[0] === "all"){ amount = parseInt(data.memberData.money, 10); } else { if(isNaN(amount) || parseInt(amount, 10) < 1){ - return message.error("economy/deposit:MISSING_AMOUNT"); + return interaction.reply({ + content: translate("economy/deposit:MISSING_AMOUNT"), + ephemeral: true + }); } amount = parseInt(amount, 10); } diff --git a/commands/Economy/divorce.js b/commands/Economy/divorce.js index 5ee87e5556..b08d902832 100644 --- a/commands/Economy/divorce.js +++ b/commands/Economy/divorce.js @@ -21,7 +21,10 @@ class Divorce extends Command { // Check if the message author is wedded if(!data.userData.lover){ - return message.error("economy/divorce:NOT_MARRIED"); + return interaction.reply({ + content: translate("economy/divorce:NOT_MARRIED"), + ephemeral: true + }); } // Updates db diff --git a/commands/Economy/leaderboard.js b/commands/Economy/leaderboard.js index 3599464937..323c5a2dcb 100644 --- a/commands/Economy/leaderboard.js +++ b/commands/Economy/leaderboard.js @@ -24,7 +24,10 @@ class Leaderboard extends Command { const type = args[0]; if(!type || (type !== "credits" && type !== "level" && type !== "rep")){ - return message.error("economy/leaderboard:MISSING_TYPE"); + return interaction.reply({ + content: translate("economy/leaderboard:MISSING_TYPE"), + ephemeral: true + }); } if(type === "credits"){ diff --git a/commands/Economy/marry.js b/commands/Economy/marry.js index 5ddd4ec534..e11645ac2f 100644 --- a/commands/Economy/marry.js +++ b/commands/Economy/marry.js @@ -33,7 +33,10 @@ class Marry extends Command { // Gets the first mentionned member const member = await this.client.resolveMember(args[0], message.guild); if(!member){ - return message.error("economy/marry:INVALID_MEMBER"); + return interaction.reply({ + content: translate("economy/marry:INVALID_MEMBER"), + ephemeral: true + }); } const userData = await this.client.findOrCreateUser({ id: member.id }); @@ -45,11 +48,17 @@ class Marry extends Command { } if(member.user.bot){ - return message.error("economy/marry:BOT_USER"); + return interaction.reply({ + content: translate("economy/marry:BOT_USER"), + ephemeral: true + }); } if(member.id === message.author.id){ - return message.error("economy/marry:YOURSELF"); + return interaction.reply({ + content: translate("economy/marry:YOURSELF"), + ephemeral: true + }); } for(const requester in pendings){ @@ -99,7 +108,10 @@ class Marry extends Command { if(msg.content.toLowerCase() === message.translate("common:NO").toLowerCase()){ return collector.stop(false); } else { - return message.error("misc:INVALID_YES_NO"); + return interaction.reply({ + content: translate("misc:INVALID_YES_NO"), + ephemeral: true + }); } }); diff --git a/commands/Economy/money.js b/commands/Economy/money.js index 4dca632786..95e7661cc0 100644 --- a/commands/Economy/money.js +++ b/commands/Economy/money.js @@ -47,7 +47,7 @@ class Credits extends Command { const embed = new Discord.MessageEmbed() .setAuthor(message.translate("economy/money:TITLE", { username: member.user.username - }), member.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) + }), member.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .addField(message.translate("economy/profile:CASH"), message.translate("economy/profile:MONEY", { money: memberData.money }), true) diff --git a/commands/Economy/pay.js b/commands/Economy/pay.js index b458540340..788f180f52 100644 --- a/commands/Economy/pay.js +++ b/commands/Economy/pay.js @@ -21,13 +21,22 @@ class Pay extends Command { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ - return message.error("economy/pay:INVALID_MEMBER"); + return interaction.reply({ + content: translate("economy/pay:INVALID_MEMBER"), + ephemeral: true + }); } if(member.user.bot){ - return message.error("economy/pay:BOT_USER"); + return interaction.reply({ + content: translate("economy/pay:BOT_USER"), + ephemeral: true + }); } if(member.id === message.author.id){ - return message.error("economy/pay:YOURSELF"); + return interaction.reply({ + content: translate("economy/pay:YOURSELF"), + ephemeral: true + }); } const sentAmount = args[1]; if(!sentAmount || isNaN(sentAmount) || parseInt(sentAmount, 10) <= 0){ diff --git a/commands/Economy/profile.js b/commands/Economy/profile.js index 27a03f9ef4..9e372c7582 100644 --- a/commands/Economy/profile.js +++ b/commands/Economy/profile.js @@ -33,7 +33,10 @@ class Profile extends Command { // Check if the user is a bot if(member.user.bot){ - return message.error("economy/profile:BOT_USER"); + return interaction.reply({ + content: translate("economy/profile:BOT_USER"), + ephemeral: true + }); } // Gets the data of the user whose profile you want to display diff --git a/commands/Economy/rep.js b/commands/Economy/rep.js index 2dde65b09a..6a1b101559 100644 --- a/commands/Economy/rep.js +++ b/commands/Economy/rep.js @@ -34,13 +34,22 @@ class Rep extends Command { const user = await this.client.resolveUser(args[0]); if(!user){ - return message.error("economy/rep:INVALID_USER"); + return interaction.reply({ + content: translate("economy/rep:INVALID_USER"), + ephemeral: true + }); } if(user.bot){ - return message.error("economy/rep:BOT_USER"); + return interaction.reply({ + content: translate("economy/rep:BOT_USER"), + ephemeral: true + }); } if(user.id === message.author.id){ - return message.error("economy/rep:YOURSELF"); + return interaction.reply({ + content: translate("economy/rep:YOURSELF"), + ephemeral: true + }); } // Records in the database the time when the member will be able to execute the command again (in 12 hours) diff --git a/commands/Economy/rob.js b/commands/Economy/rob.js index 3cd58584ba..3718f9c57b 100644 --- a/commands/Economy/rob.js +++ b/commands/Economy/rob.js @@ -21,11 +21,17 @@ class Rob extends Command { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ - return message.error("economy/rob:MISSING_MEMBER"); + return interaction.reply({ + content: translate("economy/rob:MISSING_MEMBER"), + ephemeral: true + }); } if(member.id === message.author.id){ - return message.error("economy/rob:YOURSELF"); + return interaction.reply({ + content: translate("economy/rob:YOURSELF"), + ephemeral: true + }); } const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); diff --git a/commands/Economy/setbio.js b/commands/Economy/setbio.js index 39b2ae7874..654b37fc90 100644 --- a/commands/Economy/setbio.js +++ b/commands/Economy/setbio.js @@ -20,10 +20,16 @@ class Setbio extends Command { async run (message, args, data) { const newBio = args.join(" "); if(!newBio){ - return message.error("economy/setbio:MISSING"); + return interaction.reply({ + content: translate("economy/setbio:MISSING"), + ephemeral: true + }); } if(newBio.length > 100){ - return message.error("economy/setbio:MAX_CHARACT"); + return interaction.reply({ + content: translate("economy/setbio:MAX_CHARACT"), + ephemeral: true + }); } data.userData.bio = newBio; message.success("economy/setbio:SUCCESS"); diff --git a/commands/Economy/withdraw.js b/commands/Economy/withdraw.js index d68a527783..1fce04bdf1 100644 --- a/commands/Economy/withdraw.js +++ b/commands/Economy/withdraw.js @@ -22,14 +22,20 @@ class Withdraw extends Command { let amount = args[0]; if(!(parseInt(data.memberData.bankSold, 10) > 0)) { - return message.error("economy/withdraw:NO_CREDIT"); + return interaction.reply({ + content: translate("economy/withdraw:NO_CREDIT"), + ephemeral: true + }); } if(args[0] === "all"){ amount = parseInt(data.memberData.bankSold, 10); } else { if(isNaN(amount) || parseInt(amount, 10) < 1){ - return message.error("economy/withdraw:MISSING_AMOUNT"); + return interaction.reply({ + content: translate("economy/withdraw:MISSING_AMOUNT"), + ephemeral: true + }); } amount = parseInt(amount, 10); } diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js index 563003d713..0516a903d2 100644 --- a/commands/Fun/8ball.js +++ b/commands/Fun/8ball.js @@ -20,7 +20,10 @@ class Eightball extends Command { async run (message, args) { if (!args[0] || !message.content.endsWith("?")) { - return message.error("fun/8ball:ERR_QUESTION"); + return interaction.reply({ + content: translate("fun/8ball:ERR_QUESTION"), + ephemeral: true + }); } const answerNO = parseInt(Math.floor(Math.random() * 10), 10); diff --git a/commands/Fun/ascii.js b/commands/Fun/ascii.js index bc7392d031..7d4a8d954c 100644 --- a/commands/Fun/ascii.js +++ b/commands/Fun/ascii.js @@ -23,7 +23,10 @@ class Ascii extends Command { async run (message, args) { const text = args.join(" "); if (!text || text.length > 20) { - return message.error("fun/ascii:TEXT_MISSING"); + return interaction.reply({ + content: translate("fun/ascii:TEXT_MISSING"), + ephemeral: true + }); } const rendered = await figletAsync(text); diff --git a/commands/Fun/choice.js b/commands/Fun/choice.js index 069b1df0f4..1e6c47ae31 100644 --- a/commands/Fun/choice.js +++ b/commands/Fun/choice.js @@ -21,9 +21,15 @@ class Choice extends Command { // Gets the answers by spliting on "/" const answers = args.join(" ").split("/"); - if (answers.length < 2) return message.error("fun/choice:MISSING"); + if (answers.length < 2) return interaction.reply({ + content: translate("fun/choice:MISSING"), + ephemeral: true + }); if (answers.some(answer => !answer)) - return message.error("fun/choice:EMPTY"); + return interaction.reply({ + content: translate("fun/choice:EMPTY"), + ephemeral: true + }); const m = await message.sendT( "fun/choice:PROGRESS", diff --git a/commands/Fun/findwords.js b/commands/Fun/findwords.js index f3109d4e42..0a68d79514 100644 --- a/commands/Fun/findwords.js +++ b/commands/Fun/findwords.js @@ -23,7 +23,10 @@ class FindWords extends Command { async run (message, args, data) { if (currentGames[message.guild.id]) { - return message.error("fun/number:GAME_RUNNING"); + return interaction.reply({ + content: translate("fun/number:GAME_RUNNING"), + ephemeral: true + }); } // Reads words file const wordList = require("../../assets/json/words/"+message.guild.data.language+".json"); @@ -82,7 +85,10 @@ class FindWords extends Command { collector.on("end", async (collected, reason) => { if(reason === "time"){ - message.error("fun/findwords:NO_WINNER"); + interaction.reply({ + content: translate("fun/findwords:NO_WINNER"), + ephemeral: true + }); } else { message.success("fun/findwords:WORD_FOUND", { winner: "<@"+reason+">" @@ -95,7 +101,10 @@ class FindWords extends Command { } else { currentGames[message.guild.id] = false; if(winners.length < 1){ - return message.error("fun/findwords:NO_WINNER_ALL"); + return interaction.reply({ + content: translate("fun/findwords:NO_WINNER_ALL"), + ephemeral: true + }); } const winnerID = await getWinner(winners); const time = message.convertTime(createdAt, "from", true); diff --git a/commands/Fun/fml.js b/commands/Fun/fml.js index b18435ec06..a892b4135b 100644 --- a/commands/Fun/fml.js +++ b/commands/Fun/fml.js @@ -21,7 +21,10 @@ class Fml extends Command { async run (message, args, data) { if (!this.client.config.apiKeys.blagueXYZ) - return message.error("misc:COMMAND_DISABLED"); + return interaction.reply({ + content: translate("misc:COMMAND_DISABLED"), + ephemeral: true + }); const fml = await this.client.joker.randomVDM(null, data.guild.language.substr(0, 2)); diff --git a/commands/Fun/joke.js b/commands/Fun/joke.js index f35819d66e..fa9034d966 100644 --- a/commands/Fun/joke.js +++ b/commands/Fun/joke.js @@ -21,7 +21,10 @@ class Joke extends Command { async run (message, args, data) { if (!this.client.config.apiKeys.blagueXYZ) - return message.error("misc:COMMAND_DISABLED"); + return interaction.reply({ + content: translate("misc:COMMAND_DISABLED"), + ephemeral: true + }); const joke = await this.client.joker.randomJoke( data.guild.language.substr(0, 2) diff --git a/commands/Fun/lmg.js b/commands/Fun/lmg.js index 184fd88611..63fb3009a4 100644 --- a/commands/Fun/lmg.js +++ b/commands/Fun/lmg.js @@ -19,7 +19,10 @@ class Lmg extends Command { async run (message, args) { const question = args.join(" "); - if (!question) return message.error("fun/lmg:MISSING"); + if (!question) return interaction.reply({ + content: translate("fun/lmg:MISSING"), + ephemeral: true + }); const encodedQuestion = question.replace(/[' '_]/g, "+"); await message.channel.send(`http://lmgtfy.com/?q=${encodedQuestion}`); message.delete().catch(() => {}); diff --git a/commands/Fun/lovecalc.js b/commands/Fun/lovecalc.js index 5c44292a13..ff82c0375d 100644 --- a/commands/Fun/lovecalc.js +++ b/commands/Fun/lovecalc.js @@ -22,14 +22,20 @@ class Lovecalc extends Command { async run (message) { const firstMember = message.mentions.members.filter(m => m.id !== message.author.id).first(); if (!firstMember) - return message.error("fun/lovecalc:MISSING"); + return interaction.reply({ + content: translate("fun/lovecalc:MISSING"), + ephemeral: true + }); const secondMember = message.mentions.members .filter(m => m.id !== firstMember.id) .filter(m => m.id !== message.author.id) .first() || message.member; if (!secondMember) - return message.error("fun/lovecalc:MISSING"); + return interaction.reply({ + content: translate("fun/lovecalc:MISSING"), + ephemeral: true + }); const members = [firstMember, secondMember].sort( (a, b) => parseInt(a.id, 10) - parseInt(b.id, 10) diff --git a/commands/Fun/number.js b/commands/Fun/number.js index f86eb37923..23d2585b52 100644 --- a/commands/Fun/number.js +++ b/commands/Fun/number.js @@ -23,7 +23,10 @@ class Number extends Command { async run (message) { if (currentGames[message.guild.id]) { - return message.error("fun/number:GAME_RUNNING"); + return interaction.reply({ + content: translate("fun/number:GAME_RUNNING"), + ephemeral: true + }); } const participants = []; @@ -89,7 +92,10 @@ class Number extends Command { collector.on("end", (_collected, reason) => { delete currentGames[message.guild.id]; if (reason === "time") { - return message.error("fun/number:DEFEAT", { number }); + return interaction.reply({ + content: translate("fun/number:DEFEAT", { number }), + ephemeral: true + }); } }); } diff --git a/commands/General/fortnite.js b/commands/General/fortnite.js index 52e8de1656..19de9945c3 100644 --- a/commands/General/fortnite.js +++ b/commands/General/fortnite.js @@ -28,12 +28,18 @@ class Fortnite extends Command { const platform = args[0]; if(!platform || (platform !== "pc" && platform !== "xbl" && platform !== "psn")){ - return message.error("general/fortnite:MISSING_PLATFORM"); + return interaction.reply({ + content: translate("general/fortnite:MISSING_PLATFORM"), + ephemeral: true + }); } const user = args.slice(1).join(" "); if(!user){ - return message.error("general/fortnite:MISSING_USERNAME"); + return interaction.reply({ + content: translate("general/fortnite:MISSING_USERNAME"), + ephemeral: true + }); } const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/General/fortniteshop.js b/commands/General/fortniteshop.js index 06a5762bcf..4cd1d8d944 100644 --- a/commands/General/fortniteshop.js +++ b/commands/General/fortniteshop.js @@ -46,7 +46,7 @@ class Fortniteshop extends Command { const embed = new Discord.MessageEmbed() .setAuthor(message.translate("general/fortniteshop:HEADER", { date: message.printDate(new Date(Date.now())) - }), this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) + }), this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .attachFiles(attachment) .setImage("attachment://shop.png") .setColor(this.client.config.embed.color) diff --git a/commands/General/github.js b/commands/General/github.js index bf54661931..12afa5b23f 100644 --- a/commands/General/github.js +++ b/commands/General/github.js @@ -25,7 +25,7 @@ class Github extends Command { const json = await res.json(); const embed = new Discord.MessageEmbed() - .setAuthor(this.client.user.tag, this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) + .setAuthor(this.client.user.tag, this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .setDescription("["+message.translate("general/github:CLICK_HERE")+"](https://github.com/Androz2091/AtlantaBot)") .addField("Stars", json.stargazers_count, true) .addField("Forks", json.forks_count, true) diff --git a/commands/General/hastebin.js b/commands/General/hastebin.js index 41db9554b0..cb0badaf7c 100644 --- a/commands/General/hastebin.js +++ b/commands/General/hastebin.js @@ -23,7 +23,10 @@ class Hastebin extends Command { const content = args.join(" "); if(!content){ - return message.error("general/hastebin:MISSING_TEXT"); + return interaction.reply({ + content: translate("general/hastebin:MISSING_TEXT"), + ephemeral: true + }); } try { @@ -35,7 +38,10 @@ class Hastebin extends Command { const json = await res.json(); if(!json.key){ - return message.error("misc:ERR_OCCURRED"); + return interaction.reply({ + content: translate("misc:ERR_OCCURRED"), + ephemeral: true + }); } const url = "https://hastebin.com/"+json.key+".js"; @@ -45,7 +51,10 @@ class Hastebin extends Command { .setColor(data.config.embed.color); message.channel.send({ embeds: [embed] }); } catch(e){ - message.error("misc:ERR_OCCURRED"); + interaction.reply({ + content: translate("misc:ERR_OCCURRED"), + ephemeral: true + }); } } diff --git a/commands/General/invitations.js b/commands/General/invitations.js index fb38b1f5ed..41c4253038 100644 --- a/commands/General/invitations.js +++ b/commands/General/invitations.js @@ -25,13 +25,19 @@ class Invitations extends Command { // Gets the invites const invites = await message.guild.fetchInvites().catch(() => {}); - if (!invites) return message.error("misc:ERR_OCCURRED"); + if (!invites) return interaction.reply({ + content: translate("misc:ERR_OCCURRED"), + ephemeral: true + }); const memberInvites = invites.filter((i) => i.inviter && i.inviter.id === member.user.id); if(memberInvites.size <= 0){ if(member === message.member){ - return message.error("general/invitations:NOBODY_AUTHOR"); + return interaction.reply({ + content: translate("general/invitations:NOBODY_AUTHOR"), + ephemeral: true + }); } else { return message.error("general/invitations:NOBODY_MEMBER", { member: member.user.tag diff --git a/commands/General/minecraft.js b/commands/General/minecraft.js index a890ae6aa0..8570125ebc 100644 --- a/commands/General/minecraft.js +++ b/commands/General/minecraft.js @@ -25,7 +25,10 @@ class Minecraft extends Command { const ip = args[0]; if(!ip){ - return message.error("general/minecraft:MISSING_IP"); + return interaction.reply({ + content: translate("general/minecraft:MISSING_IP"), + ephemeral: true + }); } const favicon = `https://eu.mc-api.net/v3/server/favicon/${ip}`; diff --git a/commands/General/quote.js b/commands/General/quote.js index 05c6d81037..8f95592480 100644 --- a/commands/General/quote.js +++ b/commands/General/quote.js @@ -38,7 +38,10 @@ class Quote extends Command { message.author.send(message.translate("general/quote:MISSING_ID")).then(() => { message.delete(); }).catch(() => { - message.error("misc:CANNOT_DM"); + interaction.reply({ + content: translate("misc:CANNOT_DM"), + ephemeral: true + }); }); return; } @@ -50,7 +53,10 @@ class Quote extends Command { message.author.send(message.translate("general/quote:NO_MESSAGE_ID")).then(() => { message.delete(); }).catch(() => { - message.error("misc:CANNOT_DM"); + interaction.reply({ + content: translate("misc:CANNOT_DM"), + ephemeral: true + }); }); return; } @@ -61,7 +67,10 @@ class Quote extends Command { message.author.send((message.translate("general/quote:NO_MESSAGE_ID"))).then(() => { message.delete(); }).catch(() => { - message.error("misc:CANNOT_DM"); + interaction.reply({ + content: translate("misc:CANNOT_DM"), + ephemeral: true + }); }); return; }).then((msg) => { @@ -73,7 +82,10 @@ class Quote extends Command { message.author.send(message.translate("general/quote:NO_MESSAGE_ID")).then(() => { message.delete(); }).catch(() => { - message.error("misc:CANNOT_DM"); + interaction.reply({ + content: translate("misc:CANNOT_DM"), + ephemeral: true + }); }); return; }).then((msg) => { diff --git a/commands/General/remindme.js b/commands/General/remindme.js index 385d43663a..3e6dcfcad0 100644 --- a/commands/General/remindme.js +++ b/commands/General/remindme.js @@ -21,12 +21,18 @@ class Remindme extends Command { const time = args[0]; if(!time || isNaN(ms(time))){ - return message.error("misc:INVALID_TIME"); + return interaction.reply({ + content: translate("misc:INVALID_TIME"), + ephemeral: true + }); } const msg = args.slice(1).join(" "); if(!msg){ - return message.error("general/remindme:MISSING_MESSAGE"); + return interaction.reply({ + content: translate("general/remindme:MISSING_MESSAGE"), + ephemeral: true + }); } const rData = { diff --git a/commands/General/report.js b/commands/General/report.js index 978a8ede65..6025f3afa3 100644 --- a/commands/General/report.js +++ b/commands/General/report.js @@ -42,7 +42,7 @@ class Report extends Command { const embed = new Discord.MessageEmbed() .setAuthor(message.translate("general/report:TITLE", { user: member.user.tag - }), message.author.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) + }), message.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .addField(message.translate("common:AUTHOR"), message.author.tag, true) .addField(message.translate("common:DATE"), message.printDate(new Date(Date.now())), true) .addField(message.translate("common:REASON"), "**"+rep+"**", true) diff --git a/commands/General/setafk.js b/commands/General/setafk.js index 4aa963c983..6f68d84c73 100644 --- a/commands/General/setafk.js +++ b/commands/General/setafk.js @@ -20,7 +20,10 @@ class Setafk extends Command { const reason = args.join(" "); if(!reason){ - return message.error("general/setafk:MISSING_REASON"); + return interaction.reply({ + content: translate("general/setafk:MISSING_REASON"), + ephemeral: true + }); } // Send success message diff --git a/commands/General/shorturl.js b/commands/General/shorturl.js index 870510762a..455f2037d7 100644 --- a/commands/General/shorturl.js +++ b/commands/General/shorturl.js @@ -23,14 +23,20 @@ class ShortURL extends Command { const url = args[0]; if(!url){ - return message.error("general/shorturl:MISSING_URL"); + return interaction.reply({ + content: translate("general/shorturl:MISSING_URL"), + ephemeral: true + }); } const res = await fetch(`https://is.gd/create.php?format=simple&url=${encodeURI(url)}`); const body = await res.text(); if(body === "Error: Please enter a valid URL to shorten"){ - return message.error("general/shorturl:MISSING_URL"); + return interaction.reply({ + content: translate("general/shorturl:MISSING_URL"), + ephemeral: true + }); } const embed = new Discord.MessageEmbed() diff --git a/commands/General/someone.js b/commands/General/someone.js index 8a6e4f2ad2..e9434cefdc 100644 --- a/commands/General/someone.js +++ b/commands/General/someone.js @@ -26,7 +26,7 @@ class Someone extends Command { .addField(message.translate("common:USERNAME"), member.user.username, true) .addField(message.translate("common:DISCRIMINATOR"), member.user.discriminator, true) .addField(message.translate("common:ID"), member.user.id, true) - .setThumbnail(member.user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) + .setThumbnail(member.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .setColor(data.config.embed.color); message.channel.send({ embeds: [embed] }); diff --git a/commands/General/suggest.js b/commands/General/suggest.js index 5635c3ffd2..a1ca2efe20 100644 --- a/commands/General/suggest.js +++ b/commands/General/suggest.js @@ -33,7 +33,7 @@ class Suggest extends Command { const embed = new Discord.MessageEmbed() .setAuthor(message.translate("general/suggest:TITLE", { user: message.author.username - }), message.author.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) + }), message.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .addField(message.translate("common:AUTHOR"), `\`${message.author.username}#${message.author.discriminator}\``, true) .addField(message.translate("common:DATE"), message.printDate(new Date(Date.now())), true) .addField(message.translate("common:CONTENT"), "**"+sugg+"**") diff --git a/commands/General/translate.js b/commands/General/translate.js index 1feca19494..31846afc90 100644 --- a/commands/General/translate.js +++ b/commands/General/translate.js @@ -28,7 +28,10 @@ class Translate extends Command { message.author.send(langsList).then(() => { message.success("general/translate:LIST_SENT"); }).catch(() => { - message.error("misc:CANNOT_DM"); + interaction.reply({ + content: translate("misc:CANNOT_DM"), + ephemeral: true + }); }); return; } diff --git a/commands/General/userinfo.js b/commands/General/userinfo.js index 6cef716151..b6d6f99c94 100644 --- a/commands/General/userinfo.js +++ b/commands/General/userinfo.js @@ -50,13 +50,13 @@ class Userinfo extends Command { } const embed = new Discord.MessageEmbed() - .setAuthor(user.tag, user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) + .setAuthor(user.tag, user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .setThumbnail(user.displayAvatarURL({ dynamic: true })) .addField(":man: "+message.translate("common:USERNAME"), user.username, true) .addField(this.client.customEmojis.discriminator+" "+message.translate("common:DISCRIMINATOR"), user.discriminator, true) .addField(this.client.customEmojis.bot+" "+message.translate("common:ROBOT"), (user.bot ? message.translate("common:YES") : message.translate("common:NO")), true) .addField(this.client.customEmojis.calendar+" "+message.translate("common:CREATION"), message.printDate(user.createdAt), true) - .addField(this.client.customEmojis.avatar+" "+message.translate("common:AVATAR"), user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) + .addField(this.client.customEmojis.avatar+" "+message.translate("common:AVATAR"), user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .setColor(data.config.embed.color) .setFooter(data.config.embed.footer); diff --git a/commands/Images/avatar.js b/commands/Images/avatar.js index 72055be290..bb255b3c04 100644 --- a/commands/Images/avatar.js +++ b/commands/Images/avatar.js @@ -21,7 +21,7 @@ class Avatar extends Command { let user = await this.client.resolveUser(args[0]); if(!user) user = message.author; - const avatarURL = user.displayAvatarURL({ size: 512, dynamic: true, format: 'png' }); + const avatarURL = user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }); if(message.content.includes("-v")) message.channel.send("<"+avatarURL+">"); const attachment = new Discord.MessageAttachment(avatarURL, `avatar.${avatarURL.split(".").pop().split("?")[0]}`); message.channel.send(attachment); diff --git a/commands/Images/clyde.js b/commands/Images/clyde.js index bee4fc7c57..07d4c929ae 100644 --- a/commands/Images/clyde.js +++ b/commands/Images/clyde.js @@ -23,7 +23,10 @@ class Clyde extends Command { const text = args.join(" "); if(!text){ - return message.error("images/clyde:MISSING_TEXT"); + return interaction.reply({ + content: translate("images/clyde:MISSING_TEXT"), + ephemeral: true + }); } const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/phcomment.js b/commands/Images/phcomment.js index 6c8f8f7362..4189f9542d 100644 --- a/commands/Images/phcomment.js +++ b/commands/Images/phcomment.js @@ -30,7 +30,10 @@ class Phcomment extends Command { } if(!text){ - return message.error("images/phcomment:MISSING_TEXT"); + return interaction.reply({ + content: translate("images/phcomment:MISSING_TEXT"), + ephemeral: true + }); } const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/qrcode.js b/commands/Images/qrcode.js index 39a13ca6d2..0bc6b82df6 100644 --- a/commands/Images/qrcode.js +++ b/commands/Images/qrcode.js @@ -22,7 +22,10 @@ class Qrcode extends Command { const text = args.join(" "); if(!text){ - return message.error("images/qrcode:MISSING_TEXT"); + return interaction.reply({ + content: translate("images/qrcode:MISSING_TEXT"), + ephemeral: true + }); } const pleaseWait = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/tweet.js b/commands/Images/tweet.js index 953b266886..e45ab17ccd 100644 --- a/commands/Images/tweet.js +++ b/commands/Images/tweet.js @@ -24,11 +24,17 @@ class Tweet extends Command { const text = args.slice(1).join(" "); if(!user){ - return message.error("images/tweet:MISSING_USERNAME"); + return interaction.reply({ + content: translate("images/tweet:MISSING_USERNAME"), + ephemeral: true + }); } if(!text){ - return message.error("images/tweet:MISSING_TEXT"); + return interaction.reply({ + content: translate("images/tweet:MISSING_TEXT"), + ephemeral: true + }); } const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/youtube-comment.js b/commands/Images/youtube-comment.js index 2b36a31c75..4d87fb0004 100644 --- a/commands/Images/youtube-comment.js +++ b/commands/Images/youtube-comment.js @@ -30,7 +30,10 @@ class YouTubeComment extends Command { } if(!text){ - return message.error("images/phcomment:MISSING_TEXT"); // same text as phcomment + return interaction.reply({ + content: translate("images/phcomment:MISSING_TEXT"), + ephemeral: true + }); // same text as phcomment } const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Moderation/announcement.js b/commands/Moderation/announcement.js index ffc8ee2969..2612de45df 100644 --- a/commands/Moderation/announcement.js +++ b/commands/Moderation/announcement.js @@ -22,10 +22,16 @@ class Announcement extends Command { const text = args.join(" "); if(!text){ - return message.error("moderation/announcement:MISSING_TEXT"); + return interaction.reply({ + content: translate("moderation/announcement:MISSING_TEXT"), + ephemeral: true + }); } if(text.length > 1030){ - return message.error("moderation/announcement:TOO_LONG"); + return interaction.reply({ + content: translate("moderation/announcement:TOO_LONG"), + ephemeral: true + }); } message.delete().catch(() => {}); @@ -66,7 +72,10 @@ class Announcement extends Command { }); c.on("end", (collected, reason) => { if(reason === "time"){ - return message.error("misc:TIMES_UP"); + return interaction.reply({ + content: translate("misc:TIMES_UP"), + ephemeral: true + }); } }); } @@ -75,7 +84,10 @@ class Announcement extends Command { collector.on("end", (collected, reason) => { if(reason === "time"){ - return message.error("misc:TIMES_UP"); + return interaction.reply({ + content: translate("misc:TIMES_UP"), + ephemeral: true + }); } const embed = new Discord.MessageEmbed() diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index 9bd12b5495..bfbe7ad8ae 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -22,13 +22,19 @@ class Ban extends Command { const user = await this.client.resolveUser(args[0]); if(!user){ - return message.error("moderation/ban:MISSING_MEMBER"); + return interaction.reply({ + content: translate("moderation/ban:MISSING_MEMBER"), + ephemeral: true + }); } const memberData = message.guild.members.cache.get(user.id) ? await this.client.findOrCreateMember({ id: user.id, guildID: message.guild.id }) : null; if(user.id === message.author.id){ - return message.error("moderation/ban:YOURSELF"); + return interaction.reply({ + content: translate("moderation/ban:YOURSELF"), + ephemeral: true + }); } // If the user is already banned @@ -50,10 +56,16 @@ class Ban extends Command { const memberPosition = member.roles.highest.position; const moderationPosition = message.member.roles.highest.position; if(message.member.ownerID !== message.author.id && !(moderationPosition > memberPosition)){ - return message.error("moderation/ban:SUPERIOR"); + return interaction.reply({ + content: translate("moderation/ban:SUPERIOR"), + ephemeral: true + }); } if(!member.bannable) { - return message.error("moderation/ban:MISSING_PERM"); + return interaction.reply({ + content: translate("moderation/ban:MISSING_PERM"), + ephemeral: true + }); } } @@ -108,7 +120,10 @@ class Ban extends Command { }).catch((err) => { console.log(err); - return message.error("moderation/ban:MISSING_PERM"); + return interaction.reply({ + content: translate("moderation/ban:MISSING_PERM"), + ephemeral: true + }); }); } diff --git a/commands/Moderation/clear-sanctions.js b/commands/Moderation/clear-sanctions.js index 23515f9f61..af630b83af 100644 --- a/commands/Moderation/clear-sanctions.js +++ b/commands/Moderation/clear-sanctions.js @@ -21,7 +21,10 @@ class Clearsanctions extends Command { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ - return message.error("moderation/clear-sanctions:MISSING_MEMBER"); + return interaction.reply({ + content: translate("moderation/clear-sanctions:MISSING_MEMBER"), + ephemeral: true + }); } const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); memberData.sanctions = []; diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index 780de4f58d..4a2cb820cf 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -26,7 +26,10 @@ class Clear extends Command { time: 20000, errors: ["time"] }).catch(() => { - return message.error("misc:TIMES_UP"); + return interaction.reply({ + content: translate("misc:TIMES_UP"), + ephemeral: true + }); }); const position = message.channel.position; const newChannel = await message.channel.clone(); @@ -37,7 +40,10 @@ class Clear extends Command { let amount = args[0]; if(!amount || isNaN(amount) || parseInt(amount) < 1){ - return message.error("moderation/clear:MISSING_AMOUNT"); + return interaction.reply({ + content: translate("moderation/clear:MISSING_AMOUNT"), + ephemeral: true + }); } await message.delete(); diff --git a/commands/Moderation/giveaway.js b/commands/Moderation/giveaway.js index 7349fce80f..16505e3394 100644 --- a/commands/Moderation/giveaway.js +++ b/commands/Moderation/giveaway.js @@ -22,13 +22,19 @@ class Giveaway extends Command { const status = args[0]; if(!status){ - return message.error("moderation/giveaway:MISSING_STATUS"); + return interaction.reply({ + content: translate("moderation/giveaway:MISSING_STATUS"), + ephemeral: true + }); } if(status === "create"){ const currentGiveaways = this.client.giveawaysManager.giveaways.filter((g) => g.guildID === message.guild.id && !g.ended).length; if(currentGiveaways > 3){ - return message.error("moderation/giveaway:MAX_COUNT"); + return interaction.reply({ + content: translate("moderation/giveaway:MAX_COUNT"), + ephemeral: true + }); } const time = args[1]; if(!time){ @@ -37,10 +43,16 @@ class Giveaway extends Command { }); } if(isNaN(ms(time))){ - return message.error("misc:INVALID_TIME"); + return interaction.reply({ + content: translate("misc:INVALID_TIME"), + ephemeral: true + }); } if(ms(time) > ms("15d")){ - return message.error("moderation/giveaway:MAX_DURATION"); + return interaction.reply({ + content: translate("moderation/giveaway:MAX_DURATION"), + ephemeral: true + }); } const winnersCount = args[2]; if(!winnersCount){ @@ -87,7 +99,10 @@ class Giveaway extends Command { } else if(status === "reroll"){ const messageID = args[1]; if(!messageID){ - return message.error("moderation/giveaway:MISSING_ID"); + return interaction.reply({ + content: translate("moderation/giveaway:MISSING_ID"), + ephemeral: true + }); } this.client.giveawaysManager.reroll(messageID, { congrat: message.translate("moderation/giveaway:REROLL_CONGRAT"), @@ -102,7 +117,10 @@ class Giveaway extends Command { } else if(status === "delete"){ const messageID = args[1]; if(!messageID){ - return message.error("moderation/giveaway:MISSING_ID"); + return interaction.reply({ + content: translate("moderation/giveaway:MISSING_ID"), + ephemeral: true + }); } this.client.giveawaysManager.delete(messageID).then(() => { return message.success("moderation/giveaway:GIVEAWAY_DELETED"); @@ -114,7 +132,10 @@ class Giveaway extends Command { } else if(status === "end"){ const messageID = args[1]; if(!messageID){ - return message.error("moderation/giveaway:MISSING_ID"); + return interaction.reply({ + content: translate("moderation/giveaway:MISSING_ID"), + ephemeral: true + }); } try { this.client.giveawaysManager.edit(messageID, { @@ -127,7 +148,10 @@ class Giveaway extends Command { }); } } else { - return message.error("moderation/giveaway:MISSING_STATUS"); + return interaction.reply({ + content: translate("moderation/giveaway:MISSING_STATUS"), + ephemeral: true + }); } } diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index 150945f289..3181add29c 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -22,11 +22,17 @@ class Kick extends Command { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ - return message.error("moderation/kick:MISSING_MEMBER"); + return interaction.reply({ + content: translate("moderation/kick:MISSING_MEMBER"), + ephemeral: true + }); } if(member.id === message.author.id){ - return message.error("moderation/ban:YOURSELF"); + return interaction.reply({ + content: translate("moderation/ban:YOURSELF"), + ephemeral: true + }); } const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); @@ -40,11 +46,17 @@ class Kick extends Command { const memberPosition = member.roles.highest.position; const moderationPosition = message.member.roles.highest.position; if(message.member.ownerID !== message.author.id && !(moderationPosition > memberPosition)){ - return message.error("moderation/ban:SUPERIOR"); + return interaction.reply({ + content: translate("moderation/ban:SUPERIOR"), + ephemeral: true + }); } if(!member.kickable) { - return message.error("moderation/kick:MISSING_PERM"); + return interaction.reply({ + content: translate("moderation/kick:MISSING_PERM"), + ephemeral: true + }); } await member.send(message.translate("moderation/kick:KICKED_DM", { @@ -95,7 +107,10 @@ class Kick extends Command { } }).catch(() => { - return message.error("moderation/kick:MISSING_PERM"); + return interaction.reply({ + content: translate("moderation/kick:MISSING_PERM"), + ephemeral: true + }); }); } diff --git a/commands/Moderation/mute.js b/commands/Moderation/mute.js index 0feb4da037..a6d014270a 100644 --- a/commands/Moderation/mute.js +++ b/commands/Moderation/mute.js @@ -23,24 +23,36 @@ class Mute extends Command { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ - return message.error("moderation/mute:MISSING_MEMBER"); + return interaction.reply({ + content: translate("moderation/mute:MISSING_MEMBER"), + ephemeral: true + }); } if(member.id === message.author.id){ - return message.error("moderation/ban:YOURSELF"); + return interaction.reply({ + content: translate("moderation/ban:YOURSELF"), + ephemeral: true + }); } const memberPosition = member.roles.highest.position; const moderationPosition = message.member.roles.highest.position; if(message.member.ownerID !== message.author.id && !(moderationPosition > memberPosition)){ - return message.error("moderation/ban:SUPERIOR"); + return interaction.reply({ + content: translate("moderation/ban:SUPERIOR"), + ephemeral: true + }); } const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); const time = args[1]; if(!time || isNaN(ms(time))){ - return message.error("misc:INVALID_TIME"); + return interaction.reply({ + content: translate("misc:INVALID_TIME"), + ephemeral: true + }); } let reason = args.slice(2).join(" "); diff --git a/commands/Moderation/poll.js b/commands/Moderation/poll.js index 379f45704f..14ce4be28e 100644 --- a/commands/Moderation/poll.js +++ b/commands/Moderation/poll.js @@ -22,7 +22,10 @@ class Poll extends Command { const question = args.join(" "); if(!question){ - return message.error("moderation/poll:MISSING_QUESTION"); + return interaction.reply({ + content: translate("moderation/poll:MISSING_QUESTION"), + ephemeral: true + }); } message.delete().catch(() => {}); @@ -63,7 +66,10 @@ class Poll extends Command { }); c.on("end", (collected, reason) => { if(reason === "time"){ - return message.error("misc:TIMES_UP"); + return interaction.reply({ + content: translate("misc:TIMES_UP"), + ephemeral: true + }); } }); } @@ -72,7 +78,10 @@ class Poll extends Command { collector.on("end", (collected, reason) => { if(reason === "time"){ - return message.error("misc:TIMES_UP"); + return interaction.reply({ + content: translate("misc:TIMES_UP"), + ephemeral: true + }); } const success = this.client.customEmojis.success.split(":")[1]; diff --git a/commands/Moderation/sanctions.js b/commands/Moderation/sanctions.js index 7da590fa3f..32bad701d7 100644 --- a/commands/Moderation/sanctions.js +++ b/commands/Moderation/sanctions.js @@ -22,7 +22,10 @@ class Sanctions extends Command { const user = await this.client.resolveUser(args[0]); if(!user){ - return message.error("moderation/sanctions:MISSING_MEMBER"); + return interaction.reply({ + content: translate("moderation/sanctions:MISSING_MEMBER"), + ephemeral: true + }); } const memberData = await this.client.findOrCreateMember({ id: user.id, guildID: message.guild.id }); diff --git a/commands/Moderation/setwarns.js b/commands/Moderation/setwarns.js index f5b8494dc9..186fb48958 100644 --- a/commands/Moderation/setwarns.js +++ b/commands/Moderation/setwarns.js @@ -21,7 +21,10 @@ class Setwarns extends Command { const sanction = args[0]; if(!sanction || (sanction !== "kick" && sanction !== "ban")){ - return message.error("moderation/setwarns:MISSING_TYPE"); + return interaction.reply({ + content: translate("moderation/setwarns:MISSING_TYPE"), + ephemeral: true + }); } const number = args[1]; @@ -48,10 +51,16 @@ class Setwarns extends Command { } if(!number || isNaN(number)){ - return message.error("misc:INVALID_NUMBER"); + return interaction.reply({ + content: translate("misc:INVALID_NUMBER"), + ephemeral: true + }); } if(number < 1 || number > 10){ - return message.error("misc:INVALID_NUMBER_RANGE", 1, 10); + return interaction.reply({ + content: translate("misc:INVALID_NUMBER_RANGE", 1, 10), + ephemeral: true + }); } if(sanction === "kick"){ diff --git a/commands/Moderation/unban.js b/commands/Moderation/unban.js index 6cdbc25fd2..2193d75885 100644 --- a/commands/Moderation/unban.js +++ b/commands/Moderation/unban.js @@ -22,7 +22,10 @@ class Unban extends Command { let user = null; if(!args[0]){ - return message.error("moderation/unban:MISSING_ID"); + return interaction.reply({ + content: translate("moderation/unban:MISSING_ID"), + ephemeral: true + }); } // Check if the arg is an ID or a username diff --git a/commands/Moderation/unmute.js b/commands/Moderation/unmute.js index 98b9e42095..3b2904152f 100644 --- a/commands/Moderation/unmute.js +++ b/commands/Moderation/unmute.js @@ -27,7 +27,10 @@ class Unmute extends Command { const memberPosition = member.roles.highest.position; const moderationPosition = message.member.roles.highest.position; if(message.member.ownerID !== message.author.id && !(moderationPosition > memberPosition)){ - return message.error("moderation/ban:SUPERIOR"); + return interaction.reply({ + content: translate("moderation/ban:SUPERIOR"), + ephemeral: true + }); } const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index c632c9d826..0937c59df0 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -22,26 +22,41 @@ class Warn extends Command { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ - return message.error("moderation/warn:MISSING_MEMBER"); + return interaction.reply({ + content: translate("moderation/warn:MISSING_MEMBER"), + ephemeral: true + }); } if(member.user.bot){ - return message.error("misc:BOT_USER"); + return interaction.reply({ + content: translate("misc:BOT_USER"), + ephemeral: true + }); } const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); if(member.id === message.author.id){ - return message.error("moderation/ban:YOURSELF"); + return interaction.reply({ + content: translate("moderation/ban:YOURSELF"), + ephemeral: true + }); } const memberPosition = member.roles.highest.position; const moderationPosition = message.member.roles.highest.position; if(message.member.ownerID !== message.author.id && !(moderationPosition > memberPosition)){ - return message.error("moderation/ban:SUPERIOR"); + return interaction.reply({ + content: translate("moderation/ban:SUPERIOR"), + ephemeral: true + }); } const reason = args.slice(1).join(" "); if(!reason){ - return message.error("moderation/warn:MISSING_REASON"); + return interaction.reply({ + content: translate("moderation/warn:MISSING_REASON"), + ephemeral: true + }); } // Gets current member sanctions diff --git a/commands/Music/autoplay.js b/commands/Music/autoplay.js index a0471e762b..382612b1c1 100644 --- a/commands/Music/autoplay.js +++ b/commands/Music/autoplay.js @@ -23,11 +23,17 @@ class AutoPlay extends Command { const voice = message.member.voice.channel; if (!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } if(!queue){ - return message.error("music:play:NOT_PLAYING"); + return interaction.reply({ + content: translate("music:play:NOT_PLAYING"), + ephemeral: true + }); } // Gets the current song diff --git a/commands/Music/back.js b/commands/Music/back.js index 5e47d2d597..dfee3118e9 100644 --- a/commands/Music/back.js +++ b/commands/Music/back.js @@ -24,15 +24,24 @@ class Back extends Command { const voice = message.member.voice.channel; if (!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } if(!queue){ - return message.error("music/play:NOT_PLAYING"); + return interaction.reply({ + content: translate("music/play:NOT_PLAYING"), + ephemeral: true + }); } if(!queue.previousTracks[0]){ - return message.error("music/back:NO_PREV_SONG"); + return interaction.reply({ + content: translate("music/back:NO_PREV_SONG"), + ephemeral: true + }); } const members = voice.members.filter((m) => !m.user.bot); @@ -89,7 +98,10 @@ class Back extends Command { collector.on("end", (collected, isDone) => { if(!isDone){ - return message.error("misc:TIMES_UP"); + return interaction.reply({ + content: translate("misc:TIMES_UP"), + ephemeral: true + }); } }); diff --git a/commands/Music/filter.js b/commands/Music/filter.js index e40e061588..1a6882114e 100644 --- a/commands/Music/filter.js +++ b/commands/Music/filter.js @@ -24,11 +24,17 @@ class Filter extends Command { const voice = message.member.voice.channel; if (!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } if(!queue){ - return message.error("music/play:NOT_PLAYING"); + return interaction.reply({ + content: translate("music/play:NOT_PLAYING"), + ephemeral: true + }); } const filter = args[0]; diff --git a/commands/Music/filters.js b/commands/Music/filters.js index 377b735f0b..bf6ba108bf 100644 --- a/commands/Music/filters.js +++ b/commands/Music/filters.js @@ -25,11 +25,17 @@ class Filters extends Command { const voice = message.member.voice.channel; if (!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } if(!queue){ - return message.error("music/play:NOT_PLAYING"); + return interaction.reply({ + content: translate("music/play:NOT_PLAYING"), + ephemeral: true + }); } const filtersStatuses = [ [], [] ]; diff --git a/commands/Music/lyrics.js b/commands/Music/lyrics.js index 3931f0cc72..8eddf45dd6 100644 --- a/commands/Music/lyrics.js +++ b/commands/Music/lyrics.js @@ -23,7 +23,10 @@ class Lyrics extends Command { const [songName, artistName] = args.join(" ").split("|"); if(!songName){ - return message.error("music/lyrics:MISSING_SONG_NAME"); + return interaction.reply({ + content: translate("music/lyrics:MISSING_SONG_NAME"), + ephemeral: true + }); } const embed = new Discord.MessageEmbed() diff --git a/commands/Music/np.js b/commands/Music/np.js index 1b3d1fcd01..1068403525 100644 --- a/commands/Music/np.js +++ b/commands/Music/np.js @@ -24,11 +24,17 @@ class Np extends Command { const voice = message.member.voice.channel; if (!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } if(!queue){ - return message.error("music/play:NOT_PLAYING"); + return interaction.reply({ + content: translate("music/play:NOT_PLAYING"), + ephemeral: true + }); } // Gets the current song diff --git a/commands/Music/pause.js b/commands/Music/pause.js index 07ac32216f..18595d9471 100644 --- a/commands/Music/pause.js +++ b/commands/Music/pause.js @@ -23,11 +23,17 @@ class Pause extends Command { const voice = message.member.voice.channel; if (!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } if(!queue){ - return message.error("music:play:NOT_PLAYING"); + return interaction.reply({ + content: translate("music:play:NOT_PLAYING"), + ephemeral: true + }); } // Gets the current song diff --git a/commands/Music/play.js b/commands/Music/play.js index 428798ab87..b57461a519 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -21,18 +21,27 @@ class Play extends Command { const name = args.join(" "); if(!name){ - return message.error("music/play:MISSING_SONG_NAME"); + return interaction.reply({ + content: translate("music/play:MISSING_SONG_NAME"), + ephemeral: true + }); } const voice = message.member.voice.channel; if(!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } // Check my permissions const perms = voice.permissionsFor(this.client.user); if(!perms.has("CONNECT") || !perms.has("SPEAK")){ - return message.error("music/play:VOICE_CHANNEL_CONNECT"); + return interaction.reply({ + content: translate("music/play:VOICE_CHANNEL_CONNECT"), + ephemeral: true + }); } await this.client.player.play(message, args.join(" ")); diff --git a/commands/Music/queue.js b/commands/Music/queue.js index 95ba1894db..16f5fd212a 100644 --- a/commands/Music/queue.js +++ b/commands/Music/queue.js @@ -23,13 +23,19 @@ class Queue extends Command { const voice = message.member.voice.channel; if (!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } const queue = this.client.player.getQueue(message); if(!queue){ - return message.error("music/play:NOT_PLAYING"); + return interaction.reply({ + content: translate("music/play:NOT_PLAYING"), + ephemeral: true + }); } if(queue.tracks.length === 1){ diff --git a/commands/Music/resume.js b/commands/Music/resume.js index e8abf0bb9b..d75d26e74a 100644 --- a/commands/Music/resume.js +++ b/commands/Music/resume.js @@ -23,11 +23,17 @@ class Resume extends Command { const voice = message.member.voice.channel; if (!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } if(!queue){ - return message.error("music:play:NOT_PLAYING"); + return interaction.reply({ + content: translate("music:play:NOT_PLAYING"), + ephemeral: true + }); } // Gets the current song diff --git a/commands/Music/seek.js b/commands/Music/seek.js index cfa33a4559..a4e783eb14 100644 --- a/commands/Music/seek.js +++ b/commands/Music/seek.js @@ -24,16 +24,25 @@ class Seek extends Command { const voice = message.member.voice.channel; if (!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } if(!queue){ - return message.error("music/play:NOT_PLAYING"); + return interaction.reply({ + content: translate("music/play:NOT_PLAYING"), + ephemeral: true + }); } const time = ms(args[0]); if (isNaN(time)) { - return message.error("music/seek:INVALID_TIME"); + return interaction.reply({ + content: translate("music/seek:INVALID_TIME"), + ephemeral: true + }); } // Change the song position diff --git a/commands/Music/skip.js b/commands/Music/skip.js index 9d5649bc86..a85b068bdf 100644 --- a/commands/Music/skip.js +++ b/commands/Music/skip.js @@ -24,15 +24,24 @@ class Skip extends Command { const voice = message.member.voice.channel; if (!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } if(!queue){ - return message.error("music/play:NOT_PLAYING"); + return interaction.reply({ + content: translate("music/play:NOT_PLAYING"), + ephemeral: true + }); } if(!queue.tracks[0]){ - return message.error("music/skip:NO_NEXT_SONG"); + return interaction.reply({ + content: translate("music/skip:NO_NEXT_SONG"), + ephemeral: true + }); } const members = voice.members.filter((m) => !m.user.bot); @@ -89,7 +98,10 @@ class Skip extends Command { collector.on("end", (collected, isDone) => { if(!isDone){ - return message.error("misc:TIMES_UP"); + return interaction.reply({ + content: translate("misc:TIMES_UP"), + ephemeral: true + }); } }); diff --git a/commands/Music/stop.js b/commands/Music/stop.js index d75ea6b93e..131149048e 100644 --- a/commands/Music/stop.js +++ b/commands/Music/stop.js @@ -24,11 +24,17 @@ class Stop extends Command { const voice = message.member.voice.channel; if(!voice){ - return message.error("music/play:NO_VOICE_CHANNEL"); + return interaction.reply({ + content: translate("music/play:NO_VOICE_CHANNEL"), + ephemeral: true + }); } if(!queue){ - return message.error("music/play:NOT_PLAYING"); + return interaction.reply({ + content: translate("music/play:NOT_PLAYING"), + ephemeral: true + }); } const members = voice.members.filter((m) => !m.user.bot); @@ -82,7 +88,10 @@ class Stop extends Command { collector.on("end", (collected, isDone) => { if(!isDone){ - return message.error("misc:TIMES_UP"); + return interaction.reply({ + content: translate("misc:TIMES_UP"), + ephemeral: true + }); } }); diff --git a/commands/Owner/servers-list.js b/commands/Owner/servers-list.js index ecf6f19f6f..b1a494fa86 100644 --- a/commands/Owner/servers-list.js +++ b/commands/Owner/servers-list.js @@ -34,7 +34,7 @@ class ServersList extends Command { .join("\n"); const embed = new Discord.MessageEmbed() - .setAuthor(message.author.tag, message.author.displayAvatarURL({ size: 512, dynamic: true, format: 'png' })) + .setAuthor(message.author.tag, message.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .setColor(data.config.embed.color) .setFooter(this.client.user.username) .setTitle(`${message.translate("common:PAGE")}: ${page}/${Math.ceil(this.client.guilds.cache.size/10)}`) From aa4ebd0def3cfa1d3460aaae51e221e0ec4219b5 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 19:52:10 +0200 Subject: [PATCH 04/29] :recycle: Rewrite all message#success and message#sendT with interaction#reply --- commands/Administration/automod.js | 4 +++- commands/Administration/backup.js | 8 ++++++-- commands/Administration/deletemod.js | 8 ++++++-- commands/Administration/goodbye.js | 8 ++++++-- commands/Administration/setfortniteshop.js | 4 +++- commands/Administration/setlang.js | 4 +++- commands/Administration/welcome.js | 8 ++++++-- commands/Economy/leaderboard.js | 4 +++- commands/Economy/setbio.js | 4 +++- commands/Fun/findwords.js | 4 +++- commands/Fun/flip.js | 8 ++++++-- commands/Fun/number.js | 4 +++- commands/General/fortnite.js | 4 +++- commands/General/remindme.js | 4 +++- commands/General/translate.js | 4 +++- commands/Moderation/announcement.js | 8 ++++++-- commands/Moderation/clear.js | 4 +++- commands/Moderation/giveaway.js | 16 ++++++++++++---- commands/Moderation/poll.js | 8 ++++++-- commands/Moderation/unmute.js | 4 +++- commands/Music/autoplay.js | 4 +++- commands/Music/filter.js | 8 ++++++-- commands/Music/pause.js | 4 +++- commands/Music/resume.js | 4 +++- commands/Music/seek.js | 4 +++- 25 files changed, 108 insertions(+), 36 deletions(-) diff --git a/commands/Administration/automod.js b/commands/Administration/automod.js index 3f3eca4fea..0e32cb829f 100644 --- a/commands/Administration/automod.js +++ b/commands/Administration/automod.js @@ -47,7 +47,9 @@ class Automod extends Command { data.guild.plugins.automod = { enabled: false, ignored: [] }; data.guild.markModified("plugins.automod"); data.guild.save(); - message.success("administration/automod:DISABLED"); + interaction.reply({ + content: translate("administration/automod:DISABLED") + }); } } } diff --git a/commands/Administration/backup.js b/commands/Administration/backup.js index 12914eb130..ac7964464d 100644 --- a/commands/Administration/backup.js +++ b/commands/Administration/backup.js @@ -36,7 +36,9 @@ class Backup extends Command { }); backup.create(message.guild).then((backup) => { m.delete(); - message.success("administration/backup:SUCCESS_PUBLIC"); + interaction.reply({ + content: translate("administration/backup:SUCCESS_PUBLIC") + }); message.author.send(message.translate("administration/backup:SUCCESS_PRIVATE", { backupID: backup.id })).catch(() => { @@ -62,7 +64,9 @@ class Backup extends Command { }); } backup.fetch(backupID).then(async () => { - message.sendT("administration/backup:CONFIRMATION"); + interaction.reply({ + content: translate("administration/backup:CONFIRMATION") + }); await message.channel.awaitMessages(m => (m.author.id === message.author.id) && (m.content === "-confirm"), { max: 1, time: 20000, diff --git a/commands/Administration/deletemod.js b/commands/Administration/deletemod.js index e12755051e..b237f5ba3c 100644 --- a/commands/Administration/deletemod.js +++ b/commands/Administration/deletemod.js @@ -28,11 +28,15 @@ class Deletemod extends Command { if(status === "on"){ data.guild.autoDeleteModCommands = true; data.guild.save(); - message.success("administration/deletemod:ENABLED"); + interaction.reply({ + content: translate("administration/deletemod:ENABLED") + }); } else { data.guild.autoDeleteModCommands = false; data.guild.save(); - message.success("administration/deletemod:DISABLED"); + interaction.reply({ + content: translate("administration/deletemod:DISABLED") + }); } } diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index 157ebe04fa..03737f7c74 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -25,7 +25,9 @@ class Goodbye extends Command { data.guild.plugins.goodbye.enabled ) { this.client.emit("guildMemberRemove", message.member); - return message.success("administration/goodbye:TEST_SUCCESS"); + return interaction.reply({ + content: translate("administration/goodbye:TEST_SUCCESS") + }); } if ( @@ -100,7 +102,9 @@ class Goodbye extends Command { if (goodbye.channel && !goodbye.message) { if (msg.content.length < 1800) { goodbye.message = msg.content; - return message.sendT("administration/goodbye:FORM_3"); + return interaction.reply({ + content: translate("administration/goodbye:FORM_3") + }); } return interaction.reply({ content: translate("administration/goodbye:MAX_CHARACT"), diff --git a/commands/Administration/setfortniteshop.js b/commands/Administration/setfortniteshop.js index e1bb4d2274..9e658c4d7d 100644 --- a/commands/Administration/setfortniteshop.js +++ b/commands/Administration/setfortniteshop.js @@ -32,7 +32,9 @@ class Setfortniteshop extends Command { data.guild.plugins.fortniteshop = false; data.guild.markModified("plugins.fortniteshop"); data.guild.save(); - return message.success("administration/setfortniteshop:DISABLED"); + return interaction.reply({ + content: translate("administration/setfortniteshop:DISABLED") + }); } const channel = message.mentions.channels.first() || message.channel; diff --git a/commands/Administration/setlang.js b/commands/Administration/setlang.js index 94128904ea..3f2849d927 100644 --- a/commands/Administration/setlang.js +++ b/commands/Administration/setlang.js @@ -30,7 +30,9 @@ class Setlang extends Command { data.guild.language = language.name; await data.guild.save(); - return message.sendT("administration/setlang:SUCCESS"); + return interaction.reply({ + content: translate("administration/setlang:SUCCESS") + }); } diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index 32385460bb..153cdfaf93 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -25,7 +25,9 @@ class Welcome extends Command { data.guild.plugins.welcome.enabled ) { this.client.emit("guildMemberAdd", message.member); - return message.success("administration/welcome:TEST_SUCCESS"); + return interaction.reply({ + content: translate("administration/welcome:TEST_SUCCESS") + }); } if ( @@ -100,7 +102,9 @@ class Welcome extends Command { if (welcome.channel && !welcome.message) { if (msg.content.length < 1800) { welcome.message = msg.content; - return message.sendT("administration/welcome:FORM_3"); + return interaction.reply({ + content: translate("administration/welcome:FORM_3") + }); } return interaction.reply({ content: translate("administration/goodbye:MAX_CHARACT"), diff --git a/commands/Economy/leaderboard.js b/commands/Economy/leaderboard.js index 323c5a2dcb..205275eb87 100644 --- a/commands/Economy/leaderboard.js +++ b/commands/Economy/leaderboard.js @@ -72,7 +72,9 @@ class Leaderboard extends Command { } if(isOnlyOnMobile){ - message.sendT("economy/leaderboard:MOBILE"); + interaction.reply({ + content: translate("economy/leaderboard:MOBILE") + }); } async function fetchUsers(array, table, client) { diff --git a/commands/Economy/setbio.js b/commands/Economy/setbio.js index 654b37fc90..17318a33be 100644 --- a/commands/Economy/setbio.js +++ b/commands/Economy/setbio.js @@ -32,7 +32,9 @@ class Setbio extends Command { }); } data.userData.bio = newBio; - message.success("economy/setbio:SUCCESS"); + interaction.reply({ + content: translate("economy/setbio:SUCCESS") + }); await data.userData.save(); } diff --git a/commands/Fun/findwords.js b/commands/Fun/findwords.js index 0a68d79514..eb7faa7911 100644 --- a/commands/Fun/findwords.js +++ b/commands/Fun/findwords.js @@ -55,7 +55,9 @@ class FindWords extends Command { // Launch timer const delay = (i === 0) ? 10000 : 0; if(i === 0){ - message.sendT("fun/findwords:GAME_STARTING"); + interaction.reply({ + content: translate("fun/findwords:GAME_STARTING") + }); } setTimeout(() => { diff --git a/commands/Fun/flip.js b/commands/Fun/flip.js index 50d4d0d27e..742f58cc07 100644 --- a/commands/Fun/flip.js +++ b/commands/Fun/flip.js @@ -20,8 +20,12 @@ class Flip extends Command { async run (message) { const isHeads = Math.random() > 0.5; isHeads - ? message.sendT("fun/flip:HEADS") - : message.sendT("fun/flip:TAILS"); + ? interaction.reply({ +content: translate("fun/flip:HEADS") +}); + : interaction.reply({ +content: translate("fun/flip:TAILS") +});; } } diff --git a/commands/Fun/number.js b/commands/Fun/number.js index 23d2585b52..5476550eb6 100644 --- a/commands/Fun/number.js +++ b/commands/Fun/number.js @@ -32,7 +32,9 @@ class Number extends Command { const participants = []; const number = Math.floor(Math.random() * 3000); - await message.sendT("fun/number:GAME_START"); + await interaction.reply({ + content: translate("fun/number:GAME_START") + }); // Store the date wich the game has started const gameCreatedAt = Date.now(); diff --git a/commands/General/fortnite.js b/commands/General/fortnite.js index 19de9945c3..f0706c4735 100644 --- a/commands/General/fortnite.js +++ b/commands/General/fortnite.js @@ -21,7 +21,9 @@ class Fortnite extends Command { async run (message, args, data) { if(!data.config.apiKeys.fortniteTRN || data.config.apiKeys.fortniteTRN.length === ""){ - return message.success("misc:COMMAND_DISABLED"); + return interaction.reply({ + content: translate("misc:COMMAND_DISABLED") + }); } const stats = new Canvas.FortniteStats(); diff --git a/commands/General/remindme.js b/commands/General/remindme.js index 3e6dcfcad0..c3ebd66d9c 100644 --- a/commands/General/remindme.js +++ b/commands/General/remindme.js @@ -51,7 +51,9 @@ class Remindme extends Command { this.client.databaseCache.usersReminds.set(message.author.id, data.userData); // Send success message - message.success("general/remindme:SAVED"); + interaction.reply({ + content: translate("general/remindme:SAVED") + }); } } diff --git a/commands/General/translate.js b/commands/General/translate.js index 31846afc90..19a446dcda 100644 --- a/commands/General/translate.js +++ b/commands/General/translate.js @@ -26,7 +26,9 @@ class Translate extends Command { if(args[0] === "langs-list"){ const langsList = "```Css\n"+(langs.map((l, i) => `#${i+1} - ${l}`).join("\n"))+"```"; message.author.send(langsList).then(() => { - message.success("general/translate:LIST_SENT"); + interaction.reply({ + content: translate("general/translate:LIST_SENT") + }); }).catch(() => { interaction.reply({ content: translate("misc:CANNOT_DM"), diff --git a/commands/Moderation/announcement.js b/commands/Moderation/announcement.js index 2612de45df..ffcf44f4fe 100644 --- a/commands/Moderation/announcement.js +++ b/commands/Moderation/announcement.js @@ -38,7 +38,9 @@ class Announcement extends Command { let mention = ""; - const msg = await message.sendT("moderation/announcement:MENTION_PROMPT"); + const msg = await interaction.reply({ + content: translate("moderation/announcement:MENTION_PROMPT") + }); const collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, { time: 240000 }); @@ -53,7 +55,9 @@ class Announcement extends Command { if(tmsg.content.toLowerCase() === message.translate("common:YES").toLowerCase()){ tmsg.delete(); msg.delete(); - const tmsg1 = await message.sendT("moderation/announcement:MENTION_TYPE_PROMPT"); + const tmsg1 = await interaction.reply({ + content: translate("moderation/announcement:MENTION_TYPE_PROMPT") + }); const c = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, { time: 60000 }); c.on("collect", (m) => { if(m.content.toLowerCase() === "here"){ diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index 4a2cb820cf..8b2d25f653 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -20,7 +20,9 @@ class Clear extends Command { async run (message, args) { if(args[0] === "all"){ - message.sendT("moderation/clear:ALL_CONFIRM"); + interaction.reply({ + content: translate("moderation/clear:ALL_CONFIRM") + }); await message.channel.awaitMessages((m) => (m.author.id === message.author.id) && (m.content === "-confirm"), { max: 1, time: 20000, diff --git a/commands/Moderation/giveaway.js b/commands/Moderation/giveaway.js index 16505e3394..23f4babae3 100644 --- a/commands/Moderation/giveaway.js +++ b/commands/Moderation/giveaway.js @@ -94,7 +94,9 @@ class Giveaway extends Command { } } }).then(() => { - message.success("moderation/giveaway:GIVEAWAY_CREATED"); + interaction.reply({ + content: translate("moderation/giveaway:GIVEAWAY_CREATED") + }); }); } else if(status === "reroll"){ const messageID = args[1]; @@ -108,7 +110,9 @@ class Giveaway extends Command { congrat: message.translate("moderation/giveaway:REROLL_CONGRAT"), error: message.translate("moderation/giveaway:REROLL_ERROR") }).then(() => { - return message.success("moderation/giveaway:GIVEAWAY_REROLLED"); + return interaction.reply({ + content: translate("moderation/giveaway:GIVEAWAY_REROLLED") + }); }).catch(() => { return message.error("moderation/giveaway:NOT_FOUND_ENDED", { messageID @@ -123,7 +127,9 @@ class Giveaway extends Command { }); } this.client.giveawaysManager.delete(messageID).then(() => { - return message.success("moderation/giveaway:GIVEAWAY_DELETED"); + return interaction.reply({ + content: translate("moderation/giveaway:GIVEAWAY_DELETED") + }); }).catch(() => { return message.error("moderation/giveaway:NOT_FOUND", { messageID @@ -141,7 +147,9 @@ class Giveaway extends Command { this.client.giveawaysManager.edit(messageID, { setEndTimestamp: Date.now() }); - return message.success("moderation/giveaway:GIVEAWAY_ENDED"); + return interaction.reply({ + content: translate("moderation/giveaway:GIVEAWAY_ENDED") + }); } catch(e){ return message.error("moderation/giveaway:NOT_FOUND", { messageID diff --git a/commands/Moderation/poll.js b/commands/Moderation/poll.js index 14ce4be28e..e7e82e1f83 100644 --- a/commands/Moderation/poll.js +++ b/commands/Moderation/poll.js @@ -32,7 +32,9 @@ class Poll extends Command { let mention = ""; - const msg = await message.sendT("moderation/announcement:MENTION_PROMPT"); + const msg = await interaction.reply({ + content: translate("moderation/announcement:MENTION_PROMPT") + }); const collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, { time: 240000 }); @@ -47,7 +49,9 @@ class Poll extends Command { if(tmsg.content.toLowerCase() === message.translate("common:YES").toLowerCase()){ tmsg.delete(); msg.delete(); - const tmsg1 = await message.sendT("moderation/announcement:MENTION_TYPE_PROMPT"); + const tmsg1 = await interaction.reply({ + content: translate("moderation/announcement:MENTION_TYPE_PROMPT") + }); const c = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, { time: 60000 }); c.on("collect", (m) => { if(m.content.toLowerCase() === "here"){ diff --git a/commands/Moderation/unmute.js b/commands/Moderation/unmute.js index 3b2904152f..2e698e180a 100644 --- a/commands/Moderation/unmute.js +++ b/commands/Moderation/unmute.js @@ -21,7 +21,9 @@ class Unmute extends Command { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ - return message.success("moderation/unmute:MISSING_MEMBER"); + return interaction.reply({ + content: translate("moderation/unmute:MISSING_MEMBER") + }); } const memberPosition = member.roles.highest.position; diff --git a/commands/Music/autoplay.js b/commands/Music/autoplay.js index 382612b1c1..774204e82a 100644 --- a/commands/Music/autoplay.js +++ b/commands/Music/autoplay.js @@ -40,7 +40,9 @@ class AutoPlay extends Command { await this.client.player.setAutoPlay(message, !queue.autoPlay); // Send the embed in the current channel - message.sendT(`music/autoplay:SUCCESS_${queue.autoPlay ? "ENABLED" : "DISABLED"}`); + interaction.reply({ + content: translate(`music/autoplay:SUCCESS_${queue.autoPlay ? "ENABLED" : "DISABLED"}`) + }); } diff --git a/commands/Music/filter.js b/commands/Music/filter.js index 1a6882114e..f07ff528b1 100644 --- a/commands/Music/filter.js +++ b/commands/Music/filter.js @@ -55,8 +55,12 @@ class Filter extends Command { filtersUpdated[filterRealName] = queueFilters[filterRealName] ? false : true; this.client.player.setFilters(message, filtersUpdated); - if(filtersUpdated[filterRealName]) message.success("music/filter:ADDING_FILTER"); - else message.success("music/filter:REMOVING_FILTER"); + if(filtersUpdated[filterRealName]) interaction.reply({ +content: translate("music/filter:ADDING_FILTER") +});; + else interaction.reply({ +content: translate("music/filter:REMOVING_FILTER") +});; } } diff --git a/commands/Music/pause.js b/commands/Music/pause.js index 18595d9471..35f036e3b1 100644 --- a/commands/Music/pause.js +++ b/commands/Music/pause.js @@ -40,7 +40,9 @@ class Pause extends Command { await this.client.player.pause(message); // Send the embed in the current channel - message.sendT("music/pause:SUCCESS"); + interaction.reply({ + content: translate("music/pause:SUCCESS") + }); } diff --git a/commands/Music/resume.js b/commands/Music/resume.js index d75d26e74a..8e360703e9 100644 --- a/commands/Music/resume.js +++ b/commands/Music/resume.js @@ -40,7 +40,9 @@ class Resume extends Command { await this.client.player.resume(message); // Send the embed in the current channel - message.sendT("music/resume:SUCCESS"); + interaction.reply({ + content: translate("music/resume:SUCCESS") + }); } } diff --git a/commands/Music/seek.js b/commands/Music/seek.js index a4e783eb14..11803ae4a7 100644 --- a/commands/Music/seek.js +++ b/commands/Music/seek.js @@ -49,7 +49,9 @@ class Seek extends Command { await this.client.player.setPosition(message, queue.currentStreamTime + time); // Send the embed in the current channel - message.sendT("music/seek:SUCCESS"); + interaction.reply({ + content: translate("music/seek:SUCCESS") + }); } } From 445bee6139402eb310712759ec35d08533512fef Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 19:53:33 +0200 Subject: [PATCH 05/29] :recycle: Rewrite all params --- commands/Administration/addcommand.js | 2 +- commands/Administration/addemoji.js | 2 +- commands/Administration/automod.js | 2 +- commands/Administration/autorole.js | 2 +- commands/Administration/backup.js | 2 +- commands/Administration/configuration.js | 2 +- commands/Administration/delcommand.js | 2 +- commands/Administration/deletemod.js | 2 +- commands/Administration/goodbye.js | 2 +- commands/Administration/ignore.js | 2 +- commands/Administration/setfortniteshop.js | 2 +- commands/Administration/setlang.js | 2 +- commands/Administration/setmodlogs.js | 2 +- commands/Administration/setprefix.js | 2 +- commands/Administration/setreports.js | 2 +- commands/Administration/setsuggests.js | 2 +- commands/Administration/slowmode.js | 2 +- commands/Administration/welcome.js | 2 +- commands/Economy/deposit.js | 2 +- commands/Economy/divorce.js | 2 +- commands/Economy/leaderboard.js | 2 +- commands/Economy/marry.js | 2 +- commands/Economy/money.js | 2 +- commands/Economy/pay.js | 2 +- commands/Economy/profile.js | 2 +- commands/Economy/rep.js | 2 +- commands/Economy/rob.js | 2 +- commands/Economy/setbio.js | 2 +- commands/Economy/slots.js | 2 +- commands/Economy/withdraw.js | 2 +- commands/Economy/work.js | 2 +- commands/Fun/8ball.js | 2 +- commands/Fun/ascii.js | 2 +- commands/Fun/choice.js | 2 +- commands/Fun/findwords.js | 2 +- commands/Fun/fml.js | 2 +- commands/Fun/joke.js | 2 +- commands/Fun/lmg.js | 2 +- commands/General/fortnite.js | 2 +- commands/General/fortniteshop.js | 2 +- commands/General/github.js | 2 +- commands/General/hastebin.js | 2 +- commands/General/help.js | 2 +- commands/General/invitations.js | 2 +- commands/General/invite.js | 2 +- commands/General/minecraft.js | 2 +- commands/General/quote.js | 2 +- commands/General/remindme.js | 2 +- commands/General/report.js | 2 +- commands/General/serverinfo.js | 2 +- commands/General/setafk.js | 2 +- commands/General/shorturl.js | 2 +- commands/General/someone.js | 2 +- commands/General/staff.js | 2 +- commands/General/stats.js | 2 +- commands/General/suggest.js | 2 +- commands/General/translate.js | 2 +- commands/General/userinfo.js | 2 +- commands/Images/approved.js | 2 +- commands/Images/avatar.js | 2 +- commands/Images/batslap.js | 2 +- commands/Images/beautiful.js | 2 +- commands/Images/bed.js | 2 +- commands/Images/brazzers.js | 2 +- commands/Images/burn.js | 2 +- commands/Images/captcha.js | 2 +- commands/Images/challenger.js | 2 +- commands/Images/clyde.js | 2 +- commands/Images/dictator.js | 2 +- commands/Images/facepalm.js | 2 +- commands/Images/fire.js | 2 +- commands/Images/jail.js | 2 +- commands/Images/love.js | 2 +- commands/Images/mission.js | 2 +- commands/Images/phcomment.js | 2 +- commands/Images/qrcode.js | 2 +- commands/Images/rip.js | 2 +- commands/Images/scary.js | 2 +- commands/Images/tobecontinued.js | 2 +- commands/Images/trash.js | 2 +- commands/Images/triggered.js | 2 +- commands/Images/tweet.js | 2 +- commands/Images/wanted.js | 2 +- commands/Images/wasted.js | 2 +- commands/Images/youtube-comment.js | 2 +- commands/Moderation/announcement.js | 2 +- commands/Moderation/ban.js | 2 +- commands/Moderation/checkinvites.js | 2 +- commands/Moderation/clear-sanctions.js | 2 +- commands/Moderation/clear.js | 2 +- commands/Moderation/giveaway.js | 2 +- commands/Moderation/kick.js | 2 +- commands/Moderation/mute.js | 2 +- commands/Moderation/poll.js | 2 +- commands/Moderation/sanctions.js | 2 +- commands/Moderation/setwarns.js | 2 +- commands/Moderation/unban.js | 2 +- commands/Moderation/unmute.js | 2 +- commands/Moderation/warn.js | 2 +- commands/Music/back.js | 2 +- commands/Music/filter.js | 2 +- commands/Music/filters.js | 2 +- commands/Music/lyrics.js | 2 +- commands/Music/np.js | 2 +- commands/Music/play.js | 4 ++-- commands/Music/queue.js | 2 +- commands/Music/seek.js | 2 +- commands/Music/skip.js | 2 +- commands/Music/stop.js | 2 +- commands/Owner/eval.js | 2 +- commands/Owner/reload.js | 2 +- commands/Owner/servers-list.js | 2 +- 112 files changed, 113 insertions(+), 113 deletions(-) diff --git a/commands/Administration/addcommand.js b/commands/Administration/addcommand.js index 021c22300c..5d8f40c016 100644 --- a/commands/Administration/addcommand.js +++ b/commands/Administration/addcommand.js @@ -17,7 +17,7 @@ class Addcommand extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { if (!args[0]) return interaction.reply({ diff --git a/commands/Administration/addemoji.js b/commands/Administration/addemoji.js index ad860dcbad..df49978418 100644 --- a/commands/Administration/addemoji.js +++ b/commands/Administration/addemoji.js @@ -17,7 +17,7 @@ class Addemoji extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const URL = args[0]; if (!URL) { diff --git a/commands/Administration/automod.js b/commands/Administration/automod.js index 0e32cb829f..29ea3bdc20 100644 --- a/commands/Administration/automod.js +++ b/commands/Administration/automod.js @@ -17,7 +17,7 @@ class Automod extends Command { }); } - async run (message, args,data) { + async run (interaction, translate,data) { const status = args[0]; if(!status || (status !== "on" && status !== "off")){ diff --git a/commands/Administration/autorole.js b/commands/Administration/autorole.js index ef7dfa2618..dfa613893d 100644 --- a/commands/Administration/autorole.js +++ b/commands/Administration/autorole.js @@ -18,7 +18,7 @@ class Autorole extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const status = args[0]; if(status !== "on" && status !== "off"){ diff --git a/commands/Administration/backup.js b/commands/Administration/backup.js index ac7964464d..4b42bfacbe 100644 --- a/commands/Administration/backup.js +++ b/commands/Administration/backup.js @@ -20,7 +20,7 @@ class Backup extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const status = args[0]; if(!status){ diff --git a/commands/Administration/configuration.js b/commands/Administration/configuration.js index 7bca29320b..ff9d3ad8e0 100644 --- a/commands/Administration/configuration.js +++ b/commands/Administration/configuration.js @@ -18,7 +18,7 @@ class Configuration extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const guildData = data.guild; diff --git a/commands/Administration/delcommand.js b/commands/Administration/delcommand.js index 8975fca8d8..b029f71389 100644 --- a/commands/Administration/delcommand.js +++ b/commands/Administration/delcommand.js @@ -17,7 +17,7 @@ class Delcommand extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const name = args[0]; if(!name){ diff --git a/commands/Administration/deletemod.js b/commands/Administration/deletemod.js index b237f5ba3c..edc369c2f4 100644 --- a/commands/Administration/deletemod.js +++ b/commands/Administration/deletemod.js @@ -17,7 +17,7 @@ class Deletemod extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const status = args[0]; if(!status || status !== "on" && status !== "off"){ return interaction.reply({ diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index 03737f7c74..e3123dd170 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -18,7 +18,7 @@ class Goodbye extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { if ( args[0] === "test" && diff --git a/commands/Administration/ignore.js b/commands/Administration/ignore.js index 36f7fa8571..9dc2b1be58 100644 --- a/commands/Administration/ignore.js +++ b/commands/Administration/ignore.js @@ -17,7 +17,7 @@ class Ignore extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const channel = message.mentions.channels.filter((ch) => ch.type === "text" && ch.guild.id === message.guild.id).first(); if(!channel){ diff --git a/commands/Administration/setfortniteshop.js b/commands/Administration/setfortniteshop.js index 9e658c4d7d..8c11cd157c 100644 --- a/commands/Administration/setfortniteshop.js +++ b/commands/Administration/setfortniteshop.js @@ -19,7 +19,7 @@ class Setfortniteshop extends Command { }); } - async run(message, args, data) { + async run(interaction, translate, data) { if (!data.config.apiKeys.fortniteFNBR || data.config.apiKeys.fortniteFNBR.length === "") { return interaction.reply({ diff --git a/commands/Administration/setlang.js b/commands/Administration/setlang.js index 3f2849d927..ce64532914 100644 --- a/commands/Administration/setlang.js +++ b/commands/Administration/setlang.js @@ -17,7 +17,7 @@ class Setlang extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const language = this.client.languages.find((l) => l.name === args[0] || l.aliases.includes(args[0])); diff --git a/commands/Administration/setmodlogs.js b/commands/Administration/setmodlogs.js index 80b3f04c07..a8b02d30ac 100644 --- a/commands/Administration/setmodlogs.js +++ b/commands/Administration/setmodlogs.js @@ -18,7 +18,7 @@ class Setmodlogs extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const areModLogsEnabled = Boolean(data.guild.plugins.modlogs); const sentChannel = await Resolvers.resolveChannel({ diff --git a/commands/Administration/setprefix.js b/commands/Administration/setprefix.js index 455cebb253..27ec9fe069 100644 --- a/commands/Administration/setprefix.js +++ b/commands/Administration/setprefix.js @@ -17,7 +17,7 @@ class Setprefix extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const prefix = args[0]; if(!prefix){ diff --git a/commands/Administration/setreports.js b/commands/Administration/setreports.js index 7edf93f41a..11a92f4258 100644 --- a/commands/Administration/setreports.js +++ b/commands/Administration/setreports.js @@ -18,7 +18,7 @@ class Setreports extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const areReportsEnabled = Boolean(data.guild.plugins.reports); const sentChannel = await Resolvers.resolveChannel({ diff --git a/commands/Administration/setsuggests.js b/commands/Administration/setsuggests.js index 12099abd68..4fe2fda10a 100644 --- a/commands/Administration/setsuggests.js +++ b/commands/Administration/setsuggests.js @@ -18,7 +18,7 @@ class Setsuggests extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const areSuggestsEnabled = Boolean(data.guild.plugins.suggestions); const sentChannel = await Resolvers.resolveChannel({ diff --git a/commands/Administration/slowmode.js b/commands/Administration/slowmode.js index 316febd09c..0e8fce2424 100644 --- a/commands/Administration/slowmode.js +++ b/commands/Administration/slowmode.js @@ -18,7 +18,7 @@ class Slowmode extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const channel = message.mentions.channels.filter((ch) => ch.type === "text" && ch.guild.id === message.guild.id).first(); if(!channel){ diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index 153cdfaf93..22f4a06eec 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -18,7 +18,7 @@ class Welcome extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { if ( args[0] === "test" && diff --git a/commands/Economy/deposit.js b/commands/Economy/deposit.js index 773be177e9..39e8fa58ba 100644 --- a/commands/Economy/deposit.js +++ b/commands/Economy/deposit.js @@ -17,7 +17,7 @@ class Deposit extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { let amount = args[0]; diff --git a/commands/Economy/divorce.js b/commands/Economy/divorce.js index b08d902832..80c7b387e4 100644 --- a/commands/Economy/divorce.js +++ b/commands/Economy/divorce.js @@ -17,7 +17,7 @@ class Divorce extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { // Check if the message author is wedded if(!data.userData.lover){ diff --git a/commands/Economy/leaderboard.js b/commands/Economy/leaderboard.js index 205275eb87..d2f2a7ea5a 100644 --- a/commands/Economy/leaderboard.js +++ b/commands/Economy/leaderboard.js @@ -18,7 +18,7 @@ class Leaderboard extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const isOnlyOnMobile = (message.author.presence.clientStatus ? JSON.stringify(Object.keys(message.author.presence.clientStatus)) === JSON.stringify([ "mobile" ]) : false); diff --git a/commands/Economy/marry.js b/commands/Economy/marry.js index e11645ac2f..8ab5f94774 100644 --- a/commands/Economy/marry.js +++ b/commands/Economy/marry.js @@ -21,7 +21,7 @@ class Marry extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { // if the message author is already wedded if(data.userData.lover){ diff --git a/commands/Economy/money.js b/commands/Economy/money.js index 95e7661cc0..3c17fa3cfd 100644 --- a/commands/Economy/money.js +++ b/commands/Economy/money.js @@ -24,7 +24,7 @@ class Credits extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { let member = await this.client.resolveMember(args[0], message.guild); if(!member) member = message.member; diff --git a/commands/Economy/pay.js b/commands/Economy/pay.js index 788f180f52..98995f27ed 100644 --- a/commands/Economy/pay.js +++ b/commands/Economy/pay.js @@ -17,7 +17,7 @@ class Pay extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ diff --git a/commands/Economy/profile.js b/commands/Economy/profile.js index 9e372c7582..2b00ba335d 100644 --- a/commands/Economy/profile.js +++ b/commands/Economy/profile.js @@ -24,7 +24,7 @@ class Profile extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const client = this.client; diff --git a/commands/Economy/rep.js b/commands/Economy/rep.js index 6a1b101559..306de2c339 100644 --- a/commands/Economy/rep.js +++ b/commands/Economy/rep.js @@ -17,7 +17,7 @@ class Rep extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { // if the member is already in the cooldown db const isInCooldown = (data.userData.cooldowns || { rep: 0 }).rep; diff --git a/commands/Economy/rob.js b/commands/Economy/rob.js index 3718f9c57b..7b76c81d1e 100644 --- a/commands/Economy/rob.js +++ b/commands/Economy/rob.js @@ -17,7 +17,7 @@ class Rob extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ diff --git a/commands/Economy/setbio.js b/commands/Economy/setbio.js index 17318a33be..b336c17246 100644 --- a/commands/Economy/setbio.js +++ b/commands/Economy/setbio.js @@ -17,7 +17,7 @@ class Setbio extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const newBio = args.join(" "); if(!newBio){ return interaction.reply({ diff --git a/commands/Economy/slots.js b/commands/Economy/slots.js index bb9046840b..844e3c7cdd 100644 --- a/commands/Economy/slots.js +++ b/commands/Economy/slots.js @@ -17,7 +17,7 @@ class Slots extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const fruits = [ "🍎", "🍐", "🍌", "🍇", "🍉", "🍒", "🍓" ]; diff --git a/commands/Economy/withdraw.js b/commands/Economy/withdraw.js index 1fce04bdf1..3d5fd8e9f3 100644 --- a/commands/Economy/withdraw.js +++ b/commands/Economy/withdraw.js @@ -17,7 +17,7 @@ class Withdraw extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { let amount = args[0]; diff --git a/commands/Economy/work.js b/commands/Economy/work.js index 496ad11551..37c2f12451 100644 --- a/commands/Economy/work.js +++ b/commands/Economy/work.js @@ -18,7 +18,7 @@ class Work extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { // if the member is already in the cooldown db const isInCooldown = data.memberData.cooldowns.work; diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js index 0516a903d2..724de71f4a 100644 --- a/commands/Fun/8ball.js +++ b/commands/Fun/8ball.js @@ -17,7 +17,7 @@ class Eightball extends Command { }); } - async run (message, args) { + async run (interaction, translate) { if (!args[0] || !message.content.endsWith("?")) { return interaction.reply({ diff --git a/commands/Fun/ascii.js b/commands/Fun/ascii.js index 7d4a8d954c..cbc99a27f4 100644 --- a/commands/Fun/ascii.js +++ b/commands/Fun/ascii.js @@ -20,7 +20,7 @@ class Ascii extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const text = args.join(" "); if (!text || text.length > 20) { return interaction.reply({ diff --git a/commands/Fun/choice.js b/commands/Fun/choice.js index 1e6c47ae31..ecd539b4a1 100644 --- a/commands/Fun/choice.js +++ b/commands/Fun/choice.js @@ -17,7 +17,7 @@ class Choice extends Command { }); } - async run (message, args) { + async run (interaction, translate) { // Gets the answers by spliting on "/" const answers = args.join(" ").split("/"); diff --git a/commands/Fun/findwords.js b/commands/Fun/findwords.js index eb7faa7911..d72741a642 100644 --- a/commands/Fun/findwords.js +++ b/commands/Fun/findwords.js @@ -20,7 +20,7 @@ class FindWords extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { if (currentGames[message.guild.id]) { return interaction.reply({ diff --git a/commands/Fun/fml.js b/commands/Fun/fml.js index a892b4135b..50897122b0 100644 --- a/commands/Fun/fml.js +++ b/commands/Fun/fml.js @@ -18,7 +18,7 @@ class Fml extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { if (!this.client.config.apiKeys.blagueXYZ) return interaction.reply({ diff --git a/commands/Fun/joke.js b/commands/Fun/joke.js index fa9034d966..de03e67da6 100644 --- a/commands/Fun/joke.js +++ b/commands/Fun/joke.js @@ -18,7 +18,7 @@ class Joke extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { if (!this.client.config.apiKeys.blagueXYZ) return interaction.reply({ diff --git a/commands/Fun/lmg.js b/commands/Fun/lmg.js index 63fb3009a4..cc2082478c 100644 --- a/commands/Fun/lmg.js +++ b/commands/Fun/lmg.js @@ -17,7 +17,7 @@ class Lmg extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const question = args.join(" "); if (!question) return interaction.reply({ content: translate("fun/lmg:MISSING"), diff --git a/commands/General/fortnite.js b/commands/General/fortnite.js index f0706c4735..cbeedf2de8 100644 --- a/commands/General/fortnite.js +++ b/commands/General/fortnite.js @@ -18,7 +18,7 @@ class Fortnite extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { if(!data.config.apiKeys.fortniteTRN || data.config.apiKeys.fortniteTRN.length === ""){ return interaction.reply({ diff --git a/commands/General/fortniteshop.js b/commands/General/fortniteshop.js index 4cd1d8d944..df29a31f1f 100644 --- a/commands/General/fortniteshop.js +++ b/commands/General/fortniteshop.js @@ -18,7 +18,7 @@ class Fortniteshop extends Command { }); } - async run(message, args, data) { + async run(interaction, translate, data) { if(!data.config.apiKeys.fortniteFNBR || data.config.apiKeys.fortniteFNBR.length === "") { return message.error("misc:COMMAND_DISABLED"); diff --git a/commands/General/github.js b/commands/General/github.js index 12afa5b23f..1710faebee 100644 --- a/commands/General/github.js +++ b/commands/General/github.js @@ -19,7 +19,7 @@ class Github extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const res = await fetch("https://api.github.com/repos/Androz2091/AtlantaBot"); const json = await res.json(); diff --git a/commands/General/hastebin.js b/commands/General/hastebin.js index cb0badaf7c..93ec74a5f8 100644 --- a/commands/General/hastebin.js +++ b/commands/General/hastebin.js @@ -19,7 +19,7 @@ class Hastebin extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const content = args.join(" "); if(!content){ diff --git a/commands/General/help.js b/commands/General/help.js index 0713b651fa..09287f5b6d 100644 --- a/commands/General/help.js +++ b/commands/General/help.js @@ -17,7 +17,7 @@ class Help extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { // if a command is provided if(args[0]){ diff --git a/commands/General/invitations.js b/commands/General/invitations.js index 41c4253038..6da464fe7d 100644 --- a/commands/General/invitations.js +++ b/commands/General/invitations.js @@ -18,7 +18,7 @@ class Invitations extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { let member = await this.client.resolveMember(args[0], message.guild); if (!member) member = message.member; diff --git a/commands/General/invite.js b/commands/General/invite.js index 1a0ec04ac1..ed992c634b 100644 --- a/commands/General/invite.js +++ b/commands/General/invite.js @@ -18,7 +18,7 @@ class Invite extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const inviteLink = this.client.config.inviteURL || `https://discordapp.com/oauth2/authorize?client_id=${this.client.user.id}&scope=bot&permissions=2146958847`; const voteURL = this.client.config.voteURL || `https://discordbots.org/bot/${this.client.user.id}/vote`; diff --git a/commands/General/minecraft.js b/commands/General/minecraft.js index 8570125ebc..30f6c61299 100644 --- a/commands/General/minecraft.js +++ b/commands/General/minecraft.js @@ -21,7 +21,7 @@ class Minecraft extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const ip = args[0]; if(!ip){ diff --git a/commands/General/quote.js b/commands/General/quote.js index 8f95592480..550833be6b 100644 --- a/commands/General/quote.js +++ b/commands/General/quote.js @@ -18,7 +18,7 @@ class Quote extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { function embed(m){ const embed = new Discord.MessageEmbed() diff --git a/commands/General/remindme.js b/commands/General/remindme.js index c3ebd66d9c..915031b658 100644 --- a/commands/General/remindme.js +++ b/commands/General/remindme.js @@ -17,7 +17,7 @@ class Remindme extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const time = args[0]; if(!time || isNaN(ms(time))){ diff --git a/commands/General/report.js b/commands/General/report.js index 6025f3afa3..7fca6bf2eb 100644 --- a/commands/General/report.js +++ b/commands/General/report.js @@ -18,7 +18,7 @@ class Report extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const repChannel = message.guild.channels.cache.get(data.guild.plugins.reports); if(!repChannel){ diff --git a/commands/General/serverinfo.js b/commands/General/serverinfo.js index c85983ea6c..555bb0a3eb 100644 --- a/commands/General/serverinfo.js +++ b/commands/General/serverinfo.js @@ -17,7 +17,7 @@ class Serverinfo extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { let guild = message.guild; diff --git a/commands/General/setafk.js b/commands/General/setafk.js index 6f68d84c73..ef04067b87 100644 --- a/commands/General/setafk.js +++ b/commands/General/setafk.js @@ -16,7 +16,7 @@ class Setafk extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const reason = args.join(" "); if(!reason){ diff --git a/commands/General/shorturl.js b/commands/General/shorturl.js index 455f2037d7..b4e96eaa86 100644 --- a/commands/General/shorturl.js +++ b/commands/General/shorturl.js @@ -19,7 +19,7 @@ class ShortURL extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const url = args[0]; if(!url){ diff --git a/commands/General/someone.js b/commands/General/someone.js index e9434cefdc..287a7b68af 100644 --- a/commands/General/someone.js +++ b/commands/General/someone.js @@ -18,7 +18,7 @@ class Someone extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const member = message.guild.members.cache.random(1)[0]; diff --git a/commands/General/staff.js b/commands/General/staff.js index 11c04a5362..4aad04946e 100644 --- a/commands/General/staff.js +++ b/commands/General/staff.js @@ -18,7 +18,7 @@ class Staff extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { await message.guild.members.fetch(); const administrators = message.guild.members.cache.filter((m) => m.permissions.has("ADMINISTRATOR") && !m.user.bot); const moderators = message.guild.members.cache.filter((m) => !administrators.has(m.id) && m.permissions.has("MANAGE_MESSAGES") && !m.user.bot); diff --git a/commands/General/stats.js b/commands/General/stats.js index 5056d12c1f..a060b89976 100644 --- a/commands/General/stats.js +++ b/commands/General/stats.js @@ -18,7 +18,7 @@ class Stats extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const statsEmbed = new Discord.MessageEmbed() .setColor(data.config.embed.color) diff --git a/commands/General/suggest.js b/commands/General/suggest.js index a1ca2efe20..b90ef3245c 100644 --- a/commands/General/suggest.js +++ b/commands/General/suggest.js @@ -18,7 +18,7 @@ class Suggest extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const suggChannel = message.guild.channels.cache.get(data.guild.plugins.suggestions); if(!suggChannel){ diff --git a/commands/General/translate.js b/commands/General/translate.js index 19a446dcda..eaa1694e5f 100644 --- a/commands/General/translate.js +++ b/commands/General/translate.js @@ -21,7 +21,7 @@ class Translate extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { if(args[0] === "langs-list"){ const langsList = "```Css\n"+(langs.map((l, i) => `#${i+1} - ${l}`).join("\n"))+"```"; diff --git a/commands/General/userinfo.js b/commands/General/userinfo.js index b6d6f99c94..ec58333b79 100644 --- a/commands/General/userinfo.js +++ b/commands/General/userinfo.js @@ -19,7 +19,7 @@ class Userinfo extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { let displayPresence = true; diff --git a/commands/Images/approved.js b/commands/Images/approved.js index fff35e8a71..453d76a19c 100644 --- a/commands/Images/approved.js +++ b/commands/Images/approved.js @@ -17,7 +17,7 @@ class Approved extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/avatar.js b/commands/Images/avatar.js index bb255b3c04..04f023dbb0 100644 --- a/commands/Images/avatar.js +++ b/commands/Images/avatar.js @@ -17,7 +17,7 @@ class Avatar extends Command { }); } - async run (message, args) { + async run (interaction, translate) { let user = await this.client.resolveUser(args[0]); if(!user) user = message.author; diff --git a/commands/Images/batslap.js b/commands/Images/batslap.js index 17571324fa..647d950f9c 100644 --- a/commands/Images/batslap.js +++ b/commands/Images/batslap.js @@ -17,7 +17,7 @@ class BatSlap extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const users = [ await this.client.resolveUser(args[0]) || message.author, diff --git a/commands/Images/beautiful.js b/commands/Images/beautiful.js index 2cfd8f79bf..7e078d261a 100644 --- a/commands/Images/beautiful.js +++ b/commands/Images/beautiful.js @@ -17,7 +17,7 @@ class Beautiful extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/bed.js b/commands/Images/bed.js index 5c4d5eb2f0..153f98f1bc 100644 --- a/commands/Images/bed.js +++ b/commands/Images/bed.js @@ -18,7 +18,7 @@ class Bed extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const users = [ await this.client.resolveUser(args[0]) || message.author, diff --git a/commands/Images/brazzers.js b/commands/Images/brazzers.js index d83f0d9fa9..409521cd45 100644 --- a/commands/Images/brazzers.js +++ b/commands/Images/brazzers.js @@ -17,7 +17,7 @@ class Brazzers extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/burn.js b/commands/Images/burn.js index ddd6da6c20..8317da9048 100644 --- a/commands/Images/burn.js +++ b/commands/Images/burn.js @@ -17,7 +17,7 @@ class Burn extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/captcha.js b/commands/Images/captcha.js index 9fc1af6c54..755c4e67a2 100644 --- a/commands/Images/captcha.js +++ b/commands/Images/captcha.js @@ -18,7 +18,7 @@ class Captcha extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/challenger.js b/commands/Images/challenger.js index 83c540dc05..625d9f1aa3 100644 --- a/commands/Images/challenger.js +++ b/commands/Images/challenger.js @@ -17,7 +17,7 @@ class Challenger extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/clyde.js b/commands/Images/clyde.js index 07d4c929ae..c78950c53b 100644 --- a/commands/Images/clyde.js +++ b/commands/Images/clyde.js @@ -18,7 +18,7 @@ class Clyde extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const text = args.join(" "); diff --git a/commands/Images/dictator.js b/commands/Images/dictator.js index 4678d1be95..a49cf344bd 100644 --- a/commands/Images/dictator.js +++ b/commands/Images/dictator.js @@ -17,7 +17,7 @@ class Dictator extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/facepalm.js b/commands/Images/facepalm.js index 50bb284886..8a960b877a 100644 --- a/commands/Images/facepalm.js +++ b/commands/Images/facepalm.js @@ -18,7 +18,7 @@ class Facepalm extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author, m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/fire.js b/commands/Images/fire.js index 77277e6d03..6f6f855f48 100644 --- a/commands/Images/fire.js +++ b/commands/Images/fire.js @@ -17,7 +17,7 @@ class Fire extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/jail.js b/commands/Images/jail.js index 9af67a4e64..8c515636c2 100644 --- a/commands/Images/jail.js +++ b/commands/Images/jail.js @@ -17,7 +17,7 @@ class Jail extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/love.js b/commands/Images/love.js index f3a9068083..252c00237e 100644 --- a/commands/Images/love.js +++ b/commands/Images/love.js @@ -18,7 +18,7 @@ class Love extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const users = [ await this.client.resolveUser(args[0]) || message.author, diff --git a/commands/Images/mission.js b/commands/Images/mission.js index 7ccdd7a9d7..ed5aec8c92 100644 --- a/commands/Images/mission.js +++ b/commands/Images/mission.js @@ -17,7 +17,7 @@ class Mission extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("images/mission:PLEASE_WAIT", null, { diff --git a/commands/Images/phcomment.js b/commands/Images/phcomment.js index 4189f9542d..403937a130 100644 --- a/commands/Images/phcomment.js +++ b/commands/Images/phcomment.js @@ -18,7 +18,7 @@ class Phcomment extends Command { }); } - async run (message, args) { + async run (interaction, translate) { let user = await this.client.resolveUser(args[0]); let text = args.join(" "); diff --git a/commands/Images/qrcode.js b/commands/Images/qrcode.js index 0bc6b82df6..1e65edff3e 100644 --- a/commands/Images/qrcode.js +++ b/commands/Images/qrcode.js @@ -18,7 +18,7 @@ class Qrcode extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const text = args.join(" "); if(!text){ diff --git a/commands/Images/rip.js b/commands/Images/rip.js index 129c8dacfe..7eb05f0419 100644 --- a/commands/Images/rip.js +++ b/commands/Images/rip.js @@ -17,7 +17,7 @@ class Rip extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/scary.js b/commands/Images/scary.js index adb7488c24..af2ad7ae93 100644 --- a/commands/Images/scary.js +++ b/commands/Images/scary.js @@ -17,7 +17,7 @@ class Scary extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/tobecontinued.js b/commands/Images/tobecontinued.js index 72b1b1bfd8..b897ab352b 100644 --- a/commands/Images/tobecontinued.js +++ b/commands/Images/tobecontinued.js @@ -17,7 +17,7 @@ class Tobecontinued extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/trash.js b/commands/Images/trash.js index f8002e96f7..262758d9ca 100644 --- a/commands/Images/trash.js +++ b/commands/Images/trash.js @@ -18,7 +18,7 @@ class Trash extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/triggered.js b/commands/Images/triggered.js index efeab7dd63..a83ec5f842 100644 --- a/commands/Images/triggered.js +++ b/commands/Images/triggered.js @@ -17,7 +17,7 @@ class Triggered extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/tweet.js b/commands/Images/tweet.js index e45ab17ccd..947019b964 100644 --- a/commands/Images/tweet.js +++ b/commands/Images/tweet.js @@ -18,7 +18,7 @@ class Tweet extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = message.mentions.users.first() || message.author; const text = args.slice(1).join(" "); diff --git a/commands/Images/wanted.js b/commands/Images/wanted.js index c5d02a918c..087a917f0c 100644 --- a/commands/Images/wanted.js +++ b/commands/Images/wanted.js @@ -17,7 +17,7 @@ class Wanted extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/wasted.js b/commands/Images/wasted.js index 985f8e1037..624a947cc6 100644 --- a/commands/Images/wasted.js +++ b/commands/Images/wasted.js @@ -17,7 +17,7 @@ class Wasted extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const user = await this.client.resolveUser(args[0]) || message.author; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/youtube-comment.js b/commands/Images/youtube-comment.js index 4d87fb0004..01a6121503 100644 --- a/commands/Images/youtube-comment.js +++ b/commands/Images/youtube-comment.js @@ -18,7 +18,7 @@ class YouTubeComment extends Command { }); } - async run (message, args) { + async run (interaction, translate) { let user = await this.client.resolveUser(args[0]); let text = args.join(" "); diff --git a/commands/Moderation/announcement.js b/commands/Moderation/announcement.js index ffcf44f4fe..4b57d65517 100644 --- a/commands/Moderation/announcement.js +++ b/commands/Moderation/announcement.js @@ -18,7 +18,7 @@ class Announcement extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const text = args.join(" "); if(!text){ diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index bfbe7ad8ae..b64bc34b72 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -18,7 +18,7 @@ class Ban extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const user = await this.client.resolveUser(args[0]); if(!user){ diff --git a/commands/Moderation/checkinvites.js b/commands/Moderation/checkinvites.js index 2c7b4b08ab..c4988bf05f 100644 --- a/commands/Moderation/checkinvites.js +++ b/commands/Moderation/checkinvites.js @@ -18,7 +18,7 @@ class Checkinvites extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const members = message.guild.members; diff --git a/commands/Moderation/clear-sanctions.js b/commands/Moderation/clear-sanctions.js index af630b83af..cfa026522e 100644 --- a/commands/Moderation/clear-sanctions.js +++ b/commands/Moderation/clear-sanctions.js @@ -17,7 +17,7 @@ class Clearsanctions extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index 8b2d25f653..6e23de01aa 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -17,7 +17,7 @@ class Clear extends Command { }); } - async run (message, args) { + async run (interaction, translate) { if(args[0] === "all"){ interaction.reply({ diff --git a/commands/Moderation/giveaway.js b/commands/Moderation/giveaway.js index 23f4babae3..c09f5c46e3 100644 --- a/commands/Moderation/giveaway.js +++ b/commands/Moderation/giveaway.js @@ -18,7 +18,7 @@ class Giveaway extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const status = args[0]; if(!status){ diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index 3181add29c..3a3cef7407 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -18,7 +18,7 @@ class Kick extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ diff --git a/commands/Moderation/mute.js b/commands/Moderation/mute.js index a6d014270a..0abe4fcd36 100644 --- a/commands/Moderation/mute.js +++ b/commands/Moderation/mute.js @@ -19,7 +19,7 @@ class Mute extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ diff --git a/commands/Moderation/poll.js b/commands/Moderation/poll.js index e7e82e1f83..36e437bcb1 100644 --- a/commands/Moderation/poll.js +++ b/commands/Moderation/poll.js @@ -18,7 +18,7 @@ class Poll extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const question = args.join(" "); if(!question){ diff --git a/commands/Moderation/sanctions.js b/commands/Moderation/sanctions.js index 32bad701d7..fa9c81b903 100644 --- a/commands/Moderation/sanctions.js +++ b/commands/Moderation/sanctions.js @@ -18,7 +18,7 @@ class Sanctions extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const user = await this.client.resolveUser(args[0]); if(!user){ diff --git a/commands/Moderation/setwarns.js b/commands/Moderation/setwarns.js index 186fb48958..9407f95087 100644 --- a/commands/Moderation/setwarns.js +++ b/commands/Moderation/setwarns.js @@ -17,7 +17,7 @@ class Setwarns extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const sanction = args[0]; if(!sanction || (sanction !== "kick" && sanction !== "ban")){ diff --git a/commands/Moderation/unban.js b/commands/Moderation/unban.js index 2193d75885..6008618ee9 100644 --- a/commands/Moderation/unban.js +++ b/commands/Moderation/unban.js @@ -17,7 +17,7 @@ class Unban extends Command { }); } - async run (message, args) { + async run (interaction, translate) { let user = null; diff --git a/commands/Moderation/unmute.js b/commands/Moderation/unmute.js index 2e698e180a..7cc7cf56b1 100644 --- a/commands/Moderation/unmute.js +++ b/commands/Moderation/unmute.js @@ -17,7 +17,7 @@ class Unmute extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index 0937c59df0..c2bf61a68a 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -18,7 +18,7 @@ class Warn extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const member = await this.client.resolveMember(args[0], message.guild); if(!member){ diff --git a/commands/Music/back.js b/commands/Music/back.js index dfee3118e9..3153c377f8 100644 --- a/commands/Music/back.js +++ b/commands/Music/back.js @@ -18,7 +18,7 @@ class Back extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const queue = this.client.player.getQueue(message); diff --git a/commands/Music/filter.js b/commands/Music/filter.js index f07ff528b1..29f7c07cdb 100644 --- a/commands/Music/filter.js +++ b/commands/Music/filter.js @@ -18,7 +18,7 @@ class Filter extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const queue = this.client.player.getQueue(message); diff --git a/commands/Music/filters.js b/commands/Music/filters.js index bf6ba108bf..bbcbbe0fb6 100644 --- a/commands/Music/filters.js +++ b/commands/Music/filters.js @@ -19,7 +19,7 @@ class Filters extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const queue = this.client.player.getQueue(message); diff --git a/commands/Music/lyrics.js b/commands/Music/lyrics.js index 8eddf45dd6..2a804157c3 100644 --- a/commands/Music/lyrics.js +++ b/commands/Music/lyrics.js @@ -19,7 +19,7 @@ class Lyrics extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const [songName, artistName] = args.join(" ").split("|"); if(!songName){ diff --git a/commands/Music/np.js b/commands/Music/np.js index 1068403525..1e668b4170 100644 --- a/commands/Music/np.js +++ b/commands/Music/np.js @@ -18,7 +18,7 @@ class Np extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const queue = this.client.player.getQueue(message); diff --git a/commands/Music/play.js b/commands/Music/play.js index b57461a519..6140964573 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -17,7 +17,7 @@ class Play extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const name = args.join(" "); if(!name){ @@ -44,7 +44,7 @@ class Play extends Command { }); } - await this.client.player.play(message, args.join(" ")); + await this.client.player.play(interaction, translate.join(" ")); } } diff --git a/commands/Music/queue.js b/commands/Music/queue.js index 16f5fd212a..7dae745a4e 100644 --- a/commands/Music/queue.js +++ b/commands/Music/queue.js @@ -19,7 +19,7 @@ class Queue extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const voice = message.member.voice.channel; if (!voice){ diff --git a/commands/Music/seek.js b/commands/Music/seek.js index 11803ae4a7..8f1c5b9d13 100644 --- a/commands/Music/seek.js +++ b/commands/Music/seek.js @@ -18,7 +18,7 @@ class Seek extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const queue = this.client.player.getQueue(message); diff --git a/commands/Music/skip.js b/commands/Music/skip.js index a85b068bdf..f7c2d05ae2 100644 --- a/commands/Music/skip.js +++ b/commands/Music/skip.js @@ -18,7 +18,7 @@ class Skip extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const queue = this.client.player.getQueue(message); diff --git a/commands/Music/stop.js b/commands/Music/stop.js index 131149048e..5d80f75188 100644 --- a/commands/Music/stop.js +++ b/commands/Music/stop.js @@ -18,7 +18,7 @@ class Stop extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { const queue = await this.client.player.getQueue(message); diff --git a/commands/Owner/eval.js b/commands/Owner/eval.js index 3b1e22209c..42912e32d9 100644 --- a/commands/Owner/eval.js +++ b/commands/Owner/eval.js @@ -18,7 +18,7 @@ class Eval extends Command { } // eslint-disable-next-line no-unused-vars - async run (message, args, data) { + async run (interaction, translate, data) { // eslint-disable-next-line no-unused-vars const usersData = this.client.usersData; diff --git a/commands/Owner/reload.js b/commands/Owner/reload.js index 5d9e013c1a..b7288995d3 100644 --- a/commands/Owner/reload.js +++ b/commands/Owner/reload.js @@ -17,7 +17,7 @@ class Reload extends Command { }); } - async run (message, args) { + async run (interaction, translate) { const command = args[0]; const cmd = this.client.commands.get(command) || this.client.commands.get(this.client.aliases.get(command)); if(!cmd){ diff --git a/commands/Owner/servers-list.js b/commands/Owner/servers-list.js index b1a494fa86..b9f582a697 100644 --- a/commands/Owner/servers-list.js +++ b/commands/Owner/servers-list.js @@ -18,7 +18,7 @@ class ServersList extends Command { }); } - async run (message, args, data) { + async run (interaction, translate, data) { await message.delete(); From 6a24ea7391a4d874395f34866d9730ff226fea8e Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 19:59:43 +0200 Subject: [PATCH 06/29] :fire: Remove extenders --- atlanta.js | 2 -- helpers/extenders.js | 66 -------------------------------------------- 2 files changed, 68 deletions(-) diff --git a/atlanta.js b/atlanta.js index 0f21a7abc3..cda8452a9d 100644 --- a/atlanta.js +++ b/atlanta.js @@ -1,5 +1,3 @@ -require("./helpers/extenders"); - const Sentry = require("@sentry/node"), util = require("util"), fs = require("fs"), diff --git a/helpers/extenders.js b/helpers/extenders.js index 72895824bd..e69de29bb2 100644 --- a/helpers/extenders.js +++ b/helpers/extenders.js @@ -1,66 +0,0 @@ -const { Guild, Message, MessageEmbed } = require("discord.js"); -const config = require("../config"); - -Guild.prototype.translate = function(key, args) { - const language = this.client.translations.get(this.data.language); - if (!language) throw "Message: Invalid language set in data."; - return language(key, args); -}; - -Message.prototype.translate = function(key, args) { - const language = this.client.translations.get( - this.guild ? this.guild.data.language : "en-US" - ); - if (!language) throw "Message: Invalid language set in data."; - return language(key, args); -}; - -// Wrapper for sendT with error emoji -Message.prototype.error = function(key, args, options = {}) { - options.prefixEmoji = "error"; - return this.sendT(key, args, options); -}; - -// Wrapper for sendT with success emoji -Message.prototype.success = function(key, args, options = {}) { - options.prefixEmoji = "success"; - return this.sendT(key, args, options); -}; - -// Translate and send the message -Message.prototype.sendT = function(key, args, options = {}) { - let string = this.translate(key, args); - if (options.prefixEmoji) { - string = `${this.client.customEmojis[options.prefixEmoji]} | ${string}`; - } - if (options.edit) { - return this.edit(string); - } else { - return this.channel.send(string); - } -}; - -// Format a date -Message.prototype.printDate = function(date, format) { - return this.client.printDate(date, format, this.guild.data.language); -}; - -// Convert time -Message.prototype.convertTime = function(time, type, noPrefix) { - return this.client.convertTime(time, type, noPrefix, (this.guild && this.guild.data) ? this.guild.data.language : null); -}; - -MessageEmbed.prototype.errorColor = function() { - this.setColor("#FF0000"); - return this; -}; - -MessageEmbed.prototype.successColor = function() { - this.setColor("#32CD32"); - return this; -}; - -MessageEmbed.prototype.defaultColor = function() { - this.setColor(config.color); - return this; -}; From 8d9829ea3d92b9a03b1002a30ed110b44b7596e9 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 19:59:58 +0200 Subject: [PATCH 07/29] :recycle: Rewrite birthdate command --- commands/Economy/birthdate.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/commands/Economy/birthdate.js b/commands/Economy/birthdate.js index 16d7d7c38d..3de9648301 100644 --- a/commands/Economy/birthdate.js +++ b/commands/Economy/birthdate.js @@ -13,17 +13,18 @@ class Birthdate extends Command { } ], - dirname: __dirname, enabled: true, guildOnly: false, memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, - ownerOnly: false + ownerOnly: false, + + dirname: __dirname }); } - async run (interaction, translate, data) { + async run (interaction, translate, { userData, guildData }) { const date = interaction.options.getString("date"); @@ -69,11 +70,13 @@ class Birthdate extends Command { }); } - data.userData.birthdate = d; - data.userData.save(); + userData.birthdate = d; + userData.save(); - message.success("economy/birthdate:SUCCESS", { - date: message.printDate(d) + interaction.reply({ + content: translate("economy/birthdate:SUCCESS", { + date: this.client.printDate(d, null, guildData.language) + }) }); } From a0f38c6b7b902241a3a1bd166fc13db9c646d75d Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 20:01:45 +0200 Subject: [PATCH 08/29] :bug: Fix birthdate option --- commands/Economy/birthdate.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/Economy/birthdate.js b/commands/Economy/birthdate.js index 3de9648301..194ee9df02 100644 --- a/commands/Economy/birthdate.js +++ b/commands/Economy/birthdate.js @@ -9,7 +9,8 @@ class Birthdate extends Command { options: [ { name: "date", - type: "STRING" + type: "STRING", + required: true } ], From ded6fa173ad4a075ac8124dd769a50b1080a7e5a Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 20:03:33 +0200 Subject: [PATCH 09/29] :recycle: Rewrite deposit command --- commands/Economy/deposit.js | 51 +++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/commands/Economy/deposit.js b/commands/Economy/deposit.js index 39e8fa58ba..4966c8907f 100644 --- a/commands/Economy/deposit.js +++ b/commands/Economy/deposit.js @@ -5,7 +5,15 @@ class Deposit extends Command { constructor (client) { super(client, { name: "deposit", - dirname: __dirname, + + options: [ + { + name: "amount", + type: "INTEGER" + }, + + ], + enabled: true, guildOnly: true, aliases: [ "bank", "banque", "dep" ], @@ -13,45 +21,38 @@ class Deposit extends Command { botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 1000 + + dirname: __dirname }); } - async run (interaction, translate, data) { + async run (interaction, translate, { memberData }) { - let amount = args[0]; + const amount = interaction.options.getInteger("amount"); - if(!(parseInt(data.memberData.money, 10) > 0)) { + if(!(parseInt(memberData.money, 10) > 0)) { return interaction.reply({ content: translate("economy/deposit:NO_CREDIT"), ephemeral: true }); } - - if(args[0] === "all"){ - amount = parseInt(data.memberData.money, 10); - } else { - if(isNaN(amount) || parseInt(amount, 10) < 1){ - return interaction.reply({ - content: translate("economy/deposit:MISSING_AMOUNT"), - ephemeral: true - }); - } - amount = parseInt(amount, 10); - } - if(data.memberData.money < amount){ - return message.error("economy/deposit:NOT_ENOUGH_CREDIT", { - money: amount + if(memberData.money < amount){ + return interaction.reply({ + content: translate("economy/deposit:NOT_ENOUGH_CREDIT", { + money: amount + }) }); } - data.memberData.money = data.memberData.money - amount; - data.memberData.bankSold = data.memberData.bankSold + amount; - data.memberData.save(); + memberData.money = memberData.money - amount; + memberData.bankSold = memberData.bankSold + amount; + memberData.save(); - message.success("economy/deposit:SUCCESS", { - money: amount + interaction.reply({ + content: translate("economy/deposit:SUCCESS", { + money: amount + }) }); } From 6002044bfd6e7e28454b4c52bab9a625851c7291 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 20:58:49 +0200 Subject: [PATCH 10/29] :recycle: Replace some common bugs --- commands/Administration/automod.js | 2 +- commands/Administration/backup.js | 18 +++--- commands/Administration/configuration.js | 70 +++++++++++----------- commands/Administration/goodbye.js | 8 +-- commands/Administration/ignore.js | 2 +- commands/Administration/setfortniteshop.js | 10 ++-- commands/Administration/slowmode.js | 2 +- commands/Administration/welcome.js | 8 +-- commands/Economy/marry.js | 24 ++++---- commands/Economy/money.js | 10 ++-- commands/Economy/pay.js | 4 +- commands/Economy/profile.js | 28 ++++----- commands/Economy/rep.js | 2 +- commands/Economy/rob.js | 4 +- commands/Economy/slots.js | 18 +++--- commands/Economy/work.js | 10 ++-- commands/Fun/8ball.js | 4 +- commands/Fun/findwords.js | 8 +-- commands/Fun/fml.js | 2 +- commands/Fun/joke.js | 2 +- commands/Fun/lovecalc.js | 6 +- commands/Fun/number.js | 8 +-- commands/General/fortnite.js | 26 ++++---- commands/General/fortniteshop.js | 12 ++-- commands/General/github.js | 6 +- commands/General/hastebin.js | 2 +- commands/General/help.js | 32 +++++----- commands/General/invitations.js | 10 ++-- commands/General/invite.js | 10 ++-- commands/General/minecraft.js | 16 ++--- commands/General/permissions.js | 2 +- commands/General/quote.js | 8 +-- commands/General/remindme.js | 2 +- commands/General/report.js | 14 ++--- commands/General/serverinfo.js | 22 +++---- commands/General/someone.js | 6 +- commands/General/staff.js | 6 +- commands/General/stats.js | 18 +++--- commands/General/suggest.js | 12 ++-- commands/General/translate.js | 2 +- commands/General/userinfo.js | 38 ++++++------ commands/Images/approved.js | 2 +- commands/Images/avatar.js | 2 +- commands/Images/batslap.js | 4 +- commands/Images/beautiful.js | 2 +- commands/Images/bed.js | 4 +- commands/Images/brazzers.js | 2 +- commands/Images/burn.js | 2 +- commands/Images/captcha.js | 2 +- commands/Images/challenger.js | 2 +- commands/Images/dictator.js | 2 +- commands/Images/facepalm.js | 2 +- commands/Images/fire.js | 2 +- commands/Images/jail.js | 2 +- commands/Images/love.js | 4 +- commands/Images/mission.js | 2 +- commands/Images/phcomment.js | 2 +- commands/Images/qrcode.js | 2 +- commands/Images/rip.js | 2 +- commands/Images/scary.js | 2 +- commands/Images/tobecontinued.js | 2 +- commands/Images/trash.js | 2 +- commands/Images/triggered.js | 2 +- commands/Images/tweet.js | 2 +- commands/Images/wanted.js | 2 +- commands/Images/wasted.js | 2 +- commands/Images/youtube-comment.js | 2 +- commands/Moderation/announcement.js | 12 ++-- commands/Moderation/ban.js | 24 ++++---- commands/Moderation/checkinvites.js | 2 +- commands/Moderation/clear-sanctions.js | 2 +- commands/Moderation/clear.js | 4 +- commands/Moderation/giveaway.js | 32 +++++----- commands/Moderation/kick.js | 24 ++++---- commands/Moderation/mute.js | 30 +++++----- commands/Moderation/poll.js | 12 ++-- commands/Moderation/sanctions.js | 6 +- commands/Moderation/unmute.js | 4 +- commands/Moderation/warn.js | 32 +++++----- commands/Music/back.js | 10 ++-- commands/Music/filters.js | 4 +- commands/Music/lyrics.js | 4 +- commands/Music/np.js | 12 ++-- commands/Music/queue.js | 10 ++-- commands/Music/skip.js | 10 ++-- commands/Music/stop.js | 10 ++-- commands/Owner/servers-list.js | 24 ++++---- 87 files changed, 410 insertions(+), 410 deletions(-) diff --git a/commands/Administration/automod.js b/commands/Administration/automod.js index 29ea3bdc20..d36e4af14d 100644 --- a/commands/Administration/automod.js +++ b/commands/Administration/automod.js @@ -35,7 +35,7 @@ class Automod extends Command { prefix: data.guild.prefix }); } else if (status === "off"){ - if(message.mentions.channels.filter((ch) => ch.type === "text" && ch.guild.id === message.guild.id).first()){ + if(message.mentions.channels.filter((ch) => ch.type === "text" && ch.guild.id === interaction.guild.id).first()){ const channel = message.mentions.channels.first(); data.guild.plugins.automod.ignored.push(channel); data.guild.markModified("plugins.automod"); diff --git a/commands/Administration/backup.js b/commands/Administration/backup.js index 4b42bfacbe..a6bea8af5d 100644 --- a/commands/Administration/backup.js +++ b/commands/Administration/backup.js @@ -39,7 +39,7 @@ class Backup extends Command { interaction.reply({ content: translate("administration/backup:SUCCESS_PUBLIC") }); - message.author.send(message.translate("administration/backup:SUCCESS_PRIVATE", { + interaction.user.send(translate("administration/backup:SUCCESS_PRIVATE", { backupID: backup.id })).catch(() => { backup.remove(backup.id); @@ -67,7 +67,7 @@ class Backup extends Command { interaction.reply({ content: translate("administration/backup:CONFIRMATION") }); - await message.channel.awaitMessages(m => (m.author.id === message.author.id) && (m.content === "-confirm"), { + await message.channel.awaitMessages(m => (m.author.id === interaction.user.id) && (m.content === "-confirm"), { max: 1, time: 20000, errors: ["time"] @@ -79,12 +79,12 @@ class Backup extends Command { }); }); // When the author of the command has confirmed that he wants to load the backup on his server - message.author.send(message.translate("administration/backup:START_LOADING")); + interaction.user.send(translate("administration/backup:START_LOADING")); // Load the backup backup.load(backupID, message.guild).then(() => { // When the backup is loaded, delete them from the server backup.remove(backupID); - message.author.send(message.translate("administration/backup:LOAD_SUCCESS")); + interaction.user.send(translate("administration/backup:LOAD_SUCCESS")); }).catch((err) => { Sentry.captureException(err); // If an error occurenced @@ -109,15 +109,15 @@ class Backup extends Command { } backup.fetch(backupID).then(async (backupInfos) => { const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("administration/backup:TITLE_INFOS")) + .setAuthor(translate("administration/backup:TITLE_INFOS")) // Display the backup ID - .addField(message.translate("administration/backup:TITLE_ID"), backupInfos.id, true) + .addField(translate("administration/backup:TITLE_ID"), backupInfos.id, true) // Displays the server from which this backup comes - .addField(message.translate("administration/backup:TITLE_SERVER_ID"), backupInfos.data.guildID, true) + .addField(translate("administration/backup:TITLE_SERVER_ID"), backupInfos.data.guildID, true) // Display the size (in mb) of the backup - .addField(message.translate("administration/backup:TITLE_SIZE"), backupInfos.size+" mb", true) + .addField(translate("administration/backup:TITLE_SIZE"), backupInfos.size+" mb", true) // Display when the backup was created - .addField(message.translate("administration/backup:TITLE_CREATED_AT"), message.printDate(new Date(backupInfos.data.createdTimestamp)), true) + .addField(translate("administration/backup:TITLE_CREATED_AT"), message.printDate(new Date(backupInfos.data.createdTimestamp)), true) .setColor(data.config.embed.color) .setFooter(data.config.embed.footer); message.channel.send({ embeds: [embed] }); diff --git a/commands/Administration/configuration.js b/commands/Administration/configuration.js index ff9d3ad8e0..c1db5d9697 100644 --- a/commands/Administration/configuration.js +++ b/commands/Administration/configuration.js @@ -28,100 +28,100 @@ class Configuration extends Command { .setFooter(this.client.config.embed.footer); // Guild prefix - embed.addField(message.translate("administration/configuration:PREFIX_TITLE"), guildData.prefix); + embed.addField(translate("administration/configuration:PREFIX_TITLE"), guildData.prefix); // Ignored channels - embed.addField(message.translate("administration/configuration:IGNORED_CHANNELS_TITLE"), + embed.addField(translate("administration/configuration:IGNORED_CHANNELS_TITLE"), (guildData.ignoredChannels.length > 0) ? guildData.ignoredChannels.map((ch) => `<#${ch}>`).join(", ") - : message.translate("administration/configuration:NO_IGNORED_CHANNELS") + : translate("administration/configuration:NO_IGNORED_CHANNELS") ); // Autorole plugin - embed.addField(message.translate("administration/configuration:AUTOROLE_TITLE"), + embed.addField(translate("administration/configuration:AUTOROLE_TITLE"), (guildData.plugins.autorole.enabled) ? - message.translate("administration/configuration:AUTOROLE_CONTENT", { + translate("administration/configuration:AUTOROLE_CONTENT", { roleName: `<@&${guildData.plugins.autorole.role}>` }) - : message.translate("administration/configuration:AUTOROLE_DISABLED") + : translate("administration/configuration:AUTOROLE_DISABLED") ); // Welcome plugin - embed.addField(message.translate("administration/configuration:WELCOME_TITLE"), + embed.addField(translate("administration/configuration:WELCOME_TITLE"), (guildData.plugins.welcome.enabled) ? - message.translate("administration/configuration:WELCOME_CONTENT", { + translate("administration/configuration:WELCOME_CONTENT", { channel: `<#${guildData.plugins.welcome.channel}>`, - withImage: guildData.plugins.welcome.withImage ? message.translate("common:YES") : message.translate("common:NO") + withImage: guildData.plugins.welcome.withImage ? translate("common:YES") : translate("common:NO") }) - : message.translate("administration/configuration:WELCOME_DISABLED") + : translate("administration/configuration:WELCOME_DISABLED") ); // Goodbye plugin - embed.addField(message.translate("administration/configuration:GOODBYE_TITLE"), + embed.addField(translate("administration/configuration:GOODBYE_TITLE"), (guildData.plugins.goodbye.enabled) ? - message.translate("administration/configuration:GOODBYE_CONTENT", { + translate("administration/configuration:GOODBYE_CONTENT", { channel: `<#${guildData.plugins.goodbye.channelID}>`, - withImage: guildData.plugins.goodbye.withImage ? message.translate("common:YES") : message.translate("common:NO") + withImage: guildData.plugins.goodbye.withImage ? translate("common:YES") : translate("common:NO") }) - : message.translate("administration/configuration:GOODBYE_DISABLED") + : translate("administration/configuration:GOODBYE_DISABLED") ); // Special channels - embed.addField(message.translate("administration/configuration:SPECIAL_CHANNELS"), - message.translate("administration/configuration:MODLOGS", { + embed.addField(translate("administration/configuration:SPECIAL_CHANNELS"), + translate("administration/configuration:MODLOGS", { channel: guildData.plugins.modlogs ? `<#${guildData.plugins.modlogs}>` - : message.translate("common:NOT_DEFINED") + : translate("common:NOT_DEFINED") }) + "\n" + - message.translate("administration/configuration:FORTNITESHOP", { + translate("administration/configuration:FORTNITESHOP", { channel: guildData.plugins.fortniteshop ? `<#${guildData.plugins.fortniteshop}>` - : message.translate("common:NOT_DEFINED") + : translate("common:NOT_DEFINED") }) + "\n" + - message.translate("administration/configuration:SUGGESTIONS", { + translate("administration/configuration:SUGGESTIONS", { channel: guildData.plugins.suggestions ? `<#${guildData.plugins.suggestions}>` - : message.translate("common:NOT_DEFINED") + : translate("common:NOT_DEFINED") }) + "\n" + - message.translate("administration/configuration:REPORTS", { + translate("administration/configuration:REPORTS", { channel: guildData.plugins.reports ? `<#${guildData.plugins.reports}>` - : message.translate("common:NOT_DEFINED") + : translate("common:NOT_DEFINED") }) ); // Auto sanctions - embed.addField(message.translate("administration/configuration:AUTO_SANCTIONS"), + embed.addField(translate("administration/configuration:AUTO_SANCTIONS"), ((guildData.plugins.warnsSanctions.kick) ? - message.translate("administration/configuration:KICK_CONTENT", { + translate("administration/configuration:KICK_CONTENT", { count: guildData.plugins.warnsSanctions.kick }) - : message.translate("administration/configuration:KICK_NOT_DEFINED")) + "\n" + + : translate("administration/configuration:KICK_NOT_DEFINED")) + "\n" + ((guildData.plugins.warnsSanctions.ban) ? - message.translate("administration/configuration:BAN_CONTENT", { + translate("administration/configuration:BAN_CONTENT", { count: guildData.plugins.warnsSanctions.ban }) - : message.translate("administration/configuration:BAN_NOT_DEFINED")) + : translate("administration/configuration:BAN_NOT_DEFINED")) ); // Automod plugin - embed.addField(message.translate("administration/configuration:AUTOMOD_TITLE"), + embed.addField(translate("administration/configuration:AUTOMOD_TITLE"), (guildData.plugins.automod.enabled) ? - message.translate("administration/configuration:AUTOMOD_CONTENT", { + translate("administration/configuration:AUTOMOD_CONTENT", { channels: guildData.plugins.automod.ignored.map((ch) => `<#${ch}>`) }) - : message.translate("administration/configuration:AUTOMOD_DISABLED") + : translate("administration/configuration:AUTOMOD_DISABLED") ); // Auto-delete mod commands - embed.addField(message.translate("administration/configuration:AUTODELETEMOD"), + embed.addField(translate("administration/configuration:AUTODELETEMOD"), (!message.guild.autoDeleteModCommands) ? - message.translate("administration/configuration:AUTODELETEMOD_ENABLED") - : message.translate("administration/configuration:AUTODELETEMOD_DISABLED") + translate("administration/configuration:AUTODELETEMOD_ENABLED") + : translate("administration/configuration:AUTODELETEMOD_DISABLED") ); // Dashboard link - embed.addField(message.translate("administration/configuration:DASHBOARD_TITLE"), `[${message.translate("administration/configuration:DASHBOARD_CONTENT")}](${this.client.config.supportURL})`); + embed.addField(translate("administration/configuration:DASHBOARD_TITLE"), `[${translate("administration/configuration:DASHBOARD_CONTENT")}](${this.client.config.supportURL})`); message.channel.send({ embeds: [embed] }); } diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index e3123dd170..22e10cbf5b 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -60,10 +60,10 @@ class Goodbye extends Command { }; message.sendT("administration/goodbye:FORM_1", { - author: message.author.toString() + author: interaction.user.toString() }); const collector = message.channel.createMessageCollector( - m => m.author.id === message.author.id, + m => m.author.id === interaction.user.id, { time: 120000 // 2 minutes } @@ -74,12 +74,12 @@ class Goodbye extends Command { if (goodbye.message) { if ( msg.content.toLowerCase() === - message.translate("common:YES").toLowerCase() + translate("common:YES").toLowerCase() ) { goodbye.withImage = true; } else if ( msg.content.toLowerCase() === - message.translate("common:NO").toLowerCase() + translate("common:NO").toLowerCase() ) { goodbye.withImage = false; } else { diff --git a/commands/Administration/ignore.js b/commands/Administration/ignore.js index 9dc2b1be58..db350f62a0 100644 --- a/commands/Administration/ignore.js +++ b/commands/Administration/ignore.js @@ -19,7 +19,7 @@ class Ignore extends Command { async run (interaction, translate, data) { - const channel = message.mentions.channels.filter((ch) => ch.type === "text" && ch.guild.id === message.guild.id).first(); + const channel = message.mentions.channels.filter((ch) => ch.type === "text" && ch.guild.id === interaction.guild.id).first(); if(!channel){ return interaction.reply({ content: translate("misc:INVALID_CHANNEL"), diff --git a/commands/Administration/setfortniteshop.js b/commands/Administration/setfortniteshop.js index 8c11cd157c..6223f1a57f 100644 --- a/commands/Administration/setfortniteshop.js +++ b/commands/Administration/setfortniteshop.js @@ -50,13 +50,13 @@ class Setfortniteshop extends Command { const shop = new Canvas.FortniteShop(); const image = await shop .setToken(data.config.apiKeys.fortniteFNBR) - .setText("header", message.translate("general/fortniteshop:HEADER")) - .setText("daily", message.translate("general/fortniteshop:DAILY")) - .setText("featured", message.translate("general/fortniteshop:FEATURED")) - .setText("date", message.translate("general/fortniteshop:DATE", { + .setText("header", translate("general/fortniteshop:HEADER")) + .setText("daily", translate("general/fortniteshop:DAILY")) + .setText("featured", translate("general/fortniteshop:FEATURED")) + .setText("date", translate("general/fortniteshop:DATE", { skipInterpolation: true }).replace("{{date}}", "{date}")) - .setText("footer", message.translate("general/fortniteshop:FOOTER")) + .setText("footer", translate("general/fortniteshop:FOOTER")) .lang(momentName) .toAttachment(); const attachment = new Discord.MessageAttachment(image, "shop.png"); diff --git a/commands/Administration/slowmode.js b/commands/Administration/slowmode.js index 0e8fce2424..b78c575e6a 100644 --- a/commands/Administration/slowmode.js +++ b/commands/Administration/slowmode.js @@ -20,7 +20,7 @@ class Slowmode extends Command { async run (interaction, translate, data) { - const channel = message.mentions.channels.filter((ch) => ch.type === "text" && ch.guild.id === message.guild.id).first(); + const channel = message.mentions.channels.filter((ch) => ch.type === "text" && ch.guild.id === interaction.guild.id).first(); if(!channel){ return interaction.reply({ content: translate("misc:INVALID_CHANNEL"), diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index 22f4a06eec..b908fd2d6f 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -60,10 +60,10 @@ class Welcome extends Command { }; message.sendT("administration/welcome:FORM_1", { - author: message.author.toString() + author: interaction.user.toString() }); const collector = message.channel.createMessageCollector( - m => m.author.id === message.author.id, + m => m.author.id === interaction.user.id, { time: 120000 // 2 minutes } @@ -74,12 +74,12 @@ class Welcome extends Command { if (welcome.message) { if ( msg.content.toLowerCase() === - message.translate("common:YES").toLowerCase() + translate("common:YES").toLowerCase() ) { welcome.withImage = true; } else if ( msg.content.toLowerCase() === - message.translate("common:NO").toLowerCase() + translate("common:NO").toLowerCase() ) { welcome.withImage = false; } else { diff --git a/commands/Economy/marry.js b/commands/Economy/marry.js index 8ab5f94774..0ae727641c 100644 --- a/commands/Economy/marry.js +++ b/commands/Economy/marry.js @@ -54,7 +54,7 @@ class Marry extends Command { }); } - if(member.id === message.author.id){ + if(member.id === interaction.user.id){ return interaction.reply({ content: translate("economy/marry:YOURSELF"), ephemeral: true @@ -64,12 +64,12 @@ class Marry extends Command { for(const requester in pendings){ const receiver = pendings[requester]; // If the member already sent a request to someone - if(requester === message.author.id){ + if(requester === interaction.user.id){ const user = this.client.users.cache.get(receiver) || await this.client.users.fetch(receiver); return message.error("economy/marry:REQUEST_AUTHOR_TO_AMEMBER", { username: user.tag }); - } else if (receiver === message.author.id){ // If there is a pending request for this member + } else if (receiver === interaction.user.id){ // If there is a pending request for this member const user = this.client.users.cache.get(requester) || await this.client.users.fetch(requester); return message.error("economy/marry:REQUEST_AMEMBER_TO_AUTHOR", { username: user.tag @@ -90,10 +90,10 @@ class Marry extends Command { } // Update pending requests - pendings[message.author.id] = member.id; + pendings[interaction.user.id] = member.id; message.sendT("economy/marry:REQUEST", { - from: message.author.toString(), + from: interaction.user.toString(), to: member.user.toString() }); @@ -102,10 +102,10 @@ class Marry extends Command { }); collector.on("collect", (msg) => { - if(msg.content.toLowerCase() === message.translate("common:YES").toLowerCase()){ + if(msg.content.toLowerCase() === translate("common:YES").toLowerCase()){ return collector.stop(true); } - if(msg.content.toLowerCase() === message.translate("common:NO").toLowerCase()){ + if(msg.content.toLowerCase() === translate("common:NO").toLowerCase()){ return collector.stop(false); } else { return interaction.reply({ @@ -117,7 +117,7 @@ class Marry extends Command { collector.on("end", async (_collected, reason) => { // Delete pending request - delete pendings[message.author.id]; + delete pendings[interaction.user.id]; if(reason === "time"){ return message.error("economy/marry:TIMEOUT", { username: member.user.toString() @@ -126,10 +126,10 @@ class Marry extends Command { if(reason){ data.userData.lover = member.id; await data.userData.save(); - userData.lover = message.author.id; + userData.lover = interaction.user.id; await userData.save(); const messageOptions = { - content: `${member.toString()} :heart: ${message.author.toString()}`, + content: `${member.toString()} :heart: ${interaction.user.toString()}`, files: [ { name: "unlocked.png", @@ -154,12 +154,12 @@ class Marry extends Command { data.userData.save(); } return message.success("economy/marry:SUCCESS", { - creator: message.author.toString(), + creator: interaction.user.toString(), partner: member.user.toString() }); } else { return message.success("economy/marry:DENIED", { - creator: message.author.toString(), + creator: interaction.user.toString(), partner: member.user.toString() }); } diff --git a/commands/Economy/money.js b/commands/Economy/money.js index 3c17fa3cfd..0e8135d10d 100644 --- a/commands/Economy/money.js +++ b/commands/Economy/money.js @@ -34,7 +34,7 @@ class Credits extends Command { return message.error("misc:BOT_USER"); } - const memberData = (message.author === user) ? data.memberData : await this.client.findOrCreateMember({ id: user.id, guildID: message.guild.id }); + const memberData = (interaction.user === user) ? data.memberData : await this.client.findOrCreateMember({ id: user.id, guildID: interaction.guild.id }); const commonsGuilds = this.client.guilds.cache.filter((g) => g.members.cache.get(user.id)); let globalMoney = 0; @@ -45,16 +45,16 @@ class Credits extends Command { }); const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("economy/money:TITLE", { + .setAuthor(translate("economy/money:TITLE", { username: member.user.username }), member.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) - .addField(message.translate("economy/profile:CASH"), message.translate("economy/profile:MONEY", { + .addField(translate("economy/profile:CASH"), translate("economy/profile:MONEY", { money: memberData.money }), true) - .addField(message.translate("economy/profile:BANK"), message.translate("economy/profile:MONEY", { + .addField(translate("economy/profile:BANK"), translate("economy/profile:MONEY", { money: memberData.bankSold }), true) - .addField(message.translate("economy/profile:GLOBAL"), message.translate("economy/profile:MONEY", { + .addField(translate("economy/profile:GLOBAL"), translate("economy/profile:MONEY", { money: globalMoney }), true) .setColor(this.client.config.embed.color) diff --git a/commands/Economy/pay.js b/commands/Economy/pay.js index 98995f27ed..f399bd1a50 100644 --- a/commands/Economy/pay.js +++ b/commands/Economy/pay.js @@ -32,7 +32,7 @@ class Pay extends Command { ephemeral: true }); } - if(member.id === message.author.id){ + if(member.id === interaction.user.id){ return interaction.reply({ content: translate("economy/pay:YOURSELF"), ephemeral: true @@ -54,7 +54,7 @@ class Pay extends Command { }); } - const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); + const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: interaction.guild.id }); data.memberData.money = data.memberData.money - parseInt(amount, 10); data.memberData.save(); diff --git a/commands/Economy/profile.js b/commands/Economy/profile.js index 2b00ba335d..c2b60c8936 100644 --- a/commands/Economy/profile.js +++ b/commands/Economy/profile.js @@ -40,8 +40,8 @@ class Profile extends Command { } // Gets the data of the user whose profile you want to display - const memberData = (member.id === message.author.id ? data.memberData : await client.findOrCreateMember({ id: member.id, guildID: message.guild.id})); - const userData = (member.id === message.author.id ? data.userData : await client.findOrCreateUser({ id: member.id })); + const memberData = (member.id === interaction.user.id ? data.memberData : await client.findOrCreateMember({ id: member.id, guildID: interaction.guild.id})); + const userData = (member.id === interaction.user.id ? data.userData : await client.findOrCreateUser({ id: member.id })); // Check if the lover is cached if(userData.lover && !this.client.users.cache.get(userData.lover)){ @@ -57,30 +57,30 @@ class Profile extends Command { }); const profileEmbed = new Discord.MessageEmbed() - .setAuthor(message.translate("economy/profile:TITLE", { + .setAuthor(translate("economy/profile:TITLE", { username: member.user.tag }), member.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .attachFiles([{ attachment: await userData.getAchievements(), name: "achievements.png" }]) .setImage("attachment://achievements.png") - .setDescription(userData.bio ? userData.bio : message.translate("economy/profile:NO_BIO")) - .addField(message.translate("economy/profile:CASH"), message.translate("economy/profile:MONEY", { + .setDescription(userData.bio ? userData.bio : translate("economy/profile:NO_BIO")) + .addField(translate("economy/profile:CASH"), translate("economy/profile:MONEY", { money: memberData.money }), true) - .addField(message.translate("economy/profile:BANK"), message.translate("economy/profile:MONEY", { + .addField(translate("economy/profile:BANK"), translate("economy/profile:MONEY", { money: memberData.bankSold }), true) - .addField(message.translate("economy/profile:GLOBAL"), message.translate("economy/profile:MONEY", { + .addField(translate("economy/profile:GLOBAL"), translate("economy/profile:MONEY", { money: globalMoney }), true) - .addField(message.translate("economy/profile:REPUTATION"), message.translate("economy/profile:REP_POINTS", { + .addField(translate("economy/profile:REPUTATION"), translate("economy/profile:REP_POINTS", { points: userData.rep }), true) - .addField(message.translate("economy/profile:LEVEL"), `**${memberData.level}**`, true) - .addField(message.translate("economy/profile:EXP"), `**${memberData.exp}** xp`, true) - .addField(message.translate("economy/profile:REGISTERED"), message.printDate(new Date(memberData.registeredAt)), true) - .addField(message.translate("economy/profile:BIRTHDATE"), (!userData.birthdate ? message.translate("economy/profile:NO_BIRTHDATE"): message.printDate(new Date(userData.birthdate))), true) - .addField(message.translate("economy/profile:LOVER"), (!userData.lover ? message.translate("economy/profile:NO_LOVER") : this.client.users.cache.get(userData.lover).tag), true) - .addField(message.translate("economy/profile:ACHIEVEMENTS"), message.translate("economy/profile:ACHIEVEMENTS_CONTENT", { + .addField(translate("economy/profile:LEVEL"), `**${memberData.level}**`, true) + .addField(translate("economy/profile:EXP"), `**${memberData.exp}** xp`, true) + .addField(translate("economy/profile:REGISTERED"), message.printDate(new Date(memberData.registeredAt)), true) + .addField(translate("economy/profile:BIRTHDATE"), (!userData.birthdate ? translate("economy/profile:NO_BIRTHDATE"): message.printDate(new Date(userData.birthdate))), true) + .addField(translate("economy/profile:LOVER"), (!userData.lover ? translate("economy/profile:NO_LOVER") : this.client.users.cache.get(userData.lover).tag), true) + .addField(translate("economy/profile:ACHIEVEMENTS"), translate("economy/profile:ACHIEVEMENTS_CONTENT", { prefix: data.guild.prefix })) .setColor(data.config.embed.color) // Sets the color of the embed diff --git a/commands/Economy/rep.js b/commands/Economy/rep.js index 306de2c339..28bcfe98a1 100644 --- a/commands/Economy/rep.js +++ b/commands/Economy/rep.js @@ -45,7 +45,7 @@ class Rep extends Command { ephemeral: true }); } - if(user.id === message.author.id){ + if(user.id === interaction.user.id){ return interaction.reply({ content: translate("economy/rep:YOURSELF"), ephemeral: true diff --git a/commands/Economy/rob.js b/commands/Economy/rob.js index 7b76c81d1e..19bb3ab342 100644 --- a/commands/Economy/rob.js +++ b/commands/Economy/rob.js @@ -27,14 +27,14 @@ class Rob extends Command { }); } - if(member.id === message.author.id){ + if(member.id === interaction.user.id){ return interaction.reply({ content: translate("economy/rob:YOURSELF"), ephemeral: true }); } - const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); + const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: interaction.guild.id }); const isInCooldown = memberData.cooldowns.rob || 0; if(isInCooldown){ if(isInCooldown > Date.now()){ diff --git a/commands/Economy/slots.js b/commands/Economy/slots.js index 844e3c7cdd..3db195072f 100644 --- a/commands/Economy/slots.js +++ b/commands/Economy/slots.js @@ -81,13 +81,13 @@ class Slots extends Command { msg += colonnes[0][i3] + " : " + colonnes[1][j3] + " : "+ colonnes[2][k3] + "\n------------------\n"; if((colonnes[0][i2] == colonnes[1][j2]) && (colonnes[1][j2] == colonnes[2][k2])){ - msg += "| : : : **"+(message.translate("common:VICTORY").toUpperCase())+"** : : : |"; + msg += "| : : : **"+(translate("common:VICTORY").toUpperCase())+"** : : : |"; tmsg.edit(msg); const credits = getCredits(amount, true); - message.channel.send("**!! JACKPOT !!**\n"+message.translate("economy/slots:VICTORY", { + message.channel.send("**!! JACKPOT !!**\n"+translate("economy/slots:VICTORY", { money: amount, won: credits, - username: message.author.username + username: interaction.user.username })); const toAdd = credits - amount; data.memberData.money = data.memberData.money + toAdd; @@ -105,13 +105,13 @@ class Slots extends Command { } if(colonnes[0][i2] == colonnes[1][j2] || colonnes[1][j2] == colonnes[2][k2] || colonnes[0][i2] == colonnes[2][k2]){ - msg += "| : : : **"+(message.translate("common:VICTORY").toUpperCase())+"** : : : |"; + msg += "| : : : **"+(translate("common:VICTORY").toUpperCase())+"** : : : |"; tmsg.edit(msg); const credits = getCredits(amount, false); - message.channel.send(message.translate("economy/slots:VICTORY", { + message.channel.send(translate("economy/slots:VICTORY", { money: amount, won: credits, - username: message.author.username + username: interaction.user.username })); const toAdd = credits - amount; data.memberData.money = data.memberData.money + toAdd; @@ -128,10 +128,10 @@ class Slots extends Command { return; } - msg += "| : : : **"+(message.translate("common:DEFEAT").toUpperCase())+"** : : : |"; - message.channel.send(message.translate("economy/slots:DEFEAT", { + msg += "| : : : **"+(translate("common:DEFEAT").toUpperCase())+"** : : : |"; + message.channel.send(translate("economy/slots:DEFEAT", { money: amount, - username: message.author.username + username: interaction.user.username })); data.memberData.money = data.memberData.money - amount; if(!data.userData.achievements.slots.achieved){ diff --git a/commands/Economy/work.js b/commands/Economy/work.js index 37c2f12451..2a33f0fa90 100644 --- a/commands/Economy/work.js +++ b/commands/Economy/work.js @@ -46,7 +46,7 @@ class Work extends Command { await data.memberData.save(); const embed = new Discord.MessageEmbed() - .setFooter(message.translate("economy/work:AWARD"), message.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) + .setFooter(translate("economy/work:AWARD"), interaction.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .setColor(data.config.embed.color); const award = [ @@ -60,10 +60,10 @@ class Work extends Command { if(data.memberData.workStreak >= 5){ won += 200; - embed.addField(message.translate("economy/work:SALARY"), message.translate("economy/work:SALARY_CONTENT", { + embed.addField(translate("economy/work:SALARY"), translate("economy/work:SALARY_CONTENT", { won })) - .addField(message.translate("economy/work:STREAK"), message.translate("economy/work:STREAK_CONTENT")); + .addField(translate("economy/work:STREAK"), translate("economy/work:STREAK_CONTENT")); data.memberData.workStreak = 0; } else { for(let i = 0; i < award.length; i++){ @@ -72,10 +72,10 @@ class Work extends Command { award[i] = `:regional_indicator_${letter.toLowerCase()}:`; } } - embed.addField(message.translate("economy/work:SALARY"), message.translate("economy/work:SALARY_CONTENT", { + embed.addField(translate("economy/work:SALARY"), translate("economy/work:SALARY_CONTENT", { won })) - .addField(message.translate("economy/work:STREAK"), award.join("")); + .addField(translate("economy/work:STREAK"), award.join("")); } data.memberData.money = data.memberData.money + won; diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js index 724de71f4a..5a264ae241 100644 --- a/commands/Fun/8ball.js +++ b/commands/Fun/8ball.js @@ -27,9 +27,9 @@ class Eightball extends Command { } const answerNO = parseInt(Math.floor(Math.random() * 10), 10); - const answer = message.translate(`fun/8ball:RESPONSE_${answerNO + 1}`); + const answer = translate(`fun/8ball:RESPONSE_${answerNO + 1}`); - message.channel.send(`${message.author.username}, ${answer}`); + message.channel.send(`${interaction.user.username}, ${answer}`); } } diff --git a/commands/Fun/findwords.js b/commands/Fun/findwords.js index d72741a642..5335d8738b 100644 --- a/commands/Fun/findwords.js +++ b/commands/Fun/findwords.js @@ -22,7 +22,7 @@ class FindWords extends Command { async run (interaction, translate, data) { - if (currentGames[message.guild.id]) { + if (currentGames[interaction.guild.id]) { return interaction.reply({ content: translate("fun/number:GAME_RUNNING"), ephemeral: true @@ -46,7 +46,7 @@ class FindWords extends Command { } let i = 0; // Inits i variable to count games - currentGames[message.guild.id] = true; // Update current game variable + currentGames[interaction.guild.id] = true; // Update current game variable generateGame.call(this, words[i]); // Generate a new round function generateGame(word){ @@ -101,7 +101,7 @@ class FindWords extends Command { i++; generateGame.call(this, words[i]); } else { - currentGames[message.guild.id] = false; + currentGames[interaction.guild.id] = false; if(winners.length < 1){ return interaction.reply({ content: translate("fun/findwords:NO_WINNER_ALL"), @@ -121,7 +121,7 @@ class FindWords extends Command { message.sendT("fun/findwords:CREDITS", { winner: user.username }); - const userdata = await this.client.findOrCreateMember({ id: user.id, guildID: message.guild.id }); + const userdata = await this.client.findOrCreateMember({ id: user.id, guildID: interaction.guild.id }); userdata.money = userdata.money + 15; userdata.save(); } diff --git a/commands/Fun/fml.js b/commands/Fun/fml.js index 50897122b0..9fbac371c3 100644 --- a/commands/Fun/fml.js +++ b/commands/Fun/fml.js @@ -30,7 +30,7 @@ class Fml extends Command { const embed = new Discord.MessageEmbed() .setDescription(fml.content) - .setFooter(message.translate("fun/fml:FOOTER")) + .setFooter(translate("fun/fml:FOOTER")) .setColor(this.client.config.embed.color); message.channel.send({ embeds: [embed] }); diff --git a/commands/Fun/joke.js b/commands/Fun/joke.js index de03e67da6..9a96d67fbb 100644 --- a/commands/Fun/joke.js +++ b/commands/Fun/joke.js @@ -32,7 +32,7 @@ class Joke extends Command { const embed = new Discord.MessageEmbed() .setDescription(joke.toDiscordSpoils()) - .setFooter(message.translate("fun/joke:FOOTER")) + .setFooter(translate("fun/joke:FOOTER")) .setColor(this.client.config.embed.color); message.channel.send({ embeds: [embed] }); diff --git a/commands/Fun/lovecalc.js b/commands/Fun/lovecalc.js index ff82c0375d..c9feea3554 100644 --- a/commands/Fun/lovecalc.js +++ b/commands/Fun/lovecalc.js @@ -20,7 +20,7 @@ class Lovecalc extends Command { } async run (message) { - const firstMember = message.mentions.members.filter(m => m.id !== message.author.id).first(); + const firstMember = message.mentions.members.filter(m => m.id !== interaction.user.id).first(); if (!firstMember) return interaction.reply({ content: translate("fun/lovecalc:MISSING"), @@ -29,7 +29,7 @@ class Lovecalc extends Command { const secondMember = message.mentions.members .filter(m => m.id !== firstMember.id) - .filter(m => m.id !== message.author.id) + .filter(m => m.id !== interaction.user.id) .first() || message.member; if (!secondMember) return interaction.reply({ @@ -53,7 +53,7 @@ class Lovecalc extends Command { const embed = new Discord.MessageEmbed() .setAuthor("❤️ LoveCalc") .setDescription( - message.translate("fun/lovecalc:CONTENT", { + translate("fun/lovecalc:CONTENT", { percent, firstUsername: firstMember.user.username, secondUsername: secondMember.user.username diff --git a/commands/Fun/number.js b/commands/Fun/number.js index 5476550eb6..6ac4b6d234 100644 --- a/commands/Fun/number.js +++ b/commands/Fun/number.js @@ -22,7 +22,7 @@ class Number extends Command { async run (message) { - if (currentGames[message.guild.id]) { + if (currentGames[interaction.guild.id]) { return interaction.reply({ content: translate("fun/number:GAME_RUNNING"), ephemeral: true @@ -46,7 +46,7 @@ class Number extends Command { time: 480000 // 8 minutes } ); - currentGames[message.guild.id] = true; + currentGames[interaction.guild.id] = true; collector.on("collect", async msg => { if (!participants.includes(msg.author.id)) { @@ -72,7 +72,7 @@ class Number extends Command { message.sendT("fun/number:WON", { winner: msg.author.toString() }); - const userdata = await this.client.findOrCreateMember({ id: msg.author.id, guildID: message.guild.id }); + const userdata = await this.client.findOrCreateMember({ id: msg.author.id, guildID: interaction.guild.id }); userdata.money = userdata.money + 10; userdata.save(); collector.stop(msg.author.username); @@ -92,7 +92,7 @@ class Number extends Command { }); collector.on("end", (_collected, reason) => { - delete currentGames[message.guild.id]; + delete currentGames[interaction.guild.id]; if (reason === "time") { return interaction.reply({ content: translate("fun/number:DEFEAT", { number }), diff --git a/commands/General/fortnite.js b/commands/General/fortnite.js index cbeedf2de8..067e24ce10 100644 --- a/commands/General/fortnite.js +++ b/commands/General/fortnite.js @@ -52,18 +52,18 @@ class Fortnite extends Command { .setToken(data.config.apiKeys.fortniteTRN) .setUser(user) .setPlatform(platform) - .setText("averageKills", message.translate("general/fortnite:AVERAGE_KILLS")) - .setText("averageKill", message.translate("general/fortnite:AVERAGE_KILL")) - .setText("wPercent", message.translate("general/fortnite:W_PERCENT")) - .setText("winPercent", message.translate("general/fortnite:WIN_PERCENT")) - .setText("kD", message.translate("general/fortnite:KD")) - .setText("wins", message.translate("general/fortnite:WINS")) - .setText("win", message.translate("general/fortnite:WIN")) - .setText("kills", message.translate("general/fortnite:KILLS")) - .setText("kill", message.translate("general/fortnite:KILL")) - .setText("matches", message.translate("general/fortnite:MATCHES")) - .setText("match", message.translate("general/fortnite:MATCH")) - .setText("footer", message.translate("general/fortnite:FOOTER")) + .setText("averageKills", translate("general/fortnite:AVERAGE_KILLS")) + .setText("averageKill", translate("general/fortnite:AVERAGE_KILL")) + .setText("wPercent", translate("general/fortnite:W_PERCENT")) + .setText("winPercent", translate("general/fortnite:WIN_PERCENT")) + .setText("kD", translate("general/fortnite:KD")) + .setText("wins", translate("general/fortnite:WINS")) + .setText("win", translate("general/fortnite:WIN")) + .setText("kills", translate("general/fortnite:KILLS")) + .setText("kill", translate("general/fortnite:KILL")) + .setText("matches", translate("general/fortnite:MATCHES")) + .setText("match", translate("general/fortnite:MATCH")) + .setText("footer", translate("general/fortnite:FOOTER")) .toAttachment(); if(!statsImage){ @@ -77,7 +77,7 @@ class Fortnite extends Command { // Send embed const attachment = new Discord.MessageAttachment(statsImage.toBuffer(), "fortnite-stats-image.png"), embed = new Discord.MessageEmbed() - .setDescription(message.translate("general/fortnite:TITLE", { + .setDescription(translate("general/fortnite:TITLE", { username: `[${stats.data.username}](${stats.data.url.replace(new RegExp(" ", "g"), "%20")})` })) .attachFiles(attachment) diff --git a/commands/General/fortniteshop.js b/commands/General/fortniteshop.js index df29a31f1f..168384c0de 100644 --- a/commands/General/fortniteshop.js +++ b/commands/General/fortniteshop.js @@ -32,19 +32,19 @@ class Fortniteshop extends Command { const shop = new Canvas.FortniteShop(); const image = await shop .setToken(data.config.apiKeys.fortniteFNBR) - .setText("header", message.translate("general/fortniteshop:HEADER")) - .setText("daily", message.translate("general/fortniteshop:DAILY")) - .setText("featured", message.translate("general/fortniteshop:FEATURED")) - .setText("date", message.translate("general/fortniteshop:DATE", { + .setText("header", translate("general/fortniteshop:HEADER")) + .setText("daily", translate("general/fortniteshop:DAILY")) + .setText("featured", translate("general/fortniteshop:FEATURED")) + .setText("date", translate("general/fortniteshop:DATE", { skipInterpolation: true }).replace("{{date}}", "{date}")) - .setText("footer", message.translate("general/fortniteshop:FOOTER")) + .setText("footer", translate("general/fortniteshop:FOOTER")) .lang(momentName) .toAttachment(); const attachment = new Discord.MessageAttachment(image, "shop.png"); const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("general/fortniteshop:HEADER", { + .setAuthor(translate("general/fortniteshop:HEADER", { date: message.printDate(new Date(Date.now())) }), this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .attachFiles(attachment) diff --git a/commands/General/github.js b/commands/General/github.js index 1710faebee..ea299ffb17 100644 --- a/commands/General/github.js +++ b/commands/General/github.js @@ -26,11 +26,11 @@ class Github extends Command { const embed = new Discord.MessageEmbed() .setAuthor(this.client.user.tag, this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) - .setDescription("["+message.translate("general/github:CLICK_HERE")+"](https://github.com/Androz2091/AtlantaBot)") + .setDescription("["+translate("general/github:CLICK_HERE")+"](https://github.com/Androz2091/AtlantaBot)") .addField("Stars", json.stargazers_count, true) .addField("Forks", json.forks_count, true) - .addField(message.translate("general/github:LANGUAGE"), json.language, true) - .addField(message.translate("general/github:OWNER"), "["+json.owner.login+"]("+json.owner.html_url+")") + .addField(translate("general/github:LANGUAGE"), json.language, true) + .addField(translate("general/github:OWNER"), "["+json.owner.login+"]("+json.owner.html_url+")") .setImage(json.owner.avatar_url) .setColor(data.config.embed.color) .setFooter(data.config.embed.footer); diff --git a/commands/General/hastebin.js b/commands/General/hastebin.js index 93ec74a5f8..099df7d9d5 100644 --- a/commands/General/hastebin.js +++ b/commands/General/hastebin.js @@ -46,7 +46,7 @@ class Hastebin extends Command { const url = "https://hastebin.com/"+json.key+".js"; const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("general/hastebin:SUCCESS")) + .setAuthor(translate("general/hastebin:SUCCESS")) .setDescription(url) .setColor(data.config.embed.color); message.channel.send({ embeds: [embed] }); diff --git a/commands/General/help.js b/commands/General/help.js index 09287f5b6d..ef80ad30ac 100644 --- a/commands/General/help.js +++ b/commands/General/help.js @@ -36,14 +36,14 @@ class Help extends Command { }); } - const description = message.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:DESCRIPTION`); - const usage = message.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:USAGE`, { + const description = translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:DESCRIPTION`); + const usage = translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:USAGE`, { prefix: message.guild ? data.guild.prefix : "" } ); - const examples = message.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:EXAMPLES`, { + const examples = translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:EXAMPLES`, { prefix: message.guild ? data.guild.prefix : "" @@ -53,7 +53,7 @@ class Help extends Command { // Creates the help embed const groupEmbed = new Discord.MessageEmbed() .setAuthor( - message.translate("general/help:CMD_TITLE", { + translate("general/help:CMD_TITLE", { prefix: message.guild ? data.guild.prefix : "", @@ -61,25 +61,25 @@ class Help extends Command { }) ) .addField( - message.translate("general/help:FIELD_DESCRIPTION"), + translate("general/help:FIELD_DESCRIPTION"), description ) - .addField(message.translate("general/help:FIELD_USAGE"), usage) + .addField(translate("general/help:FIELD_USAGE"), usage) .addField( - message.translate("general/help:FIELD_EXAMPLES"), + translate("general/help:FIELD_EXAMPLES"), examples ) .addField( - message.translate("general/help:FIELD_ALIASES"), + translate("general/help:FIELD_ALIASES"), cmd.help.aliases.length > 0 ? cmd.help.aliases.map(a => "`" + a + "`").join("\n") - : message.translate("general/help:NO_ALIAS") + : translate("general/help:NO_ALIAS") ) .addField( - message.translate("general/help:FIELD_PERMISSIONS"), + translate("general/help:FIELD_PERMISSIONS"), cmd.conf.memberPermissions.length > 0 ? cmd.conf.memberPermissions.map((p) => "`"+p+"`").join("\n") - : message.translate("general/help:NO_REQUIRED_PERMISSION") + : translate("general/help:NO_REQUIRED_PERMISSION") ) .setColor(this.client.config.embed.color) .setFooter(this.client.config.embed.footer); @@ -93,7 +93,7 @@ class Help extends Command { commands.forEach((command) => { if(!categories.includes(command.help.category)){ - if(command.help.category === "Owner" && message.author.id !== this.client.config.owner.id){ + if(command.help.category === "Owner" && interaction.user.id !== this.client.config.owner.id){ return; } categories.push(command.help.category); @@ -103,7 +103,7 @@ class Help extends Command { const emojis = this.client.customEmojis; const embed = new Discord.MessageEmbed() - .setDescription(message.translate("general/help:INFO", { + .setDescription(translate("general/help:INFO", { prefix: message.guild ? data.guild.prefix : "" @@ -116,11 +116,11 @@ class Help extends Command { }); if(message.guild){ if(data.guild.customCommands.length > 0){ - embed.addField(emojis.categories.custom+" "+message.guild.name+" | "+message.translate("general/help:CUSTOM_COMMANDS")+" - ("+data.guild.customCommands.length+")", data.guild.customCommands.map((cmd) => "`"+cmd.name+"`").join(", ")); + embed.addField(emojis.categories.custom+" "+message.guild.name+" | "+translate("general/help:CUSTOM_COMMANDS")+" - ("+data.guild.customCommands.length+")", data.guild.customCommands.map((cmd) => "`"+cmd.name+"`").join(", ")); } } - embed.addField("\u200B", message.translate("misc:STATS_FOOTER", { + embed.addField("\u200B", translate("misc:STATS_FOOTER", { donateLink: "https://patreon.com/Androz2091", dashboardLink: "https://dashboard.atlanta-bot.fr", inviteLink: await this.client.generateInvite({ @@ -129,7 +129,7 @@ class Help extends Command { githubLink: "https://github.com/Androz2091", supportLink: "https://discord.atlanta-bot.fr" })); - embed.setAuthor(message.translate("general/help:TITLE", { + embed.setAuthor(translate("general/help:TITLE", { name: this.client.user.username }), this.client.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })); return message.channel.send({ embeds: [embed] }); diff --git a/commands/General/invitations.js b/commands/General/invitations.js index 6da464fe7d..528617d3d8 100644 --- a/commands/General/invitations.js +++ b/commands/General/invitations.js @@ -46,7 +46,7 @@ class Invitations extends Command { } const content = memberInvites.map((i) => { - return message.translate("general/invitations:CODE", { + return translate("general/invitations:CODE", { uses: i.uses, code: i.code, channel: i.channel.toString() @@ -58,15 +58,15 @@ class Invitations extends Command { const embed = new Discord.MessageEmbed() .setColor(data.config.embed.color) .setFooter(data.config.embed.footer) - .setAuthor(message.translate("general/invitations:TRACKER")) - .setDescription(message.translate("general/invitations:TITLE", { + .setAuthor(translate("general/invitations:TRACKER")) + .setDescription(translate("general/invitations:TITLE", { member: member.user.tag, guild: message.guild.name })) - .addField(message.translate("general/invitations:FIELD_INVITED"), message.translate("general/invitations:FIELD_MEMBERS", { + .addField(translate("general/invitations:FIELD_INVITED"), translate("general/invitations:FIELD_MEMBERS", { total: index })) - .addField(message.translate("general/invitations:FIELD_CODES"), content); + .addField(translate("general/invitations:FIELD_CODES"), content); message.channel.send({ embeds: [embed] }); } diff --git a/commands/General/invite.js b/commands/General/invite.js index ed992c634b..286b0c08b9 100644 --- a/commands/General/invite.js +++ b/commands/General/invite.js @@ -29,13 +29,13 @@ class Invite extends Command { } const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("general/invite:LINKS")) - .setDescription(message.translate("general/invite:TIP", { + .setAuthor(translate("general/invite:LINKS")) + .setDescription(translate("general/invite:TIP", { prefix: data.guild.prefix })) - .addField(message.translate("general/invite:ADD"), inviteLink) - .addField(message.translate("general/invite:VOTE"), voteURL) - .addField(message.translate("general/invite:SUPPORT"), supportURL) + .addField(translate("general/invite:ADD"), inviteLink) + .addField(translate("general/invite:VOTE"), voteURL) + .addField(translate("general/invite:SUPPORT"), supportURL) .setColor(data.config.embed.color) .setFooter(data.config.embed.footer); diff --git a/commands/General/minecraft.js b/commands/General/minecraft.js index 30f6c61299..cce4e477e2 100644 --- a/commands/General/minecraft.js +++ b/commands/General/minecraft.js @@ -76,24 +76,24 @@ class Minecraft extends Command { const imgAttachment = new Discord.MessageAttachment(await imgRes.buffer(), "success.png"); const mcEmbed = new Discord.MessageEmbed() - .setAuthor(message.translate("general/minecraft:FIELD_NAME", { + .setAuthor(translate("general/minecraft:FIELD_NAME", { ip: json.name })) - .addField(message.translate("general/minecraft:FIELD_VERSION"), + .addField(translate("general/minecraft:FIELD_VERSION"), json.raw.vanilla.raw.version.name ) - .addField(message.translate("general/minecraft:FIELD_CONNECTED"), - message.translate("general/minecraft:PLAYERS", { + .addField(translate("general/minecraft:FIELD_CONNECTED"), + translate("general/minecraft:PLAYERS", { count: (json.raw.players ? json.raw.players.online : json.players.length) }) ) - .addField(message.translate("general/minecraft:FIELD_MAX"), - message.translate("general/minecraft:PLAYERS", { + .addField(translate("general/minecraft:FIELD_MAX"), + translate("general/minecraft:PLAYERS", { count: (json.raw.players ? json.raw.players.max : json.maxplayers) }) ) - .addField(message.translate("general/minecraft:FIELD_STATUS"), message.translate("general/minecraft:ONLINE")) - .addField(message.translate("general/minecraft:FIELD_IP"), json.connect) + .addField(translate("general/minecraft:FIELD_STATUS"), translate("general/minecraft:ONLINE")) + .addField(translate("general/minecraft:FIELD_IP"), json.connect) .setColor(data.config.embed.color) .setThumbnail(favicon) .setFooter(data.config.embed.footer); diff --git a/commands/General/permissions.js b/commands/General/permissions.js index cb18e2cf46..a3bdd7ac7a 100644 --- a/commands/General/permissions.js +++ b/commands/General/permissions.js @@ -20,7 +20,7 @@ class Permissions extends Command { async run (message) { const member = message.mentions.members.first() || message.member; - let text = "```\n"+message.translate("general/permissions:TITLE", { + let text = "```\n"+translate("general/permissions:TITLE", { user: member.user.username, channel: message.channel.name })+"\n\n"; diff --git a/commands/General/quote.js b/commands/General/quote.js index 550833be6b..44971b5ba7 100644 --- a/commands/General/quote.js +++ b/commands/General/quote.js @@ -35,7 +35,7 @@ class Quote extends Command { const msgID = args[0]; if(isNaN(msgID)){ - message.author.send(message.translate("general/quote:MISSING_ID")).then(() => { + interaction.user.send(translate("general/quote:MISSING_ID")).then(() => { message.delete(); }).catch(() => { interaction.reply({ @@ -50,7 +50,7 @@ class Quote extends Command { if(args[1] && !channel){ channel = this.client.channels.cache.get(args[1]); if(!channel){ - message.author.send(message.translate("general/quote:NO_MESSAGE_ID")).then(() => { + interaction.user.send(translate("general/quote:NO_MESSAGE_ID")).then(() => { message.delete(); }).catch(() => { interaction.reply({ @@ -64,7 +64,7 @@ class Quote extends Command { if(!channel){ message.channel.messages.fetch(msgID).catch(() => { - message.author.send((message.translate("general/quote:NO_MESSAGE_ID"))).then(() => { + interaction.user.send((translate("general/quote:NO_MESSAGE_ID"))).then(() => { message.delete(); }).catch(() => { interaction.reply({ @@ -79,7 +79,7 @@ class Quote extends Command { }); } else { channel.messages.fetch(msgID).catch(() => { - message.author.send(message.translate("general/quote:NO_MESSAGE_ID")).then(() => { + interaction.user.send(translate("general/quote:NO_MESSAGE_ID")).then(() => { message.delete(); }).catch(() => { interaction.reply({ diff --git a/commands/General/remindme.js b/commands/General/remindme.js index 915031b658..ccf4f9aedf 100644 --- a/commands/General/remindme.js +++ b/commands/General/remindme.js @@ -48,7 +48,7 @@ class Remindme extends Command { data.userData.reminds.push(rData); data.userData.markModified("reminds"); data.userData.save(); - this.client.databaseCache.usersReminds.set(message.author.id, data.userData); + this.client.databaseCache.usersReminds.set(interaction.user.id, data.userData); // Send success message interaction.reply({ diff --git a/commands/General/report.js b/commands/General/report.js index 7fca6bf2eb..dbf15afb17 100644 --- a/commands/General/report.js +++ b/commands/General/report.js @@ -30,7 +30,7 @@ class Report extends Command { return message.error("general/report:MISSING_USER"); } - if(member.id === message.author.id){ + if(member.id === interaction.user.id){ return message.error("general/report:INVALID_USER"); } @@ -40,13 +40,13 @@ class Report extends Command { } const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("general/report:TITLE", { + .setAuthor(translate("general/report:TITLE", { user: member.user.tag - }), message.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) - .addField(message.translate("common:AUTHOR"), message.author.tag, true) - .addField(message.translate("common:DATE"), message.printDate(new Date(Date.now())), true) - .addField(message.translate("common:REASON"), "**"+rep+"**", true) - .addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) + }), interaction.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) + .addField(translate("common:AUTHOR"), interaction.user.tag, true) + .addField(translate("common:DATE"), message.printDate(new Date(Date.now())), true) + .addField(translate("common:REASON"), "**"+rep+"**", true) + .addField(translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) .setColor(data.config.embed.color) .setFooter(data.config.embed.footer); diff --git a/commands/General/serverinfo.js b/commands/General/serverinfo.js index 555bb0a3eb..d1f9fd82dc 100644 --- a/commands/General/serverinfo.js +++ b/commands/General/serverinfo.js @@ -36,22 +36,22 @@ class Serverinfo extends Command { const embed = new Discord.MessageEmbed() .setAuthor(guild.name, guild.iconURL({ dynamic: true })) .setThumbnail(guild.iconURL({ dynamic: true })) - .addField(this.client.customEmojis.title+message.translate("common:NAME"), guild.name, true) - .addField(this.client.customEmojis.calendar+message.translate("common:CREATION"), message.printDate(guild.createdAt), true) - .addField(this.client.customEmojis.users+message.translate("common:MEMBERS"), message.translate("general/serverinfo:MEMBERS", { + .addField(this.client.customEmojis.title+translate("common:NAME"), guild.name, true) + .addField(this.client.customEmojis.calendar+translate("common:CREATION"), message.printDate(guild.createdAt), true) + .addField(this.client.customEmojis.users+translate("common:MEMBERS"), translate("general/serverinfo:MEMBERS", { count: guild.members.cache.filter(m => !m.user.bot).size - })+" | "+message.translate("general/serverinfo:BOTS", { + })+" | "+translate("general/serverinfo:BOTS", { count: guild.members.cache.filter(m => m.user.bot).size }), true) - .addField(this.client.customEmojis.afk+message.translate("general/serverinfo:AFK_CHANNEL"), guild.afkChannel || message.translate("general/serverinfo:NO_AFK_CHANNEL"), true) - .addField(this.client.customEmojis.id+message.translate("common:ID"), guild.id, true) - .addField(this.client.customEmojis.crown+message.translate("common:OWNER"), `<@${guild.ownerID}>`, true) - .addField(this.client.customEmojis.boost+message.translate("general/serverinfo:BOOSTS"), guild.premiumSubscriptionCount || 0, true) - .addField(this.client.customEmojis.channels+message.translate("common:CHANNELS"), message.translate("general/serverinfo:TEXT_CHANNELS", { + .addField(this.client.customEmojis.afk+translate("general/serverinfo:AFK_CHANNEL"), guild.afkChannel || translate("general/serverinfo:NO_AFK_CHANNEL"), true) + .addField(this.client.customEmojis.id+translate("common:ID"), guild.id, true) + .addField(this.client.customEmojis.crown+translate("common:OWNER"), `<@${guild.ownerID}>`, true) + .addField(this.client.customEmojis.boost+translate("general/serverinfo:BOOSTS"), guild.premiumSubscriptionCount || 0, true) + .addField(this.client.customEmojis.channels+translate("common:CHANNELS"), translate("general/serverinfo:TEXT_CHANNELS", { count: guild.channels.cache.filter(c => c.type === "text").size - })+" | "+message.translate("general/serverinfo:VOICE_CHANNELS", { + })+" | "+translate("general/serverinfo:VOICE_CHANNELS", { count: guild.channels.cache.filter(c => c.type === "voice").size - })+" | "+message.translate("general/serverinfo:CAT_CHANNELS", { + })+" | "+translate("general/serverinfo:CAT_CHANNELS", { count: guild.channels.cache.filter(c => c.type === "category").size }), true) .setColor(data.config.embed.color) diff --git a/commands/General/someone.js b/commands/General/someone.js index 287a7b68af..cfca13329b 100644 --- a/commands/General/someone.js +++ b/commands/General/someone.js @@ -23,9 +23,9 @@ class Someone extends Command { const member = message.guild.members.cache.random(1)[0]; const embed = new Discord.MessageEmbed() - .addField(message.translate("common:USERNAME"), member.user.username, true) - .addField(message.translate("common:DISCRIMINATOR"), member.user.discriminator, true) - .addField(message.translate("common:ID"), member.user.id, true) + .addField(translate("common:USERNAME"), member.user.username, true) + .addField(translate("common:DISCRIMINATOR"), member.user.discriminator, true) + .addField(translate("common:ID"), member.user.id, true) .setThumbnail(member.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .setColor(data.config.embed.color); message.channel.send({ embeds: [embed] }); diff --git a/commands/General/staff.js b/commands/General/staff.js index 4aad04946e..293e33e5f6 100644 --- a/commands/General/staff.js +++ b/commands/General/staff.js @@ -23,11 +23,11 @@ class Staff extends Command { const administrators = message.guild.members.cache.filter((m) => m.permissions.has("ADMINISTRATOR") && !m.user.bot); const moderators = message.guild.members.cache.filter((m) => !administrators.has(m.id) && m.permissions.has("MANAGE_MESSAGES") && !m.user.bot); const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("general/staff:TITLE", { + .setAuthor(translate("general/staff:TITLE", { guild: message.guild.name })) - .addField(message.translate("general/staff:ADMINS"), (administrators.size > 0 ? administrators.map((a) => `${this.client.customEmojis.status[a.presence.status]} | ${a.user.tag}`).join("\n") :message.translate("general/staff:NO_ADMINS"))) - .addField(message.translate("general/staff:MODS"), (moderators.size > 0 ? moderators.map((m) => `${this.client.customEmojis.status[m.presence.status]} | ${m.user.tag}`).join("\n") : message.translate("general/staff:NO_MODS"))) + .addField(translate("general/staff:ADMINS"), (administrators.size > 0 ? administrators.map((a) => `${this.client.customEmojis.status[a.presence.status]} | ${a.user.tag}`).join("\n") :translate("general/staff:NO_ADMINS"))) + .addField(translate("general/staff:MODS"), (moderators.size > 0 ? moderators.map((m) => `${this.client.customEmojis.status[m.presence.status]} | ${m.user.tag}`).join("\n") : translate("general/staff:NO_MODS"))) .setColor(data.config.embed.color) .setFooter(data.config.embed.footer); message.channel.send({ embeds: [embed] }); diff --git a/commands/General/stats.js b/commands/General/stats.js index a060b89976..6735ea251d 100644 --- a/commands/General/stats.js +++ b/commands/General/stats.js @@ -23,26 +23,26 @@ class Stats extends Command { const statsEmbed = new Discord.MessageEmbed() .setColor(data.config.embed.color) .setFooter(data.config.embed.footer) - .setAuthor(message.translate("common:STATS")) - .setDescription(message.translate("general/stats:MADE")) - .addField(this.client.customEmojis.stats+" "+message.translate("general/stats:COUNTS_TITLE"), message.translate("general/stats:COUNTS_CONTENT", { + .setAuthor(translate("common:STATS")) + .setDescription(translate("general/stats:MADE")) + .addField(this.client.customEmojis.stats+" "+translate("general/stats:COUNTS_TITLE"), translate("general/stats:COUNTS_CONTENT", { servers: this.client.guilds.cache.size, users: this.client.users.cache.size }), true) - .addField(this.client.customEmojis.version+" "+message.translate("general/stats:VERSIONS_TITLE"), `\`Discord.js : v${Discord.version}\`\n\`Nodejs : v${process.versions.node}\``, true) - .addField(this.client.customEmojis.ram+" "+message.translate("general/stats:RAM_TITLE"), `\`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB\``, true) - .addField(this.client.customEmojis.status.online+" "+message.translate("general/stats:ONLINE_TITLE"), message.translate("general/stats:ONLINE_CONTENT", { + .addField(this.client.customEmojis.version+" "+translate("general/stats:VERSIONS_TITLE"), `\`Discord.js : v${Discord.version}\`\n\`Nodejs : v${process.versions.node}\``, true) + .addField(this.client.customEmojis.ram+" "+translate("general/stats:RAM_TITLE"), `\`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB\``, true) + .addField(this.client.customEmojis.status.online+" "+translate("general/stats:ONLINE_TITLE"), translate("general/stats:ONLINE_CONTENT", { time: message.convertTime(Date.now()+this.client.uptime, "from", true) })) - .addField(this.client.customEmojis.voice+" "+message.translate("general/stats:MUSIC_TITLE"), message.translate("general/stats:MUSIC_CONTENT", { + .addField(this.client.customEmojis.voice+" "+translate("general/stats:MUSIC_TITLE"), translate("general/stats:MUSIC_CONTENT", { count: this.client.voice.connections.size })) - .addField(message.translate("general/stats:CREDITS_TITLE"), message.translate("general/stats:CREDITS_CONTENT", { + .addField(translate("general/stats:CREDITS_TITLE"), translate("general/stats:CREDITS_CONTENT", { donators: [ "`Marty#0303` (**GOD**)", "`Reese's Cup#9637` (**SUPPORTER**)", "`\"\"#2020` (**SUPPORTER**)", "`✰Donjͥบaͣnͫ✰#7777` (**SUPPORTER**)" ].join("\n"), translators: [ "`Lil Ethan. 💤#1337` (:flag_fr:)", "`Mizuki#2477` (:flag_fr:)", "`shaynlink#9070` (:flag_fr:)", "`Androz#2091` (:flag_fr:)", "`kevinava#4941` (:flag_es:)", "`Gaming Mineblox#0256` (:flag_nl:)", "`!Slayx#0917` (:flag_it:)", "`Melocet#1645` (:flag_tr:)", "`Kobayakawa Takakage#7414` (:flag_za:)", "`sarkanyka444#7446` (:flag_hu:)" ].join("\n") })); - statsEmbed.addField(this.client.customEmojis.link+" "+message.translate("general/stats:LINKS_TITLE"), message.translate("misc:STATS_FOOTER", { + statsEmbed.addField(this.client.customEmojis.link+" "+translate("general/stats:LINKS_TITLE"), translate("misc:STATS_FOOTER", { donateLink: "https://patreon.com/Androz2091", dashboardLink: "https://dashboard.atlanta-bot.fr", inviteLink: await this.client.generateInvite({ diff --git a/commands/General/suggest.js b/commands/General/suggest.js index b90ef3245c..11ee34f841 100644 --- a/commands/General/suggest.js +++ b/commands/General/suggest.js @@ -31,12 +31,12 @@ class Suggest extends Command { } const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("general/suggest:TITLE", { - user: message.author.username - }), message.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) - .addField(message.translate("common:AUTHOR"), `\`${message.author.username}#${message.author.discriminator}\``, true) - .addField(message.translate("common:DATE"), message.printDate(new Date(Date.now())), true) - .addField(message.translate("common:CONTENT"), "**"+sugg+"**") + .setAuthor(translate("general/suggest:TITLE", { + user: interaction.user.username + }), interaction.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) + .addField(translate("common:AUTHOR"), `\`${interaction.user.username}#${interaction.user.discriminator}\``, true) + .addField(translate("common:DATE"), message.printDate(new Date(Date.now())), true) + .addField(translate("common:CONTENT"), "**"+sugg+"**") .setColor(data.config.embed.color) .setFooter(data.config.embed.footer); diff --git a/commands/General/translate.js b/commands/General/translate.js index eaa1694e5f..8248d3dafd 100644 --- a/commands/General/translate.js +++ b/commands/General/translate.js @@ -25,7 +25,7 @@ class Translate extends Command { if(args[0] === "langs-list"){ const langsList = "```Css\n"+(langs.map((l, i) => `#${i+1} - ${l}`).join("\n"))+"```"; - message.author.send(langsList).then(() => { + interaction.user.send(langsList).then(() => { interaction.reply({ content: translate("general/translate:LIST_SENT") }); diff --git a/commands/General/userinfo.js b/commands/General/userinfo.js index ec58333b79..4502d32b6f 100644 --- a/commands/General/userinfo.js +++ b/commands/General/userinfo.js @@ -27,7 +27,7 @@ class Userinfo extends Command { var user; if(!args[0]){ - user = message.author; + user = interaction.user; } if(message.mentions.users.first()){ user = message.mentions.users.first(); @@ -52,28 +52,28 @@ class Userinfo extends Command { const embed = new Discord.MessageEmbed() .setAuthor(user.tag, user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .setThumbnail(user.displayAvatarURL({ dynamic: true })) - .addField(":man: "+message.translate("common:USERNAME"), user.username, true) - .addField(this.client.customEmojis.discriminator+" "+message.translate("common:DISCRIMINATOR"), user.discriminator, true) - .addField(this.client.customEmojis.bot+" "+message.translate("common:ROBOT"), (user.bot ? message.translate("common:YES") : message.translate("common:NO")), true) - .addField(this.client.customEmojis.calendar+" "+message.translate("common:CREATION"), message.printDate(user.createdAt), true) - .addField(this.client.customEmojis.avatar+" "+message.translate("common:AVATAR"), user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) + .addField(":man: "+translate("common:USERNAME"), user.username, true) + .addField(this.client.customEmojis.discriminator+" "+translate("common:DISCRIMINATOR"), user.discriminator, true) + .addField(this.client.customEmojis.bot+" "+translate("common:ROBOT"), (user.bot ? translate("common:YES") : translate("common:NO")), true) + .addField(this.client.customEmojis.calendar+" "+translate("common:CREATION"), message.printDate(user.createdAt), true) + .addField(this.client.customEmojis.avatar+" "+translate("common:AVATAR"), user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .setColor(data.config.embed.color) .setFooter(data.config.embed.footer); if(displayPresence){ - embed.addField(this.client.customEmojis.games+" "+message.translate("common:GAME"), (user.presence.activity ? user.presence.activity.name : message.translate("general/userinfo:NO_GAME")), true) - .addField(this.client.customEmojis.status.online+" "+message.translate("common:STATUS"), message.translate("common:STATUS_"+(user.presence.status.toUpperCase())), true); + embed.addField(this.client.customEmojis.games+" "+translate("common:GAME"), (user.presence.activity ? user.presence.activity.name : translate("general/userinfo:NO_GAME")), true) + .addField(this.client.customEmojis.status.online+" "+translate("common:STATUS"), translate("common:STATUS_"+(user.presence.status.toUpperCase())), true); } if(member){ - embed.addField(this.client.customEmojis.up+" "+message.translate("common:ROLE"), (member.roles.highest ? member.roles.highest : message.translate("general/userinfo:NO_ROLE")), true) - .addField(this.client.customEmojis.calendar2+" "+message.translate("common:JOIN"), message.printDate(member.joinedAt),true) - .addField(this.client.customEmojis.color+" "+message.translate("common:COLOR"), member.displayHexColor, true) - .addField(this.client.customEmojis.pencil+" "+message.translate("common:NICKNAME"), (member.nickname ? member.nickname : message.translate("general/userinfo:NO_NICKNAME")), true) - .addField(this.client.customEmojis.roles+" "+message.translate("common:ROLES"), ( + embed.addField(this.client.customEmojis.up+" "+translate("common:ROLE"), (member.roles.highest ? member.roles.highest : translate("general/userinfo:NO_ROLE")), true) + .addField(this.client.customEmojis.calendar2+" "+translate("common:JOIN"), message.printDate(member.joinedAt),true) + .addField(this.client.customEmojis.color+" "+translate("common:COLOR"), member.displayHexColor, true) + .addField(this.client.customEmojis.pencil+" "+translate("common:NICKNAME"), (member.nickname ? member.nickname : translate("general/userinfo:NO_NICKNAME")), true) + .addField(this.client.customEmojis.roles+" "+translate("common:ROLES"), ( member.roles.size > 10 - ? member.roles.cache.map((r) => r).slice(0, 9).join(", ")+" "+message.translate("general/userinfo:MORE_ROLES", { count: member.roles.cache.size - 10 }) - : (member.roles.cache.size < 1) ? message.translate("general/userinfo:NO_ROLE") : member.roles.cache.map((r) => r).join(", ") + ? member.roles.cache.map((r) => r).slice(0, 9).join(", ")+" "+translate("general/userinfo:MORE_ROLES", { count: member.roles.cache.size - 10 }) + : (member.roles.cache.size < 1) ? translate("general/userinfo:NO_ROLE") : member.roles.cache.map((r) => r).join(", ") )); } @@ -83,15 +83,15 @@ class Userinfo extends Command { }); const data = await res.json(); if(!data.error){ - embed.addField(this.client.customEmojis.desc+" "+message.translate("common:DESCRIPTION"), data.shortdesc, true) - .addField(this.client.customEmojis.stats+" "+message.translate("common:STATS"), message.translate("general/userinfo:BOT_STATS", { + embed.addField(this.client.customEmojis.desc+" "+translate("common:DESCRIPTION"), data.shortdesc, true) + .addField(this.client.customEmojis.stats+" "+translate("common:STATS"), translate("general/userinfo:BOT_STATS", { votes: data.monthlyPoints || 0, servers: data.server_count || 0, shards: (data.shards || [0]).length, lib: data.lib || "unknown" }), true) - .addField(this.client.customEmojis.link+" "+message.translate("common:LINKS"), - `${data.support ? `[${message.translate("common:SUPPORT")}](${data.support}) | ` : ""}${data.invite ? `[${message.translate("common:INVITE")}](${data.invite}) | ` : ""}${data.github ? `[GitHub](${data.github}) | ` : ""}${data.website ? `[${message.translate("common:WEBSITE")}](${data.website})` : ""}` + .addField(this.client.customEmojis.link+" "+translate("common:LINKS"), + `${data.support ? `[${translate("common:SUPPORT")}](${data.support}) | ` : ""}${data.invite ? `[${translate("common:INVITE")}](${data.invite}) | ` : ""}${data.github ? `[GitHub](${data.github}) | ` : ""}${data.website ? `[${translate("common:WEBSITE")}](${data.website})` : ""}` , true); } } diff --git a/commands/Images/approved.js b/commands/Images/approved.js index 453d76a19c..bb6bffd0cf 100644 --- a/commands/Images/approved.js +++ b/commands/Images/approved.js @@ -19,7 +19,7 @@ class Approved extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/avatar.js b/commands/Images/avatar.js index 04f023dbb0..08a88ac2f1 100644 --- a/commands/Images/avatar.js +++ b/commands/Images/avatar.js @@ -20,7 +20,7 @@ class Avatar extends Command { async run (interaction, translate) { let user = await this.client.resolveUser(args[0]); - if(!user) user = message.author; + if(!user) user = interaction.user; const avatarURL = user.displayAvatarURL({ size: 512, dynamic: true, format: "png" }); if(message.content.includes("-v")) message.channel.send("<"+avatarURL+">"); const attachment = new Discord.MessageAttachment(avatarURL, `avatar.${avatarURL.split(".").pop().split("?")[0]}`); diff --git a/commands/Images/batslap.js b/commands/Images/batslap.js index 647d950f9c..daf2b6a6dd 100644 --- a/commands/Images/batslap.js +++ b/commands/Images/batslap.js @@ -20,8 +20,8 @@ class BatSlap extends Command { async run (interaction, translate) { const users = [ - await this.client.resolveUser(args[0]) || message.author, - await this.client.resolveUser(args[1]) || message.author + await this.client.resolveUser(args[0]) || interaction.user, + await this.client.resolveUser(args[1]) || interaction.user ]; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" diff --git a/commands/Images/beautiful.js b/commands/Images/beautiful.js index 7e078d261a..89cfd9dd0f 100644 --- a/commands/Images/beautiful.js +++ b/commands/Images/beautiful.js @@ -19,7 +19,7 @@ class Beautiful extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/bed.js b/commands/Images/bed.js index 153f98f1bc..c19559c644 100644 --- a/commands/Images/bed.js +++ b/commands/Images/bed.js @@ -21,8 +21,8 @@ class Bed extends Command { async run (interaction, translate) { const users = [ - await this.client.resolveUser(args[0]) || message.author, - await this.client.resolveUser(args[1]) || message.author + await this.client.resolveUser(args[0]) || interaction.user, + await this.client.resolveUser(args[1]) || interaction.user ]; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/brazzers.js b/commands/Images/brazzers.js index 409521cd45..eed5deb6b9 100644 --- a/commands/Images/brazzers.js +++ b/commands/Images/brazzers.js @@ -19,7 +19,7 @@ class Brazzers extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/burn.js b/commands/Images/burn.js index 8317da9048..79ded33919 100644 --- a/commands/Images/burn.js +++ b/commands/Images/burn.js @@ -19,7 +19,7 @@ class Burn extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/captcha.js b/commands/Images/captcha.js index 755c4e67a2..db91a62a80 100644 --- a/commands/Images/captcha.js +++ b/commands/Images/captcha.js @@ -20,7 +20,7 @@ class Captcha extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/challenger.js b/commands/Images/challenger.js index 625d9f1aa3..5615cedc6f 100644 --- a/commands/Images/challenger.js +++ b/commands/Images/challenger.js @@ -19,7 +19,7 @@ class Challenger extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/dictator.js b/commands/Images/dictator.js index a49cf344bd..ae6b9747ec 100644 --- a/commands/Images/dictator.js +++ b/commands/Images/dictator.js @@ -19,7 +19,7 @@ class Dictator extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/facepalm.js b/commands/Images/facepalm.js index 8a960b877a..685b338733 100644 --- a/commands/Images/facepalm.js +++ b/commands/Images/facepalm.js @@ -20,7 +20,7 @@ class Facepalm extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author, + const user = await this.client.resolveUser(args[0]) || interaction.user, m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/fire.js b/commands/Images/fire.js index 6f6f855f48..959119a146 100644 --- a/commands/Images/fire.js +++ b/commands/Images/fire.js @@ -19,7 +19,7 @@ class Fire extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/jail.js b/commands/Images/jail.js index 8c515636c2..f20815bce9 100644 --- a/commands/Images/jail.js +++ b/commands/Images/jail.js @@ -19,7 +19,7 @@ class Jail extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/love.js b/commands/Images/love.js index 252c00237e..c47ae829ad 100644 --- a/commands/Images/love.js +++ b/commands/Images/love.js @@ -21,8 +21,8 @@ class Love extends Command { async run (interaction, translate) { const users = [ - await this.client.resolveUser(args[0]) || message.author, - await this.client.resolveUser(args[1]) || message.author + await this.client.resolveUser(args[0]) || interaction.user, + await this.client.resolveUser(args[1]) || interaction.user ]; const m = await message.sendT("misc:PLEASE_WAIT", null, { diff --git a/commands/Images/mission.js b/commands/Images/mission.js index ed5aec8c92..f30224248d 100644 --- a/commands/Images/mission.js +++ b/commands/Images/mission.js @@ -19,7 +19,7 @@ class Mission extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("images/mission:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/phcomment.js b/commands/Images/phcomment.js index 403937a130..1eb92a4564 100644 --- a/commands/Images/phcomment.js +++ b/commands/Images/phcomment.js @@ -26,7 +26,7 @@ class Phcomment extends Command { if(user){ text = args.slice(1).join(" "); } else { - user = message.author; + user = interaction.user; } if(!text){ diff --git a/commands/Images/qrcode.js b/commands/Images/qrcode.js index 1e65edff3e..2965651887 100644 --- a/commands/Images/qrcode.js +++ b/commands/Images/qrcode.js @@ -36,7 +36,7 @@ class Qrcode extends Command { .setImage(`https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${text.replace(new RegExp(" ", "g"), "%20")}`) .setColor(data.config.embed.color); - pleaseWait.edit({ embeds: [embed], content: message.translate("images/qrcode:SUCCESS") }); + pleaseWait.edit({ embeds: [embed], content: translate("images/qrcode:SUCCESS") }); } diff --git a/commands/Images/rip.js b/commands/Images/rip.js index 7eb05f0419..3e947e34fd 100644 --- a/commands/Images/rip.js +++ b/commands/Images/rip.js @@ -19,7 +19,7 @@ class Rip extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/scary.js b/commands/Images/scary.js index af2ad7ae93..31f091ff37 100644 --- a/commands/Images/scary.js +++ b/commands/Images/scary.js @@ -19,7 +19,7 @@ class Scary extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/tobecontinued.js b/commands/Images/tobecontinued.js index b897ab352b..a1b34fde58 100644 --- a/commands/Images/tobecontinued.js +++ b/commands/Images/tobecontinued.js @@ -19,7 +19,7 @@ class Tobecontinued extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/trash.js b/commands/Images/trash.js index 262758d9ca..ba06588184 100644 --- a/commands/Images/trash.js +++ b/commands/Images/trash.js @@ -20,7 +20,7 @@ class Trash extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/triggered.js b/commands/Images/triggered.js index a83ec5f842..150aeaba51 100644 --- a/commands/Images/triggered.js +++ b/commands/Images/triggered.js @@ -19,7 +19,7 @@ class Triggered extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/tweet.js b/commands/Images/tweet.js index 947019b964..db4fb48670 100644 --- a/commands/Images/tweet.js +++ b/commands/Images/tweet.js @@ -20,7 +20,7 @@ class Tweet extends Command { async run (interaction, translate) { - const user = message.mentions.users.first() || message.author; + const user = message.mentions.users.first() || interaction.user; const text = args.slice(1).join(" "); if(!user){ diff --git a/commands/Images/wanted.js b/commands/Images/wanted.js index 087a917f0c..37747d1c4d 100644 --- a/commands/Images/wanted.js +++ b/commands/Images/wanted.js @@ -19,7 +19,7 @@ class Wanted extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/wasted.js b/commands/Images/wasted.js index 624a947cc6..3ef9976a2e 100644 --- a/commands/Images/wasted.js +++ b/commands/Images/wasted.js @@ -19,7 +19,7 @@ class Wasted extends Command { async run (interaction, translate) { - const user = await this.client.resolveUser(args[0]) || message.author; + const user = await this.client.resolveUser(args[0]) || interaction.user; const m = await message.sendT("misc:PLEASE_WAIT", null, { prefixEmoji: "loading" }); diff --git a/commands/Images/youtube-comment.js b/commands/Images/youtube-comment.js index 01a6121503..810a7efa5f 100644 --- a/commands/Images/youtube-comment.js +++ b/commands/Images/youtube-comment.js @@ -26,7 +26,7 @@ class YouTubeComment extends Command { if(user){ text = args.slice(1).join(" "); } else { - user = message.author; + user = interaction.user; } if(!text){ diff --git a/commands/Moderation/announcement.js b/commands/Moderation/announcement.js index 4b57d65517..370d3f7951 100644 --- a/commands/Moderation/announcement.js +++ b/commands/Moderation/announcement.js @@ -42,23 +42,23 @@ class Announcement extends Command { content: translate("moderation/announcement:MENTION_PROMPT") }); - const collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, { time: 240000 }); + const collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === interaction.user.id, { time: 240000 }); collector.on("collect", async (tmsg) => { - if(tmsg.content.toLowerCase() === message.translate("common:NO").toLowerCase()){ + if(tmsg.content.toLowerCase() === translate("common:NO").toLowerCase()){ tmsg.delete(); msg.delete(); collector.stop(true); } - if(tmsg.content.toLowerCase() === message.translate("common:YES").toLowerCase()){ + if(tmsg.content.toLowerCase() === translate("common:YES").toLowerCase()){ tmsg.delete(); msg.delete(); const tmsg1 = await interaction.reply({ content: translate("moderation/announcement:MENTION_TYPE_PROMPT") }); - const c = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, { time: 60000 }); + const c = new Discord.MessageCollector(message.channel, (m) => m.author.id === interaction.user.id, { time: 60000 }); c.on("collect", (m) => { if(m.content.toLowerCase() === "here"){ mention = "@here"; @@ -95,9 +95,9 @@ class Announcement extends Command { } const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("moderation/announcement:TITLE")) + .setAuthor(translate("moderation/announcement:TITLE")) .setColor(data.config.embed.color) - .setFooter(message.author.tag) + .setFooter(interaction.user.tag) .setTimestamp() .setDescription(text); diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index b64bc34b72..46d496ed01 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -28,9 +28,9 @@ class Ban extends Command { }); } - const memberData = message.guild.members.cache.get(user.id) ? await this.client.findOrCreateMember({ id: user.id, guildID: message.guild.id }) : null; + const memberData = message.guild.members.cache.get(user.id) ? await this.client.findOrCreateMember({ id: user.id, guildID: interaction.guild.id }) : null; - if(user.id === message.author.id){ + if(user.id === interaction.user.id){ return interaction.reply({ content: translate("moderation/ban:YOURSELF"), ephemeral: true @@ -48,14 +48,14 @@ class Ban extends Command { // Gets the ban reason let reason = args.slice(1).join(" "); if(!reason){ - reason = message.translate("misc:NO_REASON_PROVIDED"); + reason = translate("misc:NO_REASON_PROVIDED"); } const member = await message.guild.members.fetch(user.id).catch(() => {}); if(member){ const memberPosition = member.roles.highest.position; const moderationPosition = message.member.roles.highest.position; - if(message.member.ownerID !== message.author.id && !(moderationPosition > memberPosition)){ + if(message.member.ownerID !== interaction.user.id && !(moderationPosition > memberPosition)){ return interaction.reply({ content: translate("moderation/ban:SUPERIOR"), ephemeral: true @@ -69,10 +69,10 @@ class Ban extends Command { } } - await user.send(message.translate("moderation/ban:BANNED_DM", { + await user.send(translate("moderation/ban:BANNED_DM", { username: user.tag, server: message.guild.name, - moderator: message.author.tag, + moderator: interaction.user.tag, reason })).catch(() => {}); @@ -83,13 +83,13 @@ class Ban extends Command { message.sendT("moderation/ban:BANNED", { username: user.tag, server: message.guild.name, - moderator: message.author.tag, + moderator: interaction.user.tag, reason }); const caseInfo = { channel: message.channel.id, - moderator: message.author.id, + moderator: interaction.user.id, date: Date.now(), type: "ban", case: data.guild.casesCount, @@ -108,12 +108,12 @@ class Ban extends Command { const channel = message.guild.channels.cache.get(data.guild.plugins.modlogs); if(!channel) return; const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("moderation/ban:CASE", { + .setAuthor(translate("moderation/ban:CASE", { count: data.guild.casesCount })) - .addField(message.translate("common:USER"), `\`${user.tag}\` (${user.toString()})`, true) - .addField(message.translate("common:MODERATOR"), `\`${message.author.tag}\` (${message.author.toString()})`, true) - .addField(message.translate("common:REASON"), reason, true) + .addField(translate("common:USER"), `\`${user.tag}\` (${user.toString()})`, true) + .addField(translate("common:MODERATOR"), `\`${interaction.user.tag}\` (${interaction.user.toString()})`, true) + .addField(translate("common:REASON"), reason, true) .setColor("#e02316"); channel.send({ embeds: [embed] }); } diff --git a/commands/Moderation/checkinvites.js b/commands/Moderation/checkinvites.js index c4988bf05f..7fc4d5b8da 100644 --- a/commands/Moderation/checkinvites.js +++ b/commands/Moderation/checkinvites.js @@ -37,7 +37,7 @@ class Checkinvites extends Command { const text = (withInvite.length > 0 ? withInvite.map((m) => "`"+m.id+"` ("+m.tag+") : "+m.links).join("\n") - : message.translate("moderation/checkinvites:NOBODY")); + : translate("moderation/checkinvites:NOBODY")); const embed = new Discord.MessageEmbed() .setDescription(text) diff --git a/commands/Moderation/clear-sanctions.js b/commands/Moderation/clear-sanctions.js index cfa026522e..ce8e59ea0a 100644 --- a/commands/Moderation/clear-sanctions.js +++ b/commands/Moderation/clear-sanctions.js @@ -26,7 +26,7 @@ class Clearsanctions extends Command { ephemeral: true }); } - const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); + const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: interaction.guild.id }); memberData.sanctions = []; memberData.save(); message.success("moderation/clear-sanctions:SUCCESS", { diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index 6e23de01aa..dcaeb057ae 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -23,7 +23,7 @@ class Clear extends Command { interaction.reply({ content: translate("moderation/clear:ALL_CONFIRM") }); - await message.channel.awaitMessages((m) => (m.author.id === message.author.id) && (m.content === "-confirm"), { + await message.channel.awaitMessages((m) => (m.author.id === interaction.user.id) && (m.content === "-confirm"), { max: 1, time: 20000, errors: ["time"] @@ -37,7 +37,7 @@ class Clear extends Command { const newChannel = await message.channel.clone(); await message.channel.delete(); newChannel.setPosition(position); - return newChannel.send(message.translate("moderation/clear:CHANNEL_CLEARED")); + return newChannel.send(translate("moderation/clear:CHANNEL_CLEARED")); } let amount = args[0]; diff --git a/commands/Moderation/giveaway.js b/commands/Moderation/giveaway.js index c09f5c46e3..7f32e6ad45 100644 --- a/commands/Moderation/giveaway.js +++ b/commands/Moderation/giveaway.js @@ -29,7 +29,7 @@ class Giveaway extends Command { } if(status === "create"){ - const currentGiveaways = this.client.giveawaysManager.giveaways.filter((g) => g.guildID === message.guild.id && !g.ended).length; + const currentGiveaways = this.client.giveawaysManager.giveaways.filter((g) => g.guildID === interaction.guild.id && !g.ended).length; if(currentGiveaways > 3){ return interaction.reply({ content: translate("moderation/giveaway:MAX_COUNT"), @@ -77,20 +77,20 @@ class Giveaway extends Command { prize: prize, winnerCount: parseInt(winnersCount, 10), messages: { - giveaway: message.translate("moderation/giveaway:TITLE"), - giveawayEnded: message.translate("moderation/giveaway:ENDED"), - timeRemaining: message.translate("moderation/giveaway:TIME_REMAINING"), - inviteToParticipate: message.translate("moderation/giveaway:INVITE_PARTICIPATE"), - winMessage: message.translate("moderation/giveaway:WIN_MESSAGE"), - embedFooter: message.translate("moderation/giveaway:FOOTER"), - noWinner: message.translate("moderation/giveaway:NO_WINNER"), - winners: message.translate("moderation/giveaway:WINNERS"), - endedAt: message.translate("moderation/giveaway:END_AT"), + giveaway: translate("moderation/giveaway:TITLE"), + giveawayEnded: translate("moderation/giveaway:ENDED"), + timeRemaining: translate("moderation/giveaway:TIME_REMAINING"), + inviteToParticipate: translate("moderation/giveaway:INVITE_PARTICIPATE"), + winMessage: translate("moderation/giveaway:WIN_MESSAGE"), + embedFooter: translate("moderation/giveaway:FOOTER"), + noWinner: translate("moderation/giveaway:NO_WINNER"), + winners: translate("moderation/giveaway:WINNERS"), + endedAt: translate("moderation/giveaway:END_AT"), units: { - seconds: message.translate("time:SECONDS", { amount: "" }).trim(), - minutes: message.translate("time:MINUTES", { amount: "" }).trim(), - hours: message.translate("time:HOURS", { amount: "" }).trim(), - days: message.translate("time:DAYS", { amount: "" }).trim() + seconds: translate("time:SECONDS", { amount: "" }).trim(), + minutes: translate("time:MINUTES", { amount: "" }).trim(), + hours: translate("time:HOURS", { amount: "" }).trim(), + days: translate("time:DAYS", { amount: "" }).trim() } } }).then(() => { @@ -107,8 +107,8 @@ class Giveaway extends Command { }); } this.client.giveawaysManager.reroll(messageID, { - congrat: message.translate("moderation/giveaway:REROLL_CONGRAT"), - error: message.translate("moderation/giveaway:REROLL_ERROR") + congrat: translate("moderation/giveaway:REROLL_CONGRAT"), + error: translate("moderation/giveaway:REROLL_ERROR") }).then(() => { return interaction.reply({ content: translate("moderation/giveaway:GIVEAWAY_REROLLED") diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index 3a3cef7407..da4c31cb8d 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -28,24 +28,24 @@ class Kick extends Command { }); } - if(member.id === message.author.id){ + if(member.id === interaction.user.id){ return interaction.reply({ content: translate("moderation/ban:YOURSELF"), ephemeral: true }); } - const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); + const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: interaction.guild.id }); // Gets the kcik reason let reason = args.slice(1).join(" "); if(!reason){ - reason = message.translate("misc:NO_REASON_PROVIDED"); + reason = translate("misc:NO_REASON_PROVIDED"); } const memberPosition = member.roles.highest.position; const moderationPosition = message.member.roles.highest.position; - if(message.member.ownerID !== message.author.id && !(moderationPosition > memberPosition)){ + if(message.member.ownerID !== interaction.user.id && !(moderationPosition > memberPosition)){ return interaction.reply({ content: translate("moderation/ban:SUPERIOR"), ephemeral: true @@ -59,10 +59,10 @@ class Kick extends Command { }); } - await member.send(message.translate("moderation/kick:KICKED_DM", { + await member.send(translate("moderation/kick:KICKED_DM", { username: member.user.tag, server: message.guild.name, - moderator: message.author.tag, + moderator: interaction.user.tag, reason })).catch(() => {}); @@ -73,7 +73,7 @@ class Kick extends Command { message.sendT("moderation/kick:KICKED", { username: member.user.tag, server: message.guild.name, - moderator: message.author.tag, + moderator: interaction.user.tag, reason }); @@ -82,7 +82,7 @@ class Kick extends Command { const caseInfo = { channel: message.channel.id, - moderator: message.author.id, + moderator: interaction.user.id, date: Date.now(), type: "kick", case: data.guild.casesCount, @@ -96,12 +96,12 @@ class Kick extends Command { const channel = message.guild.channels.cache.get(data.guild.plugins.modlogs); if(!channel) return; const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("moderation/kick:CASE", { + .setAuthor(translate("moderation/kick:CASE", { count: data.guild.casesCount })) - .addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) - .addField(message.translate("common:MODERATOR"), `\`${message.author.tag}\` (${message.author.toString()})`, true) - .addField(message.translate("common:REASON"), reason, true) + .addField(translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) + .addField(translate("common:MODERATOR"), `\`${interaction.user.tag}\` (${interaction.user.toString()})`, true) + .addField(translate("common:REASON"), reason, true) .setColor("#e88709"); channel.send({ embeds: [embed] }); } diff --git a/commands/Moderation/mute.js b/commands/Moderation/mute.js index 0abe4fcd36..e1f6a95e5a 100644 --- a/commands/Moderation/mute.js +++ b/commands/Moderation/mute.js @@ -29,7 +29,7 @@ class Mute extends Command { }); } - if(member.id === message.author.id){ + if(member.id === interaction.user.id){ return interaction.reply({ content: translate("moderation/ban:YOURSELF"), ephemeral: true @@ -38,14 +38,14 @@ class Mute extends Command { const memberPosition = member.roles.highest.position; const moderationPosition = message.member.roles.highest.position; - if(message.member.ownerID !== message.author.id && !(moderationPosition > memberPosition)){ + if(message.member.ownerID !== interaction.user.id && !(moderationPosition > memberPosition)){ return interaction.reply({ content: translate("moderation/ban:SUPERIOR"), ephemeral: true }); } - const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); + const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: interaction.guild.id }); const time = args[1]; if(!time || isNaN(ms(time))){ @@ -57,7 +57,7 @@ class Mute extends Command { let reason = args.slice(2).join(" "); if(!reason){ - reason = message.translate("misc:NO_REASON_PROVIDED"); + reason = translate("misc:NO_REASON_PROVIDED"); } message.guild.channels.cache.forEach((channel) => { @@ -68,10 +68,10 @@ class Mute extends Command { }).catch(() => {}); }); - member.send(message.translate("moderation/mute:MUTED_DM", { + member.send(translate("moderation/mute:MUTED_DM", { username: member.user.username, server: message.guild.name, - moderator: message.author.tag, + moderator: interaction.user.tag, time, reason })); @@ -79,7 +79,7 @@ class Mute extends Command { message.success("moderation/mute:MUTED", { username: member.user.tag, server: message.guild.name, - moderator: message.author.tag, + moderator: interaction.user.tag, time, reason }); @@ -88,7 +88,7 @@ class Mute extends Command { const caseInfo = { channel: message.channel.id, - moderator: message.author.id, + moderator: interaction.user.id, date: Date.now(), type: "mute", case: data.guild.casesCount, @@ -107,20 +107,20 @@ class Mute extends Command { await data.guild.save(); - this.client.databaseCache.mutedUsers.set(`${member.id}${message.guild.id}`, memberData); + this.client.databaseCache.mutedUsers.set(`${member.id}${interaction.guild.id}`, memberData); if(data.guild.plugins.modlogs){ const channel = message.guild.channels.cache.get(data.guild.plugins.modlogs); if(!channel) return; const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("moderation/mute:CASE", { + .setAuthor(translate("moderation/mute:CASE", { count: data.guild.casesCount })) - .addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) - .addField(message.translate("common:MODERATOR"), `\`${message.author.tag}\` (${message.author.toString()})`, true) - .addField(message.translate("common:REASON"), reason, true) - .addField(message.translate("common:DURATION"), time, true) - .addField(message.translate("common:EXPIRY"), message.printDate(new Date(Date.now()+ms(time))), true) + .addField(translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) + .addField(translate("common:MODERATOR"), `\`${interaction.user.tag}\` (${interaction.user.toString()})`, true) + .addField(translate("common:REASON"), reason, true) + .addField(translate("common:DURATION"), time, true) + .addField(translate("common:EXPIRY"), message.printDate(new Date(Date.now()+ms(time))), true) .setColor("#f44271"); channel.send({ embeds: [embed] }); } diff --git a/commands/Moderation/poll.js b/commands/Moderation/poll.js index 36e437bcb1..0e04f314d0 100644 --- a/commands/Moderation/poll.js +++ b/commands/Moderation/poll.js @@ -36,23 +36,23 @@ class Poll extends Command { content: translate("moderation/announcement:MENTION_PROMPT") }); - const collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, { time: 240000 }); + const collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === interaction.user.id, { time: 240000 }); collector.on("collect", async (tmsg) => { - if(tmsg.content.toLowerCase() === message.translate("common:NO").toLowerCase()){ + if(tmsg.content.toLowerCase() === translate("common:NO").toLowerCase()){ tmsg.delete(); msg.delete(); collector.stop(true); } - if(tmsg.content.toLowerCase() === message.translate("common:YES").toLowerCase()){ + if(tmsg.content.toLowerCase() === translate("common:YES").toLowerCase()){ tmsg.delete(); msg.delete(); const tmsg1 = await interaction.reply({ content: translate("moderation/announcement:MENTION_TYPE_PROMPT") }); - const c = new Discord.MessageCollector(message.channel, (m) => m.author.id === message.author.id, { time: 60000 }); + const c = new Discord.MessageCollector(message.channel, (m) => m.author.id === interaction.user.id, { time: 60000 }); c.on("collect", (m) => { if(m.content.toLowerCase() === "here"){ mention = "@here"; @@ -97,9 +97,9 @@ class Poll extends Command { ]; const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("moderation/poll:TITLE")) + .setAuthor(translate("moderation/poll:TITLE")) .setColor(data.config.embed.color) - .addField(question, message.translate("moderation/poll:REACT", { + .addField(question, translate("moderation/poll:REACT", { success: emojis[0].toString(), error: emojis[1].toString() })); diff --git a/commands/Moderation/sanctions.js b/commands/Moderation/sanctions.js index fa9c81b903..035407faf1 100644 --- a/commands/Moderation/sanctions.js +++ b/commands/Moderation/sanctions.js @@ -27,7 +27,7 @@ class Sanctions extends Command { ephemeral: true }); } - const memberData = await this.client.findOrCreateMember({ id: user.id, guildID: message.guild.id }); + const memberData = await this.client.findOrCreateMember({ id: user.id, guildID: interaction.guild.id }); const embed = new Discord.MessageEmbed() .setAuthor(user.tag, user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) @@ -35,13 +35,13 @@ class Sanctions extends Command { .setFooter(data.config.embed.footer); if(memberData.sanctions.length < 1){ - embed.setDescription(message.translate("moderation/sanctions:NO_SANCTION", { + embed.setDescription(translate("moderation/sanctions:NO_SANCTION", { username: user.tag })); return message.channel.send({ embeds: [embed] }); } else { memberData.sanctions.forEach((s) => { - embed.addField(s.type+" | #"+s.case, `${message.translate("common:MODERATOR")}: <@${s.moderator}>\n${message.translate("common:REASON")}: ${s.reason}`, true); + embed.addField(s.type+" | #"+s.case, `${translate("common:MODERATOR")}: <@${s.moderator}>\n${translate("common:REASON")}: ${s.reason}`, true); }); } diff --git a/commands/Moderation/unmute.js b/commands/Moderation/unmute.js index 7cc7cf56b1..1d87c182c9 100644 --- a/commands/Moderation/unmute.js +++ b/commands/Moderation/unmute.js @@ -28,14 +28,14 @@ class Unmute extends Command { const memberPosition = member.roles.highest.position; const moderationPosition = message.member.roles.highest.position; - if(message.member.ownerID !== message.author.id && !(moderationPosition > memberPosition)){ + if(message.member.ownerID !== interaction.user.id && !(moderationPosition > memberPosition)){ return interaction.reply({ content: translate("moderation/ban:SUPERIOR"), ephemeral: true }); } - const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); + const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: interaction.guild.id }); if(memberData.mute.muted){ memberData.mute.endDate = Date.now(); diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index c2bf61a68a..7d0d0b35a6 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -33,9 +33,9 @@ class Warn extends Command { ephemeral: true }); } - const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: message.guild.id }); + const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: interaction.guild.id }); - if(member.id === message.author.id){ + if(member.id === interaction.user.id){ return interaction.reply({ content: translate("moderation/ban:YOURSELF"), ephemeral: true @@ -44,7 +44,7 @@ class Warn extends Command { const memberPosition = member.roles.highest.position; const moderationPosition = message.member.roles.highest.position; - if(message.member.ownerID !== message.author.id && !(moderationPosition > memberPosition)){ + if(message.member.ownerID !== interaction.user.id && !(moderationPosition > memberPosition)){ return interaction.reply({ content: translate("moderation/ban:SUPERIOR"), ephemeral: true @@ -69,7 +69,7 @@ class Warn extends Command { const caseInfo = { channel: message.channel.id, - moderator: message.author.id, + moderator: interaction.user.id, date: Date.now(), type: "warn", case: data.guild.casesCount, @@ -77,20 +77,20 @@ class Warn extends Command { }; const embed = new Discord.MessageEmbed() - .addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`) - .addField(message.translate("common:MODERATOR"), `\`${message.author.tag}\` (${message.author.toString()}`) - .addField(message.translate("common:REASON"), reason, true); + .addField(translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`) + .addField(translate("common:MODERATOR"), `\`${interaction.user.tag}\` (${interaction.user.toString()}`) + .addField(translate("common:REASON"), reason, true); if(banCount){ if(sanctions >= banCount){ - member.send(message.translate("moderation/ban:BANNED_DM", { + member.send(translate("moderation/ban:BANNED_DM", { username: member.user, - moderator: message.author.tag, + moderator: interaction.user.tag, server: message.guild.name, reason })); caseInfo.type = "ban"; - embed.setAuthor(message.translate("moderation/ban:CASE", { + embed.setAuthor(translate("moderation/ban:CASE", { count: data.guild.casesCount })) .setColor("#e02316"); @@ -104,14 +104,14 @@ class Warn extends Command { if(kickCount){ if(sanctions >= kickCount){ - member.send(message.translate("moderation/kick:KICKED_DM", { + member.send(translate("moderation/kick:KICKED_DM", { username: member.user, - moderator: message.author.tag, + moderator: interaction.user.tag, server: message.guild.name, reason })); caseInfo.type = "kick"; - embed.setAuthor(message.translate("moderation/kick:CASE", { + embed.setAuthor(translate("moderation/kick:CASE", { count: data.guild.casesCount })) .setColor("#e88709"); @@ -123,14 +123,14 @@ class Warn extends Command { } } - member.send(message.translate("moderation/warn:WARNED_DM", { + member.send(translate("moderation/warn:WARNED_DM", { username: member.user.tag, server: message.guild.name, - moderator: message.author.tag, + moderator: interaction.user.tag, reason })); caseInfo.type = "warn"; - embed.setAuthor(message.translate("moderation/warn:CASE", { + embed.setAuthor(translate("moderation/warn:CASE", { caseNumber: data.guild.casesCount })) .setColor("#8c14e2"); diff --git a/commands/Music/back.js b/commands/Music/back.js index 3153c377f8..e6b9a0dde6 100644 --- a/commands/Music/back.js +++ b/commands/Music/back.js @@ -47,7 +47,7 @@ class Back extends Command { const members = voice.members.filter((m) => !m.user.bot); const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("music/back:DESCRIPTION")) + .setAuthor(translate("music/back:DESCRIPTION")) .setThumbnail(queue.tracks[0].thumbnail) .setFooter(data.config.embed.footer) .setColor(data.config.embed.color); @@ -60,7 +60,7 @@ class Back extends Command { const mustVote = Math.floor(members.size/2+1); - embed.setDescription(message.translate("music/back:VOTE_CONTENT", { + embed.setDescription(translate("music/back:VOTE_CONTENT", { songName: queue.tracks[0].name, voteCount: 0, requiredCount: mustVote @@ -83,11 +83,11 @@ class Back extends Command { const haveVoted = reaction.count-1; if(haveVoted >= mustVote){ this.client.player.back(message); - embed.setDescription(message.translate("music/back:SUCCESS")); + embed.setDescription(translate("music/back:SUCCESS")); m.edit({ embeds: [embed] }); collector.stop(true); } else { - embed.setDescription(message.translate("music/back:VOTE_CONTENT", { + embed.setDescription(translate("music/back:VOTE_CONTENT", { songName: queue.tracks[0].title, voteCount: haveVoted, requiredCount: mustVote @@ -107,7 +107,7 @@ class Back extends Command { } else { this.client.player.back(message); - embed.setDescription(message.translate("music/back:SUCCESS")); + embed.setDescription(translate("music/back:SUCCESS")); m.edit({ embeds: [embed] }); } diff --git a/commands/Music/filters.js b/commands/Music/filters.js index bbcbbe0fb6..5df910ecdb 100644 --- a/commands/Music/filters.js +++ b/commands/Music/filters.js @@ -46,10 +46,10 @@ class Filters extends Command { }); const list = new Discord.MessageEmbed() - .setDescription(message.translate("music/filters:CONTENT", { + .setDescription(translate("music/filters:CONTENT", { prefix: data.guild.prefix })) - .addField(message.translate("music/filters:TITLE"), filtersStatuses[0].join("\n"), true) + .addField(translate("music/filters:TITLE"), filtersStatuses[0].join("\n"), true) .addField("** **", filtersStatuses[1].join("\n"), true) .setColor(data.config.embed.color); diff --git a/commands/Music/lyrics.js b/commands/Music/lyrics.js index 2a804157c3..7ddf5d6e50 100644 --- a/commands/Music/lyrics.js +++ b/commands/Music/lyrics.js @@ -30,7 +30,7 @@ class Lyrics extends Command { } const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("music/lyrics:LYRICS_OF", { + .setAuthor(translate("music/lyrics:LYRICS_OF", { songName })) .setColor(data.config.embed.color) @@ -46,7 +46,7 @@ class Lyrics extends Command { let lyrics = await lyricsParse(songNameFormated, artistName) || "Not Found!"; if(lyrics.length > 2040) { - lyrics = lyrics.substr(0, 2000) + message.translate("music/lyrics:AND_MORE") + " ["+message.translate("music/lyrics:CLICK_HERE")+"]"+`https://www.musixmatch.com/search/${songName}`; + lyrics = lyrics.substr(0, 2000) + translate("music/lyrics:AND_MORE") + " ["+translate("music/lyrics:CLICK_HERE")+"]"+`https://www.musixmatch.com/search/${songName}`; } else if(!lyrics.length) { return message.error("music/lyrics:NO_LYRICS_FOUND", { songName diff --git a/commands/Music/np.js b/commands/Music/np.js index 1e668b4170..5f766fd20e 100644 --- a/commands/Music/np.js +++ b/commands/Music/np.js @@ -42,14 +42,14 @@ class Np extends Command { // Generate discord embed to display song informations const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("music/np:CURRENTLY_PLAYING")) + .setAuthor(translate("music/np:CURRENTLY_PLAYING")) .setThumbnail(track.thumbnail) - .addField(message.translate("music/np:T_TITLE"), track.title, true) - .addField(message.translate("music/np:T_CHANNEL"), track.author, true) - .addField(message.translate("music/np:T_DURATION"), message.convertTime(Date.now()+track.durationMS, "to", true), true) - .addField(message.translate("music/np:T_DESCRIPTION"), + .addField(translate("music/np:T_TITLE"), track.title, true) + .addField(translate("music/np:T_CHANNEL"), track.author, true) + .addField(translate("music/np:T_DURATION"), message.convertTime(Date.now()+track.durationMS, "to", true), true) + .addField(translate("music/np:T_DESCRIPTION"), track.description ? - (track.description.substring(0, 150)+"\n"+(message.translate("common:AND_MORE").toLowerCase())) : message.translate("music/np:NO_DESCRIPTION"), true) + (track.description.substring(0, 150)+"\n"+(translate("common:AND_MORE").toLowerCase())) : translate("music/np:NO_DESCRIPTION"), true) .addField("\u200B", this.client.player.createProgressBar(message, { timecodes: true })) .setTimestamp() .setColor(data.config.embed.color) diff --git a/commands/Music/queue.js b/commands/Music/queue.js index 7dae745a4e..d10cdd7b26 100644 --- a/commands/Music/queue.js +++ b/commands/Music/queue.js @@ -41,8 +41,8 @@ class Queue extends Command { if(queue.tracks.length === 1){ const embed = new Discord.MessageEmbed() .setColor(data.config.embed.color) - .setAuthor(message.translate("music/queue:TITLE"), message.guild.iconURL({ dynamic: true })) - .addField(message.translate("music/np:CURRENTLY_PLAYING"), `[${queue.tracks[0].title}](${queue.tracks[0].url})\n*Requested by ${queue.tracks[0].requestedBy}*\n`); + .setAuthor(translate("music/queue:TITLE"), message.guild.iconURL({ dynamic: true })) + .addField(translate("music/np:CURRENTLY_PLAYING"), `[${queue.tracks[0].title}](${queue.tracks[0].url})\n*Requested by ${queue.tracks[0].requestedBy}*\n`); return message.channel.send({ embeds: [embed] }); } let i = 0; @@ -51,11 +51,11 @@ class Queue extends Command { FieldsEmbed.embed .setColor(data.config.embed.color) - .setAuthor(message.translate("music/queue:TITLE"), message.guild.iconURL({ dynamic: true })) - .addField(message.translate("music/np:CURRENTLY_PLAYING"), `[${queue.tracks[0].title}](${queue.tracks[0].url})\n*Requested by ${queue.tracks[0].requestedBy}*\n`); + .setAuthor(translate("music/queue:TITLE"), message.guild.iconURL({ dynamic: true })) + .addField(translate("music/np:CURRENTLY_PLAYING"), `[${queue.tracks[0].title}](${queue.tracks[0].url})\n*Requested by ${queue.tracks[0].requestedBy}*\n`); FieldsEmbed.setArray(queue.tracks[1] ? queue.tracks.slice(1, queue.tracks.length) : []) - .setAuthorizedUsers([message.author.id]) + .setAuthorizedUsers([interaction.user.id]) .setChannel(message.channel) .setElementsPerPage(5) .setPageIndicator(true) diff --git a/commands/Music/skip.js b/commands/Music/skip.js index f7c2d05ae2..89279a0edb 100644 --- a/commands/Music/skip.js +++ b/commands/Music/skip.js @@ -47,7 +47,7 @@ class Skip extends Command { const members = voice.members.filter((m) => !m.user.bot); const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("music/skip:DESCRIPTION")) + .setAuthor(translate("music/skip:DESCRIPTION")) .setThumbnail(queue.tracks[0].thumbnail) .setFooter(data.config.embed.footer) .setColor(data.config.embed.color); @@ -60,7 +60,7 @@ class Skip extends Command { const mustVote = Math.floor(members.size/2+1); - embed.setDescription(message.translate("music/skip:VOTE_CONTENT", { + embed.setDescription(translate("music/skip:VOTE_CONTENT", { songName: queue.tracks[0].name, voteCount: 0, requiredCount: mustVote @@ -83,11 +83,11 @@ class Skip extends Command { const haveVoted = reaction.count-1; if(haveVoted >= mustVote){ this.client.player.skip(message); - embed.setDescription(message.translate("music/skip:SUCCESS")); + embed.setDescription(translate("music/skip:SUCCESS")); m.edit({ embeds: [embed] }); collector.stop(true); } else { - embed.setDescription(message.translate("music/skip:VOTE_CONTENT", { + embed.setDescription(translate("music/skip:VOTE_CONTENT", { songName: queue.tracks[0].title, voteCount: haveVoted, requiredCount: mustVote @@ -107,7 +107,7 @@ class Skip extends Command { } else { this.client.player.skip(message); - embed.setDescription(message.translate("music/skip:SUCCESS")); + embed.setDescription(translate("music/skip:SUCCESS")); m.edit({ embeds: [embed] }); } diff --git a/commands/Music/stop.js b/commands/Music/stop.js index 5d80f75188..80fb44594e 100644 --- a/commands/Music/stop.js +++ b/commands/Music/stop.js @@ -40,7 +40,7 @@ class Stop extends Command { const members = voice.members.filter((m) => !m.user.bot); const embed = new Discord.MessageEmbed() - .setAuthor(message.translate("music/stop:DESCRIPTION")) + .setAuthor(translate("music/stop:DESCRIPTION")) .setFooter(data.config.embed.footer) .setColor(data.config.embed.color); @@ -52,7 +52,7 @@ class Stop extends Command { const mustVote = Math.floor(members.size/2+1); - embed.setDescription(message.translate("music/stop:VOTE_CONTENT", { + embed.setDescription(translate("music/stop:VOTE_CONTENT", { voteCount: 0, requiredCount: mustVote })); @@ -74,11 +74,11 @@ class Stop extends Command { const haveVoted = reaction.count-1; if(haveVoted >= mustVote){ this.client.player.stop(message); - embed.setDescription(message.translate("music/stop:SUCCESS")); + embed.setDescription(translate("music/stop:SUCCESS")); m.edit({ embeds: [embed] }); collector.stop(true); } else { - embed.setDescription(message.translate("music/stop:VOTE_CONTENT", { + embed.setDescription(translate("music/stop:VOTE_CONTENT", { voteCount: haveVoted, requiredCount: mustVote })); @@ -97,7 +97,7 @@ class Stop extends Command { } else { this.client.player.stop(message); - embed.setDescription(message.translate("music/stop:SUCCESS")); + embed.setDescription(translate("music/stop:SUCCESS")); m.edit({ embeds: [embed] }); } diff --git a/commands/Owner/servers-list.js b/commands/Owner/servers-list.js index b9f582a697..18978fd414 100644 --- a/commands/Owner/servers-list.js +++ b/commands/Owner/servers-list.js @@ -27,17 +27,17 @@ class ServersList extends Command { let page = 1; let description = - `${message.translate("common:SERVERS")}: ${this.client.guilds.cache.size}\n\n`+ + `${translate("common:SERVERS")}: ${this.client.guilds.cache.size}\n\n`+ this.client.guilds.cache.sort((a,b) => b.memberCount-a.memberCount).map((r) => r) - .map((r, i) => `**${i + 1}** - ${r.name} | ${r.memberCount} ${message.translate("common:MEMBERS").toLowerCase()}`) + .map((r, i) => `**${i + 1}** - ${r.name} | ${r.memberCount} ${translate("common:MEMBERS").toLowerCase()}`) .slice(0, 10) .join("\n"); const embed = new Discord.MessageEmbed() - .setAuthor(message.author.tag, message.author.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) + .setAuthor(interaction.user.tag, interaction.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .setColor(data.config.embed.color) .setFooter(this.client.user.username) - .setTitle(`${message.translate("common:PAGE")}: ${page}/${Math.ceil(this.client.guilds.cache.size/10)}`) + .setTitle(`${translate("common:PAGE")}: ${page}/${Math.ceil(this.client.guilds.cache.size/10)}`) .setDescription(description); const msg = await message.channel.send({ embeds: [embed] }); @@ -46,7 +46,7 @@ class ServersList extends Command { await msg.react("➡"); await msg.react("❌"); - const collector = msg.createReactionCollector((reaction, user) => user.id === message.author.id); + const collector = msg.createReactionCollector((reaction, user) => user.id === interaction.user.id); collector.on("collect", async(reaction) => { @@ -65,14 +65,14 @@ class ServersList extends Command { return msg.delete(); } - description = `${message.translate("common:SERVERS")}: ${this.client.guilds.cache.size}\n\n`+ + description = `${translate("common:SERVERS")}: ${this.client.guilds.cache.size}\n\n`+ this.client.guilds.cache.sort((a,b) => b.memberCount-a.memberCount).map((r) => r) - .map((r, i) => `**${i + 1}** - ${r.name} | ${r.memberCount} ${message.translate("common:MEMBERS")}`) + .map((r, i) => `**${i + 1}** - ${r.name} | ${r.memberCount} ${translate("common:MEMBERS")}`) .slice(i0, i1) .join("\n"); // Update the embed with new informations - embed.setTitle(`${message.translate("common:PAGE")}: ${page}/${Math.round(this.client.guilds.cache.size/10)}`) + embed.setTitle(`${translate("common:PAGE")}: ${page}/${Math.round(this.client.guilds.cache.size/10)}`) .setDescription(description); // Edit the message @@ -95,14 +95,14 @@ class ServersList extends Command { return msg.delete(); } - description = `${message.translate("common:SERVERS")}: ${this.client.guilds.cache.size}\n\n`+ + description = `${translate("common:SERVERS")}: ${this.client.guilds.cache.size}\n\n`+ this.client.guilds.cache.sort((a,b) => b.memberCount-a.memberCount).map((r) => r) - .map((r, i) => `**${i + 1}** - ${r.name} | ${r.memberCount} ${message.translate("common:MEMBERS").toLowerCase()}`) + .map((r, i) => `**${i + 1}** - ${r.name} | ${r.memberCount} ${translate("common:MEMBERS").toLowerCase()}`) .slice(i0, i1) .join("\n"); // Update the embed with new informations - embed.setTitle(`${message.translate("common:PAGE")}: ${page}/${Math.round(this.client.guilds.cache.size/10)}`) + embed.setTitle(`${translate("common:PAGE")}: ${page}/${Math.round(this.client.guilds.cache.size/10)}`) .setDescription(description); // Edit the message @@ -115,7 +115,7 @@ class ServersList extends Command { } // Remove the reaction when the user react to the message - await reaction.users.remove(message.author.id); + await reaction.users.remove(interaction.user.id); }); } From 7d2b61e8e353bc0717b2b5c27127b2f41fb417ce Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:03:52 +0200 Subject: [PATCH 11/29] :fire: Remove useless usage language key --- languages/en-US/administration/addcommand.json | 1 - languages/en-US/administration/addemoji.json | 1 - languages/en-US/administration/automod.json | 1 - languages/en-US/administration/autorole.json | 1 - languages/en-US/administration/backup.json | 1 - languages/en-US/administration/configuration.json | 1 - languages/en-US/administration/delcommand.json | 1 - languages/en-US/administration/deletemod.json | 1 - languages/en-US/administration/goodbye.json | 1 - languages/en-US/administration/ignore.json | 1 - languages/en-US/administration/setfortniteshop.json | 1 - languages/en-US/administration/setlang.json | 1 - languages/en-US/administration/setmodlogs.json | 1 - languages/en-US/administration/setprefix.json | 1 - languages/en-US/administration/setreports.json | 1 - languages/en-US/administration/setsuggests.json | 1 - languages/en-US/administration/slowmode.json | 1 - languages/en-US/administration/welcome.json | 1 - languages/en-US/economy/achievements.json | 1 - languages/en-US/economy/divorce.json | 1 - languages/en-US/economy/leaderboard.json | 1 - languages/en-US/economy/marry.json | 1 - languages/en-US/economy/money.json | 1 - languages/en-US/economy/pay.json | 1 - languages/en-US/economy/profile.json | 1 - languages/en-US/economy/rep.json | 1 - languages/en-US/economy/rob.json | 1 - languages/en-US/economy/setbio.json | 1 - languages/en-US/economy/slots.json | 1 - languages/en-US/economy/withdraw.json | 1 - languages/en-US/economy/work.json | 1 - languages/en-US/fun/8ball.json | 1 - languages/en-US/fun/ascii.json | 1 - languages/en-US/fun/choice.json | 1 - languages/en-US/fun/findwords.json | 1 - languages/en-US/fun/flip.json | 1 - languages/en-US/fun/fml.json | 1 - languages/en-US/fun/joke.json | 1 - languages/en-US/fun/lmg.json | 1 - languages/en-US/fun/lovecalc.json | 1 - languages/en-US/fun/number.json | 1 - languages/en-US/general/calc.json | 1 - languages/en-US/general/fortnite.json | 1 - languages/en-US/general/fortniteshop.json | 1 - languages/en-US/general/github.json | 1 - languages/en-US/general/hastebin.json | 1 - languages/en-US/general/help.json | 1 - languages/en-US/general/invitations.json | 1 - languages/en-US/general/invite.json | 1 - languages/en-US/general/minecraft.json | 1 - languages/en-US/general/permissions.json | 1 - languages/en-US/general/ping.json | 1 - languages/en-US/general/quote.json | 1 - languages/en-US/general/remindme.json | 1 - languages/en-US/general/report.json | 1 - languages/en-US/general/serverinfo.json | 1 - languages/en-US/general/setafk.json | 1 - languages/en-US/general/shorturl.json | 1 - languages/en-US/general/someone.json | 1 - languages/en-US/general/staff.json | 1 - languages/en-US/general/stats.json | 1 - languages/en-US/general/suggest.json | 1 - languages/en-US/general/translate.json | 1 - languages/en-US/general/userinfo.json | 1 - languages/en-US/images/approved.json | 1 - languages/en-US/images/avatar.json | 1 - languages/en-US/images/batslap.json | 1 - languages/en-US/images/beautiful.json | 1 - languages/en-US/images/bed.json | 1 - languages/en-US/images/brazzers.json | 1 - languages/en-US/images/burn.json | 1 - languages/en-US/images/captcha.json | 1 - languages/en-US/images/challenger.json | 1 - languages/en-US/images/clyde.json | 1 - languages/en-US/images/dictator.json | 1 - languages/en-US/images/facepalm.json | 1 - languages/en-US/images/fire.json | 1 - languages/en-US/images/jail.json | 1 - languages/en-US/images/love.json | 1 - languages/en-US/images/mission.json | 1 - languages/en-US/images/phcomment.json | 1 - languages/en-US/images/qrcode.json | 1 - languages/en-US/images/rip.json | 1 - languages/en-US/images/scary.json | 1 - languages/en-US/images/tobecontinued.json | 1 - languages/en-US/images/trash.json | 1 - languages/en-US/images/triggered.json | 1 - languages/en-US/images/tweet.json | 1 - languages/en-US/images/wanted.json | 1 - languages/en-US/images/wasted.json | 1 - languages/en-US/images/youtube-comment.json | 1 - languages/en-US/moderation/announcement.json | 1 - languages/en-US/moderation/ban.json | 1 - languages/en-US/moderation/checkinvites.json | 1 - languages/en-US/moderation/clear-sanctions.json | 1 - languages/en-US/moderation/clear.json | 1 - languages/en-US/moderation/giveaway.json | 1 - languages/en-US/moderation/kick.json | 1 - languages/en-US/moderation/mute.json | 1 - languages/en-US/moderation/poll.json | 1 - languages/en-US/moderation/sanctions.json | 1 - languages/en-US/moderation/setwarns.json | 1 - languages/en-US/moderation/unban.json | 1 - languages/en-US/moderation/unmute.json | 1 - languages/en-US/moderation/warn.json | 1 - languages/en-US/music/autoplay.json | 1 - languages/en-US/music/back.json | 1 - languages/en-US/music/filter.json | 1 - languages/en-US/music/filters.json | 1 - languages/en-US/music/lyrics.json | 1 - languages/en-US/music/np.json | 1 - languages/en-US/music/pause.json | 1 - languages/en-US/music/play.json | 1 - languages/en-US/music/queue.json | 1 - languages/en-US/music/resume.json | 1 - languages/en-US/music/seek.json | 1 - languages/en-US/music/skip.json | 1 - languages/en-US/music/stop.json | 1 - languages/en-US/owner/eval.json | 1 - languages/en-US/owner/reload.json | 1 - languages/en-US/owner/servers-list.json | 1 - 121 files changed, 121 deletions(-) diff --git a/languages/en-US/administration/addcommand.json b/languages/en-US/administration/addcommand.json index 2754d00db0..041e599141 100644 --- a/languages/en-US/administration/addcommand.json +++ b/languages/en-US/administration/addcommand.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Add a custom command!", - "USAGE": "{{prefix}}addcommand [name] [answer]", "EXAMPLES": "{{prefix}}addcommand hello Hello {user}! How are you?", "MISSING_NAME": "Please provide a command name!", "MISSING_ANSWER": "Please provide a command answer!", diff --git a/languages/en-US/administration/addemoji.json b/languages/en-US/administration/addemoji.json index 38ac80861e..3dc5815a6c 100644 --- a/languages/en-US/administration/addemoji.json +++ b/languages/en-US/administration/addemoji.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Add an emoji to the server!", - "USAGE": "{{prefix}}addemoji [image-url] [name]", "EXAMPLES": "{{prefix}}addemoji https://via.placeholder.com/150 test-emoji", "MISSING_URL": "Please provide an image URL!", "MISSING_NAME": "Please provide an emoji name!", diff --git a/languages/en-US/administration/automod.json b/languages/en-US/administration/automod.json index 656a1b833a..720294969e 100644 --- a/languages/en-US/administration/automod.json +++ b/languages/en-US/administration/automod.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Toggle Discord invites automatic deletion", - "USAGE": "{{prefix}}automod [on/off] (#channel)", "EXAMPLES": "{{prefix}}automod on\n{{prefix}}automod off #general\n{{prefix}}automod off", "MISSING_STATUS": "Please enter a valid value between `on` and `off`", "ENABLED": "**Discord invites will be automatically deleted!**\n\n:arrow_right_hook: *Send `{{prefix}}automod off #channel` to ignore a channel!*", diff --git a/languages/en-US/administration/autorole.json b/languages/en-US/administration/autorole.json index d05a68858b..a99b10d71f 100644 --- a/languages/en-US/administration/autorole.json +++ b/languages/en-US/administration/autorole.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Toggle autorole on the server!", - "USAGE": "{{prefix}}autorole [on/off] (role)", "EXAMPLES": "{{prefix}}autorole on @Members\n{{prefix}}autorole off", "MISSING_STATUS": "Please specify a valid value between `on` and `off`", "MISSING_ROLE": "Please specify a valid role!", diff --git a/languages/en-US/administration/backup.json b/languages/en-US/administration/backup.json index a0d9b4524c..c2a385cc1c 100644 --- a/languages/en-US/administration/backup.json +++ b/languages/en-US/administration/backup.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Manage your server backups in an efficient way!", - "USAGE": "{{prefix}}backup [create/load/infos]", "EXAMPLES": "{{prefix}}backup create\n{{prefix}}backup load 558328638911545423\n{{prefix}}backup infos 558328638911545423", "MISSING_STATUS": "Select an action between: `create`, `load` and `info`!", "MISSING_BACKUP_ID": "Please enter a backup ID!", diff --git a/languages/en-US/administration/configuration.json b/languages/en-US/administration/configuration.json index 6082c40af3..b68b077cdc 100644 --- a/languages/en-US/administration/configuration.json +++ b/languages/en-US/administration/configuration.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows the server configuration!", - "USAGE": "{{prefix}}configuration", "EXAMPLES": "{{prefix}}configuration", "PREFIX_TITLE": "Server prefix", "IGNORED_CHANNELS_TITLE": "Ignored channel(s)", diff --git a/languages/en-US/administration/delcommand.json b/languages/en-US/administration/delcommand.json index d0864490e3..c1fa254343 100644 --- a/languages/en-US/administration/delcommand.json +++ b/languages/en-US/administration/delcommand.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Remove a custom command!", - "USAGE": "{{prefix}}delcommand [name-of-the-command]", "EXAMPLES": "{{prefix}}delcommand hey", "MISSING_NAME": "Please enter a valid custom command name!", "UNKNOWN_COMMAND": "The command {{commandName}} doesn't exist!", diff --git a/languages/en-US/administration/deletemod.json b/languages/en-US/administration/deletemod.json index acebb7cf3f..02c4aa4e27 100644 --- a/languages/en-US/administration/deletemod.json +++ b/languages/en-US/administration/deletemod.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Toggle moderation commands auto deletion!", - "USAGE": "{{prefix}}deletemod [on/off]", "EXAMPLES": "{{prefix}}deletemod on", "MISSING_STATUS": "You must specify `on` or `off`", "ENABLED": "Automatic moderation commands deletion!", diff --git a/languages/en-US/administration/goodbye.json b/languages/en-US/administration/goodbye.json index 52449c6438..027be6c9d0 100644 --- a/languages/en-US/administration/goodbye.json +++ b/languages/en-US/administration/goodbye.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Toggle goodbye messages!", - "USAGE": "{{prefix}}goodbye", "EXAMPLES": "{{prefix}}goodbye", "DEFAULT_MESSAGE": "Goodbye {user}! We're now {membercount} without you... :'(", "TEST_SUCCESS": "Test executed!", diff --git a/languages/en-US/administration/ignore.json b/languages/en-US/administration/ignore.json index 62964d6d20..0cfe71eb30 100644 --- a/languages/en-US/administration/ignore.json +++ b/languages/en-US/administration/ignore.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Toggle commands in a channel", - "USAGE": "{{prefix}}ignore [channel]", "EXAMPLES": "{{prefix}}ignore #channel", "ALLOWED": "Commands are now allowed in {{channel}}!", "IGNORED": "Commands are now forbidden in {{channel}}!" diff --git a/languages/en-US/administration/setfortniteshop.json b/languages/en-US/administration/setfortniteshop.json index 864f11beaf..4bf8c067ea 100644 --- a/languages/en-US/administration/setfortniteshop.json +++ b/languages/en-US/administration/setfortniteshop.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Set the daily Fortnite shop channel!", - "USAGE": "{{prefix}}setfortniteshop (#channel)", "EXAMPLES": "{{prefix}}setfortniteshop #shop\n{{prefix}}setfortniteshop", "DISABLED": "Daily Fortnite shop disabled!", "ENABLED": "Daily Fortnite shop enabled in {{channel}}!" diff --git a/languages/en-US/administration/setlang.json b/languages/en-US/administration/setlang.json index 3955c333cc..8d689886bb 100644 --- a/languages/en-US/administration/setlang.json +++ b/languages/en-US/administration/setlang.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Change the server language!", - "USAGE": "{{prefix}}setlang [language]", "EXAMPLES": "{{prefix}}setlang french\n{{prefix}}setlang english", "MISSING_LANG": "Please enter a valid language between theses: {{list}}", "SUCCESS": ":flag_gb: The language of this server is now english!" diff --git a/languages/en-US/administration/setmodlogs.json b/languages/en-US/administration/setmodlogs.json index 3b38eed7d2..82597ce898 100644 --- a/languages/en-US/administration/setmodlogs.json +++ b/languages/en-US/administration/setmodlogs.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Set the moderation logs channel!", - "USAGE": "{{prefix}}setmodlogs (#channel)", "EXAMPLES": "{{prefix}}setmodlogs #modlogs\n{{prefix}}setmodlogs", "SUCCESS_ENABLED": "Moderation logs will be sent in **{{channel}}**!", "SUCCESS_DISABLED": "Moderation logs channel deleted!" diff --git a/languages/en-US/administration/setprefix.json b/languages/en-US/administration/setprefix.json index b7bb3f67c7..6f039f48aa 100644 --- a/languages/en-US/administration/setprefix.json +++ b/languages/en-US/administration/setprefix.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Set the server prefix!", - "USAGE": "{{prefix}}setprefix [prefix]", "EXAMPLES": "{{prefix}}setprefix +", "MISSING_PREFIX": "Please enter a valid prefix!", "TOO_LONG": "The prefix shouldn't exceed 5 characters!", diff --git a/languages/en-US/administration/setreports.json b/languages/en-US/administration/setreports.json index c9bf2ba257..fa1e412f6b 100644 --- a/languages/en-US/administration/setreports.json +++ b/languages/en-US/administration/setreports.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Set the reports channel!", - "USAGE": "{{prefix}}setreports (#channel)", "EXAMPLES": "{{prefix}}setreports #reports\n{{prefix}}setreports", "SUCCESS_ENABLED": "Reports will be sent in **{{channel}}**!", "SUCCESS_DISABLED": "Reports channel deleted!" diff --git a/languages/en-US/administration/setsuggests.json b/languages/en-US/administration/setsuggests.json index a36d28a45a..eca0049eab 100644 --- a/languages/en-US/administration/setsuggests.json +++ b/languages/en-US/administration/setsuggests.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Set the suggestions channel!", - "USAGE": "{{prefix}}setsuggests (#channel)", "EXAMPLES": "{{prefix}}setsuggests #suggestions\n{{prefix}}setsuggests", "SUCCESS_ENABLED": "Suggestions will be sent in **{{channel}}**!", "SUCCESS_DISABLED": "Suggestions channel deleted!" diff --git a/languages/en-US/administration/slowmode.json b/languages/en-US/administration/slowmode.json index e9a64d120d..af90d68359 100644 --- a/languages/en-US/administration/slowmode.json +++ b/languages/en-US/administration/slowmode.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Set a channel cooldown", - "USAGE": "{{prefix}}slowmode [#channel] (time)", "EXAMPLES": "{{prefix}}slowmode #general 10m\n{{prefix}}slowmode #general", "DISABLED": "**Slow-mode has just been disabled in {{channel}}!**\n\n:arrow_right_hook: *Send `{{prefix}}slowmode [#channel] (time)` to enable it again!*", "ENABLED": "**A slow-mode of `{{time}}` has just been enabled in `{{channel}}`!**\n\n:arrow_right_hook: *Send `{{prefix}}slowmode {{channel}}` to disable it!*", diff --git a/languages/en-US/administration/welcome.json b/languages/en-US/administration/welcome.json index c00936d0d2..72fa80db9c 100644 --- a/languages/en-US/administration/welcome.json +++ b/languages/en-US/administration/welcome.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Toggle welcome messages!", - "USAGE": "{{prefix}}welcome", "EXAMPLES": "{{prefix}}welcome", "MISSING_STATUS": "You must specify an action between `edit` and `off`", "DEFAULT_MESSAGE": "Welcome {user} in {server}, we're now {membercount}! Your account was created {createdat}.", diff --git a/languages/en-US/economy/achievements.json b/languages/en-US/economy/achievements.json index 9a3edfd853..f8fe3dbeca 100644 --- a/languages/en-US/economy/achievements.json +++ b/languages/en-US/economy/achievements.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows your achievements list!", - "USAGE": "{{prefix}}achievements", "EXAMPLES": "{{prefix}}achievements", "SEND_CMD": "Send your first command!", "CLAIM_SALARY": "Claim your salary 10 times!", diff --git a/languages/en-US/economy/divorce.json b/languages/en-US/economy/divorce.json index 1ae273cd92..b216b9bd2d 100644 --- a/languages/en-US/economy/divorce.json +++ b/languages/en-US/economy/divorce.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Divorce the person you are currently married to!", - "USAGE": "{{prefix}}divorce", "EXAMPLES": "{{prefix}}divorce", "NOT_MARRIED": "You are not currently married!", "DIVORCED": "You just divorced with **{{username}}**!" diff --git a/languages/en-US/economy/leaderboard.json b/languages/en-US/economy/leaderboard.json index 248fc64e5c..b58210c4d5 100644 --- a/languages/en-US/economy/leaderboard.json +++ b/languages/en-US/economy/leaderboard.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows users who have the most credits, levels or reputation points!", - "USAGE": "{{prefix}}leaderboard [rep/levels/credits]", "EXAMPLES": "{{prefix}}leaderboard credits\n{{prefix}}leaderboard levels", "MISSING_TYPE": "Please specify the leaderboard type between `credits`, `level` and `rep`", "MOBILE": ":confused: We've detected that you are using a phone.... The leaderboard may not display well on small screens. Try to switch to landscape or go on the dashboard!" diff --git a/languages/en-US/economy/marry.json b/languages/en-US/economy/marry.json index 5d903bb98d..07e41c5538 100644 --- a/languages/en-US/economy/marry.json +++ b/languages/en-US/economy/marry.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Marry someone you love!", - "USAGE": "{{prefix}}marry [@member]", "EXAMPLES": "{{prefix}}marry @Androz#2091", "INVALID_MEMBER": "You must mention a valid member!", "ALREADY_MARRIED": "You are already married! First use `{{prefix}}divorce` to divorce.", diff --git a/languages/en-US/economy/money.json b/languages/en-US/economy/money.json index f4e0d696d6..e5dbc7e49e 100644 --- a/languages/en-US/economy/money.json +++ b/languages/en-US/economy/money.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows your credits", - "USAGE": "{{prefix}}money (@member)", "EXAMPLES": "{{prefix}}money\n{{prefix}}money @user#0000", "TITLE": "{{username}}'s money" } \ No newline at end of file diff --git a/languages/en-US/economy/pay.json b/languages/en-US/economy/pay.json index 04dcc9e3c6..29aa10cbdf 100644 --- a/languages/en-US/economy/pay.json +++ b/languages/en-US/economy/pay.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Send money to someone!", - "USAGE": "{{prefix}}pay [@member] [amount]", "EXAMPLES": "{{prefix}}pay Androz#2091 100", "INVALID_MEMBER": "You must mention a valid member!", "BOT_USER": "Bots are already rich 💰!", diff --git a/languages/en-US/economy/profile.json b/languages/en-US/economy/profile.json index 7fd9291824..196f413c68 100644 --- a/languages/en-US/economy/profile.json +++ b/languages/en-US/economy/profile.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows the mentioned user or author profile", - "USAGE": "{{prefix}}profile [user]", "EXAMPLES": "{{prefix}}profile Androz#2091", "TITLE": "{{username}}'s profile", "NO_BIO": "", diff --git a/languages/en-US/economy/rep.json b/languages/en-US/economy/rep.json index 4dab04347f..03ee5f8e00 100644 --- a/languages/en-US/economy/rep.json +++ b/languages/en-US/economy/rep.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Give a reputation point to someone!", - "USAGE": "{{prefix}}rep [user]", "EXAMPLES": "{{prefix}}rep @Androz#2091", "COOLDOWN": "You have to wait {{time}} before being able to `rep` someone!", "INVALID_USER": "You must mention a valid user!", diff --git a/languages/en-US/economy/rob.json b/languages/en-US/economy/rob.json index 6b8324624c..e974753725 100644 --- a/languages/en-US/economy/rob.json +++ b/languages/en-US/economy/rob.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Try to rob a member!", - "USAGE": "{{prefix}}rob [@member] [amount]", "EXAMPLES": "{{prefix}}rob @Androz#2091 100", "YOURSELF": "You can't rob yourself!", "MISSING_MEMBER": "You must specify a valid member to rob!", diff --git a/languages/en-US/economy/setbio.json b/languages/en-US/economy/setbio.json index 1e46ad9594..9e0799709a 100644 --- a/languages/en-US/economy/setbio.json +++ b/languages/en-US/economy/setbio.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Change your biography!", - "USAGE": "{{prefix}}setbio [biography]", "EXAMPLES": "{{prefix}}setbio My name is Jake, I'm 19 and I love programming!", "MISSING": "You must specify a biography!", "MAX_CHARACT": "Your biography must not exceed 500 characters!", diff --git a/languages/en-US/economy/slots.json b/languages/en-US/economy/slots.json index 1eb8973c6b..b9a40cc7c3 100644 --- a/languages/en-US/economy/slots.json +++ b/languages/en-US/economy/slots.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "The Atlanta casino", - "USAGE": "{{prefix}}slots [amount]", "EXAMPLES": "{{prefix}}slots\n{{prefix}}slots 10", "DEFEAT": "**{{username}}** used {{money}} credit(s) and lost everything.", "VICTORY": "**{{username}}** used {{money}} credit(s) and won {{won}} credit(s)!", diff --git a/languages/en-US/economy/withdraw.json b/languages/en-US/economy/withdraw.json index cbc9896a7c..074ad9ac6a 100644 --- a/languages/en-US/economy/withdraw.json +++ b/languages/en-US/economy/withdraw.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Withdraw money!", - "USAGE": "{{prefix}}withdraw [amount]", "EXAMPLES": "{{prefix}}withdraw 400", "MISSING_AMOUNT": "Please specify an amount to be withdrawn!", "NO_CREDIT": "You don't have any credit in your bank!", diff --git a/languages/en-US/economy/work.json b/languages/en-US/economy/work.json index 19aeb094ed..584a67435e 100644 --- a/languages/en-US/economy/work.json +++ b/languages/en-US/economy/work.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Claim your salary!", - "USAGE": "{{prefix}}work", "EXAMPLES": "{{prefix}}work", "COOLDOWN": "You have to wait {{time}} before working again!", "AWARD": "Complete the word AWARD to win 200 bonus credits!", diff --git a/languages/en-US/fun/8ball.json b/languages/en-US/fun/8ball.json index 32e7281a54..61d4a7e7ab 100644 --- a/languages/en-US/fun/8ball.json +++ b/languages/en-US/fun/8ball.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "I'm telling you the truth!", - "USAGE": "{{prefix}}8ball [question]", "EXAMPLES": "{{prefix}}8ball Is Atlanta the best Discord bot?", "ERR_QUESTION": "You must enter a question!", "RESPONSE_1": "I'm sure of it.", diff --git a/languages/en-US/fun/ascii.json b/languages/en-US/fun/ascii.json index 32e31c5c76..04c73a3213 100644 --- a/languages/en-US/fun/ascii.json +++ b/languages/en-US/fun/ascii.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Turn your text into ascii characters!", - "USAGE": "{{prefix}}ascii [text]", "EXAMPLES": "{{prefix}}ascii Hello world!", "TEXT_MISSING": "Please enter a valid text (less than 20 characters)!" } \ No newline at end of file diff --git a/languages/en-US/fun/choice.json b/languages/en-US/fun/choice.json index 71eee58b63..6b2ff4c411 100644 --- a/languages/en-US/fun/choice.json +++ b/languages/en-US/fun/choice.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Helps you choose between the given choices!", - "USAGE": "{{prefix}}choice [choice1/choice2/etc...]", "EXAMPLES": "{{prefix}}choice Fire/Wind/Water", "MISSING": "You must enter more than two choices!\n(or use the `flip` command instead)", "EMPTY": "One of your choices seems to be empty.... Please try again!", diff --git a/languages/en-US/fun/findwords.json b/languages/en-US/fun/findwords.json index 038a59151c..09b176fc68 100644 --- a/languages/en-US/fun/findwords.json +++ b/languages/en-US/fun/findwords.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Start a Findwords party, a game where you have to find words!", - "USAGE": "{{prefix}}findwords", "EXAMPLES": "{{prefix}}findwords", "INVALID_WORD": "{{member}} | Your word is not valid!", "GAME_STARTING": ":timer: | The game starts in 10 seconds!", diff --git a/languages/en-US/fun/flip.json b/languages/en-US/fun/flip.json index 6862e6f7b4..19d06249b5 100644 --- a/languages/en-US/fun/flip.json +++ b/languages/en-US/fun/flip.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "I roll the dice for you!", - "USAGE": "{{prefix}}flip", "EXAMPLES": "{{prefix}}flip", "HEADS": "🎲 | Heads!", "TAILS": "🎲 | Tails!" diff --git a/languages/en-US/fun/fml.json b/languages/en-US/fun/fml.json index 8db6c0d139..18fa78c431 100644 --- a/languages/en-US/fun/fml.json +++ b/languages/en-US/fun/fml.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Gets a random FML", - "USAGE": "{{prefix}}fml", "EXAMPLES": "{{prefix}}fml", "FOOTER": "blague.xyz | By Skiz#0001" } \ No newline at end of file diff --git a/languages/en-US/fun/joke.json b/languages/en-US/fun/joke.json index 12174323dc..fb2e47379c 100644 --- a/languages/en-US/fun/joke.json +++ b/languages/en-US/fun/joke.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Gets a wonderful joke specially made for you!", - "USAGE": "{{prefix}}joke", "EXAMPLES": "{{prefix}}joke", "FOOTER": "blague.xyz | By Skiz#0001" } \ No newline at end of file diff --git a/languages/en-US/fun/lmg.json b/languages/en-US/fun/lmg.json index ae470bc4f8..9aa51fb133 100644 --- a/languages/en-US/fun/lmg.json +++ b/languages/en-US/fun/lmg.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Generate a LMGTFY link with your search", - "USAGE": "{{prefix}}lmg [search]", "EXAMPLES": "{{prefix}}lmg How to create a Discord bot?", "MISSING": "You must specify a search!" } \ No newline at end of file diff --git a/languages/en-US/fun/lovecalc.json b/languages/en-US/fun/lovecalc.json index fffbc79b57..c16ad2ee39 100644 --- a/languages/en-US/fun/lovecalc.json +++ b/languages/en-US/fun/lovecalc.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "How much love is there between two people?\n*This is a fun command, not to be taken seriously*", - "USAGE": "{{prefix}}lovecalc [@member1] (@member2)", "EXAMPLES": "{{prefix}}lovecalc @Androz#2091\n{{prefix}}lovecalc @Androz#2091 @Atlanta#6770", "MISSING": "You must mention two members!", "CONTENT": "There's **{{percent}}%** of love between **{{firstUsername}}** and **{{secondUsername}}**!\n**Congrats!**" diff --git a/languages/en-US/fun/number.json b/languages/en-US/fun/number.json index b16c7e56a0..793cf5f2e9 100644 --- a/languages/en-US/fun/number.json +++ b/languages/en-US/fun/number.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Find the right number!", - "USAGE": "{{prefix}}number", "EXAMPLES": "{{prefix}}number", "GAME_START": "Number chosen, you can start!", "BIG": "{{user}} | My number is **bigger** than `{{number}}`!", diff --git a/languages/en-US/general/calc.json b/languages/en-US/general/calc.json index 5c1e464c26..f0b8ace254 100644 --- a/languages/en-US/general/calc.json +++ b/languages/en-US/general/calc.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Calculator able to solve complex operations and to convert units!", - "USAGE": "{{prefix}}calc [calculation]", "EXAMPLES": "{{prefix}}10*5+sin(3)\n{{prefix}}calc 10cm to m", "MISSING_CALC": "Please enter a calculation!", "INVALID_CALC": "Please enter a **valid** calculation!", diff --git a/languages/en-US/general/fortnite.json b/languages/en-US/general/fortnite.json index 4eafda6043..759bcfd0c7 100644 --- a/languages/en-US/general/fortnite.json +++ b/languages/en-US/general/fortnite.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows a player's Fortnite stats!", - "USAGE": "{{prefix}}fortnite [psn/xbl/pc] [pseudo]", "EXAMPLES": "{{prefix}}fortnite pc Ninja", "MISSING_PLATFORM": "Please specify a platform between `psn`, `pc` or `xbl`!", "MISSING_USERNAME": "Please enter a valid epic games username!", diff --git a/languages/en-US/general/fortniteshop.json b/languages/en-US/general/fortniteshop.json index 719983be86..7921c27cd0 100644 --- a/languages/en-US/general/fortniteshop.json +++ b/languages/en-US/general/fortniteshop.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows the daily fortnite items shop!", - "USAGE": "{{prefix}}fortniteshop", "EXAMPLES": "{{prefix}}fortniteshop", "HEADER": "FORTNITE ITEMS SHOP", "DAILY": "DAILY", diff --git a/languages/en-US/general/github.json b/languages/en-US/general/github.json index 440312dbb9..95eebe91ed 100644 --- a/languages/en-US/general/github.json +++ b/languages/en-US/general/github.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows Atlanta's Github repository information!", - "USAGE": "{{prefix}}github", "EXAMPLES": "{{prefix}}github", "CLICK_HERE": "Click here to access the github of Atlanta", "LANGUAGE": "Programming language", diff --git a/languages/en-US/general/hastebin.json b/languages/en-US/general/hastebin.json index d8097a7cd8..df50d543f8 100644 --- a/languages/en-US/general/hastebin.json +++ b/languages/en-US/general/hastebin.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Upload your text on hastebin!", - "USAGE": "{{prefix}}hastebin [text]", "EXAMPLES": "{{prefix}}hastebin Hello World!", "MISSING_TEXT": "Please enter a valid text!", "SUCCESS": "Upload complete!" diff --git a/languages/en-US/general/help.json b/languages/en-US/general/help.json index b81125921a..7e31a68c76 100644 --- a/languages/en-US/general/help.json +++ b/languages/en-US/general/help.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Show commands list or specific command help.", - "USAGE": "{{prefix}}help (command)", "EXAMPLES": "{{prefix}}help\n{{prefix}}help ping", "CUSTOM": "A custom command doesn't have help page.", "NOT_FOUND": "`{{search}}` is not a valid command", diff --git a/languages/en-US/general/invitations.json b/languages/en-US/general/invitations.json index 47e18aa5ba..79f1a5ed07 100644 --- a/languages/en-US/general/invitations.json +++ b/languages/en-US/general/invitations.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows the number of people you have invited to the server!", - "USAGE": "{{prefix}}invitations (@member)", "EXAMPLES": "{{prefix}}invitations\n{{prefix}}invitations @Androz#2091", "NOBODY_AUTHOR": "You didn't invite anyone to the server!", "NOBODY_MEMBER": "{{member}} didn't invite anyone to the server!", diff --git a/languages/en-US/general/invite.json b/languages/en-US/general/invite.json index 253001c692..0938b586a5 100644 --- a/languages/en-US/general/invite.json +++ b/languages/en-US/general/invite.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows Atlanta links!", - "USAGE": "{{prefix}}invite (copy)", "EXAMPLES": "{{prefix}}invite\n{{prefix}}invite copy", "LINKS": "Atlanta links", "TIP": "Send `{{prefix}}invite copy` to be able to copy the invite link!", diff --git a/languages/en-US/general/minecraft.json b/languages/en-US/general/minecraft.json index 37949229e6..1d0fd0e8e6 100644 --- a/languages/en-US/general/minecraft.json +++ b/languages/en-US/general/minecraft.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows information about a Minecraft server!", - "USAGE": "{{prefix}}minecraft [ip]", "EXAMPLES": "{{prefix}}minecraft mc.hypixel.net", "MISSING_IP": "Please enter a valid IP address!", "FAILED": "This server is offline or blocking access!", diff --git a/languages/en-US/general/permissions.json b/languages/en-US/general/permissions.json index 5b83333d59..e7f51d6178 100644 --- a/languages/en-US/general/permissions.json +++ b/languages/en-US/general/permissions.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Displays the member's permissions in the channel", - "USAGE": "{{prefix}}permissions (@member)", "EXAMPLES": "{{prefix}}permissions\n{{prefix}}permissions @Androz#2091", "TITLE": "{{user}}'s permissions in {{channel}}" } \ No newline at end of file diff --git a/languages/en-US/general/ping.json b/languages/en-US/general/ping.json index d99539b270..2ceb42891f 100644 --- a/languages/en-US/general/ping.json +++ b/languages/en-US/general/ping.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Show bot's ping", - "USAGE": "{{prefix}}ping", "EXAMPLES": "{{prefix}}ping", "CONTENT": "Pong! My ping is `{{ping}}` ms." } \ No newline at end of file diff --git a/languages/en-US/general/quote.json b/languages/en-US/general/quote.json index a0b828e504..7b5248a106 100644 --- a/languages/en-US/general/quote.json +++ b/languages/en-US/general/quote.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Quote a message in the channel!", - "USAGE": "{{prefix}}quote [messageID] [channel]", "EXAMPLES": "{{prefix}}quote 596018101921906698\n{{prefix}}quote 596018101921906698 573508780520898581\n{{prefix}}quote 596018101921906698 #blabla", "NO_MESSAGE_ID": "No message has this ID.", "NO_CHANNEL_ID": "No channel has this ID.", diff --git a/languages/en-US/general/remindme.json b/languages/en-US/general/remindme.json index c27a272300..75e2cf9952 100644 --- a/languages/en-US/general/remindme.json +++ b/languages/en-US/general/remindme.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Add a new personal reminder", - "USAGE": "{{prefix}}remindme [message]", "EXAMPLES": "{{prefix}}remindme 24h Work command\n{{prefix}}remindme 3m Take the pasta out of the pan!", "MISSING_MESSAGE": "You must enter a message!", "SAVED": "Reminder saved, you will receive a message at the end of the time!", diff --git a/languages/en-US/general/report.json b/languages/en-US/general/report.json index 10c7d119b5..df073d7722 100644 --- a/languages/en-US/general/report.json +++ b/languages/en-US/general/report.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Send your report to the channel defined for them!", - "USAGE": "{{prefix}}report [@user] [reason]", "EXAMPLES": "{{prefix}}report @Androz#2091 Breaking the rules", "MISSING_CHANNEL": "No report channel defined!", "MISSING_REASON": "Please enter a report reason!", diff --git a/languages/en-US/general/serverinfo.json b/languages/en-US/general/serverinfo.json index 76e0a06e9b..186151bb1a 100644 --- a/languages/en-US/general/serverinfo.json +++ b/languages/en-US/general/serverinfo.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows information about the server!", - "USAGE": "{{prefix}}serverinfo [ID/Name]", "EXAMPLES": "{{prefix}}serverinfo Atlanta\n{{prefix}}serverinfo", "AFK_CHANNEL": "AFK channel", "NO_AFK_CHANNEL": "No AFK channel", diff --git a/languages/en-US/general/setafk.json b/languages/en-US/general/setafk.json index 592f742db6..b31d7bae0b 100644 --- a/languages/en-US/general/setafk.json +++ b/languages/en-US/general/setafk.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Become AFK (members who mention you will receive a message)", - "USAGE": "{{prefix}}setafk [reason]", "EXAMPLES": "{{prefix}}setafk I'm eating =)", "MISSING_REASON": "Please specify the reason for your AFK status!", "SUCCESS": "You're now AFK (reason: {{reason}})", diff --git a/languages/en-US/general/shorturl.json b/languages/en-US/general/shorturl.json index bfc17ee507..0e0d0943d3 100644 --- a/languages/en-US/general/shorturl.json +++ b/languages/en-US/general/shorturl.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Make your links shorter!", - "USAGE": "{{prefix}}shorturl [url]", "EXAMPLES": "{{prefix}}shorturl https://google.fr", "MISSING_URL": "Please enter a valid URL!" } \ No newline at end of file diff --git a/languages/en-US/general/someone.json b/languages/en-US/general/someone.json index e7b1f8dac9..db37f67d55 100644 --- a/languages/en-US/general/someone.json +++ b/languages/en-US/general/someone.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Pick a random member on the server!", - "USAGE": "{{prefix}}someone", "EXAMPLES": "{{prefix}}someone" } \ No newline at end of file diff --git a/languages/en-US/general/staff.json b/languages/en-US/general/staff.json index 3371e60e12..513904c158 100644 --- a/languages/en-US/general/staff.json +++ b/languages/en-US/general/staff.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows the server staff members list!", - "USAGE": "{{prefix}}staff", "EXAMPLES": "{{prefix}}staff", "TITLE": "{{guild}} staff", "ADMINS": "Administrators", diff --git a/languages/en-US/general/stats.json b/languages/en-US/general/stats.json index 2fa8f3d4ad..99651005a8 100644 --- a/languages/en-US/general/stats.json +++ b/languages/en-US/general/stats.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows the bot stats!", - "USAGE": "{{prefix}}stats", "EXAMPLES": "{{prefix}}stats", "COUNTS_TITLE": "• __Statistics__", "COUNTS_CONTENT": "`Servers: {{servers}}`\n`Users: {{users}}`", diff --git a/languages/en-US/general/suggest.json b/languages/en-US/general/suggest.json index 60f7913ad6..0bfe52a2e4 100644 --- a/languages/en-US/general/suggest.json +++ b/languages/en-US/general/suggest.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Send your suggestion to the defined channel!", - "USAGE": "{{prefix}}suggest [message]", "EXAMPLES": "{{prefix}}suggest New channel #offtopic please", "MISSING_CHANNEL": "No suggestion channel defined!", "MISSING_CONTENT": "Please enter a suggestion!", diff --git a/languages/en-US/general/translate.json b/languages/en-US/general/translate.json index 905e3c9eff..9dad3f2729 100644 --- a/languages/en-US/general/translate.json +++ b/languages/en-US/general/translate.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Translate your text!", - "USAGE": "{{prefix}}translate [language] [message]", "EXAMPLES": "{{prefix}}translate fr How are you ?", "LIST_SENT": "The languages list has just been sent to you by private messages!", "MISSING_LANGUAGE": "Please enter a language! To display the languages list, type `{{prefix}}translate langs-list`!", diff --git a/languages/en-US/general/userinfo.json b/languages/en-US/general/userinfo.json index db45357f4a..0ed61c51a0 100644 --- a/languages/en-US/general/userinfo.json +++ b/languages/en-US/general/userinfo.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows user information!", - "USAGE": "{{prefix}}userinfo (@user/userID)", "EXAMPLES": "{{prefix}}userinfo\n{{prefix}}userinfo @Androz#2091\n{{prefix}}userinfo 422820341791064085", "INVALID_USER": "No user on Discord has the `{{search}}` ID!", "NO_GAME": "Not playing", diff --git a/languages/en-US/images/approved.json b/languages/en-US/images/approved.json index 1ecfea6a38..1a9a5d41da 100644 --- a/languages/en-US/images/approved.json +++ b/languages/en-US/images/approved.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"approved\" image", - "USAGE": "{{prefix}}approved (@member)", "EXAMPLES": "{{prefix}}approved\n{{prefix}}approved @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/avatar.json b/languages/en-US/images/avatar.json index 6fc21a6a46..10397dd4bb 100644 --- a/languages/en-US/images/avatar.json +++ b/languages/en-US/images/avatar.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Shows the avatar of the mentionned member", - "USAGE": "{{prefix}}avatar (@member)", "EXAMPLES": "{{prefix}}avatar\n{{prefix}}avatar @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/batslap.json b/languages/en-US/images/batslap.json index d0e5adbf79..63c0ec648f 100644 --- a/languages/en-US/images/batslap.json +++ b/languages/en-US/images/batslap.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"batslap\" image", - "USAGE": "{{prefix}}batslap (@member1) (@member2)", "EXAMPLES": "{{prefix}}batslap\n{{prefix}}batslap @Androz#2091 @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/beautiful.json b/languages/en-US/images/beautiful.json index cd20272b72..5569e0f185 100644 --- a/languages/en-US/images/beautiful.json +++ b/languages/en-US/images/beautiful.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"beautiful\" image", - "USAGE": "{{prefix}}beautiful (@member)", "EXAMPLES": "{{prefix}}beautiful\n{{prefix}}beautiful @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/bed.json b/languages/en-US/images/bed.json index 777c526ef9..e24d858d31 100644 --- a/languages/en-US/images/bed.json +++ b/languages/en-US/images/bed.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"love\" image using the Nekobot API", - "USAGE": "{{prefix}}love [@member1] (@member2)", "EXAMPLES": "{{prefix}}love @Androz#2091\n{{prefix}}love @Androz#2091 @Marty#0303" } \ No newline at end of file diff --git a/languages/en-US/images/brazzers.json b/languages/en-US/images/brazzers.json index 3f0393cc8a..f5f2ecf9de 100644 --- a/languages/en-US/images/brazzers.json +++ b/languages/en-US/images/brazzers.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"dictator\" image", - "USAGE": "{{prefix}}dictator (@member)", "EXAMPLES": "{{prefix}}dictator\n{{prefix}}dictator @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/burn.json b/languages/en-US/images/burn.json index 66dc89be8d..0af2b2e824 100644 --- a/languages/en-US/images/burn.json +++ b/languages/en-US/images/burn.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"brazzers\" image", - "USAGE": "{{prefix}}brazzers (@member)", "EXAMPLES": "{{prefix}}brazzers\n{{prefix}}brazzers @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/captcha.json b/languages/en-US/images/captcha.json index cf43aeb52f..d389efeda1 100644 --- a/languages/en-US/images/captcha.json +++ b/languages/en-US/images/captcha.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"captcha\" image using the Nekobot API", - "USAGE": "{{prefix}}captcha (@member)", "EXAMPLES": "{{prefix}}captcha\n{{prefix}}captcha @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/challenger.json b/languages/en-US/images/challenger.json index 2bddf422c7..1ac822e095 100644 --- a/languages/en-US/images/challenger.json +++ b/languages/en-US/images/challenger.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"challenger\" image", - "USAGE": "{{prefix}}challenger (@member)", "EXAMPLES": "{{prefix}}challenger\n{{prefix}}challenger @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/clyde.json b/languages/en-US/images/clyde.json index a2319f3089..a045c1fd5e 100644 --- a/languages/en-US/images/clyde.json +++ b/languages/en-US/images/clyde.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Generates a \"Clyde\" message image using the Nekobot API", - "USAGE": "{{prefix}}clyde [text]", "EXAMPLES": "{{prefix}}clyde Discord will close on December 11, 2002. Goodbye.", "MISSING_TEXT": "Please specify the message text!" } \ No newline at end of file diff --git a/languages/en-US/images/dictator.json b/languages/en-US/images/dictator.json index 6e3da8086d..a8c8a98282 100644 --- a/languages/en-US/images/dictator.json +++ b/languages/en-US/images/dictator.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"burn\" image", - "USAGE": "{{prefix}}burn (@member)", "EXAMPLES": "{{prefix}}burn\n{{prefix}}burn @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/facepalm.json b/languages/en-US/images/facepalm.json index c1ecc89c0e..a4710c6a4d 100644 --- a/languages/en-US/images/facepalm.json +++ b/languages/en-US/images/facepalm.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"facepalm\" image using canvas", - "USAGE": "{{prefix}}facepalm (@member)", "EXAMPLES": "{{prefix}}facepalm\n{{prefix}}facepalm Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/fire.json b/languages/en-US/images/fire.json index 48c516c3d8..d7cffaaa6c 100644 --- a/languages/en-US/images/fire.json +++ b/languages/en-US/images/fire.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"fire\" image using Amethyste API", - "USAGE": "{{prefix}}fire (@member)", "EXAMPLES": "{{prefix}}fire\n{{prefix}}fire @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/jail.json b/languages/en-US/images/jail.json index b894d95f23..277e3749ad 100644 --- a/languages/en-US/images/jail.json +++ b/languages/en-US/images/jail.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"jail\" image using Amethyste API", - "USAGE": "{{prefix}}jail (@member)", "EXAMPLES": "{{prefix}}jail\n{{prefix}}jail @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/love.json b/languages/en-US/images/love.json index 16e5eb5039..397d61401e 100644 --- a/languages/en-US/images/love.json +++ b/languages/en-US/images/love.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"bed\" image", - "USAGE": "{{prefix}}bed [@member1] (@member2)", "EXAMPLES": "{{prefix}}bed @Androz#2091\n{{prefix}}bed @Androz#2091 @Marty#0303" } \ No newline at end of file diff --git a/languages/en-US/images/mission.json b/languages/en-US/images/mission.json index b94f6a1a06..b5552cc52d 100644 --- a/languages/en-US/images/mission.json +++ b/languages/en-US/images/mission.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"mission\" image using Amethyste API", - "USAGE": "{{prefix}}mission (@member)", "EXAMPLES": "{{prefix}}mission\n{{prefix}}mission @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/phcomment.json b/languages/en-US/images/phcomment.json index 13486a9d88..66ec5793df 100644 --- a/languages/en-US/images/phcomment.json +++ b/languages/en-US/images/phcomment.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Generates a \"phcomment\" image", - "USAGE": "{{prefix}}phcomment (@member) [text]", "EXAMPLES": "{{prefix}}phcomment Hi!\n{{prefix}}phcomment @Androz#2091 Hi!", "MISSING_TEXT": "Please specify the comment text!" } \ No newline at end of file diff --git a/languages/en-US/images/qrcode.json b/languages/en-US/images/qrcode.json index 33da955dfc..9a6e91adcb 100644 --- a/languages/en-US/images/qrcode.json +++ b/languages/en-US/images/qrcode.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Generates a QR code image from a given text", - "USAGE": "{{prefix}}qrcode [text]", "EXAMPLES": "{{prefix}}qrcode Hello", "MISSING_TEXT": "Please specify the QR code source text!", "SUCCESS": "Here's your QRCode!" diff --git a/languages/en-US/images/rip.json b/languages/en-US/images/rip.json index a7b8840df4..7799506dc2 100644 --- a/languages/en-US/images/rip.json +++ b/languages/en-US/images/rip.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"rip\" image using Nekobot API", - "USAGE": "{{prefix}}rip (@member)", "EXAMPLES": "{{prefix}}rip\n{{prefix}}rip @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/scary.json b/languages/en-US/images/scary.json index 04a4b0ce21..046319760d 100644 --- a/languages/en-US/images/scary.json +++ b/languages/en-US/images/scary.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"scary\" image using Nekobot API", - "USAGE": "{{prefix}}scary (@member)", "EXAMPLES": "{{prefix}}scary\n{{prefix}}scary @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/tobecontinued.json b/languages/en-US/images/tobecontinued.json index 04f0584621..8b820ef506 100644 --- a/languages/en-US/images/tobecontinued.json +++ b/languages/en-US/images/tobecontinued.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"tobecontinued\" image using Nekobot API", - "USAGE": "{{prefix}}tobecontinued (@member)", "EXAMPLES": "{{prefix}}tobecontinued\n{{prefix}}tobecontinued @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/trash.json b/languages/en-US/images/trash.json index fe656dc0c0..6b20f59491 100644 --- a/languages/en-US/images/trash.json +++ b/languages/en-US/images/trash.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"trash\" image", - "USAGE": "{{prefix}}trash (@member)", "EXAMPLES": "{{prefix}}trash\n{{prefix}}trash @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/triggered.json b/languages/en-US/images/triggered.json index 544d69d5a9..f7c82e1dd1 100644 --- a/languages/en-US/images/triggered.json +++ b/languages/en-US/images/triggered.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"triggered\" image using Nekobot API", - "USAGE": "{{prefix}}triggered (@member)", "EXAMPLES": "{{prefix}}triggered\n{{prefix}}triggered @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/tweet.json b/languages/en-US/images/tweet.json index 748987efd2..31b53016d3 100644 --- a/languages/en-US/images/tweet.json +++ b/languages/en-US/images/tweet.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Generates a \"tweet\" image using Nekobot API", - "USAGE": "{{prefix}}tweet [@twitter_username] [content]", "EXAMPLES": "{{prefix}}tweet @ElonMusk Hello", "MISSING_USERNAME": "You have to enter someone's twitter nickname!", "MISSING_TEXT": "You have to specify the tweet content!", diff --git a/languages/en-US/images/wanted.json b/languages/en-US/images/wanted.json index cecc164f56..e37fb07722 100644 --- a/languages/en-US/images/wanted.json +++ b/languages/en-US/images/wanted.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"wanted\" image using Nekobot API", - "USAGE": "{{prefix}}wanted (@member)", "EXAMPLES": "{{prefix}}wanted\n{{prefix}}wanted @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/wasted.json b/languages/en-US/images/wasted.json index 19285d9fed..f38255f671 100644 --- a/languages/en-US/images/wasted.json +++ b/languages/en-US/images/wasted.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"wasted\" image using Nekobot API", - "USAGE": "{{prefix}}wasted (@member)", "EXAMPLES": "{{prefix}}wasted\n{{prefix}}wasted @Androz#2091" } \ No newline at end of file diff --git a/languages/en-US/images/youtube-comment.json b/languages/en-US/images/youtube-comment.json index 06387ef986..8966e70dee 100644 --- a/languages/en-US/images/youtube-comment.json +++ b/languages/en-US/images/youtube-comment.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Generates a \"youtube-comment\" image", - "USAGE": "{{prefix}}youtube-comment (@member) [text]", "EXAMPLES": "{{prefix}}youtube-comment Hi!\n{{prefix}}youtube-comment @Androz#2091 Hi!" } \ No newline at end of file diff --git a/languages/en-US/moderation/announcement.json b/languages/en-US/moderation/announcement.json index 5505845813..b67cbe5673 100644 --- a/languages/en-US/moderation/announcement.json +++ b/languages/en-US/moderation/announcement.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Send an announcement in the current channel!", - "USAGE": "{{prefix}}announcement [text]", "EXAMPLES": "{{prefix}}announcement New staff member!", "MISSING_TEXT": "You must enter the announcement text!", "TOO_LONG": "Your text should be shorter than 1030 characters!", diff --git a/languages/en-US/moderation/ban.json b/languages/en-US/moderation/ban.json index 9b965f99f8..7d84f47fc8 100644 --- a/languages/en-US/moderation/ban.json +++ b/languages/en-US/moderation/ban.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Ban the mentioned member!", - "USAGE": "{{prefix}}ban [@user] (reason)", "EXAMPLES": "{{prefix}}ban @Androz#2091 Spam", "MISSING_MEMBER": "Please specify a valid member to ban!", "YOURSELF": "You can't sanction yourself!", diff --git a/languages/en-US/moderation/checkinvites.json b/languages/en-US/moderation/checkinvites.json index f19dec94c4..8cc00dc7ea 100644 --- a/languages/en-US/moderation/checkinvites.json +++ b/languages/en-US/moderation/checkinvites.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Check if members have a Discord server link in their status!", - "USAGE": "{{prefix}}checkinvites", "EXAMPLES": "{{prefix}}checkinvites", "NOBODY": "No member advertises in their status!" } diff --git a/languages/en-US/moderation/clear-sanctions.json b/languages/en-US/moderation/clear-sanctions.json index 1df99b4297..4c8a40930b 100644 --- a/languages/en-US/moderation/clear-sanctions.json +++ b/languages/en-US/moderation/clear-sanctions.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Clear a member sanctions!", - "USAGE": "{{prefix}}clear-sanctions [@member]", "EXAMPLES": "{{prefix}}clear-sanctions @Androz#2091", "MISSING_MEMBER": "Please mention the member you wish to remove the sanctions from!", "SUCCESS": "**{{username}}**'s sanctions were deleted!" diff --git a/languages/en-US/moderation/clear.json b/languages/en-US/moderation/clear.json index 20c92d8315..2f613fb18e 100644 --- a/languages/en-US/moderation/clear.json +++ b/languages/en-US/moderation/clear.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Quickly delete multiple messages!", - "USAGE": "{{prefix}}clear [number-of-messages] (@member)", "EXAMPLES": "{{prefix}}clear 10\n{{prefix}}clear 10 @Androz#2091", "MISSING_AMOUNT": "You must specify a number of messages to delete!", "ALL_CONFIRM": "All the channel messages will be deleted! To confirm type `-confirm`", diff --git a/languages/en-US/moderation/giveaway.json b/languages/en-US/moderation/giveaway.json index 62ef63c2b6..2cbc784e87 100644 --- a/languages/en-US/moderation/giveaway.json +++ b/languages/en-US/moderation/giveaway.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Easily manage your giveaways!", - "USAGE": "{{prefix}}giveaway [create/reroll/delete/end] (time) (winners count) (prize)", "EXAMPLES": "{{prefix}}giveaway create 10m 2 5$ PayPal!\n{{prefix}}giveaway reroll 597812898022031374", "MISSING_STATUS": "You must specify an action between `create`, `reroll`, `end` or `delete`!", "INVALID_CREATE": "You must enter the information like this: \n\n`{{prefix}}giveaway create [time] [winners count] [prize]`", diff --git a/languages/en-US/moderation/kick.json b/languages/en-US/moderation/kick.json index 0b28e70f3e..9ea3b86669 100644 --- a/languages/en-US/moderation/kick.json +++ b/languages/en-US/moderation/kick.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Kick the mentioned member!", - "USAGE": "{{prefix}}kick [@member] (reason)", "EXAMPLES": "{{prefix}}kick @Androz#2091 Spam", "MISSING_MEMBER": "Please specify a valid member to kick!", "MISSING_PERM": "An error has occurred... Please check that I have the permission to kick this specific member and try again!", diff --git a/languages/en-US/moderation/mute.json b/languages/en-US/moderation/mute.json index bc700f9938..23a0cff94d 100644 --- a/languages/en-US/moderation/mute.json +++ b/languages/en-US/moderation/mute.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Prevents a member from sending messages and connecting to a voice chat room for a defined period of time!", - "USAGE": "{{prefix}}mute [@member] [time]", "EXAMPLES": "{{prefix}}mute @Androz#2091 Spam", "MISSING_MEMBER": "Please specify a valid member to mute!", "MUTED_DM": "Hello {{username}},\nYou've just been muted on **{{server}}** by **{{moderator}}** for **{{time}}** because of **{{reason}}**!", diff --git a/languages/en-US/moderation/poll.json b/languages/en-US/moderation/poll.json index c90fb8456d..93a9cb5ed2 100644 --- a/languages/en-US/moderation/poll.json +++ b/languages/en-US/moderation/poll.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Launch a survey in the current channel!", - "USAGE": "{{prefix}}poll [question]", "EXAMPLES": "{{prefix}}poll Is the Earth flat?", "MISSING_QUESTION": "Please specify a question!", "REACT": "React with {{success}} or {{error}}!", diff --git a/languages/en-US/moderation/sanctions.json b/languages/en-US/moderation/sanctions.json index d1d5b0aa5b..13ec7b65c0 100644 --- a/languages/en-US/moderation/sanctions.json +++ b/languages/en-US/moderation/sanctions.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Displays the list of infractions committed by a member!", - "USAGE": "{{prefix}}sanctions [@member]", "EXAMPLES": "{{prefix}}sanctions @Androz#2091", "MISSING_MEMBER": "You must specify a member!", "NO_SANCTION": "**{{username}}** did not receive any sanctions." diff --git a/languages/en-US/moderation/setwarns.json b/languages/en-US/moderation/setwarns.json index 15d28ef33f..05073b0705 100644 --- a/languages/en-US/moderation/setwarns.json +++ b/languages/en-US/moderation/setwarns.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Define the sanctions that members will get after a certain number of warns!", - "USAGE": "{{prefix}}setwarns [kick/ban] [number/reset]", "EXAMPLES": "{{prefix}}setwarns kick 10\n{{prefix}}setwarns ban 10\n{{prefix}}setwarns ban reset", "MISSING_TYPE": "Please specify sanction between `kick` and `ban`", "SUCCESS_KICK": "** `{{count}}` warnings will result in an expulsion!**\n\n:arrow_right_hook: *Send `{{prefix}}configuration` to see the updated configuration!*", diff --git a/languages/en-US/moderation/unban.json b/languages/en-US/moderation/unban.json index 27097f4766..293ad692f7 100644 --- a/languages/en-US/moderation/unban.json +++ b/languages/en-US/moderation/unban.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Unban the user from the server!", - "USAGE": "{{prefix}}unban [userID/user#0000]", "EXAMPLES": "{{prefix}}unban 422820341791064085\n{{prefix}}unban Androz#2091", "MISSING_ID": "Please specify the ID of the member you wish to unban!", "NOT_BANNED": "**{{username}}** is not banned!", diff --git a/languages/en-US/moderation/unmute.json b/languages/en-US/moderation/unmute.json index 7e733f5662..a8e3c03dac 100644 --- a/languages/en-US/moderation/unmute.json +++ b/languages/en-US/moderation/unmute.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Unmute the mentioned member!", - "USAGE": "{{prefix}}unmute [@member]", "EXAMPLES": "{{prefix}}unmute @Androz#2091", "MISSING_MEMBER": "Please specify the member you want to unmute!", "NOT_MUTED": "**{{username}}** is not muted on this server!", diff --git a/languages/en-US/moderation/warn.json b/languages/en-US/moderation/warn.json index 3f8b150eed..651c3b7684 100644 --- a/languages/en-US/moderation/warn.json +++ b/languages/en-US/moderation/warn.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Warn a member in private messages", - "USAGE": "{{prefix}}warn [@member] [reason]", "EXAMPLES": "{{prefix}}warn @Androz#2091 Dumb", "MISSING_MEMBER": "Please specify the member you want to warn!", "MISSING_REASON": "Please enter a reason!", diff --git a/languages/en-US/music/autoplay.json b/languages/en-US/music/autoplay.json index 69b8517cd6..1885ab2837 100644 --- a/languages/en-US/music/autoplay.json +++ b/languages/en-US/music/autoplay.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Enable or disable the autoplay feature", - "USAGE": "{{prefix}}autoplay", "EXAMPLES": "{{prefix}}autoplay", "SUCCESS_ENABLED": "{{success}} Auto play is now enabled!", "SUCCESS_DISABLED": "{{success}} Auto play is now disabled!" diff --git a/languages/en-US/music/back.json b/languages/en-US/music/back.json index ab06741a8c..cf94c34077 100644 --- a/languages/en-US/music/back.json +++ b/languages/en-US/music/back.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Play back the previous song", - "USAGE": "{{prefix}}back", "EXAMPLES": "{{prefix}}back", "NO_PREV_SONG": "There was no song before this one!", "VOTE_CONTENT": "Previous song: {{songName}}\nReact with 👍 to play the previous song! {{requiredCount}} more votes are required.", diff --git a/languages/en-US/music/filter.json b/languages/en-US/music/filter.json index 4152323fe9..03daa04361 100644 --- a/languages/en-US/music/filter.json +++ b/languages/en-US/music/filter.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Enable or disable a filter!", - "USAGE": "{{prefix}}filter [filter]", "EXAMPLES": "{{prefix}}filter vaporwave", "MISSING_FILTER": "Please specify a valid filter to enable or disable! (or send `{{prefix}}filters` to get the statuses of the filters)", "UNKNOWN_FILTER": "This filter doesn't exist! Send `{{prefix}}filters` to get the list!", diff --git a/languages/en-US/music/filters.json b/languages/en-US/music/filters.json index e71df3d3f7..776bd5f72b 100644 --- a/languages/en-US/music/filters.json +++ b/languages/en-US/music/filters.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Send the list of all the filters and their status", - "USAGE": "{{prefix}}filters", "EXAMPLES": "{{prefix}}filters", "TITLE": "**Filters**", "CONTENT": "Here is the list of all filters enabled or disabled.\nUse `{{prefix}}filter` to change the status of one of them." diff --git a/languages/en-US/music/lyrics.json b/languages/en-US/music/lyrics.json index 136680f501..7abe37a5d7 100644 --- a/languages/en-US/music/lyrics.json +++ b/languages/en-US/music/lyrics.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows the song lyrics", - "USAGE": "{{prefix}}lyrics [song-name]", "EXAMPLES": "{{prefix}}lyrics Skyfall", "LYRICS_OF": "🎤 {{songName}} lyrics", "AND_MORE": "\n**And more...**", diff --git a/languages/en-US/music/np.json b/languages/en-US/music/np.json index 66b6d7952e..c3b864437d 100644 --- a/languages/en-US/music/np.json +++ b/languages/en-US/music/np.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows information about the current song!", - "USAGE": "{{prefix}}np", "EXAMPLES": "{{prefix}}np", "CURRENTLY_PLAYING": "Currently playing", "T_TITLE": "Title", diff --git a/languages/en-US/music/pause.json b/languages/en-US/music/pause.json index e993ffe417..66a4eb0355 100644 --- a/languages/en-US/music/pause.json +++ b/languages/en-US/music/pause.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Pause the current song!", - "USAGE": "{{prefix}}pause", "EXAMPLES": "{{prefix}}pause", "SUCCESS": "⏸️ Music paused." } \ No newline at end of file diff --git a/languages/en-US/music/play.json b/languages/en-US/music/play.json index 49424b804e..fed651b25a 100644 --- a/languages/en-US/music/play.json +++ b/languages/en-US/music/play.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Plays music for you!", - "USAGE": "{{prefix}}play [song]", "EXAMPLES": "{{prefix}}play Bye Bye", "NO_VOICE_CHANNEL": "You must be connected to a voice channel!", "VOICE_CHANNEL_CONNECT": "I can't connect to your voice channel!", diff --git a/languages/en-US/music/queue.json b/languages/en-US/music/queue.json index e2a9c47a1b..d8b81878c4 100644 --- a/languages/en-US/music/queue.json +++ b/languages/en-US/music/queue.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Shows the server queue", - "USAGE": "{{prefix}}queue", "EXAMPLES": "{{prefix}}queue", "TITLE": "Server Queue" } \ No newline at end of file diff --git a/languages/en-US/music/resume.json b/languages/en-US/music/resume.json index 7a2868b957..24bb09f859 100644 --- a/languages/en-US/music/resume.json +++ b/languages/en-US/music/resume.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Resume the current song!", - "USAGE": "{{prefix}}resume", "EXAMPLES": "{{prefix}}resume", "SUCCESS": "▶️ Music resumed!" } \ No newline at end of file diff --git a/languages/en-US/music/seek.json b/languages/en-US/music/seek.json index f4eb505d44..2e0ee11977 100644 --- a/languages/en-US/music/seek.json +++ b/languages/en-US/music/seek.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Go forward or backward a specific amount of time in the current song!!", - "USAGE": "{{prefix}}seek [time]", "EXAMPLES": "{{prefix}}resume 10s", "INVALID_TIME": "You must specify a valid number of time!", "SUCCESS": "▶️ Music sought!" diff --git a/languages/en-US/music/skip.json b/languages/en-US/music/skip.json index f25234480a..d11f99c112 100644 --- a/languages/en-US/music/skip.json +++ b/languages/en-US/music/skip.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Skip the current song", - "USAGE": "{{prefix}}skip", "EXAMPLES": "{{prefix}}skip", "NO_NEXT_SONG": "There's no song after this one!", "VOTE_CONTENT": "Next song: {{songName}}\nReact with 👍 to skip the music! {{requiredCount}} more votes are required.", diff --git a/languages/en-US/music/stop.json b/languages/en-US/music/stop.json index d60924c479..05e690b379 100644 --- a/languages/en-US/music/stop.json +++ b/languages/en-US/music/stop.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Stop the music", - "USAGE": "{{prefix}}stop", "EXAMPLES": "{{prefix}}stop", "VOTE_CONTENT": "React with 👍 to stop the music! {{requiredCount}} more votes are required.", "SUCCESS": "Music stopped!" diff --git a/languages/en-US/owner/eval.json b/languages/en-US/owner/eval.json index 3c55b58c72..099a4a8b55 100644 --- a/languages/en-US/owner/eval.json +++ b/languages/en-US/owner/eval.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Executes the given code", - "USAGE": "{{prefix}}eval [code]", "EXAMPLES": "{{prefix}}eval message.author.send(message.client.token);" } \ No newline at end of file diff --git a/languages/en-US/owner/reload.json b/languages/en-US/owner/reload.json index c222fc7152..77692dd7e6 100644 --- a/languages/en-US/owner/reload.json +++ b/languages/en-US/owner/reload.json @@ -1,6 +1,5 @@ { "DESCRIPTION": "Reload a command!", - "USAGE": "{{prefix}}reload", "EXAMPLES": "{{prefix}}reload", "NOT_FOUND": "`{{search}}` is not an available command!", "SUCCESS": "Command successfully reloaded!" diff --git a/languages/en-US/owner/servers-list.json b/languages/en-US/owner/servers-list.json index 326ade3c14..5da7c4eb5f 100644 --- a/languages/en-US/owner/servers-list.json +++ b/languages/en-US/owner/servers-list.json @@ -1,5 +1,4 @@ { "DESCRIPTION": "Show the servers list!", - "USAGE": "{{prefix}}servers-list", "EXAMPLES": "{{prefix}}servers-list" } \ No newline at end of file From eb5b464edefc5f9b91750f59eb1af9172ebf0484 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:05:28 +0200 Subject: [PATCH 12/29] :recycle: Rewrite some commands --- commands/Economy/deposit.js | 3 +- commands/Economy/divorce.js | 22 ++++++------ commands/Economy/leaderboard.js | 43 +++++++++++++----------- docs/commands.md | 6 ++-- languages/en-US/economy/deposit.json | 3 +- languages/en-US/economy/leaderboard.json | 2 +- 6 files changed, 41 insertions(+), 38 deletions(-) diff --git a/commands/Economy/deposit.js b/commands/Economy/deposit.js index 4966c8907f..9dfd8bafc9 100644 --- a/commands/Economy/deposit.js +++ b/commands/Economy/deposit.js @@ -10,8 +10,7 @@ class Deposit extends Command { { name: "amount", type: "INTEGER" - }, - + } ], enabled: true, diff --git a/commands/Economy/divorce.js b/commands/Economy/divorce.js index 80c7b387e4..e1b8fe74dc 100644 --- a/commands/Economy/divorce.js +++ b/commands/Economy/divorce.js @@ -5,7 +5,7 @@ class Divorce extends Command { constructor (client) { super(client, { name: "divorce", - dirname: __dirname, + enabled: true, guildOnly: false, aliases: [ "profil" ], @@ -13,14 +13,15 @@ class Divorce extends Command { botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 3000 + + dirname: __dirname }); } - async run (interaction, translate, data) { + async run (interaction, translate, { userData }) { // Check if the message author is wedded - if(!data.userData.lover){ + if(!userData.lover){ return interaction.reply({ content: translate("economy/divorce:NOT_MARRIED"), ephemeral: true @@ -28,19 +29,20 @@ class Divorce extends Command { } // Updates db + const user = this.client.users.cache.get(userData.lover) || await this.client.users.fetch(userData.lover); - const user = this.client.users.cache.get(data.userData.lover) || await this.client.users.fetch(data.userData.lover); - - data.userData.lover = null; - data.userData.save(); + userData.lover = null; + userData.save(); const oldLover = await this.client.findOrCreateUser({ id:user.id }); oldLover.lover = null; oldLover.save(); // Send success message - message.success("economy/divorce:SUCCESS", { - username: user.username + interaction.reply({ + content: translate("economy/divorce:SUCCESS", { + username: user.username + }) }); } diff --git a/commands/Economy/leaderboard.js b/commands/Economy/leaderboard.js index d2f2a7ea5a..65e558c548 100644 --- a/commands/Economy/leaderboard.js +++ b/commands/Economy/leaderboard.js @@ -6,7 +6,15 @@ class Leaderboard extends Command { constructor (client) { super(client, { name: "leaderboard", - dirname: __dirname, + + options: [ + { + name: "type", + type: "STRING", + choices: ["money", "level", "rep"].map((c) => ({ name: c, value: c })) + } + ], + enabled: true, guildOnly: true, aliases: [ "lb" ], @@ -14,24 +22,20 @@ class Leaderboard extends Command { botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 5000 + cooldown: 5000, + + dirname: __dirname }); } async run (interaction, translate) { - const isOnlyOnMobile = (message.author.presence.clientStatus ? JSON.stringify(Object.keys(message.author.presence.clientStatus)) === JSON.stringify([ "mobile" ]) : false); + const isOnlyOnMobile = (interaction.user.presence.clientStatus ? JSON.stringify(Object.keys(interaction.user.presence.clientStatus)) === JSON.stringify([ "mobile" ]) : false); - const type = args[0]; - if(!type || (type !== "credits" && type !== "level" && type !== "rep")){ - return interaction.reply({ - content: translate("economy/leaderboard:MISSING_TYPE"), - ephemeral: true - }); - } + const type = interaction.options.getString("type"); if(type === "credits"){ - const members = await this.client.membersData.find({ guildID: message.guild.id }).lean(), + const members = await this.client.membersData.find({ guildID: interaction.guild.id }).lean(), membersLeaderboard = members.map((m) => { return { id: m.id, @@ -39,12 +43,12 @@ class Leaderboard extends Command { }; }).sort((a,b) => b.value - a.value); const table = new AsciiTable("LEADERBOARD"); - table.setHeading("#", message.translate("common:USER"), message.translate("common:CREDITS")); + table.setHeading("#", translate("common:USER"), translate("common:CREDITS")); if(membersLeaderboard.length > 20) membersLeaderboard.length = 20; const newTable = await fetchUsers(membersLeaderboard, table, this.client); - message.channel.send("```\n"+newTable.toString()+"```"); + interaction.reply("```\n"+newTable.toString()+"```"); } else if(type === "level"){ - const members = await this.client.membersData.find({ guildID: message.guild.id }).lean(), + const members = await this.client.membersData.find({ guildID: interaction.guild.id }).lean(), membersLeaderboard = members.map((m) => { return { id: m.id, @@ -52,10 +56,10 @@ class Leaderboard extends Command { }; }).sort((a,b) => b.value - a.value); const table = new AsciiTable("LEADERBOARD"); - table.setHeading("#", message.translate("common:USER"), message.translate("common:LEVEL")); + table.setHeading("#", translate("common:USER"), translate("common:LEVEL")); if(membersLeaderboard.length > 20) membersLeaderboard.length = 20; const newTable = await fetchUsers(membersLeaderboard, table, this.client); - message.channel.send("```\n"+newTable.toString()+"```"); + interaction.reply("```\n"+newTable.toString()+"```"); } else if(type === "rep"){ const users = await this.client.usersData.find().lean(), usersLeaderboard = users.map((u) => { @@ -65,14 +69,15 @@ class Leaderboard extends Command { }; }).sort((a,b) => b.value - a.value); const table = new AsciiTable("LEADERBOARD"); - table.setHeading("#", message.translate("common:USER"), message.translate("common:POINTS")); + table.setHeading("#", translate("common:USER"), translate("common:POINTS")); if(usersLeaderboard.length > 20) usersLeaderboard.length = 20; const newTable = await fetchUsers(usersLeaderboard, table, this.client); - message.channel.send("```\n"+newTable.toString()+"```"); + interaction.reply("```\n"+newTable.toString()+"```"); } if(isOnlyOnMobile){ - interaction.reply({ + // TODO: add a better way to answer here + interaction.channel.send({ content: translate("economy/leaderboard:MOBILE") }); } diff --git a/docs/commands.md b/docs/commands.md index 23f2ed88f4..375b81c0cd 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -128,13 +128,12 @@ Here's the list of Atlanta commands. This one contains more than **120 commands* | **unmute** | Unmute the mentioned member! | unmute [@member] | NaN seconds | | **warn** | Warn a member in private messages | warn [@member] [reason] | NaN seconds | -### Music (13 commands) +### Music (12 commands) | Name | Description | Usage | Cooldown | | ------------ | ---------------------------------------------------------------------- | ------------------ | ----------- | | **autoplay** | Enable or disable the autoplay feature | autoplay | NaN seconds | | **back** | Play back the previous song | back | NaN seconds | -| **filter** | Enable or disable a filter! | filter [filter] | NaN seconds | | **filters** | Send the list of all the filters and their status | filters | NaN seconds | | **lyrics** | Shows the song lyrics | lyrics [song-name] | NaN seconds | | **np** | Shows information about the current song! | np | NaN seconds | @@ -146,7 +145,7 @@ Here's the list of Atlanta commands. This one contains more than **120 commands* | **skip** | Skip the current song | skip | NaN seconds | | **stop** | Stop the music | stop | NaN seconds | -### Fun (10 commands) +### Fun (9 commands) | Name | Description | Usage | Cooldown | | ------------- | --------------------------------------------------------------------------------------------- | ------------------------------- | ----------- | @@ -154,7 +153,6 @@ Here's the list of Atlanta commands. This one contains more than **120 commands* | **ascii** | Turn your text into ascii characters! | ascii [text] | NaN seconds | | **choice** | Helps you choose between the given choices! | choice [choice1/choice2/etc...] | NaN seconds | | **findwords** | Start a Findwords party, a game where you have to find words! | findwords | NaN seconds | -| **flip** | I roll the dice for you! | flip | NaN seconds | | **fml** | Gets a random FML | fml | NaN seconds | | **joke** | Gets a wonderful joke specially made for you! | joke | NaN seconds | | **lmg** | Generate a LMGTFY link with your search | lmg [search] | NaN seconds | diff --git a/languages/en-US/economy/deposit.json b/languages/en-US/economy/deposit.json index b8827fd282..88bc8bdcdb 100644 --- a/languages/en-US/economy/deposit.json +++ b/languages/en-US/economy/deposit.json @@ -1,8 +1,7 @@ { "DESCRIPTION": "Deposit your money in the bank", - "USAGE": "{{prefix}}deposit [amount]", "EXAMPLES": "{{prefix}}deposit 400", - "MISSING_AMOUNT": "Please specify an amount!", + "OPT_AMOUNT_DESCRIPTION": "The amount of money to deposit to the bank", "NO_CREDIT": "You have no credit to deposit in the bank!", "NO_ENOUGH_CREDIT": "You don't have `{{money}}` credits!", "SUCCESS": "**{{money}}** credits deposited in the bank!" diff --git a/languages/en-US/economy/leaderboard.json b/languages/en-US/economy/leaderboard.json index b58210c4d5..0ebf1f936e 100644 --- a/languages/en-US/economy/leaderboard.json +++ b/languages/en-US/economy/leaderboard.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Shows users who have the most credits, levels or reputation points!", "EXAMPLES": "{{prefix}}leaderboard credits\n{{prefix}}leaderboard levels", - "MISSING_TYPE": "Please specify the leaderboard type between `credits`, `level` and `rep`", + "OPT_TYPE_DESCRIPTION": "The type of the leaderboard", "MOBILE": ":confused: We've detected that you are using a phone.... The leaderboard may not display well on small screens. Try to switch to landscape or go on the dashboard!" } \ No newline at end of file From 952f13f49e6e296925ebd3ed87a8da7441200b56 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:14:49 +0200 Subject: [PATCH 13/29] :art: Clean up code --- commands/Administration/addcommand.js | 6 +++--- commands/Administration/addemoji.js | 5 ++--- commands/Administration/automod.js | 5 ++--- commands/Administration/autorole.js | 5 ++--- commands/Administration/backup.js | 5 ++--- commands/Administration/configuration.js | 6 +++--- commands/Administration/delcommand.js | 5 ++--- commands/Administration/deletemod.js | 5 ++--- commands/Administration/goodbye.js | 6 +++--- commands/Administration/ignore.js | 5 ++--- commands/Administration/setfortniteshop.js | 5 ++--- commands/Administration/setlang.js | 5 ++--- commands/Administration/setmodlogs.js | 5 ++--- commands/Administration/setprefix.js | 5 ++--- commands/Administration/setreports.js | 6 +++--- commands/Administration/setsuggests.js | 5 ++--- commands/Administration/slowmode.js | 6 +++--- commands/Administration/welcome.js | 6 +++--- commands/Economy/achievements.js | 6 +++--- commands/Economy/birthdate.js | 6 +++--- commands/Economy/deposit.js | 6 +++--- commands/Economy/divorce.js | 5 ++--- commands/Economy/leaderboard.js | 6 +++--- commands/Economy/money.js | 4 ++-- commands/Economy/pay.js | 6 +++--- commands/Economy/profile.js | 3 +-- commands/Economy/rep.js | 3 +-- commands/Economy/rob.js | 4 ++-- commands/Economy/setbio.js | 3 +-- commands/Economy/slots.js | 3 +-- commands/Economy/withdraw.js | 3 +-- commands/Economy/work.js | 4 ++-- commands/Fun/8ball.js | 5 ++--- commands/Fun/ascii.js | 5 ++--- commands/Fun/choice.js | 5 ++--- commands/Fun/findwords.js | 5 ++--- commands/Fun/flip.js | 3 +-- commands/Fun/fml.js | 6 +++--- commands/Fun/joke.js | 5 ++--- commands/Fun/lmg.js | 5 ++--- commands/Fun/lovecalc.js | 6 +++--- commands/Fun/number.js | 6 +++--- commands/General/fortnite.js | 6 +++--- commands/General/fortniteshop.js | 6 +++--- commands/General/github.js | 5 ++--- commands/General/hastebin.js | 6 +++--- commands/General/help.js | 6 +++--- commands/General/invitations.js | 6 +++--- commands/General/invite.js | 5 ++--- commands/General/minecraft.js | 5 ++--- commands/General/permissions.js | 6 +++--- commands/General/ping.js | 5 ++--- commands/General/quote.js | 5 ++--- commands/General/remindme.js | 5 ++--- commands/General/report.js | 6 +++--- commands/General/serverinfo.js | 5 ++--- commands/General/setafk.js | 5 ++--- commands/General/shorturl.js | 5 ++--- commands/General/someone.js | 5 ++--- commands/General/staff.js | 5 ++--- commands/General/stats.js | 6 +++--- commands/General/suggest.js | 5 ++--- commands/General/translate.js | 5 ++--- commands/General/userinfo.js | 6 +++--- commands/Images/approved.js | 4 ++-- commands/Images/avatar.js | 4 ++-- commands/Images/batslap.js | 4 ++-- commands/Images/beautiful.js | 4 ++-- commands/Images/bed.js | 5 ++--- commands/Images/brazzers.js | 4 ++-- commands/Images/burn.js | 4 ++-- commands/Images/captcha.js | 5 ++--- commands/Images/challenger.js | 4 ++-- commands/Images/clyde.js | 5 ++--- commands/Images/dictator.js | 6 +++--- commands/Images/facepalm.js | 4 ++-- commands/Images/fire.js | 3 +-- commands/Images/jail.js | 3 +-- commands/Images/love.js | 5 ++--- commands/Images/mission.js | 5 ++--- commands/Images/phcomment.js | 3 +-- commands/Images/qrcode.js | 3 +-- commands/Images/rip.js | 5 ++--- commands/Images/scary.js | 3 +-- commands/Images/tobecontinued.js | 3 +-- commands/Images/trash.js | 5 ++--- commands/Images/triggered.js | 3 +-- commands/Images/tweet.js | 5 ++--- commands/Images/wanted.js | 3 +-- commands/Images/wasted.js | 3 +-- commands/Images/youtube-comment.js | 5 ++--- commands/Moderation/announcement.js | 5 ++--- commands/Moderation/ban.js | 6 +++--- commands/Moderation/checkinvites.js | 5 ++--- commands/Moderation/clear-sanctions.js | 5 ++--- commands/Moderation/clear.js | 6 +++--- commands/Moderation/giveaway.js | 5 ++--- commands/Moderation/kick.js | 6 +++--- commands/Moderation/mute.js | 6 +++--- commands/Moderation/poll.js | 5 ++--- commands/Moderation/sanctions.js | 6 +++--- commands/Moderation/setwarns.js | 5 ++--- commands/Moderation/unban.js | 5 ++--- commands/Moderation/unmute.js | 5 ++--- commands/Moderation/warn.js | 6 +++--- commands/Music/autoplay.js | 3 +-- commands/Music/back.js | 4 ++-- commands/Music/filter.js | 3 +-- commands/Music/filters.js | 3 +-- commands/Music/lyrics.js | 3 +-- commands/Music/np.js | 3 +-- commands/Music/pause.js | 3 +-- commands/Music/play.js | 4 ++-- commands/Music/queue.js | 3 +-- commands/Music/resume.js | 3 +-- commands/Music/seek.js | 5 ++--- commands/Music/skip.js | 4 ++-- commands/Music/stop.js | 4 ++-- commands/Owner/eval.js | 5 ++--- commands/Owner/reload.js | 3 +-- commands/Owner/servers-list.js | 6 +++--- 121 files changed, 249 insertions(+), 324 deletions(-) diff --git a/commands/Administration/addcommand.js b/commands/Administration/addcommand.js index 5d8f40c016..72d3c3c370 100644 --- a/commands/Administration/addcommand.js +++ b/commands/Administration/addcommand.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Addcommand extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -57,6 +57,6 @@ class Addcommand extends Command { }); } -} +}; + -module.exports = Addcommand; diff --git a/commands/Administration/addemoji.js b/commands/Administration/addemoji.js index df49978418..21096f59bc 100644 --- a/commands/Administration/addemoji.js +++ b/commands/Administration/addemoji.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Addemoji extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -55,6 +55,5 @@ class Addemoji extends Command { }); } -} +}; -module.exports = Addemoji; \ No newline at end of file diff --git a/commands/Administration/automod.js b/commands/Administration/automod.js index d36e4af14d..5bcc816aec 100644 --- a/commands/Administration/automod.js +++ b/commands/Administration/automod.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Automod extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -54,6 +54,5 @@ class Automod extends Command { } } -} +}; -module.exports = Automod; \ No newline at end of file diff --git a/commands/Administration/autorole.js b/commands/Administration/autorole.js index dfa613893d..9605988af6 100644 --- a/commands/Administration/autorole.js +++ b/commands/Administration/autorole.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Resolvers = require("../../helpers/resolvers"); -class Autorole extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -76,6 +76,5 @@ class Autorole extends Command { } -} +}; -module.exports = Autorole; \ No newline at end of file diff --git a/commands/Administration/backup.js b/commands/Administration/backup.js index a6bea8af5d..25e4f84161 100644 --- a/commands/Administration/backup.js +++ b/commands/Administration/backup.js @@ -3,7 +3,7 @@ const Command = require("../../base/Command.js"), backup = require("discord-backup"), Sentry = require("@sentry/node"); -class Backup extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -136,6 +136,5 @@ class Backup extends Command { } -} +}; -module.exports = Backup; \ No newline at end of file diff --git a/commands/Administration/configuration.js b/commands/Administration/configuration.js index c1db5d9697..39878e990e 100644 --- a/commands/Administration/configuration.js +++ b/commands/Administration/configuration.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Configuration extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -126,6 +126,6 @@ class Configuration extends Command { message.channel.send({ embeds: [embed] }); } -} +}; + -module.exports = Configuration; diff --git a/commands/Administration/delcommand.js b/commands/Administration/delcommand.js index b029f71389..939931ab9d 100644 --- a/commands/Administration/delcommand.js +++ b/commands/Administration/delcommand.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Delcommand extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -41,6 +41,5 @@ class Delcommand extends Command { }); } -} +}; -module.exports = Delcommand; \ No newline at end of file diff --git a/commands/Administration/deletemod.js b/commands/Administration/deletemod.js index edc369c2f4..3eb8ea8c32 100644 --- a/commands/Administration/deletemod.js +++ b/commands/Administration/deletemod.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Deletemod extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -40,6 +40,5 @@ class Deletemod extends Command { } } -} +}; -module.exports = Deletemod; \ No newline at end of file diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index 22e10cbf5b..060756da08 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Resolvers = require("../../helpers/resolvers"); -class Goodbye extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -144,6 +144,6 @@ class Goodbye extends Command { } } -} +}; + -module.exports = Goodbye; diff --git a/commands/Administration/ignore.js b/commands/Administration/ignore.js index db350f62a0..82b5b57395 100644 --- a/commands/Administration/ignore.js +++ b/commands/Administration/ignore.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Ignore extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -45,6 +45,5 @@ class Ignore extends Command { } -} +}; -module.exports = Ignore; \ No newline at end of file diff --git a/commands/Administration/setfortniteshop.js b/commands/Administration/setfortniteshop.js index 6223f1a57f..f9977ab1b5 100644 --- a/commands/Administration/setfortniteshop.js +++ b/commands/Administration/setfortniteshop.js @@ -2,7 +2,7 @@ Discord = require("discord.js"), Canvas = require("discord-canvas"); -class Setfortniteshop extends Command { +module.exports = class extends Command { constructor(client) { super(client, { @@ -76,6 +76,5 @@ class Setfortniteshop extends Command { } -} +}; -module.exports = Setfortniteshop; \ No newline at end of file diff --git a/commands/Administration/setlang.js b/commands/Administration/setlang.js index ce64532914..6da2af3645 100644 --- a/commands/Administration/setlang.js +++ b/commands/Administration/setlang.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Setlang extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -36,6 +36,5 @@ class Setlang extends Command { } -} +}; -module.exports = Setlang; \ No newline at end of file diff --git a/commands/Administration/setmodlogs.js b/commands/Administration/setmodlogs.js index a8b02d30ac..5608ed3bd8 100644 --- a/commands/Administration/setmodlogs.js +++ b/commands/Administration/setmodlogs.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Resolvers = require("../../helpers/resolvers"); -class Setmodlogs extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -48,6 +48,5 @@ class Setmodlogs extends Command { } } -} +}; -module.exports = Setmodlogs; \ No newline at end of file diff --git a/commands/Administration/setprefix.js b/commands/Administration/setprefix.js index 27ec9fe069..84cbca35d5 100644 --- a/commands/Administration/setprefix.js +++ b/commands/Administration/setprefix.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Setprefix extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -43,6 +43,5 @@ class Setprefix extends Command { } -} +}; -module.exports = Setprefix; \ No newline at end of file diff --git a/commands/Administration/setreports.js b/commands/Administration/setreports.js index 11a92f4258..a46845bf47 100644 --- a/commands/Administration/setreports.js +++ b/commands/Administration/setreports.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Resolvers = require("../../helpers/resolvers"); -class Setreports extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -49,6 +49,6 @@ class Setreports extends Command { } -} +}; + -module.exports = Setreports; diff --git a/commands/Administration/setsuggests.js b/commands/Administration/setsuggests.js index 4fe2fda10a..b93b7a528f 100644 --- a/commands/Administration/setsuggests.js +++ b/commands/Administration/setsuggests.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Resolvers = require("../../helpers/resolvers"); -class Setsuggests extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -49,6 +49,5 @@ class Setsuggests extends Command { } -} +}; -module.exports = Setsuggests; \ No newline at end of file diff --git a/commands/Administration/slowmode.js b/commands/Administration/slowmode.js index b78c575e6a..89018805f1 100644 --- a/commands/Administration/slowmode.js +++ b/commands/Administration/slowmode.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), ms = require("ms"); -class Slowmode extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -65,6 +65,6 @@ class Slowmode extends Command { }); } } -} +}; + -module.exports = Slowmode; diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index b908fd2d6f..a3a52e333a 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Resolvers = require("../../helpers/resolvers"); -class Welcome extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -144,6 +144,6 @@ class Welcome extends Command { } } -} +}; + -module.exports = Welcome; diff --git a/commands/Economy/achievements.js b/commands/Economy/achievements.js index b7883e2a87..42e1e533ac 100644 --- a/commands/Economy/achievements.js +++ b/commands/Economy/achievements.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); const { Embed } = require("../../helpers/constants.js"); -class Achievements extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -67,6 +67,6 @@ class Achievements extends Command { } -} +}; + -module.exports = Achievements; diff --git a/commands/Economy/birthdate.js b/commands/Economy/birthdate.js index 194ee9df02..9d45911eba 100644 --- a/commands/Economy/birthdate.js +++ b/commands/Economy/birthdate.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Birthdate extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -82,6 +82,6 @@ class Birthdate extends Command { } -} +}; + -module.exports = Birthdate; diff --git a/commands/Economy/deposit.js b/commands/Economy/deposit.js index 9dfd8bafc9..bdbbcc5538 100644 --- a/commands/Economy/deposit.js +++ b/commands/Economy/deposit.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Deposit extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -55,6 +55,6 @@ class Deposit extends Command { }); } -} +}; + -module.exports = Deposit; diff --git a/commands/Economy/divorce.js b/commands/Economy/divorce.js index e1b8fe74dc..df554cc81f 100644 --- a/commands/Economy/divorce.js +++ b/commands/Economy/divorce.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Divorce extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -47,6 +47,5 @@ class Divorce extends Command { } -} +}; -module.exports = Divorce; \ No newline at end of file diff --git a/commands/Economy/leaderboard.js b/commands/Economy/leaderboard.js index 65e558c548..f00e2ebe4e 100644 --- a/commands/Economy/leaderboard.js +++ b/commands/Economy/leaderboard.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), AsciiTable = require("ascii-table"); -class Leaderboard extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -100,6 +100,6 @@ class Leaderboard extends Command { } } -} +}; + -module.exports = Leaderboard; diff --git a/commands/Economy/money.js b/commands/Economy/money.js index 0e8135d10d..5509dde1b6 100644 --- a/commands/Economy/money.js +++ b/commands/Economy/money.js @@ -7,7 +7,7 @@ const asyncForEach = async (array, callback) => { } }; -class Credits extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -64,4 +64,4 @@ class Credits extends Command { } -module.exports = Credits; + diff --git a/commands/Economy/pay.js b/commands/Economy/pay.js index f399bd1a50..f0cd67fae4 100644 --- a/commands/Economy/pay.js +++ b/commands/Economy/pay.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Pay extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -70,6 +70,6 @@ class Pay extends Command { } -} +}; -module.exports = Pay; \ No newline at end of file + \ No newline at end of file diff --git a/commands/Economy/profile.js b/commands/Economy/profile.js index c2b60c8936..80c8c6ba98 100644 --- a/commands/Economy/profile.js +++ b/commands/Economy/profile.js @@ -7,7 +7,7 @@ const asyncForEach = async (array, callback) => { } }; -class Profile extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -92,4 +92,3 @@ class Profile extends Command { } -module.exports = Profile; \ No newline at end of file diff --git a/commands/Economy/rep.js b/commands/Economy/rep.js index 28bcfe98a1..374dc8a462 100644 --- a/commands/Economy/rep.js +++ b/commands/Economy/rep.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Rep extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -79,4 +79,3 @@ class Rep extends Command { } -module.exports = Rep; \ No newline at end of file diff --git a/commands/Economy/rob.js b/commands/Economy/rob.js index 19bb3ab342..40dddd504e 100644 --- a/commands/Economy/rob.js +++ b/commands/Economy/rob.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Rob extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -102,4 +102,4 @@ class Rob extends Command { } -module.exports = Rob; + diff --git a/commands/Economy/setbio.js b/commands/Economy/setbio.js index b336c17246..c512d4c353 100644 --- a/commands/Economy/setbio.js +++ b/commands/Economy/setbio.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Setbio extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -40,4 +40,3 @@ class Setbio extends Command { } -module.exports = Setbio; \ No newline at end of file diff --git a/commands/Economy/slots.js b/commands/Economy/slots.js index 3db195072f..7c388634c7 100644 --- a/commands/Economy/slots.js +++ b/commands/Economy/slots.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Slots extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -167,4 +167,3 @@ class Slots extends Command { } -module.exports = Slots; \ No newline at end of file diff --git a/commands/Economy/withdraw.js b/commands/Economy/withdraw.js index 3d5fd8e9f3..5f6d1430f6 100644 --- a/commands/Economy/withdraw.js +++ b/commands/Economy/withdraw.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Withdraw extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -57,4 +57,3 @@ class Withdraw extends Command { } -module.exports = Withdraw; \ No newline at end of file diff --git a/commands/Economy/work.js b/commands/Economy/work.js index 2a33f0fa90..01e83b3e4e 100644 --- a/commands/Economy/work.js +++ b/commands/Economy/work.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Work extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -104,4 +104,4 @@ class Work extends Command { } -module.exports = Work; + diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js index 5a264ae241..7e091e6957 100644 --- a/commands/Fun/8ball.js +++ b/commands/Fun/8ball.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Eightball extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -32,6 +32,5 @@ class Eightball extends Command { message.channel.send(`${interaction.user.username}, ${answer}`); } -} +}; -module.exports = Eightball; \ No newline at end of file diff --git a/commands/Fun/ascii.js b/commands/Fun/ascii.js index cbc99a27f4..f2eb375d61 100644 --- a/commands/Fun/ascii.js +++ b/commands/Fun/ascii.js @@ -3,7 +3,7 @@ const Command = require("../../base/Command.js"), util = require("util"), figletAsync = util.promisify(figlet); -class Ascii extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -34,6 +34,5 @@ class Ascii extends Command { } -} +}; -module.exports = Ascii; \ No newline at end of file diff --git a/commands/Fun/choice.js b/commands/Fun/choice.js index ecd539b4a1..f0728f733c 100644 --- a/commands/Fun/choice.js +++ b/commands/Fun/choice.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Choice extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -50,6 +50,5 @@ class Choice extends Command { } -} +}; -module.exports = Choice; \ No newline at end of file diff --git a/commands/Fun/findwords.js b/commands/Fun/findwords.js index 5335d8738b..7afa289428 100644 --- a/commands/Fun/findwords.js +++ b/commands/Fun/findwords.js @@ -3,7 +3,7 @@ const Command = require("../../base/Command.js"), const currentGames = {}; -class FindWords extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -152,6 +152,5 @@ class FindWords extends Command { } } -} +}; -module.exports = FindWords; \ No newline at end of file diff --git a/commands/Fun/flip.js b/commands/Fun/flip.js index 742f58cc07..2a09533531 100644 --- a/commands/Fun/flip.js +++ b/commands/Fun/flip.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Flip extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -30,4 +30,3 @@ content: translate("fun/flip:TAILS") } -module.exports = Flip; \ No newline at end of file diff --git a/commands/Fun/fml.js b/commands/Fun/fml.js index 9fbac371c3..b99526674d 100644 --- a/commands/Fun/fml.js +++ b/commands/Fun/fml.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Fml extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -37,6 +37,6 @@ class Fml extends Command { } -} +}; + -module.exports = Fml; diff --git a/commands/Fun/joke.js b/commands/Fun/joke.js index 9a96d67fbb..b947afd1bc 100644 --- a/commands/Fun/joke.js +++ b/commands/Fun/joke.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Joke extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -39,6 +39,5 @@ class Joke extends Command { } -} +}; -module.exports = Joke; \ No newline at end of file diff --git a/commands/Fun/lmg.js b/commands/Fun/lmg.js index cc2082478c..0e0ebb2a99 100644 --- a/commands/Fun/lmg.js +++ b/commands/Fun/lmg.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Lmg extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -28,6 +28,5 @@ class Lmg extends Command { message.delete().catch(() => {}); } -} +}; -module.exports = Lmg; \ No newline at end of file diff --git a/commands/Fun/lovecalc.js b/commands/Fun/lovecalc.js index c9feea3554..19a27e28b6 100644 --- a/commands/Fun/lovecalc.js +++ b/commands/Fun/lovecalc.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), md5 = require("md5"); -class Lovecalc extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -66,6 +66,6 @@ class Lovecalc extends Command { } -} +}; + -module.exports = Lovecalc; diff --git a/commands/Fun/number.js b/commands/Fun/number.js index 6ac4b6d234..be331c34d1 100644 --- a/commands/Fun/number.js +++ b/commands/Fun/number.js @@ -3,7 +3,7 @@ const Command = require("../../base/Command.js"), const currentGames = {}; -class Number extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -102,6 +102,6 @@ class Number extends Command { }); } -} +}; + -module.exports = Number; diff --git a/commands/General/fortnite.js b/commands/General/fortnite.js index 067e24ce10..7b98735f2d 100644 --- a/commands/General/fortnite.js +++ b/commands/General/fortnite.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Canvas = require("discord-canvas"), Discord = require("discord.js"); -class Fortnite extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "fortnite", @@ -87,6 +87,6 @@ class Fortnite extends Command { message.channel.send({ embeds: [embed] }); m.delete(); } -} +}; + -module.exports = Fortnite; diff --git a/commands/General/fortniteshop.js b/commands/General/fortniteshop.js index 168384c0de..ea73dfb035 100644 --- a/commands/General/fortniteshop.js +++ b/commands/General/fortniteshop.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), Canvas = require("discord-canvas"); -class Fortniteshop extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "fortniteshop", @@ -56,6 +56,6 @@ class Fortniteshop extends Command { return; } -} +}; + -module.exports = Fortniteshop; diff --git a/commands/General/github.js b/commands/General/github.js index ea299ffb17..2b7daa2430 100644 --- a/commands/General/github.js +++ b/commands/General/github.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), fetch = require("node-fetch"); -class Github extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -38,6 +38,5 @@ class Github extends Command { message.channel.send({ embeds: [embed] }); } -} +}; -module.exports = Github; \ No newline at end of file diff --git a/commands/General/hastebin.js b/commands/General/hastebin.js index 099df7d9d5..a79628b924 100644 --- a/commands/General/hastebin.js +++ b/commands/General/hastebin.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), fetch = require("node-fetch"); -class Hastebin extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -59,6 +59,6 @@ class Hastebin extends Command { } -} +}; + -module.exports = Hastebin; diff --git a/commands/General/help.js b/commands/General/help.js index ef80ad30ac..ac5b36f8d8 100644 --- a/commands/General/help.js +++ b/commands/General/help.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Help extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "help", @@ -135,6 +135,6 @@ class Help extends Command { return message.channel.send({ embeds: [embed] }); } -} +}; + -module.exports = Help; diff --git a/commands/General/invitations.js b/commands/General/invitations.js index 528617d3d8..d8e55633d8 100644 --- a/commands/General/invitations.js +++ b/commands/General/invitations.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Invitations extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -71,6 +71,6 @@ class Invitations extends Command { message.channel.send({ embeds: [embed] }); } -} +}; + -module.exports = Invitations; diff --git a/commands/General/invite.js b/commands/General/invite.js index 286b0c08b9..818fc49501 100644 --- a/commands/General/invite.js +++ b/commands/General/invite.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Invite extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -43,6 +43,5 @@ class Invite extends Command { } -} +}; -module.exports = Invite; \ No newline at end of file diff --git a/commands/General/minecraft.js b/commands/General/minecraft.js index cce4e477e2..1a97aafd21 100644 --- a/commands/General/minecraft.js +++ b/commands/General/minecraft.js @@ -4,7 +4,7 @@ const Command = require("../../base/Command.js"), gamedig = require("gamedig"), Sentry = require("@sentry/node"); -class Minecraft extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -102,6 +102,5 @@ class Minecraft extends Command { } -} +}; -module.exports = Minecraft; \ No newline at end of file diff --git a/commands/General/permissions.js b/commands/General/permissions.js index a3bdd7ac7a..97cd4151f1 100644 --- a/commands/General/permissions.js +++ b/commands/General/permissions.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); const permissions = Object.keys(Discord.Permissions.FLAGS); -class Permissions extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "permissions", @@ -41,6 +41,6 @@ class Permissions extends Command { text += `\n${total.allowed} ✅ | ${total.denied} ❌`+"\n```"; message.channel.send(text); } -} +}; + -module.exports = Permissions; diff --git a/commands/General/ping.js b/commands/General/ping.js index be8559c506..50aa78bcd6 100644 --- a/commands/General/ping.js +++ b/commands/General/ping.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Ping extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -29,6 +29,5 @@ class Ping extends Command { }); } -} +}; -module.exports = Ping; \ No newline at end of file diff --git a/commands/General/quote.js b/commands/General/quote.js index 44971b5ba7..7c0ab6f9ef 100644 --- a/commands/General/quote.js +++ b/commands/General/quote.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Quote extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -95,6 +95,5 @@ class Quote extends Command { } } -} +}; -module.exports = Quote; \ No newline at end of file diff --git a/commands/General/remindme.js b/commands/General/remindme.js index ccf4f9aedf..eb3d330743 100644 --- a/commands/General/remindme.js +++ b/commands/General/remindme.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), ms = require("ms"); -class Remindme extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -56,6 +56,5 @@ class Remindme extends Command { }); } -} +}; -module.exports = Remindme; \ No newline at end of file diff --git a/commands/General/report.js b/commands/General/report.js index dbf15afb17..8475c4cfbd 100644 --- a/commands/General/report.js +++ b/commands/General/report.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Report extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -63,6 +63,6 @@ class Report extends Command { }); } -} +}; + -module.exports = Report; diff --git a/commands/General/serverinfo.js b/commands/General/serverinfo.js index d1f9fd82dc..b6500b057f 100644 --- a/commands/General/serverinfo.js +++ b/commands/General/serverinfo.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Serverinfo extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -60,6 +60,5 @@ class Serverinfo extends Command { message.channel.send({ embeds: [embed] }); } -} +}; -module.exports = Serverinfo; \ No newline at end of file diff --git a/commands/General/setafk.js b/commands/General/setafk.js index ef04067b87..dc5c124292 100644 --- a/commands/General/setafk.js +++ b/commands/General/setafk.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Setafk extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -36,6 +36,5 @@ class Setafk extends Command { } -} +}; -module.exports = Setafk; \ No newline at end of file diff --git a/commands/General/shorturl.js b/commands/General/shorturl.js index b4e96eaa86..647fbe7d19 100644 --- a/commands/General/shorturl.js +++ b/commands/General/shorturl.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), fetch = require("node-fetch"); -class ShortURL extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -47,6 +47,5 @@ class ShortURL extends Command { } -} +}; -module.exports = ShortURL; \ No newline at end of file diff --git a/commands/General/someone.js b/commands/General/someone.js index cfca13329b..a26ed5467f 100644 --- a/commands/General/someone.js +++ b/commands/General/someone.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Someone extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -32,6 +32,5 @@ class Someone extends Command { } -} +}; -module.exports = Someone; \ No newline at end of file diff --git a/commands/General/staff.js b/commands/General/staff.js index 293e33e5f6..0dea9b9f98 100644 --- a/commands/General/staff.js +++ b/commands/General/staff.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Staff extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -33,6 +33,5 @@ class Staff extends Command { message.channel.send({ embeds: [embed] }); } -} +}; -module.exports = Staff; \ No newline at end of file diff --git a/commands/General/stats.js b/commands/General/stats.js index 6735ea251d..d914e685db 100644 --- a/commands/General/stats.js +++ b/commands/General/stats.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Stats extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -56,6 +56,6 @@ class Stats extends Command { } -} +}; + -module.exports = Stats; diff --git a/commands/General/suggest.js b/commands/General/suggest.js index 11ee34f841..738f2e970d 100644 --- a/commands/General/suggest.js +++ b/commands/General/suggest.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Suggest extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -53,6 +53,5 @@ class Suggest extends Command { }); } -} +}; -module.exports = Suggest; \ No newline at end of file diff --git a/commands/General/translate.js b/commands/General/translate.js index 8248d3dafd..bc6f36854b 100644 --- a/commands/General/translate.js +++ b/commands/General/translate.js @@ -4,7 +4,7 @@ const Command = require("../../base/Command.js"), const langs = ["afrikaans", "albanian", "amharic", "arabic", "armenian", "azerbaijani", "bangla", "basque", "belarusian", "bengali", "bosnian", "bulgarian", "burmese", "catalan", "cebuano", "chichewa", "corsican", "croatian", "czech", "danish", "dutch", "english", "esperanto", "estonian", "filipino", "finnish", "french", "frisian", "galician", "georgian", "german", "greek", "gujarati", "haitian creole", "hausa", "hawaiian", "hebrew", "hindi", "hmong", "hungarian", "icelandic", "igbo", "indonesian", "irish", "italian", "japanese", "javanese", "kannada", "kazakh", "khmer", "korean", "kurdish (kurmanji)", "kyrgyz", "lao", "latin", "latvian", "lithuanian", "luxembourgish", "macedonian", "malagasy", "malay", "malayalam", "maltese", "maori", "marathi", "mongolian", "myanmar (burmese)", "nepali", "norwegian", "nyanja", "pashto", "persian", "polish", "portugese", "punjabi", "romanian", "russian", "samoan", "scottish gaelic", "serbian", "sesotho", "shona", "sindhi", "sinhala", "slovak", "slovenian", "somali", "spanish", "sundanese", "swahili", "swedish", "tajik", "tamil", "telugu", "thai", "turkish", "ukrainian", "urdu", "uzbek", "vietnamese", "welsh", "xhosa", "yiddish", "yoruba", "zulu"]; -class Translate extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -82,6 +82,5 @@ class Translate extends Command { } -} +}; -module.exports = Translate; \ No newline at end of file diff --git a/commands/General/userinfo.js b/commands/General/userinfo.js index 4502d32b6f..655f0535a7 100644 --- a/commands/General/userinfo.js +++ b/commands/General/userinfo.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), fetch = require("node-fetch"); -class Userinfo extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -99,6 +99,6 @@ class Userinfo extends Command { message.channel.send({ embeds: [embed] }); } -} +}; + -module.exports = Userinfo; diff --git a/commands/Images/approved.js b/commands/Images/approved.js index bb6bffd0cf..5e41411db2 100644 --- a/commands/Images/approved.js +++ b/commands/Images/approved.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Approved extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "approved", @@ -32,4 +32,4 @@ class Approved extends Command { } -module.exports = Approved; + diff --git a/commands/Images/avatar.js b/commands/Images/avatar.js index 08a88ac2f1..c7f0387509 100644 --- a/commands/Images/avatar.js +++ b/commands/Images/avatar.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Avatar extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "avatar", @@ -30,4 +30,4 @@ class Avatar extends Command { } -module.exports = Avatar; + diff --git a/commands/Images/batslap.js b/commands/Images/batslap.js index daf2b6a6dd..9840e46ad5 100644 --- a/commands/Images/batslap.js +++ b/commands/Images/batslap.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class BatSlap extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "batslap", @@ -35,4 +35,4 @@ class BatSlap extends Command { } -module.exports = BatSlap; + diff --git a/commands/Images/beautiful.js b/commands/Images/beautiful.js index 89cfd9dd0f..9b1e67655c 100644 --- a/commands/Images/beautiful.js +++ b/commands/Images/beautiful.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Beautiful extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "beautiful", @@ -32,4 +32,4 @@ class Beautiful extends Command { } -module.exports = Beautiful; + diff --git a/commands/Images/bed.js b/commands/Images/bed.js index c19559c644..b12a34997c 100644 --- a/commands/Images/bed.js +++ b/commands/Images/bed.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), canvacord = require("canvacord"); -class Bed extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "bed", @@ -42,6 +42,5 @@ class Bed extends Command { } -} +}; -module.exports = Bed; \ No newline at end of file diff --git a/commands/Images/brazzers.js b/commands/Images/brazzers.js index eed5deb6b9..2c2e8a8a70 100644 --- a/commands/Images/brazzers.js +++ b/commands/Images/brazzers.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Brazzers extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "brazzers", @@ -32,4 +32,4 @@ class Brazzers extends Command { } -module.exports = Brazzers; + diff --git a/commands/Images/burn.js b/commands/Images/burn.js index 79ded33919..0debb27103 100644 --- a/commands/Images/burn.js +++ b/commands/Images/burn.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Burn extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "burn", @@ -32,4 +32,4 @@ class Burn extends Command { } -module.exports = Burn; + diff --git a/commands/Images/captcha.js b/commands/Images/captcha.js index db91a62a80..988a023233 100644 --- a/commands/Images/captcha.js +++ b/commands/Images/captcha.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), fetch = require("node-fetch"); -class Captcha extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "captcha", @@ -39,6 +39,5 @@ class Captcha extends Command { } -} +}; -module.exports = Captcha; \ No newline at end of file diff --git a/commands/Images/challenger.js b/commands/Images/challenger.js index 5615cedc6f..0a042ba504 100644 --- a/commands/Images/challenger.js +++ b/commands/Images/challenger.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Challenger extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "challenger", @@ -32,4 +32,4 @@ class Challenger extends Command { } -module.exports = Challenger; + diff --git a/commands/Images/clyde.js b/commands/Images/clyde.js index c78950c53b..2c9409c58c 100644 --- a/commands/Images/clyde.js +++ b/commands/Images/clyde.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), fetch = require("node-fetch"); -class Clyde extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "clyde", @@ -47,6 +47,5 @@ class Clyde extends Command { } -} +}; -module.exports = Clyde; \ No newline at end of file diff --git a/commands/Images/dictator.js b/commands/Images/dictator.js index ae6b9747ec..70c3b0c705 100644 --- a/commands/Images/dictator.js +++ b/commands/Images/dictator.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Dictator extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "dictator", @@ -30,6 +30,6 @@ class Dictator extends Command { } -} +}; + -module.exports = Dictator; diff --git a/commands/Images/facepalm.js b/commands/Images/facepalm.js index 685b338733..5df9a93ca0 100644 --- a/commands/Images/facepalm.js +++ b/commands/Images/facepalm.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Canvas = require("canvas"), Discord = require("discord.js"); -class Facepalm extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "facepalm", @@ -49,4 +49,4 @@ class Facepalm extends Command { } -module.exports = Facepalm; + diff --git a/commands/Images/fire.js b/commands/Images/fire.js index 959119a146..6d7805e9e7 100644 --- a/commands/Images/fire.js +++ b/commands/Images/fire.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Fire extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "fire", @@ -32,4 +32,3 @@ class Fire extends Command { } -module.exports = Fire; \ No newline at end of file diff --git a/commands/Images/jail.js b/commands/Images/jail.js index f20815bce9..e1f39d2226 100644 --- a/commands/Images/jail.js +++ b/commands/Images/jail.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Jail extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "jail", @@ -32,4 +32,3 @@ class Jail extends Command { } -module.exports = Jail; \ No newline at end of file diff --git a/commands/Images/love.js b/commands/Images/love.js index c47ae829ad..468fec0e6c 100644 --- a/commands/Images/love.js +++ b/commands/Images/love.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), fetch = require("node-fetch"); -class Love extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "love", @@ -43,6 +43,5 @@ class Love extends Command { } -} +}; -module.exports = Love; \ No newline at end of file diff --git a/commands/Images/mission.js b/commands/Images/mission.js index f30224248d..3c52ccba40 100644 --- a/commands/Images/mission.js +++ b/commands/Images/mission.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Mission extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "mission", @@ -30,6 +30,5 @@ class Mission extends Command { } -} +}; -module.exports = Mission; \ No newline at end of file diff --git a/commands/Images/phcomment.js b/commands/Images/phcomment.js index 1eb92a4564..1ee1e9cc8c 100644 --- a/commands/Images/phcomment.js +++ b/commands/Images/phcomment.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), canvacord = require("canvacord"); -class Phcomment extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "phcomment", @@ -59,4 +59,3 @@ class Phcomment extends Command { } -module.exports = Phcomment; \ No newline at end of file diff --git a/commands/Images/qrcode.js b/commands/Images/qrcode.js index 2965651887..039bc091cc 100644 --- a/commands/Images/qrcode.js +++ b/commands/Images/qrcode.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Qrcode extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -42,4 +42,3 @@ class Qrcode extends Command { } -module.exports = Qrcode; \ No newline at end of file diff --git a/commands/Images/rip.js b/commands/Images/rip.js index 3e947e34fd..3aa0045c5e 100644 --- a/commands/Images/rip.js +++ b/commands/Images/rip.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Rip extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "rip", @@ -30,6 +30,5 @@ class Rip extends Command { } -} +}; -module.exports = Rip; \ No newline at end of file diff --git a/commands/Images/scary.js b/commands/Images/scary.js index 31f091ff37..6c15f16f85 100644 --- a/commands/Images/scary.js +++ b/commands/Images/scary.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Scary extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "scary", @@ -32,4 +32,3 @@ class Scary extends Command { } -module.exports = Scary; \ No newline at end of file diff --git a/commands/Images/tobecontinued.js b/commands/Images/tobecontinued.js index a1b34fde58..a4e90569ad 100644 --- a/commands/Images/tobecontinued.js +++ b/commands/Images/tobecontinued.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Tobecontinued extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "tobecontinued", @@ -32,4 +32,3 @@ class Tobecontinued extends Command { } -module.exports = Tobecontinued; \ No newline at end of file diff --git a/commands/Images/trash.js b/commands/Images/trash.js index ba06588184..77ba62d112 100644 --- a/commands/Images/trash.js +++ b/commands/Images/trash.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), canvacord = require("canvacord"); -class Trash extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "trash", @@ -31,6 +31,5 @@ class Trash extends Command { } -} +}; -module.exports = Trash; \ No newline at end of file diff --git a/commands/Images/triggered.js b/commands/Images/triggered.js index 150aeaba51..d80ab18619 100644 --- a/commands/Images/triggered.js +++ b/commands/Images/triggered.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Triggered extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "triggered", @@ -32,4 +32,3 @@ class Triggered extends Command { } -module.exports = Triggered; \ No newline at end of file diff --git a/commands/Images/tweet.js b/commands/Images/tweet.js index db4fb48670..a303a457fd 100644 --- a/commands/Images/tweet.js +++ b/commands/Images/tweet.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Tweet extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -57,6 +57,5 @@ class Tweet extends Command { } -} +}; -module.exports = Tweet; \ No newline at end of file diff --git a/commands/Images/wanted.js b/commands/Images/wanted.js index 37747d1c4d..85b146b0bf 100644 --- a/commands/Images/wanted.js +++ b/commands/Images/wanted.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Wanted extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "wanted", @@ -32,4 +32,3 @@ class Wanted extends Command { } -module.exports = Wanted; \ No newline at end of file diff --git a/commands/Images/wasted.js b/commands/Images/wasted.js index 3ef9976a2e..be84af3818 100644 --- a/commands/Images/wasted.js +++ b/commands/Images/wasted.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Wasted extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "wasted", @@ -32,4 +32,3 @@ class Wasted extends Command { } -module.exports = Wasted; \ No newline at end of file diff --git a/commands/Images/youtube-comment.js b/commands/Images/youtube-comment.js index 810a7efa5f..c759508ea4 100644 --- a/commands/Images/youtube-comment.js +++ b/commands/Images/youtube-comment.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), canvacord = require("canvacord"); -class YouTubeComment extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "youtube-comment", @@ -50,6 +50,5 @@ class YouTubeComment extends Command { } -} +}; -module.exports = YouTubeComment; \ No newline at end of file diff --git a/commands/Moderation/announcement.js b/commands/Moderation/announcement.js index 370d3f7951..da9739d860 100644 --- a/commands/Moderation/announcement.js +++ b/commands/Moderation/announcement.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Announcement extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -112,6 +112,5 @@ class Announcement extends Command { } -} +}; -module.exports = Announcement; \ No newline at end of file diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index 46d496ed01..e309c1cf6e 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Ban extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -128,6 +128,6 @@ class Ban extends Command { } -} +}; + -module.exports = Ban; diff --git a/commands/Moderation/checkinvites.js b/commands/Moderation/checkinvites.js index 7fc4d5b8da..5ce6ab5a0a 100644 --- a/commands/Moderation/checkinvites.js +++ b/commands/Moderation/checkinvites.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Checkinvites extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -47,6 +47,5 @@ class Checkinvites extends Command { message.channel.send({ embeds: [embed] }); } -} +}; -module.exports = Checkinvites; \ No newline at end of file diff --git a/commands/Moderation/clear-sanctions.js b/commands/Moderation/clear-sanctions.js index ce8e59ea0a..abf8e17e68 100644 --- a/commands/Moderation/clear-sanctions.js +++ b/commands/Moderation/clear-sanctions.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Clearsanctions extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -34,6 +34,5 @@ class Clearsanctions extends Command { }); } -} +}; -module.exports = Clearsanctions; \ No newline at end of file diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index dcaeb057ae..fa38154f5f 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Clear extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -84,6 +84,6 @@ class Clear extends Command { } -} +}; + -module.exports = Clear; diff --git a/commands/Moderation/giveaway.js b/commands/Moderation/giveaway.js index 7f32e6ad45..c485e1ef30 100644 --- a/commands/Moderation/giveaway.js +++ b/commands/Moderation/giveaway.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), ms = require("ms"); -class Giveaway extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -164,6 +164,5 @@ class Giveaway extends Command { } -} +}; -module.exports = Giveaway; \ No newline at end of file diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index da4c31cb8d..d7615657ba 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Kick extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -115,6 +115,6 @@ class Kick extends Command { } -} +}; + -module.exports = Kick; diff --git a/commands/Moderation/mute.js b/commands/Moderation/mute.js index e1f6a95e5a..536a3f0f3c 100644 --- a/commands/Moderation/mute.js +++ b/commands/Moderation/mute.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), ms = require("ms"); -class Mute extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -127,6 +127,6 @@ class Mute extends Command { } -} +}; + -module.exports = Mute; diff --git a/commands/Moderation/poll.js b/commands/Moderation/poll.js index 0e04f314d0..d8e50d98bb 100644 --- a/commands/Moderation/poll.js +++ b/commands/Moderation/poll.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Poll extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -112,6 +112,5 @@ class Poll extends Command { } -} +}; -module.exports = Poll; \ No newline at end of file diff --git a/commands/Moderation/sanctions.js b/commands/Moderation/sanctions.js index 035407faf1..32128e146e 100644 --- a/commands/Moderation/sanctions.js +++ b/commands/Moderation/sanctions.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Sanctions extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -48,6 +48,6 @@ class Sanctions extends Command { message.channel.send({ embeds: [embed] }); } -} +}; + -module.exports = Sanctions; diff --git a/commands/Moderation/setwarns.js b/commands/Moderation/setwarns.js index 9407f95087..2a4f2f48d6 100644 --- a/commands/Moderation/setwarns.js +++ b/commands/Moderation/setwarns.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Setwarns extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -85,6 +85,5 @@ class Setwarns extends Command { } -} +}; -module.exports = Setwarns; \ No newline at end of file diff --git a/commands/Moderation/unban.js b/commands/Moderation/unban.js index 6008618ee9..4519239657 100644 --- a/commands/Moderation/unban.js +++ b/commands/Moderation/unban.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Unban extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -72,6 +72,5 @@ class Unban extends Command { } -} +}; -module.exports = Unban; \ No newline at end of file diff --git a/commands/Moderation/unmute.js b/commands/Moderation/unmute.js index 1d87c182c9..1ddaf21123 100644 --- a/commands/Moderation/unmute.js +++ b/commands/Moderation/unmute.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Unmute extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -53,6 +53,5 @@ class Unmute extends Command { } -} +}; -module.exports = Unmute; \ No newline at end of file diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index 7d0d0b35a6..b52a436372 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Warn extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -149,6 +149,6 @@ class Warn extends Command { } } -} +}; + -module.exports = Warn; diff --git a/commands/Music/autoplay.js b/commands/Music/autoplay.js index 774204e82a..c267d9b369 100644 --- a/commands/Music/autoplay.js +++ b/commands/Music/autoplay.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class AutoPlay extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -48,4 +48,3 @@ class AutoPlay extends Command { } -module.exports = AutoPlay; \ No newline at end of file diff --git a/commands/Music/back.js b/commands/Music/back.js index e6b9a0dde6..d1fffd7657 100644 --- a/commands/Music/back.js +++ b/commands/Music/back.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Back extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -115,4 +115,4 @@ class Back extends Command { } -module.exports = Back; + diff --git a/commands/Music/filter.js b/commands/Music/filter.js index 29f7c07cdb..ad1a989a65 100644 --- a/commands/Music/filter.js +++ b/commands/Music/filter.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), FiltersList = require("../../assets/json/filters.json"); -class Filter extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -65,4 +65,3 @@ content: translate("music/filter:REMOVING_FILTER") } -module.exports = Filter; \ No newline at end of file diff --git a/commands/Music/filters.js b/commands/Music/filters.js index 5df910ecdb..92afd8a967 100644 --- a/commands/Music/filters.js +++ b/commands/Music/filters.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), FiltersList = require("../../assets/json/filters.json"); -class Filters extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -58,4 +58,3 @@ class Filters extends Command { } -module.exports = Filters; \ No newline at end of file diff --git a/commands/Music/lyrics.js b/commands/Music/lyrics.js index 7ddf5d6e50..43dce5737f 100644 --- a/commands/Music/lyrics.js +++ b/commands/Music/lyrics.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), lyricsParse = require("lyrics-finder"); -class Lyrics extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -67,4 +67,3 @@ class Lyrics extends Command { } -module.exports = Lyrics; \ No newline at end of file diff --git a/commands/Music/np.js b/commands/Music/np.js index 5f766fd20e..e898449c60 100644 --- a/commands/Music/np.js +++ b/commands/Music/np.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Np extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -62,4 +62,3 @@ class Np extends Command { } -module.exports = Np; \ No newline at end of file diff --git a/commands/Music/pause.js b/commands/Music/pause.js index 35f036e3b1..2971da82a9 100644 --- a/commands/Music/pause.js +++ b/commands/Music/pause.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Pause extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -48,4 +48,3 @@ class Pause extends Command { } -module.exports = Pause; \ No newline at end of file diff --git a/commands/Music/play.js b/commands/Music/play.js index 6140964573..906387ba94 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Play extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -49,4 +49,4 @@ class Play extends Command { } -module.exports = Play; \ No newline at end of file + \ No newline at end of file diff --git a/commands/Music/queue.js b/commands/Music/queue.js index d10cdd7b26..440066907e 100644 --- a/commands/Music/queue.js +++ b/commands/Music/queue.js @@ -2,7 +2,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"), Pagination = require("discord-paginationembed"); -class Queue extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -67,4 +67,3 @@ class Queue extends Command { } -module.exports = Queue; \ No newline at end of file diff --git a/commands/Music/resume.js b/commands/Music/resume.js index 8e360703e9..f2c60488ac 100644 --- a/commands/Music/resume.js +++ b/commands/Music/resume.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Resume extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -47,4 +47,3 @@ class Resume extends Command { } -module.exports = Resume; \ No newline at end of file diff --git a/commands/Music/seek.js b/commands/Music/seek.js index 8f1c5b9d13..ea3726de71 100644 --- a/commands/Music/seek.js +++ b/commands/Music/seek.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"); const ms = require("ms"); -class Seek extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -54,6 +54,5 @@ class Seek extends Command { }); } -} +}; -module.exports = Seek; \ No newline at end of file diff --git a/commands/Music/skip.js b/commands/Music/skip.js index 89279a0edb..f1d76db4c8 100644 --- a/commands/Music/skip.js +++ b/commands/Music/skip.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Skip extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -115,4 +115,4 @@ class Skip extends Command { } -module.exports = Skip; + diff --git a/commands/Music/stop.js b/commands/Music/stop.js index 80fb44594e..a087318c6f 100644 --- a/commands/Music/stop.js +++ b/commands/Music/stop.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class Stop extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -105,4 +105,4 @@ class Stop extends Command { } -module.exports = Stop; + diff --git a/commands/Owner/eval.js b/commands/Owner/eval.js index 42912e32d9..aec22c17b9 100644 --- a/commands/Owner/eval.js +++ b/commands/Owner/eval.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Eval extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -50,6 +50,5 @@ class Eval extends Command { } -} +}; -module.exports = Eval; \ No newline at end of file diff --git a/commands/Owner/reload.js b/commands/Owner/reload.js index b7288995d3..ce1167352b 100644 --- a/commands/Owner/reload.js +++ b/commands/Owner/reload.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"); -class Reload extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -34,4 +34,3 @@ class Reload extends Command { } -module.exports = Reload; \ No newline at end of file diff --git a/commands/Owner/servers-list.js b/commands/Owner/servers-list.js index 18978fd414..811dbc9643 100644 --- a/commands/Owner/servers-list.js +++ b/commands/Owner/servers-list.js @@ -1,7 +1,7 @@ const Command = require("../../base/Command.js"), Discord = require("discord.js"); -class ServersList extends Command { +module.exports = class extends Command { constructor (client) { super(client, { @@ -120,6 +120,6 @@ class ServersList extends Command { }); } -} +}; + -module.exports = ServersList; From 0affe77dc941be23f0e7da893e0a9a03230e21da Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:15:45 +0200 Subject: [PATCH 14/29] :art: Add eol last eslint rule --- base/Log.js | 2 +- base/Member.js | 2 +- base/User.js | 2 +- commands/Administration/addcommand.js | 2 -- commands/Administration/addemoji.js | 1 - commands/Administration/automod.js | 1 - commands/Administration/autorole.js | 1 - commands/Administration/backup.js | 1 - commands/Administration/configuration.js | 2 -- commands/Administration/delcommand.js | 1 - commands/Administration/deletemod.js | 1 - commands/Administration/goodbye.js | 2 -- commands/Administration/ignore.js | 1 - commands/Administration/setfortniteshop.js | 1 - commands/Administration/setlang.js | 1 - commands/Administration/setmodlogs.js | 1 - commands/Administration/setprefix.js | 1 - commands/Administration/setreports.js | 2 -- commands/Administration/setsuggests.js | 1 - commands/Administration/slowmode.js | 2 -- commands/Administration/welcome.js | 2 -- commands/Economy/achievements.js | 2 -- commands/Economy/birthdate.js | 2 -- commands/Economy/deposit.js | 2 -- commands/Economy/divorce.js | 1 - commands/Economy/leaderboard.js | 2 -- commands/Economy/money.js | 4 +--- commands/Economy/pay.js | 2 +- commands/Economy/profile.js | 3 +-- commands/Economy/rep.js | 3 +-- commands/Economy/rob.js | 4 +--- commands/Economy/setbio.js | 3 +-- commands/Economy/slots.js | 3 +-- commands/Economy/withdraw.js | 3 +-- commands/Economy/work.js | 4 +--- commands/Fun/8ball.js | 1 - commands/Fun/ascii.js | 1 - commands/Fun/choice.js | 1 - commands/Fun/findwords.js | 1 - commands/Fun/fml.js | 2 -- commands/Fun/joke.js | 1 - commands/Fun/lmg.js | 1 - commands/Fun/lovecalc.js | 2 -- commands/Fun/number.js | 2 -- commands/General/fortnite.js | 2 -- commands/General/fortniteshop.js | 2 -- commands/General/github.js | 1 - commands/General/hastebin.js | 2 -- commands/General/help.js | 2 -- commands/General/invitations.js | 2 -- commands/General/invite.js | 1 - commands/General/minecraft.js | 1 - commands/General/permissions.js | 2 -- commands/General/ping.js | 1 - commands/General/quote.js | 1 - commands/General/remindme.js | 1 - commands/General/report.js | 2 -- commands/General/serverinfo.js | 1 - commands/General/setafk.js | 1 - commands/General/shorturl.js | 1 - commands/General/someone.js | 1 - commands/General/staff.js | 1 - commands/General/stats.js | 2 -- commands/General/suggest.js | 1 - commands/General/translate.js | 1 - commands/General/userinfo.js | 2 -- commands/Images/approved.js | 4 +--- commands/Images/avatar.js | 4 +--- commands/Images/batslap.js | 4 +--- commands/Images/beautiful.js | 4 +--- commands/Images/bed.js | 1 - commands/Images/brazzers.js | 4 +--- commands/Images/burn.js | 4 +--- commands/Images/captcha.js | 1 - commands/Images/challenger.js | 4 +--- commands/Images/clyde.js | 1 - commands/Images/dictator.js | 2 -- commands/Images/facepalm.js | 4 +--- commands/Images/fire.js | 3 +-- commands/Images/jail.js | 3 +-- commands/Images/love.js | 1 - commands/Images/mission.js | 1 - commands/Images/phcomment.js | 3 +-- commands/Images/qrcode.js | 3 +-- commands/Images/rip.js | 1 - commands/Images/scary.js | 3 +-- commands/Images/tobecontinued.js | 3 +-- commands/Images/trash.js | 1 - commands/Images/triggered.js | 3 +-- commands/Images/tweet.js | 1 - commands/Images/wanted.js | 3 +-- commands/Images/wasted.js | 3 +-- commands/Images/youtube-comment.js | 1 - commands/Moderation/announcement.js | 1 - commands/Moderation/ban.js | 2 -- commands/Moderation/checkinvites.js | 1 - commands/Moderation/clear-sanctions.js | 1 - commands/Moderation/clear.js | 2 -- commands/Moderation/giveaway.js | 1 - commands/Moderation/kick.js | 2 -- commands/Moderation/mute.js | 2 -- commands/Moderation/poll.js | 1 - commands/Moderation/sanctions.js | 2 -- commands/Moderation/setwarns.js | 1 - commands/Moderation/unban.js | 1 - commands/Moderation/unmute.js | 1 - commands/Moderation/warn.js | 2 -- commands/Music/autoplay.js | 3 +-- commands/Music/back.js | 4 +--- commands/Music/filters.js | 3 +-- commands/Music/lyrics.js | 3 +-- commands/Music/np.js | 3 +-- commands/Music/pause.js | 3 +-- commands/Music/play.js | 4 ++-- commands/Music/queue.js | 3 +-- commands/Music/resume.js | 3 +-- commands/Music/seek.js | 1 - commands/Music/skip.js | 4 +--- commands/Music/stop.js | 4 +--- commands/Owner/eval.js | 1 - commands/Owner/reload.js | 3 +-- commands/Owner/servers-list.js | 2 -- dashboard/routes/discord.js | 2 +- dashboard/routes/guild-manager.js | 2 +- dashboard/routes/guild-stats.js | 2 +- dashboard/routes/index.js | 2 +- dashboard/routes/logout.js | 2 +- dashboard/routes/settings.js | 2 +- dashboard/utils.js | 2 +- events/guildCreate.js | 2 +- events/guildDelete.js | 2 +- events/guildMemberAdd.js | 2 +- events/guildMemberRemove.js | 2 +- events/guildMemberUpdate.js | 2 +- events/ready.js | 2 +- helpers/autoUpdateDocs.js | 2 +- helpers/checkReminds.js | 2 +- helpers/discordbots.org.js | 2 +- helpers/functions.js | 2 +- helpers/logger.js | 2 +- package.json | 4 ++++ scripts/create-db-indexes.js | 2 +- scripts/migrate-db-from-v4.6-to-v4.7.js | 2 +- 143 files changed, 66 insertions(+), 223 deletions(-) diff --git a/base/Log.js b/base/Log.js index 5e9d898e90..8a89f1c7d8 100644 --- a/base/Log.js +++ b/base/Log.js @@ -14,4 +14,4 @@ module.exports = mongoose.model("Log", new mongoose.Schema({ id: null }} -})); \ No newline at end of file +})); diff --git a/base/Member.js b/base/Member.js index 1ad6c81661..10d8c6937c 100644 --- a/base/Member.js +++ b/base/Member.js @@ -30,4 +30,4 @@ module.exports = mongoose.model("Member", new mongoose.Schema({ endDate: null }}, -})); \ No newline at end of file +})); diff --git a/base/User.js b/base/User.js index c3d0a6bd98..b42dd3cc15 100644 --- a/base/User.js +++ b/base/User.js @@ -116,4 +116,4 @@ userSchema.method("getAchievements", async function(){ return canvas.toBuffer(); }); -module.exports = mongoose.model("User", userSchema); \ No newline at end of file +module.exports = mongoose.model("User", userSchema); diff --git a/commands/Administration/addcommand.js b/commands/Administration/addcommand.js index 72d3c3c370..271df52677 100644 --- a/commands/Administration/addcommand.js +++ b/commands/Administration/addcommand.js @@ -58,5 +58,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Administration/addemoji.js b/commands/Administration/addemoji.js index 21096f59bc..b5b42c8ec1 100644 --- a/commands/Administration/addemoji.js +++ b/commands/Administration/addemoji.js @@ -56,4 +56,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/automod.js b/commands/Administration/automod.js index 5bcc816aec..4679e77a79 100644 --- a/commands/Administration/automod.js +++ b/commands/Administration/automod.js @@ -55,4 +55,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/autorole.js b/commands/Administration/autorole.js index 9605988af6..37c4d88ada 100644 --- a/commands/Administration/autorole.js +++ b/commands/Administration/autorole.js @@ -77,4 +77,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/backup.js b/commands/Administration/backup.js index 25e4f84161..bfa01b9ca9 100644 --- a/commands/Administration/backup.js +++ b/commands/Administration/backup.js @@ -137,4 +137,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/configuration.js b/commands/Administration/configuration.js index 39878e990e..2202b29800 100644 --- a/commands/Administration/configuration.js +++ b/commands/Administration/configuration.js @@ -127,5 +127,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Administration/delcommand.js b/commands/Administration/delcommand.js index 939931ab9d..03667bc6be 100644 --- a/commands/Administration/delcommand.js +++ b/commands/Administration/delcommand.js @@ -42,4 +42,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/deletemod.js b/commands/Administration/deletemod.js index 3eb8ea8c32..2f5d67c751 100644 --- a/commands/Administration/deletemod.js +++ b/commands/Administration/deletemod.js @@ -41,4 +41,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index 060756da08..7c892b40e5 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -145,5 +145,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Administration/ignore.js b/commands/Administration/ignore.js index 82b5b57395..177cb0e65f 100644 --- a/commands/Administration/ignore.js +++ b/commands/Administration/ignore.js @@ -46,4 +46,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/setfortniteshop.js b/commands/Administration/setfortniteshop.js index f9977ab1b5..6eadc99a8a 100644 --- a/commands/Administration/setfortniteshop.js +++ b/commands/Administration/setfortniteshop.js @@ -77,4 +77,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/setlang.js b/commands/Administration/setlang.js index 6da2af3645..8b929d3e47 100644 --- a/commands/Administration/setlang.js +++ b/commands/Administration/setlang.js @@ -37,4 +37,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/setmodlogs.js b/commands/Administration/setmodlogs.js index 5608ed3bd8..a7cdb004c7 100644 --- a/commands/Administration/setmodlogs.js +++ b/commands/Administration/setmodlogs.js @@ -49,4 +49,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/setprefix.js b/commands/Administration/setprefix.js index 84cbca35d5..7a3621f0f2 100644 --- a/commands/Administration/setprefix.js +++ b/commands/Administration/setprefix.js @@ -44,4 +44,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/setreports.js b/commands/Administration/setreports.js index a46845bf47..bcdeb22a02 100644 --- a/commands/Administration/setreports.js +++ b/commands/Administration/setreports.js @@ -50,5 +50,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Administration/setsuggests.js b/commands/Administration/setsuggests.js index b93b7a528f..2407998bd9 100644 --- a/commands/Administration/setsuggests.js +++ b/commands/Administration/setsuggests.js @@ -50,4 +50,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Administration/slowmode.js b/commands/Administration/slowmode.js index 89018805f1..7b2bbc9ff4 100644 --- a/commands/Administration/slowmode.js +++ b/commands/Administration/slowmode.js @@ -66,5 +66,3 @@ module.exports = class extends Command { } } }; - - diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index a3a52e333a..8dcdb8decc 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -145,5 +145,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Economy/achievements.js b/commands/Economy/achievements.js index 42e1e533ac..3208f55b23 100644 --- a/commands/Economy/achievements.js +++ b/commands/Economy/achievements.js @@ -68,5 +68,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Economy/birthdate.js b/commands/Economy/birthdate.js index 9d45911eba..573c679e78 100644 --- a/commands/Economy/birthdate.js +++ b/commands/Economy/birthdate.js @@ -83,5 +83,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Economy/deposit.js b/commands/Economy/deposit.js index bdbbcc5538..029fd0e646 100644 --- a/commands/Economy/deposit.js +++ b/commands/Economy/deposit.js @@ -56,5 +56,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Economy/divorce.js b/commands/Economy/divorce.js index df554cc81f..9590bd0026 100644 --- a/commands/Economy/divorce.js +++ b/commands/Economy/divorce.js @@ -48,4 +48,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Economy/leaderboard.js b/commands/Economy/leaderboard.js index f00e2ebe4e..c5150788fb 100644 --- a/commands/Economy/leaderboard.js +++ b/commands/Economy/leaderboard.js @@ -101,5 +101,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Economy/money.js b/commands/Economy/money.js index 5509dde1b6..fe06ee85c6 100644 --- a/commands/Economy/money.js +++ b/commands/Economy/money.js @@ -62,6 +62,4 @@ module.exports = class extends Command { message.channel.send({ embeds: [embed] }); } -} - - +}; diff --git a/commands/Economy/pay.js b/commands/Economy/pay.js index f0cd67fae4..036c8ba72d 100644 --- a/commands/Economy/pay.js +++ b/commands/Economy/pay.js @@ -72,4 +72,4 @@ module.exports = class extends Command { }; - \ No newline at end of file + diff --git a/commands/Economy/profile.js b/commands/Economy/profile.js index 80c8c6ba98..defae453a1 100644 --- a/commands/Economy/profile.js +++ b/commands/Economy/profile.js @@ -90,5 +90,4 @@ module.exports = class extends Command { message.channel.send({ embeds: [profileEmbed] }); // Send the embed in the current channel } -} - +}; diff --git a/commands/Economy/rep.js b/commands/Economy/rep.js index 374dc8a462..8bcc881da1 100644 --- a/commands/Economy/rep.js +++ b/commands/Economy/rep.js @@ -77,5 +77,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Economy/rob.js b/commands/Economy/rob.js index 40dddd504e..69a414df0c 100644 --- a/commands/Economy/rob.js +++ b/commands/Economy/rob.js @@ -100,6 +100,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Economy/setbio.js b/commands/Economy/setbio.js index c512d4c353..1683004942 100644 --- a/commands/Economy/setbio.js +++ b/commands/Economy/setbio.js @@ -38,5 +38,4 @@ module.exports = class extends Command { await data.userData.save(); } -} - +}; diff --git a/commands/Economy/slots.js b/commands/Economy/slots.js index 7c388634c7..9d277ead82 100644 --- a/commands/Economy/slots.js +++ b/commands/Economy/slots.js @@ -165,5 +165,4 @@ module.exports = class extends Command { } } -} - +}; diff --git a/commands/Economy/withdraw.js b/commands/Economy/withdraw.js index 5f6d1430f6..ccfb794b3b 100644 --- a/commands/Economy/withdraw.js +++ b/commands/Economy/withdraw.js @@ -55,5 +55,4 @@ module.exports = class extends Command { }); } -} - +}; diff --git a/commands/Economy/work.js b/commands/Economy/work.js index 01e83b3e4e..6be26eee3a 100644 --- a/commands/Economy/work.js +++ b/commands/Economy/work.js @@ -102,6 +102,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js index 7e091e6957..9efa5aa2de 100644 --- a/commands/Fun/8ball.js +++ b/commands/Fun/8ball.js @@ -33,4 +33,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Fun/ascii.js b/commands/Fun/ascii.js index f2eb375d61..c566455c00 100644 --- a/commands/Fun/ascii.js +++ b/commands/Fun/ascii.js @@ -35,4 +35,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Fun/choice.js b/commands/Fun/choice.js index f0728f733c..45668f6080 100644 --- a/commands/Fun/choice.js +++ b/commands/Fun/choice.js @@ -51,4 +51,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Fun/findwords.js b/commands/Fun/findwords.js index 7afa289428..0e5e0ea1e2 100644 --- a/commands/Fun/findwords.js +++ b/commands/Fun/findwords.js @@ -153,4 +153,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Fun/fml.js b/commands/Fun/fml.js index b99526674d..13a4296f38 100644 --- a/commands/Fun/fml.js +++ b/commands/Fun/fml.js @@ -38,5 +38,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Fun/joke.js b/commands/Fun/joke.js index b947afd1bc..7687fadbf9 100644 --- a/commands/Fun/joke.js +++ b/commands/Fun/joke.js @@ -40,4 +40,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Fun/lmg.js b/commands/Fun/lmg.js index 0e0ebb2a99..4fa499e7e7 100644 --- a/commands/Fun/lmg.js +++ b/commands/Fun/lmg.js @@ -29,4 +29,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Fun/lovecalc.js b/commands/Fun/lovecalc.js index 19a27e28b6..9c9584d1de 100644 --- a/commands/Fun/lovecalc.js +++ b/commands/Fun/lovecalc.js @@ -67,5 +67,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Fun/number.js b/commands/Fun/number.js index be331c34d1..f7d9a8d777 100644 --- a/commands/Fun/number.js +++ b/commands/Fun/number.js @@ -103,5 +103,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/General/fortnite.js b/commands/General/fortnite.js index 7b98735f2d..dac4074e6a 100644 --- a/commands/General/fortnite.js +++ b/commands/General/fortnite.js @@ -88,5 +88,3 @@ module.exports = class extends Command { m.delete(); } }; - - diff --git a/commands/General/fortniteshop.js b/commands/General/fortniteshop.js index ea73dfb035..d794d5477b 100644 --- a/commands/General/fortniteshop.js +++ b/commands/General/fortniteshop.js @@ -57,5 +57,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/General/github.js b/commands/General/github.js index 2b7daa2430..8e6221ba41 100644 --- a/commands/General/github.js +++ b/commands/General/github.js @@ -39,4 +39,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/hastebin.js b/commands/General/hastebin.js index a79628b924..91cbba46f7 100644 --- a/commands/General/hastebin.js +++ b/commands/General/hastebin.js @@ -60,5 +60,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/General/help.js b/commands/General/help.js index ac5b36f8d8..3db23733b8 100644 --- a/commands/General/help.js +++ b/commands/General/help.js @@ -136,5 +136,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/General/invitations.js b/commands/General/invitations.js index d8e55633d8..ef1f95951f 100644 --- a/commands/General/invitations.js +++ b/commands/General/invitations.js @@ -72,5 +72,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/General/invite.js b/commands/General/invite.js index 818fc49501..98b18d57d3 100644 --- a/commands/General/invite.js +++ b/commands/General/invite.js @@ -44,4 +44,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/minecraft.js b/commands/General/minecraft.js index 1a97aafd21..989917adc7 100644 --- a/commands/General/minecraft.js +++ b/commands/General/minecraft.js @@ -103,4 +103,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/permissions.js b/commands/General/permissions.js index 97cd4151f1..25e8e7143a 100644 --- a/commands/General/permissions.js +++ b/commands/General/permissions.js @@ -42,5 +42,3 @@ module.exports = class extends Command { message.channel.send(text); } }; - - diff --git a/commands/General/ping.js b/commands/General/ping.js index 50aa78bcd6..80819f3d1a 100644 --- a/commands/General/ping.js +++ b/commands/General/ping.js @@ -30,4 +30,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/quote.js b/commands/General/quote.js index 7c0ab6f9ef..ada714fe6d 100644 --- a/commands/General/quote.js +++ b/commands/General/quote.js @@ -96,4 +96,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/remindme.js b/commands/General/remindme.js index eb3d330743..ba82f3645d 100644 --- a/commands/General/remindme.js +++ b/commands/General/remindme.js @@ -57,4 +57,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/report.js b/commands/General/report.js index 8475c4cfbd..79a7323de2 100644 --- a/commands/General/report.js +++ b/commands/General/report.js @@ -64,5 +64,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/General/serverinfo.js b/commands/General/serverinfo.js index b6500b057f..3d3a7f8115 100644 --- a/commands/General/serverinfo.js +++ b/commands/General/serverinfo.js @@ -61,4 +61,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/setafk.js b/commands/General/setafk.js index dc5c124292..2ebfdd85db 100644 --- a/commands/General/setafk.js +++ b/commands/General/setafk.js @@ -37,4 +37,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/shorturl.js b/commands/General/shorturl.js index 647fbe7d19..6d6e9468a3 100644 --- a/commands/General/shorturl.js +++ b/commands/General/shorturl.js @@ -48,4 +48,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/someone.js b/commands/General/someone.js index a26ed5467f..53400a7133 100644 --- a/commands/General/someone.js +++ b/commands/General/someone.js @@ -33,4 +33,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/staff.js b/commands/General/staff.js index 0dea9b9f98..73b02ed288 100644 --- a/commands/General/staff.js +++ b/commands/General/staff.js @@ -34,4 +34,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/stats.js b/commands/General/stats.js index d914e685db..19b5d4bb9c 100644 --- a/commands/General/stats.js +++ b/commands/General/stats.js @@ -57,5 +57,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/General/suggest.js b/commands/General/suggest.js index 738f2e970d..95ec554ce4 100644 --- a/commands/General/suggest.js +++ b/commands/General/suggest.js @@ -54,4 +54,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/translate.js b/commands/General/translate.js index bc6f36854b..d6593d5285 100644 --- a/commands/General/translate.js +++ b/commands/General/translate.js @@ -83,4 +83,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/General/userinfo.js b/commands/General/userinfo.js index 655f0535a7..12c2a76250 100644 --- a/commands/General/userinfo.js +++ b/commands/General/userinfo.js @@ -100,5 +100,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Images/approved.js b/commands/Images/approved.js index 5e41411db2..47c54a26b9 100644 --- a/commands/Images/approved.js +++ b/commands/Images/approved.js @@ -30,6 +30,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Images/avatar.js b/commands/Images/avatar.js index c7f0387509..e7b5fef461 100644 --- a/commands/Images/avatar.js +++ b/commands/Images/avatar.js @@ -28,6 +28,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Images/batslap.js b/commands/Images/batslap.js index 9840e46ad5..0e97991766 100644 --- a/commands/Images/batslap.js +++ b/commands/Images/batslap.js @@ -33,6 +33,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Images/beautiful.js b/commands/Images/beautiful.js index 9b1e67655c..78ca5ee369 100644 --- a/commands/Images/beautiful.js +++ b/commands/Images/beautiful.js @@ -30,6 +30,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Images/bed.js b/commands/Images/bed.js index b12a34997c..33e4d27cb2 100644 --- a/commands/Images/bed.js +++ b/commands/Images/bed.js @@ -43,4 +43,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Images/brazzers.js b/commands/Images/brazzers.js index 2c2e8a8a70..0505e75572 100644 --- a/commands/Images/brazzers.js +++ b/commands/Images/brazzers.js @@ -30,6 +30,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Images/burn.js b/commands/Images/burn.js index 0debb27103..7277c4d4ae 100644 --- a/commands/Images/burn.js +++ b/commands/Images/burn.js @@ -30,6 +30,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Images/captcha.js b/commands/Images/captcha.js index 988a023233..ec5d89c8d4 100644 --- a/commands/Images/captcha.js +++ b/commands/Images/captcha.js @@ -40,4 +40,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Images/challenger.js b/commands/Images/challenger.js index 0a042ba504..c8a717afbc 100644 --- a/commands/Images/challenger.js +++ b/commands/Images/challenger.js @@ -30,6 +30,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Images/clyde.js b/commands/Images/clyde.js index 2c9409c58c..8fa2970b59 100644 --- a/commands/Images/clyde.js +++ b/commands/Images/clyde.js @@ -48,4 +48,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Images/dictator.js b/commands/Images/dictator.js index 70c3b0c705..912aee7df2 100644 --- a/commands/Images/dictator.js +++ b/commands/Images/dictator.js @@ -31,5 +31,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Images/facepalm.js b/commands/Images/facepalm.js index 5df9a93ca0..a2443a192a 100644 --- a/commands/Images/facepalm.js +++ b/commands/Images/facepalm.js @@ -47,6 +47,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Images/fire.js b/commands/Images/fire.js index 6d7805e9e7..378f82ae5b 100644 --- a/commands/Images/fire.js +++ b/commands/Images/fire.js @@ -30,5 +30,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Images/jail.js b/commands/Images/jail.js index e1f39d2226..d6c9594dcc 100644 --- a/commands/Images/jail.js +++ b/commands/Images/jail.js @@ -30,5 +30,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Images/love.js b/commands/Images/love.js index 468fec0e6c..bdf688b9f2 100644 --- a/commands/Images/love.js +++ b/commands/Images/love.js @@ -44,4 +44,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Images/mission.js b/commands/Images/mission.js index 3c52ccba40..8850e03739 100644 --- a/commands/Images/mission.js +++ b/commands/Images/mission.js @@ -31,4 +31,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Images/phcomment.js b/commands/Images/phcomment.js index 1ee1e9cc8c..0721eaaf89 100644 --- a/commands/Images/phcomment.js +++ b/commands/Images/phcomment.js @@ -57,5 +57,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Images/qrcode.js b/commands/Images/qrcode.js index 039bc091cc..dec689b5e4 100644 --- a/commands/Images/qrcode.js +++ b/commands/Images/qrcode.js @@ -40,5 +40,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Images/rip.js b/commands/Images/rip.js index 3aa0045c5e..5089437030 100644 --- a/commands/Images/rip.js +++ b/commands/Images/rip.js @@ -31,4 +31,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Images/scary.js b/commands/Images/scary.js index 6c15f16f85..dc975cae2f 100644 --- a/commands/Images/scary.js +++ b/commands/Images/scary.js @@ -30,5 +30,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Images/tobecontinued.js b/commands/Images/tobecontinued.js index a4e90569ad..a9c3938dc8 100644 --- a/commands/Images/tobecontinued.js +++ b/commands/Images/tobecontinued.js @@ -30,5 +30,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Images/trash.js b/commands/Images/trash.js index 77ba62d112..8e493c593b 100644 --- a/commands/Images/trash.js +++ b/commands/Images/trash.js @@ -32,4 +32,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Images/triggered.js b/commands/Images/triggered.js index d80ab18619..70bc8a28c2 100644 --- a/commands/Images/triggered.js +++ b/commands/Images/triggered.js @@ -30,5 +30,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Images/tweet.js b/commands/Images/tweet.js index a303a457fd..b0d8e78848 100644 --- a/commands/Images/tweet.js +++ b/commands/Images/tweet.js @@ -58,4 +58,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Images/wanted.js b/commands/Images/wanted.js index 85b146b0bf..13bd9d4462 100644 --- a/commands/Images/wanted.js +++ b/commands/Images/wanted.js @@ -30,5 +30,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Images/wasted.js b/commands/Images/wasted.js index be84af3818..0f50fb39b2 100644 --- a/commands/Images/wasted.js +++ b/commands/Images/wasted.js @@ -30,5 +30,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Images/youtube-comment.js b/commands/Images/youtube-comment.js index c759508ea4..b73c461805 100644 --- a/commands/Images/youtube-comment.js +++ b/commands/Images/youtube-comment.js @@ -51,4 +51,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Moderation/announcement.js b/commands/Moderation/announcement.js index da9739d860..46097ff752 100644 --- a/commands/Moderation/announcement.js +++ b/commands/Moderation/announcement.js @@ -113,4 +113,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index e309c1cf6e..f3db9416a3 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -129,5 +129,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Moderation/checkinvites.js b/commands/Moderation/checkinvites.js index 5ce6ab5a0a..0cebc48e56 100644 --- a/commands/Moderation/checkinvites.js +++ b/commands/Moderation/checkinvites.js @@ -48,4 +48,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Moderation/clear-sanctions.js b/commands/Moderation/clear-sanctions.js index abf8e17e68..4685342f5a 100644 --- a/commands/Moderation/clear-sanctions.js +++ b/commands/Moderation/clear-sanctions.js @@ -35,4 +35,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index fa38154f5f..37023a694c 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -85,5 +85,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Moderation/giveaway.js b/commands/Moderation/giveaway.js index c485e1ef30..ca296eab5f 100644 --- a/commands/Moderation/giveaway.js +++ b/commands/Moderation/giveaway.js @@ -165,4 +165,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index d7615657ba..84caef2ad8 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -116,5 +116,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Moderation/mute.js b/commands/Moderation/mute.js index 536a3f0f3c..5c754e9258 100644 --- a/commands/Moderation/mute.js +++ b/commands/Moderation/mute.js @@ -128,5 +128,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Moderation/poll.js b/commands/Moderation/poll.js index d8e50d98bb..e373c226df 100644 --- a/commands/Moderation/poll.js +++ b/commands/Moderation/poll.js @@ -113,4 +113,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Moderation/sanctions.js b/commands/Moderation/sanctions.js index 32128e146e..b0c4311804 100644 --- a/commands/Moderation/sanctions.js +++ b/commands/Moderation/sanctions.js @@ -49,5 +49,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Moderation/setwarns.js b/commands/Moderation/setwarns.js index 2a4f2f48d6..5f5ef0cca2 100644 --- a/commands/Moderation/setwarns.js +++ b/commands/Moderation/setwarns.js @@ -86,4 +86,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Moderation/unban.js b/commands/Moderation/unban.js index 4519239657..30b15b9d77 100644 --- a/commands/Moderation/unban.js +++ b/commands/Moderation/unban.js @@ -73,4 +73,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Moderation/unmute.js b/commands/Moderation/unmute.js index 1ddaf21123..fb8e53d82a 100644 --- a/commands/Moderation/unmute.js +++ b/commands/Moderation/unmute.js @@ -54,4 +54,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index b52a436372..787985cf88 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -150,5 +150,3 @@ module.exports = class extends Command { } }; - - diff --git a/commands/Music/autoplay.js b/commands/Music/autoplay.js index c267d9b369..f64945d871 100644 --- a/commands/Music/autoplay.js +++ b/commands/Music/autoplay.js @@ -46,5 +46,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Music/back.js b/commands/Music/back.js index d1fffd7657..0fbb378095 100644 --- a/commands/Music/back.js +++ b/commands/Music/back.js @@ -113,6 +113,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Music/filters.js b/commands/Music/filters.js index 92afd8a967..2eb1c466a2 100644 --- a/commands/Music/filters.js +++ b/commands/Music/filters.js @@ -56,5 +56,4 @@ module.exports = class extends Command { message.channel.send({ embeds: [list] }); } -} - +}; diff --git a/commands/Music/lyrics.js b/commands/Music/lyrics.js index 43dce5737f..3057bc25e7 100644 --- a/commands/Music/lyrics.js +++ b/commands/Music/lyrics.js @@ -65,5 +65,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Music/np.js b/commands/Music/np.js index e898449c60..fb22b465a3 100644 --- a/commands/Music/np.js +++ b/commands/Music/np.js @@ -60,5 +60,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Music/pause.js b/commands/Music/pause.js index 2971da82a9..00adb0a10d 100644 --- a/commands/Music/pause.js +++ b/commands/Music/pause.js @@ -46,5 +46,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Music/play.js b/commands/Music/play.js index 906387ba94..6bfb320135 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -47,6 +47,6 @@ module.exports = class extends Command { await this.client.player.play(interaction, translate.join(" ")); } -} +}; - \ No newline at end of file + diff --git a/commands/Music/queue.js b/commands/Music/queue.js index 440066907e..1ba3c63c5a 100644 --- a/commands/Music/queue.js +++ b/commands/Music/queue.js @@ -65,5 +65,4 @@ module.exports = class extends Command { } -} - +}; diff --git a/commands/Music/resume.js b/commands/Music/resume.js index f2c60488ac..fbfa180116 100644 --- a/commands/Music/resume.js +++ b/commands/Music/resume.js @@ -45,5 +45,4 @@ module.exports = class extends Command { }); } -} - +}; diff --git a/commands/Music/seek.js b/commands/Music/seek.js index ea3726de71..f919c48a87 100644 --- a/commands/Music/seek.js +++ b/commands/Music/seek.js @@ -55,4 +55,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Music/skip.js b/commands/Music/skip.js index f1d76db4c8..65dd8ea630 100644 --- a/commands/Music/skip.js +++ b/commands/Music/skip.js @@ -113,6 +113,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Music/stop.js b/commands/Music/stop.js index a087318c6f..68819ed942 100644 --- a/commands/Music/stop.js +++ b/commands/Music/stop.js @@ -103,6 +103,4 @@ module.exports = class extends Command { } -} - - +}; diff --git a/commands/Owner/eval.js b/commands/Owner/eval.js index aec22c17b9..4a06ff0262 100644 --- a/commands/Owner/eval.js +++ b/commands/Owner/eval.js @@ -51,4 +51,3 @@ module.exports = class extends Command { } }; - diff --git a/commands/Owner/reload.js b/commands/Owner/reload.js index ce1167352b..803bebb233 100644 --- a/commands/Owner/reload.js +++ b/commands/Owner/reload.js @@ -32,5 +32,4 @@ module.exports = class extends Command { }); } -} - +}; diff --git a/commands/Owner/servers-list.js b/commands/Owner/servers-list.js index 811dbc9643..78795cc4c9 100644 --- a/commands/Owner/servers-list.js +++ b/commands/Owner/servers-list.js @@ -121,5 +121,3 @@ module.exports = class extends Command { } }; - - diff --git a/dashboard/routes/discord.js b/dashboard/routes/discord.js index 8c8979a02e..c52e0c6ec1 100644 --- a/dashboard/routes/discord.js +++ b/dashboard/routes/discord.js @@ -87,4 +87,4 @@ router.get("/callback", async (req, res) => { res.redirect(redirectURL); }); -module.exports = router; \ No newline at end of file +module.exports = router; diff --git a/dashboard/routes/guild-manager.js b/dashboard/routes/guild-manager.js index 5e7f018ae1..0a07394b73 100644 --- a/dashboard/routes/guild-manager.js +++ b/dashboard/routes/guild-manager.js @@ -146,4 +146,4 @@ router.post("/:serverID", CheckAuth, async(req, res) => { res.redirect(303, "/manage/"+guild.id); }); -module.exports = router; \ No newline at end of file +module.exports = router; diff --git a/dashboard/routes/guild-stats.js b/dashboard/routes/guild-stats.js index 86aca91bbe..04ed708f1c 100644 --- a/dashboard/routes/guild-stats.js +++ b/dashboard/routes/guild-stats.js @@ -107,4 +107,4 @@ function formatDate(date){ if(mm<10) {mm="0"+mm;} date = mm+"/"+dd; return date; -} \ No newline at end of file +} diff --git a/dashboard/routes/index.js b/dashboard/routes/index.js index a69a610c5e..07dd672f89 100644 --- a/dashboard/routes/index.js +++ b/dashboard/routes/index.js @@ -14,4 +14,4 @@ router.get("/selector", CheckAuth, async(req, res) => { }); }); -module.exports = router; \ No newline at end of file +module.exports = router; diff --git a/dashboard/routes/logout.js b/dashboard/routes/logout.js index 17d1e5f6ab..a3195d3492 100644 --- a/dashboard/routes/logout.js +++ b/dashboard/routes/logout.js @@ -7,4 +7,4 @@ router.get("/", async function(req, res) { res.redirect(req.client.config.dashboard.failureURL); }); -module.exports = router; \ No newline at end of file +module.exports = router; diff --git a/dashboard/routes/settings.js b/dashboard/routes/settings.js index 844292eec9..dae9ee20bb 100644 --- a/dashboard/routes/settings.js +++ b/dashboard/routes/settings.js @@ -48,4 +48,4 @@ function checkDate(birthdate){ if(d.getTime() > Date.now()) return false; if(d.getTime() < (Date.now()-2.523e+12)) return false; return d; -} \ No newline at end of file +} diff --git a/dashboard/utils.js b/dashboard/utils.js index b57a5c9a91..db4b09399a 100644 --- a/dashboard/utils.js +++ b/dashboard/utils.js @@ -42,4 +42,4 @@ async function fetchUser(userData, client, query){ return userInfos; } -module.exports = { fetchUser, fetchGuild }; \ No newline at end of file +module.exports = { fetchUser, fetchGuild }; diff --git a/events/guildCreate.js b/events/guildCreate.js index 15c703dd2b..16b7bbea4a 100644 --- a/events/guildCreate.js +++ b/events/guildCreate.js @@ -48,4 +48,4 @@ module.exports = class { this.client.channels.cache.get(this.client.config.support.logs).send(logsEmbed); } -}; \ No newline at end of file +}; diff --git a/events/guildDelete.js b/events/guildDelete.js index 0f81d2d651..e0394234d1 100644 --- a/events/guildDelete.js +++ b/events/guildDelete.js @@ -18,4 +18,4 @@ module.exports = class { this.client.channels.cache.get(this.client.config.support.logs).send({ embeds: [embed] }); } -}; \ No newline at end of file +}; diff --git a/events/guildMemberAdd.js b/events/guildMemberAdd.js index dbdb2034c9..d3d5a378e8 100644 --- a/events/guildMemberAdd.js +++ b/events/guildMemberAdd.js @@ -138,4 +138,4 @@ module.exports = class { } -}; \ No newline at end of file +}; diff --git a/events/guildMemberRemove.js b/events/guildMemberRemove.js index 6a16c70ef3..23f765cbc9 100644 --- a/events/guildMemberRemove.js +++ b/events/guildMemberRemove.js @@ -121,4 +121,4 @@ module.exports = class { } } }; - \ No newline at end of file + diff --git a/events/guildMemberUpdate.js b/events/guildMemberUpdate.js index 6200fb4a00..245e14da03 100644 --- a/events/guildMemberUpdate.js +++ b/events/guildMemberUpdate.js @@ -16,4 +16,4 @@ module.exports = class { newMember.send({ files: [ { name: "unlocked.png", attachment: "./assets/img/achievements/achievement_unlocked5.png"} ] }); } } -}; \ No newline at end of file +}; diff --git a/events/ready.js b/events/ready.js index b51752b809..5a0e69cfe1 100644 --- a/events/ready.js +++ b/events/ready.js @@ -53,4 +53,4 @@ module.exports = class { }, 400); } -}; \ No newline at end of file +}; diff --git a/helpers/autoUpdateDocs.js b/helpers/autoUpdateDocs.js index 3d0257f69a..830e038d00 100644 --- a/helpers/autoUpdateDocs.js +++ b/helpers/autoUpdateDocs.js @@ -54,4 +54,4 @@ module.exports = { } } -}; \ No newline at end of file +}; diff --git a/helpers/checkReminds.js b/helpers/checkReminds.js index 707507f231..7bbb5792fe 100644 --- a/helpers/checkReminds.js +++ b/helpers/checkReminds.js @@ -44,4 +44,4 @@ module.exports = { }, 1000); } -}; \ No newline at end of file +}; diff --git a/helpers/discordbots.org.js b/helpers/discordbots.org.js index 1dff129b09..139e425a52 100644 --- a/helpers/discordbots.org.js +++ b/helpers/discordbots.org.js @@ -33,4 +33,4 @@ module.exports = { } } -}; \ No newline at end of file +}; diff --git a/helpers/functions.js b/helpers/functions.js index 1db515e50b..a8f4239939 100644 --- a/helpers/functions.js +++ b/helpers/functions.js @@ -111,4 +111,4 @@ module.exports = { return absoluteTime.join(", "); } -}; \ No newline at end of file +}; diff --git a/helpers/logger.js b/helpers/logger.js index da9345df2b..fb518fb5fd 100644 --- a/helpers/logger.js +++ b/helpers/logger.js @@ -47,4 +47,4 @@ module.exports = class Logger { default: throw new TypeError("Logger type must be either warn, debug, log, ready, cmd or error."); } } -}; \ No newline at end of file +}; diff --git a/package.json b/package.json index b62e71bce1..fd0f1e4b4e 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,10 @@ "error", "always" ], + "eol-last": [ + "error", + "always" + ], "linebreak-style": 0, "require-atomic-updates": 0 } diff --git a/scripts/create-db-indexes.js b/scripts/create-db-indexes.js index d9b029b65f..b0942989e2 100644 --- a/scripts/create-db-indexes.js +++ b/scripts/create-db-indexes.js @@ -41,4 +41,4 @@ client.connect().then(async () => { }).catch(() => { console.log(chalk.red("Couldn't connect to mongoDB database...")); process.exit(1); -}); \ No newline at end of file +}); diff --git a/scripts/migrate-db-from-v4.6-to-v4.7.js b/scripts/migrate-db-from-v4.6-to-v4.7.js index 5a3be6a4ae..c59d3b4559 100644 --- a/scripts/migrate-db-from-v4.6-to-v4.7.js +++ b/scripts/migrate-db-from-v4.6-to-v4.7.js @@ -33,4 +33,4 @@ client.connect().then(async () => { }).catch(() => { console.log(chalk.red("Couldn't connect to mongoDB database...")); process.exit(1); -}); \ No newline at end of file +}); From adbcd710d9a011d62c590bcbf8507ce4e1fc8004 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:17:50 +0200 Subject: [PATCH 15/29] :recycle: Rewrite marry command --- commands/Economy/marry.js | 128 +++++++++++++++++------------ languages/en-US/economy/marry.json | 2 +- 2 files changed, 78 insertions(+), 52 deletions(-) diff --git a/commands/Economy/marry.js b/commands/Economy/marry.js index 0ae727641c..3efecb10de 100644 --- a/commands/Economy/marry.js +++ b/commands/Economy/marry.js @@ -4,12 +4,20 @@ const Command = require("../../base/Command.js"), // An object to store pending requests const pendings = {}; -class Marry extends Command { +module.exports = class extends Command { constructor (client) { super(client, { name: "marry", - dirname: __dirname, + + options: [ + { + name: "user", + type: "USER", + required: true + } + ], + enabled: true, guildOnly: true, aliases: [ "mariage" ], @@ -17,7 +25,8 @@ class Marry extends Command { botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 10000 + + dirname: __dirname }); } @@ -25,36 +34,35 @@ class Marry extends Command { // if the message author is already wedded if(data.userData.lover){ - return message.error("economy/marry:ALREADY_MARRIED", { - prefix: data.guild.prefix - }); - } - - // Gets the first mentionned member - const member = await this.client.resolveMember(args[0], message.guild); - if(!member){ return interaction.reply({ - content: translate("economy/marry:INVALID_MEMBER"), + content: translate("economy/marry:ALREADY_MARRIED", { + prefix: data.guild.prefix + }), ephemeral: true }); } - const userData = await this.client.findOrCreateUser({ id: member.id }); + const user = interaction.options.getUser("user"); + + const userData = await this.client.findOrCreateUser({ id: user.id }); // if the member is already wedded if(userData.lover){ - return message.error("economy/marry:ALREADY_MARRIED_USER", { - username: member.user.tag + return interaction.reply({ + content: translate("economy/marry:ALREADY_MARRIED_USER", { + username: user.tag + }), + ephemeral: true }); } - if(member.user.bot){ + if(user.bot){ return interaction.reply({ content: translate("economy/marry:BOT_USER"), ephemeral: true }); } - if(member.id === interaction.user.id){ + if(user.id === interaction.user.id){ return interaction.reply({ content: translate("economy/marry:YOURSELF"), ephemeral: true @@ -66,38 +74,52 @@ class Marry extends Command { // If the member already sent a request to someone if(requester === interaction.user.id){ const user = this.client.users.cache.get(receiver) || await this.client.users.fetch(receiver); - return message.error("economy/marry:REQUEST_AUTHOR_TO_AMEMBER", { - username: user.tag + return interaction.reply({ + content: translate("economy/marry:REQUEST_AUTHOR_TO_AMEMBER", { + username: user.tag + }), + ephemeral: true }); } else if (receiver === interaction.user.id){ // If there is a pending request for this member - const user = this.client.users.cache.get(requester) || await this.client.users.fetch(requester); - return message.error("economy/marry:REQUEST_AMEMBER_TO_AUTHOR", { - username: user.tag + const user = this.client.users.cache.get(requester) || await this.client.users.fetch(requester); + return interaction.reply({ + content: translate("economy/marry:REQUEST_AMEMBER_TO_AUTHOR", { + username: user.tag + }), + ephemeral: true }); - } else if(requester === member.id){ // If the asked member has sent pending request + } else if(requester === user.id){ // If the asked member has sent pending request const user = this.client.users.cache.get(receiver) || await this.client.users.fetch(receiver); - return message.error("economy/marry:REQUEST_AMEMBER_TO_MEMBER", { - firstUsername: member.user.tag, - secondUsername: user.tag + return interaction.reply({ + content: translate("economy/marry:REQUEST_AMEMBER_TO_MEMBER", { + firstUsername: user.tag, + secondUsername: user.tag + }), + ephemeral: true }); - } else if (receiver === member.id){ // If there is a pending request for the asked member + } else if (receiver === user.id){ // If there is a pending request for the asked member const user = this.client.users.cache.get(requester) || await this.client.users.fetch(requester); - return message.error("economy/marry:REQUEST_MEMBER_TO_AMEMBER", { - firstUsername: member.user.tag, - secondUsername: user.tag + return interaction.reply({ + content: translate("economy/marry:REQUEST_MEMBER_TO_AMEMBER", { + firstUsername: user.tag, + secondUsername: user.tag + }), + ephemeral: true }); } } // Update pending requests - pendings[interaction.user.id] = member.id; + pendings[interaction.user.id] = user.id; - message.sendT("economy/marry:REQUEST", { - from: interaction.user.toString(), - to: member.user.toString() + interaction.channel.send({ + content: translate("economy/marry:REQUEST", { + from: interaction.user.toString(), + to: user.toString() + }) }); - const collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === member.id, { + const collector = new Discord.MessageCollector(interaction.channel, (m) => m.author.id === user.id, { time: 120000 }); @@ -108,7 +130,7 @@ class Marry extends Command { if(msg.content.toLowerCase() === translate("common:NO").toLowerCase()){ return collector.stop(false); } else { - return interaction.reply({ + return interaction.channel.send({ content: translate("misc:INVALID_YES_NO"), ephemeral: true }); @@ -119,17 +141,19 @@ class Marry extends Command { // Delete pending request delete pendings[interaction.user.id]; if(reason === "time"){ - return message.error("economy/marry:TIMEOUT", { - username: member.user.toString() + return interaction.channel.send({ + content: translate("economy/marry:TIMEOUT", { + username: user.toString() + }) }); } if(reason){ - data.userData.lover = member.id; + data.userData.lover = user.id; await data.userData.save(); userData.lover = interaction.user.id; await userData.save(); const messageOptions = { - content: `${member.toString()} :heart: ${interaction.user.toString()}`, + content: `${user.toString()} :heart: ${interaction.user.toString()}`, files: [ { name: "unlocked.png", @@ -139,7 +163,7 @@ class Marry extends Command { }; let sent = false; if(!userData.achievements.married.achieved){ - message.channel.send(messageOptions); + interaction.channel.send(messageOptions); sent = true; userData.achievements.married.achieved = true; userData.achievements.married.progress.now = 1; @@ -147,26 +171,28 @@ class Marry extends Command { userData.save(); } if(!data.userData.achievements.married.achieved){ - if(!sent) message.channel.send(messageOptions); + if(!sent) interaction.channel.send(messageOptions); data.userData.achievements.married.achieved = true; data.userData.achievements.married.progress.now = 1; data.userData.markModified("achievements.married"); data.userData.save(); } - return message.success("economy/marry:SUCCESS", { - creator: interaction.user.toString(), - partner: member.user.toString() + return interaction.reply({ + content: translate("economy/marry:SUCCESS", { + creator: interaction.user.toString(), + partner: user.toString() + }) }); } else { - return message.success("economy/marry:DENIED", { - creator: interaction.user.toString(), - partner: member.user.toString() + return interaction.reply({ + content: translate("economy/marry:DENIED", { + creator: interaction.user.toString(), + partner: user.toString() + }) }); } }); } -} - -module.exports = Marry; \ No newline at end of file +}; diff --git a/languages/en-US/economy/marry.json b/languages/en-US/economy/marry.json index 07e41c5538..76645d5b83 100644 --- a/languages/en-US/economy/marry.json +++ b/languages/en-US/economy/marry.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Marry someone you love!", "EXAMPLES": "{{prefix}}marry @Androz#2091", - "INVALID_MEMBER": "You must mention a valid member!", + "OPT_USER_DESCRIPTION": "The user you want to marry", "ALREADY_MARRIED": "You are already married! First use `{{prefix}}divorce` to divorce.", "ALREADY_MARRIED_USER": "The place is taken, companion! **{{username}}** is already married!", "YOURSELF": "You can't marry yourself!", From 0a7c18a3c8baf0bc0860c0e2c426832ed57a978c Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:30:53 +0200 Subject: [PATCH 16/29] :fire: Remove aliases --- commands/Administration/addcommand.js | 2 +- commands/Administration/addemoji.js | 2 +- commands/Administration/automod.js | 2 +- commands/Administration/autorole.js | 2 +- commands/Administration/backup.js | 2 +- commands/Administration/configuration.js | 2 +- commands/Administration/delcommand.js | 2 +- commands/Administration/deletemod.js | 2 +- commands/Administration/goodbye.js | 2 +- commands/Administration/ignore.js | 2 +- commands/Administration/setlang.js | 2 +- commands/Administration/setmodlogs.js | 2 +- commands/Administration/setprefix.js | 2 +- commands/Administration/setsuggests.js | 2 +- commands/Administration/slowmode.js | 2 +- commands/Administration/welcome.js | 2 +- commands/Economy/deposit.js | 2 +- commands/Economy/divorce.js | 2 +- commands/Economy/leaderboard.js | 2 +- commands/Economy/marry.js | 2 +- commands/Economy/pay.js | 2 +- commands/Economy/profile.js | 2 +- commands/Economy/rep.js | 2 +- commands/Economy/rob.js | 2 +- commands/Economy/setbio.js | 2 +- commands/Economy/slots.js | 2 +- commands/Economy/withdraw.js | 2 +- commands/Economy/work.js | 2 +- commands/Fun/8ball.js | 2 +- commands/Fun/ascii.js | 2 +- commands/Fun/choice.js | 2 +- commands/Fun/findwords.js | 2 +- commands/Fun/flip.js | 2 +- commands/Fun/fml.js | 2 +- commands/Fun/joke.js | 2 +- commands/Fun/lmg.js | 2 +- commands/Fun/number.js | 2 +- commands/General/fortnite.js | 2 +- commands/General/fortniteshop.js | 2 +- commands/General/github.js | 2 +- commands/General/hastebin.js | 2 +- commands/General/help.js | 2 +- commands/General/invitations.js | 2 +- commands/General/invite.js | 2 +- commands/General/minecraft.js | 2 +- commands/General/permissions.js | 2 +- commands/General/ping.js | 2 +- commands/General/quote.js | 2 +- commands/General/remindme.js | 2 +- commands/General/report.js | 2 +- commands/General/serverinfo.js | 2 +- commands/General/setafk.js | 2 +- commands/General/shorturl.js | 2 +- commands/General/someone.js | 2 +- commands/General/staff.js | 2 +- commands/General/stats.js | 2 +- commands/General/suggest.js | 2 +- commands/General/translate.js | 2 +- commands/General/userinfo.js | 2 +- commands/Images/approved.js | 2 +- commands/Images/avatar.js | 2 +- commands/Images/batslap.js | 2 +- commands/Images/beautiful.js | 2 +- commands/Images/bed.js | 2 +- commands/Images/brazzers.js | 2 +- commands/Images/burn.js | 2 +- commands/Images/captcha.js | 2 +- commands/Images/challenger.js | 2 +- commands/Images/clyde.js | 2 +- commands/Images/dictator.js | 2 +- commands/Images/facepalm.js | 2 +- commands/Images/fire.js | 2 +- commands/Images/jail.js | 2 +- commands/Images/love.js | 2 +- commands/Images/mission.js | 2 +- commands/Images/phcomment.js | 2 +- commands/Images/qrcode.js | 2 +- commands/Images/rip.js | 2 +- commands/Images/scary.js | 2 +- commands/Images/tobecontinued.js | 2 +- commands/Images/trash.js | 2 +- commands/Images/triggered.js | 2 +- commands/Images/tweet.js | 2 +- commands/Images/wanted.js | 2 +- commands/Images/wasted.js | 2 +- commands/Images/youtube-comment.js | 2 +- commands/Moderation/announcement.js | 2 +- commands/Moderation/ban.js | 2 +- commands/Moderation/checkinvites.js | 2 +- commands/Moderation/clear-sanctions.js | 2 +- commands/Moderation/clear.js | 2 +- commands/Moderation/giveaway.js | 2 +- commands/Moderation/kick.js | 2 +- commands/Moderation/mute.js | 2 +- commands/Moderation/poll.js | 2 +- commands/Moderation/sanctions.js | 2 +- commands/Moderation/setwarns.js | 2 +- commands/Moderation/unmute.js | 2 +- commands/Moderation/warn.js | 2 +- commands/Music/autoplay.js | 2 +- commands/Music/back.js | 2 +- commands/Music/filter.js | 2 +- commands/Music/filters.js | 2 +- commands/Music/lyrics.js | 2 +- commands/Music/np.js | 2 +- commands/Music/pause.js | 2 +- commands/Music/play.js | 2 +- commands/Music/queue.js | 2 +- commands/Music/resume.js | 2 +- commands/Music/seek.js | 2 +- commands/Music/skip.js | 2 +- commands/Music/stop.js | 2 +- commands/Owner/eval.js | 2 +- commands/Owner/reload.js | 2 +- commands/Owner/servers-list.js | 2 +- 115 files changed, 115 insertions(+), 115 deletions(-) diff --git a/commands/Administration/addcommand.js b/commands/Administration/addcommand.js index 271df52677..6741f3f98f 100644 --- a/commands/Administration/addcommand.js +++ b/commands/Administration/addcommand.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "custom-command" ], + memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/addemoji.js b/commands/Administration/addemoji.js index b5b42c8ec1..d16bac87c6 100644 --- a/commands/Administration/addemoji.js +++ b/commands/Administration/addemoji.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/automod.js b/commands/Administration/automod.js index 4679e77a79..3375c0a916 100644 --- a/commands/Administration/automod.js +++ b/commands/Administration/automod.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/autorole.js b/commands/Administration/autorole.js index 37c4d88ada..342450b22a 100644 --- a/commands/Administration/autorole.js +++ b/commands/Administration/autorole.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "ar" ], + memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/backup.js b/commands/Administration/backup.js index bfa01b9ca9..45c80da53e 100644 --- a/commands/Administration/backup.js +++ b/commands/Administration/backup.js @@ -11,7 +11,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "sauvegarde" ], + memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ADMINISTRATOR" ], nsfw: false, diff --git a/commands/Administration/configuration.js b/commands/Administration/configuration.js index 2202b29800..2f7cf3c4cf 100644 --- a/commands/Administration/configuration.js +++ b/commands/Administration/configuration.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "conf", "config" ], + memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/delcommand.js b/commands/Administration/delcommand.js index 03667bc6be..8667bea141 100644 --- a/commands/Administration/delcommand.js +++ b/commands/Administration/delcommand.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/deletemod.js b/commands/Administration/deletemod.js index 2f5d67c751..e720c4b3ae 100644 --- a/commands/Administration/deletemod.js +++ b/commands/Administration/deletemod.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "autodeletemodcommands" ], + memberPermissions: [ "MANAGE_MESSAGES" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index 7c892b40e5..004e403d97 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "au-revoir" ], + memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/ignore.js b/commands/Administration/ignore.js index 177cb0e65f..4a363c98a9 100644 --- a/commands/Administration/ignore.js +++ b/commands/Administration/ignore.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "disableChannel" ], + memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/setlang.js b/commands/Administration/setlang.js index 8b929d3e47..26e2a3bbc1 100644 --- a/commands/Administration/setlang.js +++ b/commands/Administration/setlang.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/setmodlogs.js b/commands/Administration/setmodlogs.js index a7cdb004c7..dfdc525daa 100644 --- a/commands/Administration/setmodlogs.js +++ b/commands/Administration/setmodlogs.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "setmodlogs" ], + memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/setprefix.js b/commands/Administration/setprefix.js index 7a3621f0f2..ec3dceaf37 100644 --- a/commands/Administration/setprefix.js +++ b/commands/Administration/setprefix.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/setsuggests.js b/commands/Administration/setsuggests.js index 2407998bd9..94a59cbdc2 100644 --- a/commands/Administration/setsuggests.js +++ b/commands/Administration/setsuggests.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "setsuggest", "setsuggestions", "setsuggestion" ], + memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/slowmode.js b/commands/Administration/slowmode.js index 7b2bbc9ff4..2243d39e32 100644 --- a/commands/Administration/slowmode.js +++ b/commands/Administration/slowmode.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "slowmotion" ], + memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index 8dcdb8decc..6aff63dfe4 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "bienvenue" ], + memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/deposit.js b/commands/Economy/deposit.js index 029fd0e646..1b3de00479 100644 --- a/commands/Economy/deposit.js +++ b/commands/Economy/deposit.js @@ -15,7 +15,7 @@ module.exports = class extends Command { enabled: true, guildOnly: true, - aliases: [ "bank", "banque", "dep" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/divorce.js b/commands/Economy/divorce.js index 9590bd0026..e058a0aecf 100644 --- a/commands/Economy/divorce.js +++ b/commands/Economy/divorce.js @@ -8,7 +8,7 @@ module.exports = class extends Command { enabled: true, guildOnly: false, - aliases: [ "profil" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/leaderboard.js b/commands/Economy/leaderboard.js index c5150788fb..12e6cdfde6 100644 --- a/commands/Economy/leaderboard.js +++ b/commands/Economy/leaderboard.js @@ -17,7 +17,7 @@ module.exports = class extends Command { enabled: true, guildOnly: true, - aliases: [ "lb" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/marry.js b/commands/Economy/marry.js index 3efecb10de..ed1e9f2f23 100644 --- a/commands/Economy/marry.js +++ b/commands/Economy/marry.js @@ -20,7 +20,7 @@ module.exports = class extends Command { enabled: true, guildOnly: true, - aliases: [ "mariage" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/pay.js b/commands/Economy/pay.js index 036c8ba72d..3a1c1bb5a4 100644 --- a/commands/Economy/pay.js +++ b/commands/Economy/pay.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/profile.js b/commands/Economy/profile.js index defae453a1..8dd50d47b3 100644 --- a/commands/Economy/profile.js +++ b/commands/Economy/profile.js @@ -15,7 +15,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "profil" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/rep.js b/commands/Economy/rep.js index 8bcc881da1..942c04264a 100644 --- a/commands/Economy/rep.js +++ b/commands/Economy/rep.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "reputation" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/rob.js b/commands/Economy/rob.js index 69a414df0c..2e9ae60534 100644 --- a/commands/Economy/rob.js +++ b/commands/Economy/rob.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "steal" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/setbio.js b/commands/Economy/setbio.js index 1683004942..ae2949a265 100644 --- a/commands/Economy/setbio.js +++ b/commands/Economy/setbio.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "biography", "setdesc" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/slots.js b/commands/Economy/slots.js index 9d277ead82..0615136e1f 100644 --- a/commands/Economy/slots.js +++ b/commands/Economy/slots.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "casino", "slot" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/withdraw.js b/commands/Economy/withdraw.js index ccfb794b3b..b01c2cf9a5 100644 --- a/commands/Economy/withdraw.js +++ b/commands/Economy/withdraw.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "wd" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Economy/work.js b/commands/Economy/work.js index 6be26eee3a..234389e0df 100644 --- a/commands/Economy/work.js +++ b/commands/Economy/work.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "salaire", "salary", "travail", "daily", "dailies" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js index 9efa5aa2de..13f1eeb03e 100644 --- a/commands/Fun/8ball.js +++ b/commands/Fun/8ball.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "eight-ball", "eightball" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Fun/ascii.js b/commands/Fun/ascii.js index c566455c00..8977208aeb 100644 --- a/commands/Fun/ascii.js +++ b/commands/Fun/ascii.js @@ -11,7 +11,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Fun/choice.js b/commands/Fun/choice.js index 45668f6080..35f1f59465 100644 --- a/commands/Fun/choice.js +++ b/commands/Fun/choice.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "random" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Fun/findwords.js b/commands/Fun/findwords.js index 0e5e0ea1e2..681cf4712f 100644 --- a/commands/Fun/findwords.js +++ b/commands/Fun/findwords.js @@ -11,7 +11,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Fun/flip.js b/commands/Fun/flip.js index 2a09533531..c14757e193 100644 --- a/commands/Fun/flip.js +++ b/commands/Fun/flip.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "dice" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Fun/fml.js b/commands/Fun/fml.js index 13a4296f38..d1363e27f6 100644 --- a/commands/Fun/fml.js +++ b/commands/Fun/fml.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "vdm" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Fun/joke.js b/commands/Fun/joke.js index 7687fadbf9..bff911abc7 100644 --- a/commands/Fun/joke.js +++ b/commands/Fun/joke.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "blague" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Fun/lmg.js b/commands/Fun/lmg.js index 4fa499e7e7..661bc085ff 100644 --- a/commands/Fun/lmg.js +++ b/commands/Fun/lmg.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "lmgtfy" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Fun/number.js b/commands/Fun/number.js index f7d9a8d777..3f3c24d5ed 100644 --- a/commands/Fun/number.js +++ b/commands/Fun/number.js @@ -11,7 +11,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/fortnite.js b/commands/General/fortnite.js index dac4074e6a..07d6097691 100644 --- a/commands/General/fortnite.js +++ b/commands/General/fortnite.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "fn" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/fortniteshop.js b/commands/General/fortniteshop.js index d794d5477b..7621897c27 100644 --- a/commands/General/fortniteshop.js +++ b/commands/General/fortniteshop.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "fnshop" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/github.js b/commands/General/github.js index 8e6221ba41..02a68b49dd 100644 --- a/commands/General/github.js +++ b/commands/General/github.js @@ -10,7 +10,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "git", "code" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/hastebin.js b/commands/General/hastebin.js index 91cbba46f7..193a8c33d0 100644 --- a/commands/General/hastebin.js +++ b/commands/General/hastebin.js @@ -10,7 +10,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "pastebin" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/help.js b/commands/General/help.js index 3db23733b8..a403d550a9 100644 --- a/commands/General/help.js +++ b/commands/General/help.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "aide", "h", "commands" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/invitations.js b/commands/General/invitations.js index ef1f95951f..9bfc972171 100644 --- a/commands/General/invitations.js +++ b/commands/General/invitations.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "MANAGE_GUILD" ], nsfw: false, diff --git a/commands/General/invite.js b/commands/General/invite.js index 98b18d57d3..2af4419345 100644 --- a/commands/General/invite.js +++ b/commands/General/invite.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "i", "add", "vote" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/minecraft.js b/commands/General/minecraft.js index 989917adc7..30bb4c6eaa 100644 --- a/commands/General/minecraft.js +++ b/commands/General/minecraft.js @@ -12,7 +12,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "mc" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/permissions.js b/commands/General/permissions.js index 25e8e7143a..90cdb74401 100644 --- a/commands/General/permissions.js +++ b/commands/General/permissions.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "perms" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/ping.js b/commands/General/ping.js index 80819f3d1a..df7638714b 100644 --- a/commands/General/ping.js +++ b/commands/General/ping.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "pong", "latency" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES" ], nsfw: false, diff --git a/commands/General/quote.js b/commands/General/quote.js index ada714fe6d..613293572f 100644 --- a/commands/General/quote.js +++ b/commands/General/quote.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "quoter" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/remindme.js b/commands/General/remindme.js index ba82f3645d..ba0bbd3a41 100644 --- a/commands/General/remindme.js +++ b/commands/General/remindme.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "reminder" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/report.js b/commands/General/report.js index 79a7323de2..050160353a 100644 --- a/commands/General/report.js +++ b/commands/General/report.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/serverinfo.js b/commands/General/serverinfo.js index 3d3a7f8115..b7a1660186 100644 --- a/commands/General/serverinfo.js +++ b/commands/General/serverinfo.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "si" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/setafk.js b/commands/General/setafk.js index 2ebfdd85db..72135ab9d4 100644 --- a/commands/General/setafk.js +++ b/commands/General/setafk.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "afk" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/shorturl.js b/commands/General/shorturl.js index 6d6e9468a3..eee8e51428 100644 --- a/commands/General/shorturl.js +++ b/commands/General/shorturl.js @@ -10,7 +10,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "minimize" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/someone.js b/commands/General/someone.js index 53400a7133..fcd380ac37 100644 --- a/commands/General/someone.js +++ b/commands/General/someone.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "somebody", "something" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/staff.js b/commands/General/staff.js index 73b02ed288..3b8f10b452 100644 --- a/commands/General/staff.js +++ b/commands/General/staff.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "stafflist", "staffliste" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/stats.js b/commands/General/stats.js index 19b5d4bb9c..4169c4d2d2 100644 --- a/commands/General/stats.js +++ b/commands/General/stats.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "statistics", "infobot", "botinfos", "bot-infos", "bot-info", "infos-bot", "info-bot" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/suggest.js b/commands/General/suggest.js index 95ec554ce4..07b079065e 100644 --- a/commands/General/suggest.js +++ b/commands/General/suggest.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "suggestion", "sugg" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/translate.js b/commands/General/translate.js index d6593d5285..4128ea7974 100644 --- a/commands/General/translate.js +++ b/commands/General/translate.js @@ -12,7 +12,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "traduction", "translation", "trad" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/General/userinfo.js b/commands/General/userinfo.js index 12c2a76250..80eb9b0b06 100644 --- a/commands/General/userinfo.js +++ b/commands/General/userinfo.js @@ -10,7 +10,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "ui" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Images/approved.js b/commands/Images/approved.js index 47c54a26b9..4126bc098a 100644 --- a/commands/Images/approved.js +++ b/commands/Images/approved.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/avatar.js b/commands/Images/avatar.js index e7b5fef461..2b3da58dc8 100644 --- a/commands/Images/avatar.js +++ b/commands/Images/avatar.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/batslap.js b/commands/Images/batslap.js index 0e97991766..e577dd5779 100644 --- a/commands/Images/batslap.js +++ b/commands/Images/batslap.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/beautiful.js b/commands/Images/beautiful.js index 78ca5ee369..5e1023687c 100644 --- a/commands/Images/beautiful.js +++ b/commands/Images/beautiful.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/bed.js b/commands/Images/bed.js index 33e4d27cb2..5d26c57f3c 100644 --- a/commands/Images/bed.js +++ b/commands/Images/bed.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/brazzers.js b/commands/Images/brazzers.js index 0505e75572..91496cb51e 100644 --- a/commands/Images/brazzers.js +++ b/commands/Images/brazzers.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/burn.js b/commands/Images/burn.js index 7277c4d4ae..143df82e9d 100644 --- a/commands/Images/burn.js +++ b/commands/Images/burn.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/captcha.js b/commands/Images/captcha.js index ec5d89c8d4..78de3b9734 100644 --- a/commands/Images/captcha.js +++ b/commands/Images/captcha.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/challenger.js b/commands/Images/challenger.js index c8a717afbc..c584760397 100644 --- a/commands/Images/challenger.js +++ b/commands/Images/challenger.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/clyde.js b/commands/Images/clyde.js index 8fa2970b59..104edfa8e5 100644 --- a/commands/Images/clyde.js +++ b/commands/Images/clyde.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/dictator.js b/commands/Images/dictator.js index 912aee7df2..646cfe8b9a 100644 --- a/commands/Images/dictator.js +++ b/commands/Images/dictator.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/facepalm.js b/commands/Images/facepalm.js index a2443a192a..aa0a4260e5 100644 --- a/commands/Images/facepalm.js +++ b/commands/Images/facepalm.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "palm" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/fire.js b/commands/Images/fire.js index 378f82ae5b..9e5e18bd61 100644 --- a/commands/Images/fire.js +++ b/commands/Images/fire.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/jail.js b/commands/Images/jail.js index d6c9594dcc..98367f5208 100644 --- a/commands/Images/jail.js +++ b/commands/Images/jail.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/love.js b/commands/Images/love.js index bdf688b9f2..8a5160dc1a 100644 --- a/commands/Images/love.js +++ b/commands/Images/love.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/mission.js b/commands/Images/mission.js index 8850e03739..f08f216a9b 100644 --- a/commands/Images/mission.js +++ b/commands/Images/mission.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/phcomment.js b/commands/Images/phcomment.js index 0721eaaf89..a9a05a799b 100644 --- a/commands/Images/phcomment.js +++ b/commands/Images/phcomment.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/qrcode.js b/commands/Images/qrcode.js index dec689b5e4..ddd832abff 100644 --- a/commands/Images/qrcode.js +++ b/commands/Images/qrcode.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "qr" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Images/rip.js b/commands/Images/rip.js index 5089437030..d52fd0499a 100644 --- a/commands/Images/rip.js +++ b/commands/Images/rip.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/scary.js b/commands/Images/scary.js index dc975cae2f..ebd57c2680 100644 --- a/commands/Images/scary.js +++ b/commands/Images/scary.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/tobecontinued.js b/commands/Images/tobecontinued.js index a9c3938dc8..092a208626 100644 --- a/commands/Images/tobecontinued.js +++ b/commands/Images/tobecontinued.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/trash.js b/commands/Images/trash.js index 8e493c593b..9c58753c3c 100644 --- a/commands/Images/trash.js +++ b/commands/Images/trash.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/triggered.js b/commands/Images/triggered.js index 70bc8a28c2..ba791f4ab7 100644 --- a/commands/Images/triggered.js +++ b/commands/Images/triggered.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/tweet.js b/commands/Images/tweet.js index b0d8e78848..ff7396a7ef 100644 --- a/commands/Images/tweet.js +++ b/commands/Images/tweet.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "twitter" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Images/wanted.js b/commands/Images/wanted.js index 13bd9d4462..229c4aa157 100644 --- a/commands/Images/wanted.js +++ b/commands/Images/wanted.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/wasted.js b/commands/Images/wasted.js index 0f50fb39b2..7f62047ee6 100644 --- a/commands/Images/wasted.js +++ b/commands/Images/wasted.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Images/youtube-comment.js b/commands/Images/youtube-comment.js index b73c461805..32c69a03fd 100644 --- a/commands/Images/youtube-comment.js +++ b/commands/Images/youtube-comment.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES" ], nsfw: false, diff --git a/commands/Moderation/announcement.js b/commands/Moderation/announcement.js index 46097ff752..217b160e9c 100644 --- a/commands/Moderation/announcement.js +++ b/commands/Moderation/announcement.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MENTION_EVERYONE" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index f3db9416a3..f6ebd65e76 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "BAN_MEMBERS" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "BAN_MEMBERS" ], nsfw: false, diff --git a/commands/Moderation/checkinvites.js b/commands/Moderation/checkinvites.js index 0cebc48e56..572d7d3d98 100644 --- a/commands/Moderation/checkinvites.js +++ b/commands/Moderation/checkinvites.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "checkinvite", "checki" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Moderation/clear-sanctions.js b/commands/Moderation/clear-sanctions.js index 4685342f5a..9d11d9da51 100644 --- a/commands/Moderation/clear-sanctions.js +++ b/commands/Moderation/clear-sanctions.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MANAGE_MESSAGES" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js index 37023a694c..304b611b77 100644 --- a/commands/Moderation/clear.js +++ b/commands/Moderation/clear.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "clear", "bulkdelete", "purge" ], + memberPermissions: [ "MANAGE_MESSAGES" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "MANAGE_MESSAGES" ], nsfw: false, diff --git a/commands/Moderation/giveaway.js b/commands/Moderation/giveaway.js index ca296eab5f..bfbbd3d330 100644 --- a/commands/Moderation/giveaway.js +++ b/commands/Moderation/giveaway.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "gway" ], + memberPermissions: [ "MENTION_EVERYONE" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index 84caef2ad8..6caf68dc04 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "KICK_MEMBERS" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "KICK_MEMBERS" ], nsfw: false, diff --git a/commands/Moderation/mute.js b/commands/Moderation/mute.js index 5c754e9258..4284578e8b 100644 --- a/commands/Moderation/mute.js +++ b/commands/Moderation/mute.js @@ -10,7 +10,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MANAGE_MESSAGES" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "MANAGE_CHANNELS" ], nsfw: false, diff --git a/commands/Moderation/poll.js b/commands/Moderation/poll.js index e373c226df..73d9ae8233 100644 --- a/commands/Moderation/poll.js +++ b/commands/Moderation/poll.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MENTION_EVERYONE" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Moderation/sanctions.js b/commands/Moderation/sanctions.js index b0c4311804..2aaabe5e12 100644 --- a/commands/Moderation/sanctions.js +++ b/commands/Moderation/sanctions.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "warns", "see-warns", "view-warns", "see-sanctions", "view-sanctions", "infractions", "view-infractions", "see-infractions" ], + memberPermissions: [ "MANAGE_MESSAGES" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Moderation/setwarns.js b/commands/Moderation/setwarns.js index 5f5ef0cca2..75dc32601f 100644 --- a/commands/Moderation/setwarns.js +++ b/commands/Moderation/setwarns.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MANAGE_GUILD" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "BAN_MEMBERS", "KICK_MEMBERS" ], nsfw: false, diff --git a/commands/Moderation/unmute.js b/commands/Moderation/unmute.js index fb8e53d82a..2881bf821c 100644 --- a/commands/Moderation/unmute.js +++ b/commands/Moderation/unmute.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MANAGE_MESSAGES" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "MANAGE_CHANNELS" ], nsfw: false, diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index 787985cf88..2178e06a50 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [ "MANAGE_MESSAGES" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/autoplay.js b/commands/Music/autoplay.js index f64945d871..f548bd2c2c 100644 --- a/commands/Music/autoplay.js +++ b/commands/Music/autoplay.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/back.js b/commands/Music/back.js index 0fbb378095..a6a8cc419d 100644 --- a/commands/Music/back.js +++ b/commands/Music/back.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "previous" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/filter.js b/commands/Music/filter.js index ad1a989a65..a1429140cd 100644 --- a/commands/Music/filter.js +++ b/commands/Music/filter.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "f" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/filters.js b/commands/Music/filters.js index 2eb1c466a2..8ebf768086 100644 --- a/commands/Music/filters.js +++ b/commands/Music/filters.js @@ -10,7 +10,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/lyrics.js b/commands/Music/lyrics.js index 3057bc25e7..8ef28d2908 100644 --- a/commands/Music/lyrics.js +++ b/commands/Music/lyrics.js @@ -10,7 +10,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "paroles" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/np.js b/commands/Music/np.js index fb22b465a3..8802e66bc2 100644 --- a/commands/Music/np.js +++ b/commands/Music/np.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "nowplaying", "now-playing" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/pause.js b/commands/Music/pause.js index 00adb0a10d..bba44a243e 100644 --- a/commands/Music/pause.js +++ b/commands/Music/pause.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/play.js b/commands/Music/play.js index 6bfb320135..dbcc4a15b5 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "joue" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/queue.js b/commands/Music/queue.js index 1ba3c63c5a..2e015fcdf8 100644 --- a/commands/Music/queue.js +++ b/commands/Music/queue.js @@ -10,7 +10,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "playlist" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/resume.js b/commands/Music/resume.js index fbfa180116..f70fda3382 100644 --- a/commands/Music/resume.js +++ b/commands/Music/resume.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/seek.js b/commands/Music/seek.js index f919c48a87..d47374e72b 100644 --- a/commands/Music/seek.js +++ b/commands/Music/seek.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/skip.js b/commands/Music/skip.js index 65dd8ea630..f9ae60ed79 100644 --- a/commands/Music/skip.js +++ b/commands/Music/skip.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "next" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Music/stop.js b/commands/Music/stop.js index 68819ed942..56543463eb 100644 --- a/commands/Music/stop.js +++ b/commands/Music/stop.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: true, - aliases: [ "leave" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Owner/eval.js b/commands/Owner/eval.js index 4a06ff0262..4225a283eb 100644 --- a/commands/Owner/eval.js +++ b/commands/Owner/eval.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, diff --git a/commands/Owner/reload.js b/commands/Owner/reload.js index 803bebb233..bb3f4ed89f 100644 --- a/commands/Owner/reload.js +++ b/commands/Owner/reload.js @@ -8,7 +8,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [], + , memberPermissions: [], botPermissions: [], nsfw: false, diff --git a/commands/Owner/servers-list.js b/commands/Owner/servers-list.js index 78795cc4c9..0b93ee9c46 100644 --- a/commands/Owner/servers-list.js +++ b/commands/Owner/servers-list.js @@ -9,7 +9,7 @@ module.exports = class extends Command { dirname: __dirname, enabled: true, guildOnly: false, - aliases: [ "slist" ], + memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, From 5a1b76d20b3f59cb2adfd1adf3dbde01ae7ab9c4 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:32:56 +0200 Subject: [PATCH 17/29] :recycle: Rewrite money command --- commands/Economy/money.js | 34 +++++++++++++++++++----------- languages/en-US/economy/money.json | 1 + 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/commands/Economy/money.js b/commands/Economy/money.js index fe06ee85c6..03cd3e25c5 100644 --- a/commands/Economy/money.js +++ b/commands/Economy/money.js @@ -12,26 +12,36 @@ module.exports = class extends Command { constructor (client) { super(client, { name: "money", - dirname: __dirname, + + options: [ + { + name: "user", + type: "USER", + required: false + } + ], + enabled: true, guildOnly: true, - aliases: [ "credits", "balance" ], memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 1000 + cooldown: 1000, + + dirname: __dirname }); } async run (interaction, translate, data) { - let member = await this.client.resolveMember(args[0], message.guild); - if(!member) member = message.member; - const user = member.user; + const user = interaction.options.getUser("user") || interaction.user; if(user.bot){ - return message.error("misc:BOT_USER"); + return interaction.reply({ + content: translate("misc:BOT_USER"), + ephemeral: true + }); } const memberData = (interaction.user === user) ? data.memberData : await this.client.findOrCreateMember({ id: user.id, guildID: interaction.guild.id }); @@ -40,14 +50,14 @@ module.exports = class extends Command { let globalMoney = 0; await asyncForEach(commonsGuilds.array(), async (guild) => { const memberData = await this.client.findOrCreateMember({ id: user.id, guildID: guild.id }); - globalMoney+=memberData.money; - globalMoney+=memberData.bankSold; + globalMoney += memberData.money; + globalMoney += memberData.bankSold; }); const embed = new Discord.MessageEmbed() .setAuthor(translate("economy/money:TITLE", { - username: member.user.username - }), member.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) + username: user.username + }), user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .addField(translate("economy/profile:CASH"), translate("economy/profile:MONEY", { money: memberData.money }), true) @@ -59,7 +69,7 @@ module.exports = class extends Command { }), true) .setColor(this.client.config.embed.color) .setFooter(this.client.config.embed.footer); - message.channel.send({ embeds: [embed] }); + interaction.channel.send({ embeds: [embed] }); } }; diff --git a/languages/en-US/economy/money.json b/languages/en-US/economy/money.json index e5dbc7e49e..4b76da152f 100644 --- a/languages/en-US/economy/money.json +++ b/languages/en-US/economy/money.json @@ -1,5 +1,6 @@ { "DESCRIPTION": "Shows your credits", "EXAMPLES": "{{prefix}}money\n{{prefix}}money @user#0000", + "OPT_USER_DESCRIPTION": "The user you want to display the money of", "TITLE": "{{username}}'s money" } \ No newline at end of file From 1bdd2acb0c4d1a3812d84f44fc7ebadd3b123fa3 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:37:40 +0200 Subject: [PATCH 18/29] :recycle: Rewrite pay command --- commands/Economy/pay.js | 53 ++++++++++++++++++++------------ languages/en-US/economy/pay.json | 5 +-- 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/commands/Economy/pay.js b/commands/Economy/pay.js index 3a1c1bb5a4..5104ae55f7 100644 --- a/commands/Economy/pay.js +++ b/commands/Economy/pay.js @@ -5,27 +5,34 @@ module.exports = class extends Command { constructor (client) { super(client, { name: "pay", - dirname: __dirname, + + options: [ + { + name: "user", + type: "USER", + required: true + }, + { + name: "amount", + type: "INTEGER", + required: true + } + ], + enabled: true, guildOnly: true, - , memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 10000 + + dirname: __dirname }); } async run (interaction, translate, data) { - const member = await this.client.resolveMember(args[0], message.guild); - if(!member){ - return interaction.reply({ - content: translate("economy/pay:INVALID_MEMBER"), - ephemeral: true - }); - } + const member = interaction.options.getUser("user"); if(member.user.bot){ return interaction.reply({ content: translate("economy/pay:BOT_USER"), @@ -38,19 +45,23 @@ module.exports = class extends Command { ephemeral: true }); } - const sentAmount = args[1]; - if(!sentAmount || isNaN(sentAmount) || parseInt(sentAmount, 10) <= 0){ - return message.error("economy/pay:INVALID_AMOUNT", { - username: member.user.tag + const sentAmount = interaction.options.getInteger("amount"); + if(parseInt(sentAmount, 10) <= 0){ + return interaction.reply({ + content: translate("economy/pay:POSITIVE_INT_AMOUNT"), + ephemeral: true }); } const amount = Math.ceil(parseInt(sentAmount, 10)); if(amount > data.memberData.money){ - return message.error("economy/pay:ENOUGH_MONEY", { - amount, - username: member.user.tag + return interaction.reply({ + content: translate("economy/pay:ENOUGH_MONEY", { + amount, + username: member.user.tag + }), + ephemeral: true }); } @@ -63,9 +74,11 @@ module.exports = class extends Command { memberData.save(); // Send a success message - message.success("economy/pay:SUCCESS", { - amount, - username: member.user.tag + interaction.reply({ + content: translate("economy/pay:SUCCESS", { + amount, + username: member.user.tag + }) }); } diff --git a/languages/en-US/economy/pay.json b/languages/en-US/economy/pay.json index 29aa10cbdf..7604aea8c6 100644 --- a/languages/en-US/economy/pay.json +++ b/languages/en-US/economy/pay.json @@ -1,10 +1,11 @@ { "DESCRIPTION": "Send money to someone!", "EXAMPLES": "{{prefix}}pay Androz#2091 100", - "INVALID_MEMBER": "You must mention a valid member!", + "OPT_USER_DESCRIPTION": "The user you want to pay", + "OPT_AMOUNT_DESCRIPTION": "The amount you want to pay", "BOT_USER": "Bots are already rich 💰!", "YOURSELF": "You can't pay yourself!", - "INVALID_AMOUNT": "You must specify a valid amount", + "POSITIVE_INT_AMOUNT": "The amount should be a positive integer", "ENOUGH_MONEY": "You can't afford **{{amount}}**", "SUCCESS": "You just paid **{{amount}}** to **{{username}}**!" } \ No newline at end of file From f1b823ba935d3853da68995a8c1e8f70cf2b2baa Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:40:12 +0200 Subject: [PATCH 19/29] :recycle: Rewrite profile command --- commands/Economy/profile.js | 36 ++++++++++++++++------------ languages/en-US/economy/profile.json | 1 + 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/commands/Economy/profile.js b/commands/Economy/profile.js index 8dd50d47b3..4c65878d59 100644 --- a/commands/Economy/profile.js +++ b/commands/Economy/profile.js @@ -12,15 +12,22 @@ module.exports = class extends Command { constructor (client) { super(client, { name: "profile", - dirname: __dirname, + + options: [ + { + name: "user", + type: "USER" + } + ], + enabled: true, guildOnly: true, - memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 3000 + + dirname: __dirname }); } @@ -28,11 +35,10 @@ module.exports = class extends Command { const client = this.client; - let member = await client.resolveMember(args[0], message.guild); - if(!member) member = message.member; + const user = interaction.options.getUser("user") || interaction.user; // Check if the user is a bot - if(member.user.bot){ + if(user.bot){ return interaction.reply({ content: translate("economy/profile:BOT_USER"), ephemeral: true @@ -40,26 +46,26 @@ module.exports = class extends Command { } // Gets the data of the user whose profile you want to display - const memberData = (member.id === interaction.user.id ? data.memberData : await client.findOrCreateMember({ id: member.id, guildID: interaction.guild.id})); - const userData = (member.id === interaction.user.id ? data.userData : await client.findOrCreateUser({ id: member.id })); + const memberData = (user.id === interaction.user.id ? data.memberData : await client.findOrCreateMember({ id: user.id, guildID: interaction.guild.id})); + const userData = (user.id === interaction.user.id ? data.userData : await client.findOrCreateUser({ id: user.id })); // Check if the lover is cached if(userData.lover && !this.client.users.cache.get(userData.lover)){ await this.client.users.fetch(userData.lover, true); } - const commonsGuilds = client.guilds.cache.filter((g) => g.members.cache.get(member.id)); + const commonsGuilds = client.guilds.cache.filter((g) => g.members.cache.get(user.id)); let globalMoney = 0; await asyncForEach(commonsGuilds.array(), async (guild) => { - const memberData = await client.findOrCreateMember({ id: member.id, guildID: guild.id }); + const memberData = await client.findOrCreateMember({ id: user.id, guildID: guild.id }); globalMoney+=memberData.money; globalMoney+=memberData.bankSold; }); const profileEmbed = new Discord.MessageEmbed() .setAuthor(translate("economy/profile:TITLE", { - username: member.user.tag - }), member.user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) + username: user.tag + }), user.displayAvatarURL({ size: 512, dynamic: true, format: "png" })) .attachFiles([{ attachment: await userData.getAchievements(), name: "achievements.png" }]) .setImage("attachment://achievements.png") .setDescription(userData.bio ? userData.bio : translate("economy/profile:NO_BIO")) @@ -77,8 +83,8 @@ module.exports = class extends Command { }), true) .addField(translate("economy/profile:LEVEL"), `**${memberData.level}**`, true) .addField(translate("economy/profile:EXP"), `**${memberData.exp}** xp`, true) - .addField(translate("economy/profile:REGISTERED"), message.printDate(new Date(memberData.registeredAt)), true) - .addField(translate("economy/profile:BIRTHDATE"), (!userData.birthdate ? translate("economy/profile:NO_BIRTHDATE"): message.printDate(new Date(userData.birthdate))), true) + .addField(translate("economy/profile:REGISTERED"), this.client.printDate(new Date(memberData.registeredAt), null, data.guildData.language), true) + .addField(translate("economy/profile:BIRTHDATE"), (!userData.birthdate ? translate("economy/profile:NO_BIRTHDATE"): this.client.printDate(new Date(userData.birthdate), null, data.guildData.language)), true) .addField(translate("economy/profile:LOVER"), (!userData.lover ? translate("economy/profile:NO_LOVER") : this.client.users.cache.get(userData.lover).tag), true) .addField(translate("economy/profile:ACHIEVEMENTS"), translate("economy/profile:ACHIEVEMENTS_CONTENT", { prefix: data.guild.prefix @@ -87,7 +93,7 @@ module.exports = class extends Command { .setFooter(data.config.embed.footer) // Sets the footer of the embed .setTimestamp(); - message.channel.send({ embeds: [profileEmbed] }); // Send the embed in the current channel + interaction.reply({ embeds: [profileEmbed] }); // Send the embed in the current channel } }; diff --git a/languages/en-US/economy/profile.json b/languages/en-US/economy/profile.json index 196f413c68..764365654b 100644 --- a/languages/en-US/economy/profile.json +++ b/languages/en-US/economy/profile.json @@ -1,6 +1,7 @@ { "DESCRIPTION": "Shows the mentioned user or author profile", "EXAMPLES": "{{prefix}}profile Androz#2091", + "OPT_USER_DESCRIPTION": "The user you want to show the profile of", "TITLE": "{{username}}'s profile", "NO_BIO": "", "BOT_USER": "Bots don't have profile page!", From 98dcd6e0052c7d3dae421fa69e00e5b31bd64760 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:42:45 +0200 Subject: [PATCH 20/29] :recycle: Rewrite rep command --- commands/Economy/rep.js | 30 +++++++++++++++++++++--------- languages/en-US/economy/rep.json | 2 +- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/commands/Economy/rep.js b/commands/Economy/rep.js index 942c04264a..7e50df8785 100644 --- a/commands/Economy/rep.js +++ b/commands/Economy/rep.js @@ -5,15 +5,23 @@ module.exports = class extends Command { constructor (client) { super(client, { name: "rep", - dirname: __dirname, + + options: [ + { + name: "user", + type: "USER", + required: true + } + ], + enabled: true, guildOnly: true, - memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 3000 + + dirname: __dirname }); } @@ -26,13 +34,15 @@ module.exports = class extends Command { when the member will be able to execute the order again is greater than the current date, display an error message */ if(isInCooldown > Date.now()){ - return message.error("economy/rep:COOLDOWN", { - time: message.convertTime(isInCooldown, "to", true) + return interaction.reply({ + content: translate("economy/rep:COOLDOWN", { + time: this.client.convertTime(isInCooldown, "to", true, data.guildData.language) + }) }); } } - const user = await this.client.resolveUser(args[0]); + const user = interaction.options.getUser("user"); if(!user){ return interaction.reply({ content: translate("economy/rep:INVALID_USER"), @@ -65,14 +75,16 @@ module.exports = class extends Command { userData.achievements.rep.progress.now = (userData.rep > userData.achievements.rep.progress.total ? userData.achievements.rep.progress.total : userData.rep); if(userData.achievements.rep.progress.now >= userData.achievements.rep.progress.total){ userData.achievements.rep.achieved = true; - message.channel.send({ files: [ { name: "unlocked.png", attachment: "./assets/img/achievements/achievement_unlocked6.png"}]}); + interaction.channel.send({ files: [ { name: "unlocked.png", attachment: "./assets/img/achievements/achievement_unlocked6.png"}]}); } userData.markModified("achievements.rep"); } await userData.save(); - message.success("economy/rep:SUCCESS", { - username: user.username + interaction.reply({ + content: translate("economy/rep:SUCCESS", { + username: user.username + }) }); } diff --git a/languages/en-US/economy/rep.json b/languages/en-US/economy/rep.json index 03ee5f8e00..2b69d03c51 100644 --- a/languages/en-US/economy/rep.json +++ b/languages/en-US/economy/rep.json @@ -1,8 +1,8 @@ { "DESCRIPTION": "Give a reputation point to someone!", "EXAMPLES": "{{prefix}}rep @Androz#2091", + "OPT_USER_DESCRIPTION": "The user you want to give a reputation point to", "COOLDOWN": "You have to wait {{time}} before being able to `rep` someone!", - "INVALID_USER": "You must mention a valid user!", "BOT_USER": "Bots don't accept reputation points!", "YOURSELF": "You can't give yourself a reputation point!", "SUCCESS": "You just gave a reputation point to {{username}}!" From 41646df3c250ecde9a269b6f47df70d1a4e09ccf Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:47:28 +0200 Subject: [PATCH 21/29] :recycle: Rewrite rob command --- commands/Economy/rob.js | 76 +++++++++++++++++++++----------- languages/en-US/economy/rob.json | 4 +- 2 files changed, 53 insertions(+), 27 deletions(-) diff --git a/commands/Economy/rob.js b/commands/Economy/rob.js index 2e9ae60534..26792fffb0 100644 --- a/commands/Economy/rob.js +++ b/commands/Economy/rob.js @@ -5,65 +5,87 @@ module.exports = class extends Command { constructor (client) { super(client, { name: "rob", - dirname: __dirname, + + options: [ + { + name: "user", + type: "USER" + }, + { + name: "amount", + type: "INTEGER" + } + ], + enabled: true, guildOnly: true, - memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 1000 + + dirname: __dirname }); } async run (interaction, translate, data) { - const member = await this.client.resolveMember(args[0], message.guild); - if(!member){ + const user = interaction.options.getUser("user"); + if(!user){ return interaction.reply({ content: translate("economy/rob:MISSING_MEMBER"), ephemeral: true }); } - if(member.id === interaction.user.id){ + if(user.id === interaction.user.id){ return interaction.reply({ content: translate("economy/rob:YOURSELF"), ephemeral: true }); } - const memberData = await this.client.findOrCreateMember({ id: member.id, guildID: interaction.guild.id }); + const memberData = await this.client.findOrCreateMember({ id: user.id, guildID: interaction.guild.id }); const isInCooldown = memberData.cooldowns.rob || 0; if(isInCooldown){ if(isInCooldown > Date.now()){ - return message.error("economy/rob:COOLDOWN", { - username: member.user.tag + return interaction.reply({ + content: translate("economy/rob:COOLDOWN", { + username: user.tag + }), + ephemeral: true }); } } - let amountToRob = args[1]; + let amountToRob = interaction.options.getInteger("amount"); if(!amountToRob || isNaN(amountToRob) || parseInt(amountToRob, 10) <= 0){ - return message.error("economy/rob:MISSING_AMOUNT", { - username: member.user.username + return interaction.reply({ + content: translate("economy/rob:MISSING_AMOUNT", { + username: user.username + }), + ephemeral: true }); } amountToRob = Math.floor(parseInt(amountToRob, 10)); if(amountToRob > memberData.money){ - return message.error("economy/rob:NOT_ENOUGH_MEMBER", { - username: member.user.username, - money: amountToRob + return interaction.reply({ + content: translate("economy/rob:NOT_ENOUGH_MEMBER", { + username: user.username, + money: amountToRob + }) }); } const potentiallyLose = Math.floor(amountToRob*1.5); if(potentiallyLose > data.memberData.money){ - return message.error("economy/rob:NOT_ENOUGH_AUTHOR", { - moneyMin: potentiallyLose, - moneyCurrent: data.memberData.money + return interaction.reply({ + content: translate("economy/rob:NOT_ENOUGH_AUTHOR", { + moneyMin: potentiallyLose, + moneyCurrent: data.memberData.money + }), + ephemeral: true }); } @@ -75,9 +97,11 @@ module.exports = class extends Command { memberData.markModified("cooldowns"); await memberData.save(); const randomNum = Math.floor(this.client.functions.randomNum(1, 3)); - message.sendT("economy/rob:ROB_WON_"+randomNum, { - money: amountToRob, - username: member.user.username + interaction.reply({ + content: translate("economy/rob:ROB_WON_"+randomNum, { + money: amountToRob, + username: user.username + }) }); data.memberData.money += amountToRob; memberData.money -= amountToRob, 10; @@ -86,10 +110,12 @@ module.exports = class extends Command { } else { const won = Math.floor(0.9*amountToRob); const randomNum = Math.floor(this.client.functions.randomNum(1, 3)); - message.sendT("economy/rob:ROB_LOSE_"+randomNum, { - fine: potentiallyLose, - offset: won, - username: member.user.username + interaction.reply({ + content: translate("economy/rob:ROB_LOSE_"+randomNum, { + fine: potentiallyLose, + offset: won, + username: user.username + }) }); data.memberData.money -= potentiallyLose; memberData.money += won; diff --git a/languages/en-US/economy/rob.json b/languages/en-US/economy/rob.json index e974753725..18bd393cbc 100644 --- a/languages/en-US/economy/rob.json +++ b/languages/en-US/economy/rob.json @@ -1,9 +1,9 @@ { "DESCRIPTION": "Try to rob a member!", "EXAMPLES": "{{prefix}}rob @Androz#2091 100", + "OPT_USER_DESCRIPTION": "The user you want to rob", + "OPT_AMOUNT_DESCRIPTION": "The amount you want to try to rob", "YOURSELF": "You can't rob yourself!", - "MISSING_MEMBER": "You must specify a valid member to rob!", - "MISSING_AMOUNT": "Please enter a valid amount!", "NOT_ENOUGH_AUTHOR": "You must have more than **{{moneyMin}}** credits to attempt this robbery (you have **{{moneyCurrent}}** credits for now)!", "NOT_ENOUGH_MEMBER": "You can't try your robbery because **{{username}}** doesn't have as many credits in cash!", "COOLDOWN": "🕵️ **{{username}}** is on guard.... Wait a while and try again!", From 5b43bbb0cd5bf0efc3af5934567a508c3f24abe4 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:48:35 +0200 Subject: [PATCH 22/29] :recycle: Rewrite bio command --- commands/Economy/setbio.js | 15 +++++++++++---- languages/en-US/economy/setbio.json | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/commands/Economy/setbio.js b/commands/Economy/setbio.js index ae2949a265..9d09f5f8a1 100644 --- a/commands/Economy/setbio.js +++ b/commands/Economy/setbio.js @@ -5,20 +5,27 @@ module.exports = class extends Command { constructor (client) { super(client, { name: "setbio", - dirname: __dirname, + + options: [ + { + name: "bio", + type: "STRING" + } + ], + enabled: true, guildOnly: false, - memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 5000 + + dirname: __dirname }); } async run (interaction, translate, data) { - const newBio = args.join(" "); + const newBio = interaction.options.getString("bio"); if(!newBio){ return interaction.reply({ content: translate("economy/setbio:MISSING"), diff --git a/languages/en-US/economy/setbio.json b/languages/en-US/economy/setbio.json index 9e0799709a..c600b72915 100644 --- a/languages/en-US/economy/setbio.json +++ b/languages/en-US/economy/setbio.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Change your biography!", "EXAMPLES": "{{prefix}}setbio My name is Jake, I'm 19 and I love programming!", - "MISSING": "You must specify a biography!", + "OPT_BIO_DESCRIPTION": "Your new biography", "MAX_CHARACT": "Your biography must not exceed 500 characters!", "SUCCESS": "Your biography has been modified!" } \ No newline at end of file From dbad9115e5489c40bca0ab2c79a549deba185f75 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:52:43 +0200 Subject: [PATCH 23/29] :recycle: Rewrite slot command --- commands/Economy/slots.js | 37 +++++++++++++++++++----------- languages/en-US/economy/slots.json | 1 + 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/commands/Economy/slots.js b/commands/Economy/slots.js index 0615136e1f..da6602ed50 100644 --- a/commands/Economy/slots.js +++ b/commands/Economy/slots.js @@ -1,19 +1,27 @@ const Command = require("../../base/Command.js"); +const Emojis = require("../../emojis.json"); module.exports = class extends Command { constructor (client) { super(client, { name: "slots", - dirname: __dirname, + + options: [ + { + name: "amount", + type: "INTEGER" + } + ], + enabled: true, guildOnly: true, - memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 3000 + + dirname: __dirname }); } @@ -31,13 +39,16 @@ module.exports = class extends Command { ]; // Gets the amount provided - let amount = args[0]; + let amount = interaction.options.getInteger("amount"); if(!amount || isNaN(amount) || amount < 1){ amount = 1; } if(amount > data.memberData.money){ - return message.error("economy/slots:NOT_ENOUGH", { - money: amount + return interaction.reply({ + content: translate("economy/slots:NOT_ENOUGH", { + money: amount + }), + ephemeral: true }); } amount = Math.round(amount); @@ -52,8 +63,8 @@ module.exports = class extends Command { return Math.round(number); } - const tmsg = await message.sendT("misc:loading", null, { - prefixEmoji: "loading" + const tmsg = await interaction.reply({ + content: Emojis.loading + " | " + translate("misc:loading") }); editMsg(); const interval = setInterval(editMsg, 1000); @@ -84,7 +95,7 @@ module.exports = class extends Command { msg += "| : : : **"+(translate("common:VICTORY").toUpperCase())+"** : : : |"; tmsg.edit(msg); const credits = getCredits(amount, true); - message.channel.send("**!! JACKPOT !!**\n"+translate("economy/slots:VICTORY", { + interaction.channel.send("**!! JACKPOT !!**\n"+translate("economy/slots:VICTORY", { money: amount, won: credits, username: interaction.user.username @@ -95,7 +106,7 @@ module.exports = class extends Command { data.userData.achievements.slots.progress.now += 1; if(data.userData.achievements.slots.progress.now === data.userData.achievements.slots.progress.total){ data.userData.achievements.slots.achieved = true; - message.channel.send({ files: [ { name: "unlocked.png", attachment: "./assets/img/achievements/achievement_unlocked4.png" } ] }); + interaction.channel.send({ files: [ { name: "unlocked.png", attachment: "./assets/img/achievements/achievement_unlocked4.png" } ] }); } data.userData.markModified("achievements.slots"); await data.userData.save(); @@ -108,7 +119,7 @@ module.exports = class extends Command { msg += "| : : : **"+(translate("common:VICTORY").toUpperCase())+"** : : : |"; tmsg.edit(msg); const credits = getCredits(amount, false); - message.channel.send(translate("economy/slots:VICTORY", { + interaction.channel.send(translate("economy/slots:VICTORY", { money: amount, won: credits, username: interaction.user.username @@ -119,7 +130,7 @@ module.exports = class extends Command { data.userData.achievements.slots.progress.now += 1; if(data.userData.achievements.slots.progress.now === data.userData.achievements.slots.progress.total){ data.userData.achievements.slots.achieved = true; - message.channel.send({ files: [ { name: "unlocked.png", attachment: "./assets/img/achievements/achievement_unlocked4.png" } ] }); + interaction.channel.send({ files: [ { name: "unlocked.png", attachment: "./assets/img/achievements/achievement_unlocked4.png" } ] }); } data.userData.markModified("achievements.slots"); await data.userData.save(); @@ -129,7 +140,7 @@ module.exports = class extends Command { } msg += "| : : : **"+(translate("common:DEFEAT").toUpperCase())+"** : : : |"; - message.channel.send(translate("economy/slots:DEFEAT", { + interaction.channel.send(translate("economy/slots:DEFEAT", { money: amount, username: interaction.user.username })); diff --git a/languages/en-US/economy/slots.json b/languages/en-US/economy/slots.json index b9a40cc7c3..78c4214889 100644 --- a/languages/en-US/economy/slots.json +++ b/languages/en-US/economy/slots.json @@ -1,6 +1,7 @@ { "DESCRIPTION": "The Atlanta casino", "EXAMPLES": "{{prefix}}slots\n{{prefix}}slots 10", + "OPT_AMOUNT_DESCRIPTION": "The amount of money you want to play with", "DEFEAT": "**{{username}}** used {{money}} credit(s) and lost everything.", "VICTORY": "**{{username}}** used {{money}} credit(s) and won {{won}} credit(s)!", "NOT_ENOUGH": "You need at least **{{money}}** credit(s)." From 1e7efa35dafc861a281391790897dce74cb044d3 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:53:40 +0200 Subject: [PATCH 24/29] :lipstick: Clean up slots command --- commands/Economy/slots.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/commands/Economy/slots.js b/commands/Economy/slots.js index da6602ed50..3779f3426c 100644 --- a/commands/Economy/slots.js +++ b/commands/Economy/slots.js @@ -32,7 +32,7 @@ module.exports = class extends Command { let i1=0,j1=0,k1=0,i2=1,j2=1,k2=1,i3=2,j3=2,k3=2; // Gets three random fruits array - const colonnes = [ + const columns = [ this.client.functions.shuffle(fruits), this.client.functions.shuffle(fruits), this.client.functions.shuffle(fruits) @@ -87,11 +87,11 @@ module.exports = class extends Command { k2 = (k2 < fruits.length - 1) ? k2 + 1 : 0; k3 = (k3 < fruits.length - 1) ? k3 + 1 : 0; - msg += colonnes[0][i1] + " : " + colonnes[1][j1] + " : "+ colonnes[2][k1] + "\n"; - msg += colonnes[0][i2] + " : " + colonnes[1][j2] + " : "+ colonnes[2][k2] + " **<**\n"; - msg += colonnes[0][i3] + " : " + colonnes[1][j3] + " : "+ colonnes[2][k3] + "\n------------------\n"; + msg += columns[0][i1] + " : " + columns[1][j1] + " : "+ columns[2][k1] + "\n"; + msg += columns[0][i2] + " : " + columns[1][j2] + " : "+ columns[2][k2] + " **<**\n"; + msg += columns[0][i3] + " : " + columns[1][j3] + " : "+ columns[2][k3] + "\n------------------\n"; - if((colonnes[0][i2] == colonnes[1][j2]) && (colonnes[1][j2] == colonnes[2][k2])){ + if((columns[0][i2] == columns[1][j2]) && (columns[1][j2] == columns[2][k2])){ msg += "| : : : **"+(translate("common:VICTORY").toUpperCase())+"** : : : |"; tmsg.edit(msg); const credits = getCredits(amount, true); @@ -115,7 +115,7 @@ module.exports = class extends Command { return; } - if(colonnes[0][i2] == colonnes[1][j2] || colonnes[1][j2] == colonnes[2][k2] || colonnes[0][i2] == colonnes[2][k2]){ + if(columns[0][i2] == columns[1][j2] || columns[1][j2] == columns[2][k2] || columns[0][i2] == columns[2][k2]){ msg += "| : : : **"+(translate("common:VICTORY").toUpperCase())+"** : : : |"; tmsg.edit(msg); const credits = getCredits(amount, false); @@ -168,9 +168,9 @@ module.exports = class extends Command { k2 = (k2 < fruits.length - 1) ? k2 + 1 : 0; k3 = (k3 < fruits.length - 1) ? k3 + 1 : 0; - msg += colonnes[0][i1] + " : " + colonnes[1][j1] + " : "+ colonnes[2][k1] + "\n"; - msg += colonnes[0][i2] + " : " + colonnes[1][j2] + " : "+ colonnes[2][k2] + " **<**\n"; - msg += colonnes[0][i3] + " : " + colonnes[1][j3] + " : "+ colonnes[2][k3] + "\n"; + msg += columns[0][i1] + " : " + columns[1][j1] + " : "+ columns[2][k1] + "\n"; + msg += columns[0][i2] + " : " + columns[1][j2] + " : "+ columns[2][k2] + " **<**\n"; + msg += columns[0][i3] + " : " + columns[1][j3] + " : "+ columns[2][k3] + "\n"; tmsg.edit(msg); } From 58fb99e06abd31616eda131ebb81d1a29710455e Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:55:49 +0200 Subject: [PATCH 25/29] :recycle: Rewrite withdraw command --- commands/Economy/withdraw.js | 41 ++++++++++++++------------- languages/en-US/economy/withdraw.json | 2 +- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/commands/Economy/withdraw.js b/commands/Economy/withdraw.js index b01c2cf9a5..626ec898aa 100644 --- a/commands/Economy/withdraw.js +++ b/commands/Economy/withdraw.js @@ -5,21 +5,29 @@ module.exports = class extends Command { constructor (client) { super(client, { name: "withdraw", - dirname: __dirname, + + options: [ + { + name: "amount", + type: "INTEGER", + required: true + } + ], + enabled: true, guildOnly: true, - memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 1000 + + dirname: __dirname }); } async run (interaction, translate, data) { - let amount = args[0]; + const amount = interaction.options.getInteger("amount"); if(!(parseInt(data.memberData.bankSold, 10) > 0)) { return interaction.reply({ @@ -28,21 +36,12 @@ module.exports = class extends Command { }); } - if(args[0] === "all"){ - amount = parseInt(data.memberData.bankSold, 10); - } else { - if(isNaN(amount) || parseInt(amount, 10) < 1){ - return interaction.reply({ - content: translate("economy/withdraw:MISSING_AMOUNT"), - ephemeral: true - }); - } - amount = parseInt(amount, 10); - } - if(data.memberData.bankSold < amount){ - return message.error("economy/withdraw:NOT_ENOUGH", { - money: amount + return interaction.reply({ + content: translate("economy/withdraw:NOT_ENOUGH", { + money: amount + }), + ephemeral: true }); } @@ -50,8 +49,10 @@ module.exports = class extends Command { data.memberData.bankSold = data.memberData.bankSold - amount; data.memberData.save(); - message.success("economy/withdraw:SUCCESS", { - money: amount + interaction.reply({ + content: translate("economy/withdraw:SUCCESS", { + money: amount + }) }); } diff --git a/languages/en-US/economy/withdraw.json b/languages/en-US/economy/withdraw.json index 074ad9ac6a..9643ae1655 100644 --- a/languages/en-US/economy/withdraw.json +++ b/languages/en-US/economy/withdraw.json @@ -1,7 +1,7 @@ { "DESCRIPTION": "Withdraw money!", "EXAMPLES": "{{prefix}}withdraw 400", - "MISSING_AMOUNT": "Please specify an amount to be withdrawn!", + "OPT_AMOUNT_DESCRIPTION": "The amount you want to widthdraw from the bank", "NO_CREDIT": "You don't have any credit in your bank!", "NOT_ENOUGH": "You need at least `{{money}}` credit(s)!", "SUCCESS": "**{{money}}** credit(s) withdrawn!" From a7bd26c31860e1911bfeca0bcc39ca6724f46b43 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Thu, 26 Aug 2021 21:57:11 +0200 Subject: [PATCH 26/29] :recycle: Rewrite work command --- commands/Economy/work.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/commands/Economy/work.js b/commands/Economy/work.js index 234389e0df..c608320eb7 100644 --- a/commands/Economy/work.js +++ b/commands/Economy/work.js @@ -6,15 +6,15 @@ module.exports = class extends Command { constructor (client) { super(client, { name: "work", - dirname: __dirname, + enabled: true, guildOnly: true, - memberPermissions: [], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], nsfw: false, ownerOnly: false, - cooldown: 3000 + + dirname: __dirname }); } @@ -27,8 +27,11 @@ module.exports = class extends Command { when the member will be able to execute the order again is greater than the current date, display an error message */ if(isInCooldown > Date.now()){ - return message.error("economy/work:COOLDOWN", { - time: message.convertTime(isInCooldown, "to", true) + return interaction.reply({ + content: translate("economy/work:COOLDOWN", { + time: this.client.convertTime(isInCooldown, "to", true, data.guildData.language) + }), + ephemeral: true }); } } @@ -98,7 +101,7 @@ module.exports = class extends Command { } // Send the embed in the current channel - message.channel.send(messageOptions); + interaction.channel.send(messageOptions); } From cb367c6f42259238517490d5aa9bd0238d4405b8 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Sun, 29 Aug 2021 21:34:04 +0200 Subject: [PATCH 27/29] :recycle: Rewrite ban command --- commands/Moderation/ban.js | 82 +++++++++++++++++++++++--------------- languages/en-US/misc.json | 3 +- 2 files changed, 51 insertions(+), 34 deletions(-) diff --git a/commands/Moderation/ban.js b/commands/Moderation/ban.js index f6ebd65e76..15cc57da82 100644 --- a/commands/Moderation/ban.js +++ b/commands/Moderation/ban.js @@ -6,29 +6,43 @@ module.exports = class extends Command { constructor (client) { super(client, { name: "ban", - dirname: __dirname, + + options: [ + { + name: "user", + type: "USER", + required: true + }, + { + name: "reason", + type: "STRING" + } + ], + enabled: true, guildOnly: true, - , memberPermissions: [ "BAN_MEMBERS" ], botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "BAN_MEMBERS" ], nsfw: false, ownerOnly: false, - cooldown: 3000 + + dirname: __dirname }); } async run (interaction, translate, data) { - const user = await this.client.resolveUser(args[0]); - if(!user){ - return interaction.reply({ - content: translate("moderation/ban:MISSING_MEMBER"), + const user = interaction.options.getUser("user"); + const member = interaction.guild.members.cache.get(user.id) ?? await interaction.guild.members.fetch(user.id).catch(() => {}); + + if (!member) { + return void interaction.reply({ + content: translate("misc:USER_NOT_SERVER"), ephemeral: true }); } - - const memberData = message.guild.members.cache.get(user.id) ? await this.client.findOrCreateMember({ id: user.id, guildID: interaction.guild.id }) : null; + + const memberData = interaction.guild.members.cache.get(user.id) && await this.client.findOrCreateMember({ id: user.id, guildID: interaction.guild.id }); if(user.id === interaction.user.id){ return interaction.reply({ @@ -38,24 +52,22 @@ module.exports = class extends Command { } // If the user is already banned - const banned = await message.guild.fetchBans(); + const banned = await interaction.guild.bans.fetch(); if(banned.some((m) => m.user.id === user.id)){ - return message.error("moderation/ban:ALREADY_BANNED", { - username: user.tag + return interaction.reply({ + content: translate("moderation/ban:ALREADY_BANNED", { + username: user.tag + }) }); } // Gets the ban reason - let reason = args.slice(1).join(" "); - if(!reason){ - reason = translate("misc:NO_REASON_PROVIDED"); - } + const reason = interaction.options.getString("reason") ?? translate("misc:NO_REASON_PROVIDED"); - const member = await message.guild.members.fetch(user.id).catch(() => {}); if(member){ const memberPosition = member.roles.highest.position; - const moderationPosition = message.member.roles.highest.position; - if(message.member.ownerID !== interaction.user.id && !(moderationPosition > memberPosition)){ + const moderationPosition = interaction.member.roles.highest.position; + if(interaction.guild.ownerID !== interaction.user.id && !(moderationPosition > memberPosition)){ return interaction.reply({ content: translate("moderation/ban:SUPERIOR"), ephemeral: true @@ -71,28 +83,32 @@ module.exports = class extends Command { await user.send(translate("moderation/ban:BANNED_DM", { username: user.tag, - server: message.guild.name, + server: interaction.guild.name, moderator: interaction.user.tag, reason })).catch(() => {}); // Ban the user - message.guild.members.ban(user, { reason } ).then(() => { + await interaction.guild.members.ban(user, { + reason + }).then(() => { // Send a success message in the current channel - message.sendT("moderation/ban:BANNED", { - username: user.tag, - server: message.guild.name, - moderator: interaction.user.tag, - reason + interaction.reply({ + content: translate("moderation/ban:BANNED", { + username: user.tag, + server: interaction.guild.name, + moderator: interaction.user.tag, + reason + }) }); const caseInfo = { - channel: message.channel.id, + channel: interaction.channel.id, moderator: interaction.user.id, date: Date.now(), type: "ban", - case: data.guild.casesCount, + case: data.guildData.casesCount, reason }; @@ -101,15 +117,15 @@ module.exports = class extends Command { memberData.save(); } - data.guild.casesCount++; - data.guild.save(); + data.guildData.casesCount++; + data.guildData.save(); - if(data.guild.plugins.modlogs){ - const channel = message.guild.channels.cache.get(data.guild.plugins.modlogs); + if(data.guildData.plugins.modlogs){ + const channel = interaction.guild.channels.cache.get(data.guildData.plugins.modlogs); if(!channel) return; const embed = new Discord.MessageEmbed() .setAuthor(translate("moderation/ban:CASE", { - count: data.guild.casesCount + count: data.guildData.casesCount })) .addField(translate("common:USER"), `\`${user.tag}\` (${user.toString()})`, true) .addField(translate("common:MODERATOR"), `\`${interaction.user.tag}\` (${interaction.user.toString()})`, true) diff --git a/languages/en-US/misc.json b/languages/en-US/misc.json index 6a0de10e5c..789acc3521 100644 --- a/languages/en-US/misc.json +++ b/languages/en-US/misc.json @@ -24,5 +24,6 @@ "NSFW_COMMAND": "You must execute this command in a channel that allows NSFW!", "OWNER_ONLY": "Only the owner of Atlanta can do these commands!", "COOLDOWNED": "You must wait **{{seconds}}** second(s) to be able to run this command again!", - "CANNOT_DM": "I don't have permission to send you private messages... Please update your privacy settings!" + "CANNOT_DM": "I don't have permission to send you private messages... Please update your privacy settings!", + "USER_NOT_SERVER": "This user is not in the current server." } \ No newline at end of file From c43c32662c547d990cd215740d98494cbd69809e Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Sun, 29 Aug 2021 21:34:10 +0200 Subject: [PATCH 28/29] :fire: Remove announcement command --- commands/Moderation/announcement.js | 115 ---------------------------- 1 file changed, 115 deletions(-) delete mode 100644 commands/Moderation/announcement.js diff --git a/commands/Moderation/announcement.js b/commands/Moderation/announcement.js deleted file mode 100644 index 217b160e9c..0000000000 --- a/commands/Moderation/announcement.js +++ /dev/null @@ -1,115 +0,0 @@ -const Command = require("../../base/Command.js"), - Discord = require("discord.js"); - -module.exports = class extends Command { - - constructor (client) { - super(client, { - name: "announcement", - dirname: __dirname, - enabled: true, - guildOnly: true, - , - memberPermissions: [ "MENTION_EVERYONE" ], - botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], - nsfw: false, - ownerOnly: false, - cooldown: 3000 - }); - } - - async run (interaction, translate, data) { - - const text = args.join(" "); - if(!text){ - return interaction.reply({ - content: translate("moderation/announcement:MISSING_TEXT"), - ephemeral: true - }); - } - if(text.length > 1030){ - return interaction.reply({ - content: translate("moderation/announcement:TOO_LONG"), - ephemeral: true - }); - } - - message.delete().catch(() => {}); - - let mention = ""; - - const msg = await interaction.reply({ - content: translate("moderation/announcement:MENTION_PROMPT") - }); - - const collector = new Discord.MessageCollector(message.channel, (m) => m.author.id === interaction.user.id, { time: 240000 }); - - collector.on("collect", async (tmsg) => { - - if(tmsg.content.toLowerCase() === translate("common:NO").toLowerCase()){ - tmsg.delete(); - msg.delete(); - collector.stop(true); - } - - if(tmsg.content.toLowerCase() === translate("common:YES").toLowerCase()){ - tmsg.delete(); - msg.delete(); - const tmsg1 = await interaction.reply({ - content: translate("moderation/announcement:MENTION_TYPE_PROMPT") - }); - const c = new Discord.MessageCollector(message.channel, (m) => m.author.id === interaction.user.id, { time: 60000 }); - c.on("collect", (m) => { - if(m.content.toLowerCase() === "here"){ - mention = "@here"; - tmsg1.delete(); - m.delete(); - collector.stop(true); - c.stop(true); - } else if(m.content.toLowerCase() === "every"){ - mention = "@everyone"; - tmsg1.delete(); - m.delete(); - collector.stop(true); - c.stop(true); - } - }); - c.on("end", (collected, reason) => { - if(reason === "time"){ - return interaction.reply({ - content: translate("misc:TIMES_UP"), - ephemeral: true - }); - } - }); - } - }); - - collector.on("end", (collected, reason) => { - - if(reason === "time"){ - return interaction.reply({ - content: translate("misc:TIMES_UP"), - ephemeral: true - }); - } - - const embed = new Discord.MessageEmbed() - .setAuthor(translate("moderation/announcement:TITLE")) - .setColor(data.config.embed.color) - .setFooter(interaction.user.tag) - .setTimestamp() - .setDescription(text); - - message.channel.send({ - content: mention, - embeds: [embed], - allowedMentions: { - parse: ["users", "everyone", "roles"] - } - }); - }); - - } - -}; From d46d3e69ae9d36dc59a8f37ffe42c0683c88a68a Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Sun, 29 Aug 2021 21:34:58 +0200 Subject: [PATCH 29/29] :recycle: Rename data#guild to data#guildData --- commands/Administration/addcommand.js | 8 +++--- commands/Administration/automod.js | 20 +++++++------- commands/Administration/autorole.js | 18 ++++++------ commands/Administration/configuration.js | 2 +- commands/Administration/delcommand.js | 6 ++-- commands/Administration/deletemod.js | 8 +++--- commands/Administration/goodbye.js | 20 +++++++------- commands/Administration/ignore.js | 10 +++---- commands/Administration/setfortniteshop.js | 16 +++++------ commands/Administration/setlang.js | 4 +-- commands/Administration/setmodlogs.js | 14 +++++----- commands/Administration/setprefix.js | 4 +-- commands/Administration/setreports.js | 14 +++++----- commands/Administration/setsuggests.js | 14 +++++----- commands/Administration/slowmode.js | 22 +++++++-------- commands/Administration/welcome.js | 20 +++++++------- commands/Economy/marry.js | 2 +- commands/Economy/profile.js | 2 +- commands/Fun/findwords.js | 2 +- commands/Fun/fml.js | 2 +- commands/Fun/joke.js | 2 +- commands/General/fortniteshop.js | 2 +- commands/General/help.js | 14 +++++----- commands/General/invite.js | 2 +- commands/General/report.js | 2 +- commands/General/suggest.js | 2 +- commands/General/translate.js | 4 +-- commands/Moderation/giveaway.js | 6 ++-- commands/Moderation/kick.js | 12 ++++---- commands/Moderation/mute.js | 14 +++++----- commands/Moderation/setwarns.js | 32 +++++++++++----------- commands/Moderation/warn.js | 20 +++++++------- commands/Music/filter.js | 4 +-- commands/Music/filters.js | 2 +- events/message.js | 22 +++++++-------- helpers/functions.js | 2 +- 36 files changed, 175 insertions(+), 175 deletions(-) diff --git a/commands/Administration/addcommand.js b/commands/Administration/addcommand.js index 6741f3f98f..c0a2648071 100644 --- a/commands/Administration/addcommand.js +++ b/commands/Administration/addcommand.js @@ -30,7 +30,7 @@ module.exports = class extends Command { if ( this.client.commands.get(name) || this.client.aliases.get(name) || - data.guild.customCommands.find((c) => c.name === name) + data.guildData.customCommands.find((c) => c.name === name) ) { return message.error( "administration/addcommand:COMMAND_ALREADY_EXISTS" @@ -45,15 +45,15 @@ module.exports = class extends Command { }); } - data.guild.customCommands.push({ + data.guildData.customCommands.push({ name: name.toLowerCase(), answer: answer }); - data.guild.save(); + data.guildData.save(); message.success("administration/addcommand:SUCCESS", { commandName: name, - prefix: data.guild.prefix + prefix: data.guildData.prefix }); } diff --git a/commands/Administration/automod.js b/commands/Administration/automod.js index 3375c0a916..77acccc71d 100644 --- a/commands/Administration/automod.js +++ b/commands/Administration/automod.js @@ -28,25 +28,25 @@ module.exports = class extends Command { } if(status === "on"){ - data.guild.plugins.automod = { enabled: true, ignored: [] }; - data.guild.markModified("plugins.automod"); - data.guild.save(); + data.guildData.plugins.automod = { enabled: true, ignored: [] }; + data.guildData.markModified("plugins.automod"); + data.guildData.save(); message.success("administration/automod:ENABLED", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }); } else if (status === "off"){ if(message.mentions.channels.filter((ch) => ch.type === "text" && ch.guild.id === interaction.guild.id).first()){ const channel = message.mentions.channels.first(); - data.guild.plugins.automod.ignored.push(channel); - data.guild.markModified("plugins.automod"); - data.guild.save(); + data.guildData.plugins.automod.ignored.push(channel); + data.guildData.markModified("plugins.automod"); + data.guildData.save(); message.success("administration/automod:DISABLED_CHANNEL", { channel: channel.toString() }); } else { - data.guild.plugins.automod = { enabled: false, ignored: [] }; - data.guild.markModified("plugins.automod"); - data.guild.save(); + data.guildData.plugins.automod = { enabled: false, ignored: [] }; + data.guildData.markModified("plugins.automod"); + data.guildData.save(); interaction.reply({ content: translate("administration/automod:DISABLED") }); diff --git a/commands/Administration/autorole.js b/commands/Administration/autorole.js index 342450b22a..d23eec17c2 100644 --- a/commands/Administration/autorole.js +++ b/commands/Administration/autorole.js @@ -41,12 +41,12 @@ module.exports = class extends Command { }); } - data.guild.plugins.autorole = { + data.guildData.plugins.autorole = { enabled: true, role: role.id }; - data.guild.markModified("plugins.autorole"); - await data.guild.save(); + data.guildData.markModified("plugins.autorole"); + await data.guildData.save(); message.success("administration/autorole:SUCCESS_ENABLED", { roleName: role.name @@ -55,21 +55,21 @@ module.exports = class extends Command { if(status === "off"){ - if(!data.guild.plugins.autorole.enabled){ + if(!data.guildData.plugins.autorole.enabled){ return message.success("administration/autorole:ALREADY_DISABLED", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }); } - data.guild.plugins.autorole = { + data.guildData.plugins.autorole = { enabled: false, role: null }; - data.guild.markModified("plugins.autorole"); - await data.guild.save(); + data.guildData.markModified("plugins.autorole"); + await data.guildData.save(); message.success("administration/autorole:SUCCESS_DISABLED", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }); } diff --git a/commands/Administration/configuration.js b/commands/Administration/configuration.js index 2f7cf3c4cf..1546b497b4 100644 --- a/commands/Administration/configuration.js +++ b/commands/Administration/configuration.js @@ -20,7 +20,7 @@ module.exports = class extends Command { async run (interaction, translate, data) { - const guildData = data.guild; + const guildData = data.guildData; const embed = new Discord.MessageEmbed() .setAuthor(message.guild.name, message.guild.iconURL()) diff --git a/commands/Administration/delcommand.js b/commands/Administration/delcommand.js index 8667bea141..5a0aa7946f 100644 --- a/commands/Administration/delcommand.js +++ b/commands/Administration/delcommand.js @@ -27,14 +27,14 @@ module.exports = class extends Command { }); } - if(!data.guild.customCommands.find((c) => c.name === name)){ + if(!data.guildData.customCommands.find((c) => c.name === name)){ return message.error("administration/delcommand:UNKNOWN_COMMAND", { commandName: name }); } - data.guild.customCommands = data.guild.customCommands.filter((c) => c.name !== name); - data.guild.save(); + data.guildData.customCommands = data.guildData.customCommands.filter((c) => c.name !== name); + data.guildData.save(); message.success("administration/delcommand:SUCCESS", { commandName: name diff --git a/commands/Administration/deletemod.js b/commands/Administration/deletemod.js index e720c4b3ae..1f149017a5 100644 --- a/commands/Administration/deletemod.js +++ b/commands/Administration/deletemod.js @@ -26,14 +26,14 @@ module.exports = class extends Command { }); } if(status === "on"){ - data.guild.autoDeleteModCommands = true; - data.guild.save(); + data.guildData.autoDeleteModCommands = true; + data.guildData.save(); interaction.reply({ content: translate("administration/deletemod:ENABLED") }); } else { - data.guild.autoDeleteModCommands = false; - data.guild.save(); + data.guildData.autoDeleteModCommands = false; + data.guildData.save(); interaction.reply({ content: translate("administration/deletemod:DISABLED") }); diff --git a/commands/Administration/goodbye.js b/commands/Administration/goodbye.js index 004e403d97..f225fc6755 100644 --- a/commands/Administration/goodbye.js +++ b/commands/Administration/goodbye.js @@ -22,7 +22,7 @@ module.exports = class extends Command { if ( args[0] === "test" && - data.guild.plugins.goodbye.enabled + data.guildData.plugins.goodbye.enabled ) { this.client.emit("guildMemberRemove", message.member); return interaction.reply({ @@ -32,7 +32,7 @@ module.exports = class extends Command { if ( (!args[0] || !["edit", "off"].includes(args[0])) && - data.guild.plugins.goodbye.enabled + data.guildData.plugins.goodbye.enabled ) return interaction.reply({ content: translate("administration/goodbye:MISSING_STATUS"), @@ -40,16 +40,16 @@ module.exports = class extends Command { }); if (args[0] === "off") { - data.guild.plugins.goodbye = { + data.guildData.plugins.goodbye = { enabled: false, message: null, channelID: null, withImage: null }; - data.guild.markModified("plugins.goodbye"); - data.guild.save(); + data.guildData.markModified("plugins.goodbye"); + data.guildData.save(); return message.error("administration/goodbye:DISABLED", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }); } else { const goodbye = { @@ -88,11 +88,11 @@ module.exports = class extends Command { ephemeral: true }); } - data.guild.plugins.goodbye = goodbye; - data.guild.markModified("plugins.goodbye"); - await data.guild.save(); + data.guildData.plugins.goodbye = goodbye; + data.guildData.markModified("plugins.goodbye"); + await data.guildData.save(); message.sendT("administration/goodbye:FORM_SUCCESS", { - prefix: data.guild.prefix, + prefix: data.guildData.prefix, channel: `<#${goodbye.channel}>` }); return collector.stop(); diff --git a/commands/Administration/ignore.js b/commands/Administration/ignore.js index 4a363c98a9..5b6a8db6af 100644 --- a/commands/Administration/ignore.js +++ b/commands/Administration/ignore.js @@ -27,17 +27,17 @@ module.exports = class extends Command { }); } - const ignored = data.guild.ignoredChannels.includes(channel.id); + const ignored = data.guildData.ignoredChannels.includes(channel.id); if(ignored){ - data.guild.ignoredChannels = data.guild.ignoredChannels.filter((ch) => ch !== channel.id); - data.guild.save(); + data.guildData.ignoredChannels = data.guildData.ignoredChannels.filter((ch) => ch !== channel.id); + data.guildData.save(); return message.success("administration/ignore:ALLOWED", { channel: channel.toString() }); } else if(!ignored){ - data.guild.ignoredChannels.push(channel.id); - data.guild.save(); + data.guildData.ignoredChannels.push(channel.id); + data.guildData.save(); return message.success("administration/ignore:IGNORED", { channel: channel.toString() }); diff --git a/commands/Administration/setfortniteshop.js b/commands/Administration/setfortniteshop.js index 6eadc99a8a..7d5db0f609 100644 --- a/commands/Administration/setfortniteshop.js +++ b/commands/Administration/setfortniteshop.js @@ -28,25 +28,25 @@ module.exports = class extends Command { }); } - if (data.guild.plugins.fortniteshop && !message.mentions.channels.first() || message.mentions.channels.first() && data.guild.plugins.fortniteshop === message.mentions.channels.first().id) { - data.guild.plugins.fortniteshop = false; - data.guild.markModified("plugins.fortniteshop"); - data.guild.save(); + if (data.guildData.plugins.fortniteshop && !message.mentions.channels.first() || message.mentions.channels.first() && data.guildData.plugins.fortniteshop === message.mentions.channels.first().id) { + data.guildData.plugins.fortniteshop = false; + data.guildData.markModified("plugins.fortniteshop"); + data.guildData.save(); return interaction.reply({ content: translate("administration/setfortniteshop:DISABLED") }); } const channel = message.mentions.channels.first() || message.channel; - data.guild.plugins.fortniteshop = channel.id; - data.guild.markModified("plugins.fortniteshop"); - data.guild.save(); + data.guildData.plugins.fortniteshop = channel.id; + data.guildData.markModified("plugins.fortniteshop"); + data.guildData.save(); message.success("administration/setfortniteshop:ENABLED", { channel: channel.toString() }); - const momentName = this.client.languages.find((language) => language.name === data.guild.language || language.aliases.includes(data.guild.language)).moment; + const momentName = this.client.languages.find((language) => language.name === data.guildData.language || language.aliases.includes(data.guildData.language)).moment; const shop = new Canvas.FortniteShop(); const image = await shop .setToken(data.config.apiKeys.fortniteFNBR) diff --git a/commands/Administration/setlang.js b/commands/Administration/setlang.js index 26e2a3bbc1..c8729a0d36 100644 --- a/commands/Administration/setlang.js +++ b/commands/Administration/setlang.js @@ -27,8 +27,8 @@ module.exports = class extends Command { }); } - data.guild.language = language.name; - await data.guild.save(); + data.guildData.language = language.name; + await data.guildData.save(); return interaction.reply({ content: translate("administration/setlang:SUCCESS") diff --git a/commands/Administration/setmodlogs.js b/commands/Administration/setmodlogs.js index dfdc525daa..77ec5d3551 100644 --- a/commands/Administration/setmodlogs.js +++ b/commands/Administration/setmodlogs.js @@ -20,7 +20,7 @@ module.exports = class extends Command { async run (interaction, translate, data) { - const areModLogsEnabled = Boolean(data.guild.plugins.modlogs); + const areModLogsEnabled = Boolean(data.guildData.plugins.modlogs); const sentChannel = await Resolvers.resolveChannel({ message, search: args.join(" "), @@ -28,17 +28,17 @@ module.exports = class extends Command { }); if (!sentChannel && areModLogsEnabled) { - data.guild.plugins.modlogs = null; - data.guild.markModified("plugins.modlogs"); - await data.guild.save(); + data.guildData.plugins.modlogs = null; + data.guildData.markModified("plugins.modlogs"); + await data.guildData.save(); return message.success( "administration/setmodlogs:SUCCESS_DISABLED" ); } else { const channel = sentChannel || message.channel; - data.guild.plugins.modlogs = channel.id; - data.guild.markModified("plugins.modlogs"); - await data.guild.save(); + data.guildData.plugins.modlogs = channel.id; + data.guildData.markModified("plugins.modlogs"); + await data.guildData.save(); return message.success( "administration/setmodlogs:SUCCESS_ENABLED", { diff --git a/commands/Administration/setprefix.js b/commands/Administration/setprefix.js index ec3dceaf37..9ee6939002 100644 --- a/commands/Administration/setprefix.js +++ b/commands/Administration/setprefix.js @@ -33,8 +33,8 @@ module.exports = class extends Command { }); } - data.guild.prefix = prefix; - data.guild.save(); + data.guildData.prefix = prefix; + data.guildData.save(); // Sucess return message.success("administration/setprefix:SUCCESS", { diff --git a/commands/Administration/setreports.js b/commands/Administration/setreports.js index bcdeb22a02..e1884a39c9 100644 --- a/commands/Administration/setreports.js +++ b/commands/Administration/setreports.js @@ -20,7 +20,7 @@ module.exports = class extends Command { async run (interaction, translate, data) { - const areReportsEnabled = Boolean(data.guild.plugins.reports); + const areReportsEnabled = Boolean(data.guildData.plugins.reports); const sentChannel = await Resolvers.resolveChannel({ message, search: args.join(" "), @@ -28,17 +28,17 @@ module.exports = class extends Command { }); if (!sentChannel && areReportsEnabled) { - data.guild.plugins.reports = null; - data.guild.markModified("plugins.reports"); - await data.guild.save(); + data.guildData.plugins.reports = null; + data.guildData.markModified("plugins.reports"); + await data.guildData.save(); return message.success( "administration/setreports:SUCCESS_DISABLED" ); } else { const channel = sentChannel || message.channel; - data.guild.plugins.reports = channel.id; - data.guild.markModified("plugins.reports"); - await data.guild.save(); + data.guildData.plugins.reports = channel.id; + data.guildData.markModified("plugins.reports"); + await data.guildData.save(); return message.success( "administration/setreports:SUCCESS_ENABLED", { diff --git a/commands/Administration/setsuggests.js b/commands/Administration/setsuggests.js index 94a59cbdc2..dc0786d448 100644 --- a/commands/Administration/setsuggests.js +++ b/commands/Administration/setsuggests.js @@ -20,7 +20,7 @@ module.exports = class extends Command { async run (interaction, translate, data) { - const areSuggestsEnabled = Boolean(data.guild.plugins.suggestions); + const areSuggestsEnabled = Boolean(data.guildData.plugins.suggestions); const sentChannel = await Resolvers.resolveChannel({ message, search: args.join(" "), @@ -28,17 +28,17 @@ module.exports = class extends Command { }); if (!sentChannel && areSuggestsEnabled) { - data.guild.plugins.suggestions = null; - data.guild.markModified("plugins.suggestions"); - await data.guild.save(); + data.guildData.plugins.suggestions = null; + data.guildData.markModified("plugins.suggestions"); + await data.guildData.save(); return message.success( "administration/setsuggests:SUCCESS_DISABLED" ); } else { const channel = sentChannel || message.channel; - data.guild.plugins.suggestions = channel.id; - data.guild.markModified("plugins.suggestions"); - await data.guild.save(); + data.guildData.plugins.suggestions = channel.id; + data.guildData.markModified("plugins.suggestions"); + await data.guildData.save(); return message.success( "administration/setsuggests:SUCCESS_ENABLED", { diff --git a/commands/Administration/slowmode.js b/commands/Administration/slowmode.js index 2243d39e32..1903a02687 100644 --- a/commands/Administration/slowmode.js +++ b/commands/Administration/slowmode.js @@ -29,17 +29,17 @@ module.exports = class extends Command { } const time = args[1]; if(!time){ - if(!data.guild.slowmode.channels.find((ch) => ch.id === channel.id)){ + if(!data.guildData.slowmode.channels.find((ch) => ch.id === channel.id)){ return interaction.reply({ content: translate("misc:INVALID_TIME"), ephemeral: true }); } - data.guild.slowmode.channels = data.guild.slowmode.channels.filter((ch) => ch.id !== channel.id); - data.guild.markModified("slowmode.channels"); - data.guild.save(); + data.guildData.slowmode.channels = data.guildData.slowmode.channels.filter((ch) => ch.id !== channel.id); + data.guildData.markModified("slowmode.channels"); + data.guildData.save(); message.success("administration/slowmode:DISABLED", { - prefix: data.guild.prefix, + prefix: data.guildData.prefix, channel: `#${channel.name}` }); } else { @@ -49,17 +49,17 @@ module.exports = class extends Command { ephemeral: true }); } - if(data.guild.slowmode.channels.find((ch) => ch.id === channel.id)){ - data.guild.slowmode.channels = data.guild.slowmode.channels.filter((ch) => ch.id !== channel.id); + if(data.guildData.slowmode.channels.find((ch) => ch.id === channel.id)){ + data.guildData.slowmode.channels = data.guildData.slowmode.channels.filter((ch) => ch.id !== channel.id); } - data.guild.slowmode.channels.push({ + data.guildData.slowmode.channels.push({ id: channel.id, time: ms(time) }); - data.guild.markModified("slowmode.channels"); - data.guild.save(); + data.guildData.markModified("slowmode.channels"); + data.guildData.save(); message.success("administration/slowmode:ENABLED", { - prefix: data.guild.prefix, + prefix: data.guildData.prefix, channel: `#${channel.name}`, time: this.client.functions.convertTime(message.guild, ms(time)) }); diff --git a/commands/Administration/welcome.js b/commands/Administration/welcome.js index 6aff63dfe4..80a3e9b1e4 100644 --- a/commands/Administration/welcome.js +++ b/commands/Administration/welcome.js @@ -22,7 +22,7 @@ module.exports = class extends Command { if ( args[0] === "test" && - data.guild.plugins.welcome.enabled + data.guildData.plugins.welcome.enabled ) { this.client.emit("guildMemberAdd", message.member); return interaction.reply({ @@ -32,7 +32,7 @@ module.exports = class extends Command { if ( (!args[0] || !["edit", "off"].includes(args[0])) && - data.guild.plugins.welcome.enabled + data.guildData.plugins.welcome.enabled ) return interaction.reply({ content: translate("administration/welcome:MISSING_STATUS"), @@ -40,16 +40,16 @@ module.exports = class extends Command { }); if (args[0] === "off") { - data.guild.plugins.welcome = { + data.guildData.plugins.welcome = { enabled: false, message: null, channelID: null, withImage: null }; - data.guild.markModified("plugins.welcome"); - data.guild.save(); + data.guildData.markModified("plugins.welcome"); + data.guildData.save(); return message.error("administration/welcome:DISABLED", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }); } else { const welcome = { @@ -88,11 +88,11 @@ module.exports = class extends Command { ephemeral: true }); } - data.guild.plugins.welcome = welcome; - data.guild.markModified("plugins.welcome"); - await data.guild.save(); + data.guildData.plugins.welcome = welcome; + data.guildData.markModified("plugins.welcome"); + await data.guildData.save(); message.sendT("administration/welcome:FORM_SUCCESS", { - prefix: data.guild.prefix, + prefix: data.guildData.prefix, channel: `<#${welcome.channel}>` }); return collector.stop(); diff --git a/commands/Economy/marry.js b/commands/Economy/marry.js index ed1e9f2f23..ded5ed9dbe 100644 --- a/commands/Economy/marry.js +++ b/commands/Economy/marry.js @@ -36,7 +36,7 @@ module.exports = class extends Command { if(data.userData.lover){ return interaction.reply({ content: translate("economy/marry:ALREADY_MARRIED", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }), ephemeral: true }); diff --git a/commands/Economy/profile.js b/commands/Economy/profile.js index 4c65878d59..a11e3a5fe7 100644 --- a/commands/Economy/profile.js +++ b/commands/Economy/profile.js @@ -87,7 +87,7 @@ module.exports = class extends Command { .addField(translate("economy/profile:BIRTHDATE"), (!userData.birthdate ? translate("economy/profile:NO_BIRTHDATE"): this.client.printDate(new Date(userData.birthdate), null, data.guildData.language)), true) .addField(translate("economy/profile:LOVER"), (!userData.lover ? translate("economy/profile:NO_LOVER") : this.client.users.cache.get(userData.lover).tag), true) .addField(translate("economy/profile:ACHIEVEMENTS"), translate("economy/profile:ACHIEVEMENTS_CONTENT", { - prefix: data.guild.prefix + prefix: data.guildData.prefix })) .setColor(data.config.embed.color) // Sets the color of the embed .setFooter(data.config.embed.footer) // Sets the footer of the embed diff --git a/commands/Fun/findwords.js b/commands/Fun/findwords.js index 681cf4712f..fb1c11eabb 100644 --- a/commands/Fun/findwords.js +++ b/commands/Fun/findwords.js @@ -117,7 +117,7 @@ module.exports = class extends Command { participantCount: participants.length, participantList: participants.map((p) => "<@"+p+">").join("\n") }); - if(participants.length > 1 && data.guild.disabledCategories && !data.guild.disabledCategories.includes("Economy")){ + if(participants.length > 1 && data.guildData.disabledCategories && !data.guildData.disabledCategories.includes("Economy")){ message.sendT("fun/findwords:CREDITS", { winner: user.username }); diff --git a/commands/Fun/fml.js b/commands/Fun/fml.js index d1363e27f6..b5aa698d62 100644 --- a/commands/Fun/fml.js +++ b/commands/Fun/fml.js @@ -26,7 +26,7 @@ module.exports = class extends Command { ephemeral: true }); - const fml = await this.client.joker.randomVDM(null, data.guild.language.substr(0, 2)); + const fml = await this.client.joker.randomVDM(null, data.guildData.language.substr(0, 2)); const embed = new Discord.MessageEmbed() .setDescription(fml.content) diff --git a/commands/Fun/joke.js b/commands/Fun/joke.js index bff911abc7..0a9de6a1c6 100644 --- a/commands/Fun/joke.js +++ b/commands/Fun/joke.js @@ -27,7 +27,7 @@ module.exports = class extends Command { }); const joke = await this.client.joker.randomJoke( - data.guild.language.substr(0, 2) + data.guildData.language.substr(0, 2) ); const embed = new Discord.MessageEmbed() diff --git a/commands/General/fortniteshop.js b/commands/General/fortniteshop.js index 7621897c27..94c17631cc 100644 --- a/commands/General/fortniteshop.js +++ b/commands/General/fortniteshop.js @@ -28,7 +28,7 @@ module.exports = class extends Command { prefixEmoji: "loading" }); - const momentName = this.client.languages.find((language) => language.name === data.guild.language || language.aliases.includes(data.guild.language)).moment; + const momentName = this.client.languages.find((language) => language.name === data.guildData.language || language.aliases.includes(data.guildData.language)).moment; const shop = new Canvas.FortniteShop(); const image = await shop .setToken(data.config.apiKeys.fortniteFNBR) diff --git a/commands/General/help.js b/commands/General/help.js index a403d550a9..76a53cf1d9 100644 --- a/commands/General/help.js +++ b/commands/General/help.js @@ -22,7 +22,7 @@ module.exports = class extends Command { // if a command is provided if(args[0]){ - const isCustom = (message.guild && data.guild.customCommands ? data.guild.customCommands.find((c) => c.name === args[0]) : false); + const isCustom = (message.guild && data.guildData.customCommands ? data.guildData.customCommands.find((c) => c.name === args[0]) : false); // if the command doesn't exist, error message const cmd = this.client.commands.get(args[0]) || this.client.commands.get(this.client.aliases.get(args[0])); @@ -39,13 +39,13 @@ module.exports = class extends Command { const description = translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:DESCRIPTION`); const usage = translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:USAGE`, { prefix: message.guild - ? data.guild.prefix + ? data.guildData.prefix : "" } ); const examples = translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:EXAMPLES`, { prefix: message.guild - ? data.guild.prefix + ? data.guildData.prefix : "" } ); @@ -55,7 +55,7 @@ module.exports = class extends Command { .setAuthor( translate("general/help:CMD_TITLE", { prefix: message.guild - ? data.guild.prefix + ? data.guildData.prefix : "", cmd: cmd.help.name }) @@ -105,7 +105,7 @@ module.exports = class extends Command { const embed = new Discord.MessageEmbed() .setDescription(translate("general/help:INFO", { prefix: message.guild - ? data.guild.prefix + ? data.guildData.prefix : "" })) .setColor(data.config.embed.color) @@ -115,8 +115,8 @@ module.exports = class extends Command { embed.addField(emojis.categories[cat.toLowerCase()]+" "+cat+" - ("+tCommands.size+")", tCommands.map((cmd) => "`"+cmd.help.name+"`").join(", ")); }); if(message.guild){ - if(data.guild.customCommands.length > 0){ - embed.addField(emojis.categories.custom+" "+message.guild.name+" | "+translate("general/help:CUSTOM_COMMANDS")+" - ("+data.guild.customCommands.length+")", data.guild.customCommands.map((cmd) => "`"+cmd.name+"`").join(", ")); + if(data.guildData.customCommands.length > 0){ + embed.addField(emojis.categories.custom+" "+message.guild.name+" | "+translate("general/help:CUSTOM_COMMANDS")+" - ("+data.guildData.customCommands.length+")", data.guildData.customCommands.map((cmd) => "`"+cmd.name+"`").join(", ")); } } diff --git a/commands/General/invite.js b/commands/General/invite.js index 2af4419345..fd8683ecb1 100644 --- a/commands/General/invite.js +++ b/commands/General/invite.js @@ -31,7 +31,7 @@ module.exports = class extends Command { const embed = new Discord.MessageEmbed() .setAuthor(translate("general/invite:LINKS")) .setDescription(translate("general/invite:TIP", { - prefix: data.guild.prefix + prefix: data.guildData.prefix })) .addField(translate("general/invite:ADD"), inviteLink) .addField(translate("general/invite:VOTE"), voteURL) diff --git a/commands/General/report.js b/commands/General/report.js index 050160353a..7b323b2485 100644 --- a/commands/General/report.js +++ b/commands/General/report.js @@ -20,7 +20,7 @@ module.exports = class extends Command { async run (interaction, translate, data) { - const repChannel = message.guild.channels.cache.get(data.guild.plugins.reports); + const repChannel = message.guild.channels.cache.get(data.guildData.plugins.reports); if(!repChannel){ return message.error("general/report:MISSING_CHANNEL"); } diff --git a/commands/General/suggest.js b/commands/General/suggest.js index 07b079065e..78bbb4332e 100644 --- a/commands/General/suggest.js +++ b/commands/General/suggest.js @@ -20,7 +20,7 @@ module.exports = class extends Command { async run (interaction, translate, data) { - const suggChannel = message.guild.channels.cache.get(data.guild.plugins.suggestions); + const suggChannel = message.guild.channels.cache.get(data.guildData.plugins.suggestions); if(!suggChannel){ return message.error("general/suggest:MISSING_CHANNEL"); } diff --git a/commands/General/translate.js b/commands/General/translate.js index 4128ea7974..aaed47a23e 100644 --- a/commands/General/translate.js +++ b/commands/General/translate.js @@ -44,7 +44,7 @@ module.exports = class extends Command { if(!args[0]){ return pWait.error("general/translate:MISSING_LANGUAGE", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }, { edit: true }); @@ -62,7 +62,7 @@ module.exports = class extends Command { if(!langs.includes(language)){ return pWait.error("general/translate:INVALID_LANGUAGE", { - prefix: data.guild.prefix, + prefix: data.guildData.prefix, search: language }, { edit: true diff --git a/commands/Moderation/giveaway.js b/commands/Moderation/giveaway.js index bfbbd3d330..308eef1a1a 100644 --- a/commands/Moderation/giveaway.js +++ b/commands/Moderation/giveaway.js @@ -39,7 +39,7 @@ module.exports = class extends Command { const time = args[1]; if(!time){ return message.error("moderation/giveaway:INVALID_CREATE", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }); } if(isNaN(ms(time))){ @@ -57,7 +57,7 @@ module.exports = class extends Command { const winnersCount = args[2]; if(!winnersCount){ return message.error("moderation/giveaway:INVALID_CREATE", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }); } if(isNaN(winnersCount) || winnersCount > 10 || winnersCount < 1){ @@ -69,7 +69,7 @@ module.exports = class extends Command { const prize = args.slice(3).join(" "); if(!prize){ return message.error("moderation/giveaway:INVALID_CREATE", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }); } this.client.giveawaysManager.start(message.channel, { diff --git a/commands/Moderation/kick.js b/commands/Moderation/kick.js index 6caf68dc04..58b147c7d3 100644 --- a/commands/Moderation/kick.js +++ b/commands/Moderation/kick.js @@ -77,27 +77,27 @@ module.exports = class extends Command { reason }); - data.guild.casesCount++; - data.guild.save(); + data.guildData.casesCount++; + data.guildData.save(); const caseInfo = { channel: message.channel.id, moderator: interaction.user.id, date: Date.now(), type: "kick", - case: data.guild.casesCount, + case: data.guildData.casesCount, reason, }; memberData.sanctions.push(caseInfo); memberData.save(); - if(data.guild.plugins.modlogs){ - const channel = message.guild.channels.cache.get(data.guild.plugins.modlogs); + if(data.guildData.plugins.modlogs){ + const channel = message.guild.channels.cache.get(data.guildData.plugins.modlogs); if(!channel) return; const embed = new Discord.MessageEmbed() .setAuthor(translate("moderation/kick:CASE", { - count: data.guild.casesCount + count: data.guildData.casesCount })) .addField(translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) .addField(translate("common:MODERATOR"), `\`${interaction.user.tag}\` (${interaction.user.toString()})`, true) diff --git a/commands/Moderation/mute.js b/commands/Moderation/mute.js index 4284578e8b..7572d2c609 100644 --- a/commands/Moderation/mute.js +++ b/commands/Moderation/mute.js @@ -84,37 +84,37 @@ module.exports = class extends Command { reason }); - data.guild.casesCount++; + data.guildData.casesCount++; const caseInfo = { channel: message.channel.id, moderator: interaction.user.id, date: Date.now(), type: "mute", - case: data.guild.casesCount, + case: data.guildData.casesCount, reason, time }; memberData.mute.muted = true; memberData.mute.endDate = Date.now()+ms(time); - memberData.mute.case = data.guild.casesCount; + memberData.mute.case = data.guildData.casesCount; memberData.sanctions.push(caseInfo); memberData.markModified("sanctions"); memberData.markModified("mute"); await memberData.save(); - await data.guild.save(); + await data.guildData.save(); this.client.databaseCache.mutedUsers.set(`${member.id}${interaction.guild.id}`, memberData); - if(data.guild.plugins.modlogs){ - const channel = message.guild.channels.cache.get(data.guild.plugins.modlogs); + if(data.guildData.plugins.modlogs){ + const channel = message.guild.channels.cache.get(data.guildData.plugins.modlogs); if(!channel) return; const embed = new Discord.MessageEmbed() .setAuthor(translate("moderation/mute:CASE", { - count: data.guild.casesCount + count: data.guildData.casesCount })) .addField(translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) .addField(translate("common:MODERATOR"), `\`${interaction.user.tag}\` (${interaction.user.toString()})`, true) diff --git a/commands/Moderation/setwarns.js b/commands/Moderation/setwarns.js index 75dc32601f..f117c612db 100644 --- a/commands/Moderation/setwarns.js +++ b/commands/Moderation/setwarns.js @@ -31,20 +31,20 @@ module.exports = class extends Command { if(number === "reset"){ if(sanction === "kick"){ - data.guild.plugins.warnsSanctions.kick = false; - data.guild.markModified("plugins.warnsSanctions"); - data.guild.save(); + data.guildData.plugins.warnsSanctions.kick = false; + data.guildData.markModified("plugins.warnsSanctions"); + data.guildData.save(); return message.success("moderation/setwarns:SUCCESS_KICK_RESET", { - prefix: data.guild.prefix, + prefix: data.guildData.prefix, count: number }); } if(sanction === "ban"){ - data.guild.plugins.warnsSanctions.ban = false; - data.guild.markModified("plugins.warnsSanctions"); - data.guild.save(); + data.guildData.plugins.warnsSanctions.ban = false; + data.guildData.markModified("plugins.warnsSanctions"); + data.guildData.save(); return message.success("moderation/setwarns:SUCCESS_BAN_RESET", { - prefix: data.guild.prefix, + prefix: data.guildData.prefix, count: number }); } @@ -64,21 +64,21 @@ module.exports = class extends Command { } if(sanction === "kick"){ - data.guild.plugins.warnsSanctions.kick = number; - data.guild.markModified("plugins.warnsSanctions"); - data.guild.save(); + data.guildData.plugins.warnsSanctions.kick = number; + data.guildData.markModified("plugins.warnsSanctions"); + data.guildData.save(); return message.success("moderation/setwarns:SUCCESS_KICK", { - prefix: data.guild.prefix, + prefix: data.guildData.prefix, count: number }); } if(sanction === "ban"){ - data.guild.plugins.warnsSanctions.ban = number; - data.guild.markModified("plugins.warnsSanctions"); - data.guild.save(); + data.guildData.plugins.warnsSanctions.ban = number; + data.guildData.markModified("plugins.warnsSanctions"); + data.guildData.save(); return message.success("moderation/setwarns:SUCCESS_BAN", { - prefix: data.guild.prefix, + prefix: data.guildData.prefix, count: number }); } diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js index 2178e06a50..b1dc0067fd 100644 --- a/commands/Moderation/warn.js +++ b/commands/Moderation/warn.js @@ -61,18 +61,18 @@ module.exports = class extends Command { // Gets current member sanctions const sanctions = memberData.sanctions.filter((s) => s.type === "warn").length; - const banCount = data.guild.plugins.warnsSanctions.ban; - const kickCount = data.guild.plugins.warnsSanctions.kick; + const banCount = data.guildData.plugins.warnsSanctions.ban; + const kickCount = data.guildData.plugins.warnsSanctions.kick; - data.guild.casesCount++; - data.guild.save(); + data.guildData.casesCount++; + data.guildData.save(); const caseInfo = { channel: message.channel.id, moderator: interaction.user.id, date: Date.now(), type: "warn", - case: data.guild.casesCount, + case: data.guildData.casesCount, reason }; @@ -91,7 +91,7 @@ module.exports = class extends Command { })); caseInfo.type = "ban"; embed.setAuthor(translate("moderation/ban:CASE", { - count: data.guild.casesCount + count: data.guildData.casesCount })) .setColor("#e02316"); message.guild.members.ban(member).catch(() => {}); @@ -112,7 +112,7 @@ module.exports = class extends Command { })); caseInfo.type = "kick"; embed.setAuthor(translate("moderation/kick:CASE", { - count: data.guild.casesCount + count: data.guildData.casesCount })) .setColor("#e88709"); member.kick().catch(() => {}); @@ -131,7 +131,7 @@ module.exports = class extends Command { })); caseInfo.type = "warn"; embed.setAuthor(translate("moderation/warn:CASE", { - caseNumber: data.guild.casesCount + caseNumber: data.guildData.casesCount })) .setColor("#8c14e2"); message.success("moderation/warn:WARNED", { @@ -142,8 +142,8 @@ module.exports = class extends Command { memberData.sanctions.push(caseInfo); memberData.save(); - if(data.guild.plugins.modlogs){ - const channel = message.guild.channels.cache.get(data.guild.plugins.modlogs); + if(data.guildData.plugins.modlogs){ + const channel = message.guild.channels.cache.get(data.guildData.plugins.modlogs); if(!channel) return; channel.send({ embeds: [embed] }); } diff --git a/commands/Music/filter.js b/commands/Music/filter.js index a1429140cd..04f8ea2380 100644 --- a/commands/Music/filter.js +++ b/commands/Music/filter.js @@ -39,13 +39,13 @@ module.exports = class extends Command { const filter = args[0]; if(!filter) return message.error("music/filter:MISSING_FILTER", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }); const filterToUpdate = Object.values(FiltersList).find((f) => f.toLowerCase() === filter.toLowerCase()); if(!filterToUpdate) return message.error("music/filter:UNKNOWN_FILTER", { - prefix: data.guild.prefix + prefix: data.guildData.prefix }); const filterRealName = Object.keys(FiltersList).find((f) => FiltersList[f] === filterToUpdate); diff --git a/commands/Music/filters.js b/commands/Music/filters.js index 8ebf768086..4e96c14cd9 100644 --- a/commands/Music/filters.js +++ b/commands/Music/filters.js @@ -47,7 +47,7 @@ module.exports = class extends Command { const list = new Discord.MessageEmbed() .setDescription(translate("music/filters:CONTENT", { - prefix: data.guild.prefix + prefix: data.guildData.prefix })) .addField(translate("music/filters:TITLE"), filtersStatuses[0].join("\n"), true) .addField("** **", filtersStatuses[1].join("\n"), true) diff --git a/events/message.js b/events/message.js index 3e209be010..9fbeb1a775 100644 --- a/events/message.js +++ b/events/message.js @@ -26,7 +26,7 @@ module.exports = class { if(message.guild){ // Gets guild data const guild = await client.findOrCreateGuild({ id: message.guild.id }); - message.guild.data = data.guild = guild; + message.guild.data = data.guildData = guild; } // Check if the bot was mentionned @@ -34,7 +34,7 @@ module.exports = class { if(message.guild){ return message.sendT("misc:HELLO_SERVER", { username: message.author.username, - prefix: data.guild.prefix + prefix: data.guildData.prefix }); } else { return message.sendT("misc:HELLO_DM", { @@ -61,9 +61,9 @@ module.exports = class { await updateXp(message, data); if(!message.channel.permissionsFor(message.member).has("MANAGE_MESSAGES") && !message.editedAt){ - const channelSlowmode = data.guild.slowmode.channels.find((ch) => ch.id === message.channel.id); + const channelSlowmode = data.guildData.slowmode.channels.find((ch) => ch.id === message.channel.id); if(channelSlowmode){ - const uSlowmode = data.guild.slowmode.users.find((d) => d.id === (message.author.id+message.channel.id)); + const uSlowmode = data.guildData.slowmode.users.find((d) => d.id === (message.author.id+message.channel.id)); if(uSlowmode){ if(uSlowmode.time > Date.now()){ message.delete(); @@ -76,17 +76,17 @@ module.exports = class { uSlowmode.time = channelSlowmode.time+Date.now(); } } else { - data.guild.slowmode.users.push({ + data.guildData.slowmode.users.push({ id: message.author.id+message.channel.id, time: channelSlowmode.time+Date.now() }); } - data.guild.markModified("slowmode.users"); - await data.guild.save(); + data.guildData.markModified("slowmode.users"); + await data.guildData.save(); } } - if(data.guild.plugins.automod.enabled && !data.guild.plugins.automod.ignored.includes(message.channel.id)){ + if(data.guildData.plugins.automod.enabled && !data.guildData.plugins.automod.ignored.includes(message.channel.id)){ if(/(discord\.(gg|io|me|li)\/.+|discordapp\.com\/invite\/.+)/i.test(message.content)){ if(!message.channel.permissionsFor(message.member).has("MANAGE_MESSAGES")){ message.delete(); @@ -129,7 +129,7 @@ module.exports = class { const command = args.shift().toLowerCase(); const cmd = client.commands.get(command) || client.commands.get(client.aliases.get(command)); - const customCommand = message.guild ? data.guild.customCommands.find((c) => c.name === command) : null; + const customCommand = message.guild ? data.guildData.customCommands.find((c) => c.name === command) : null; const customCommandAnswer = customCommand ? customCommand.answer : ""; if(!cmd && !customCommandAnswer && message.guild) return; @@ -139,7 +139,7 @@ module.exports = class { }); } - if(message.guild && data.guild.ignoredChannels.includes(message.channel.id) && !message.member.permissions.has("MANAGE_MESSAGES")){ + if(message.guild && data.guildData.ignoredChannels.includes(message.channel.id) && !message.member.permissions.has("MANAGE_MESSAGES")){ message.delete(); message.author.send(message.translate("misc:RESTRICTED_CHANNEL", { channel: message.channel.toString() @@ -234,7 +234,7 @@ module.exports = class { try { cmd.run(message, args, data); - if(cmd.help.category === "Moderation" && data.guild.autoDeleteModCommands){ + if(cmd.help.category === "Moderation" && data.guildData.autoDeleteModCommands){ message.delete(); } } catch(e){ diff --git a/helpers/functions.js b/helpers/functions.js index a8f4239939..f5dbd08a87 100644 --- a/helpers/functions.js +++ b/helpers/functions.js @@ -16,7 +16,7 @@ module.exports = { `<@!${message.client.user.id}> `, `<@${message.client.user.id}> `, message.client.user.username.toLowerCase(), - data.guild.prefix + data.guildData.prefix ]; let prefix = null; prefixes.forEach((p) => {