From aa5e2d490174e1bb90b75acc9256fc66f3e981f0 Mon Sep 17 00:00:00 2001 From: Vukky <46850780+Vukky123@users.noreply.github.com> Date: Tue, 27 Apr 2021 14:37:12 +0200 Subject: [PATCH 1/3] spaghetti a million! --- commands/about.js | 7 ++- commands/counting.js | 2 +- commands/delwarn.js | 2 +- commands/tweet.js | 12 +++--- commands/tweetreply.js | 12 +++--- commands/vukkysmp.js | 97 ++++++++++++++++++++++++++++++++++++++++++ commands/warn.js | 2 +- commands/warns.js | 2 +- config.json | 5 +++ counting.js | 3 ++ index.js | 46 ++++++++++++++------ strings/en.json | 7 ++- utilities/embeds.js | 3 +- 13 files changed, 170 insertions(+), 30 deletions(-) create mode 100644 commands/vukkysmp.js diff --git a/commands/about.js b/commands/about.js index 1039f3fc..bb229d8b 100644 --- a/commands/about.js +++ b/commands/about.js @@ -2,6 +2,7 @@ const embeds = require("../utilities/embeds"); const packagejson = require("../package.json"); +const config = require("../config.json"); var os = require("os"); module.exports = { @@ -10,6 +11,10 @@ module.exports = { botPermissions: ["EMBED_LINKS"], aliases: ["info"], execute(message, args) { - message.channel.send(embeds.aboutEmbed(`${packagejson.version} (${packagejson.date})`, packagejson.dependencies["discord.js"].substring(1), `${os.type().replace(/_/g, " ")} ${os.release}`)); + let owners = config.misc.owner; + for (let i = 0; i < owners.length; i++) { + owners[i] = `<@${owners[i]}>`; + } + message.channel.send(embeds.aboutEmbed(`${packagejson.version} (${packagejson.date})`, packagejson.dependencies["discord.js"].substring(1), `${os.type().replace(/_/g, " ")} ${os.release}`, owners)); }, }; diff --git a/commands/counting.js b/commands/counting.js index b7a9eb10..10ab1b35 100644 --- a/commands/counting.js +++ b/commands/counting.js @@ -9,7 +9,7 @@ module.exports = { description: "Make VukkyBot tell things about counting!", cooldown: 0, guildOnly: true, - mysql: true, + requiredAPIs: ["mysql"], usage: "", execute(message, args) { var con = mysql.createConnection({ diff --git a/commands/delwarn.js b/commands/delwarn.js index ffee0dad..dabaf1d5 100644 --- a/commands/delwarn.js +++ b/commands/delwarn.js @@ -16,7 +16,7 @@ module.exports = { args: true, cooldown: 0, guildOnly: true, - mysql: true, + requiredAPIs: ["mysql"], usage: "", aliases: ["delwarning", "deletewarning", "deletewarn"], execute(message, args) { diff --git a/commands/tweet.js b/commands/tweet.js index c484643e..813a4625 100644 --- a/commands/tweet.js +++ b/commands/tweet.js @@ -16,6 +16,7 @@ module.exports = { usage: "", guildOnly: true, aliases: ["twt", "tw"], + requiredAPIs: ["twitter"], execute(message, args) { let attachments = []; if(message.attachments.first()) attachments = message.attachments.map(attachment => attachment.url); @@ -45,7 +46,7 @@ module.exports = { if(!reaction || !reaction.emoji || !reaction.emoji.name) return message.channel.send("could not get result"); if(reaction.emoji.name == "⬆") { await message.reactions.removeAll(); - if(reaction.users.cache) console.log(`[twttr] tweet approved by ${reaction.users.cache.last().tag}: ${tweet}`); + if(reaction.users.cache) console.log(`[twttr] tweet by ${message.author.tag} (${message.author.id}) approved by ${reaction.users.cache.last().tag}: ${tweet}`); var client = new Twitter({ consumer_key: process.env.TWITTER_KEY, consumer_secret: process.env.TWITTER_SECRET, @@ -68,7 +69,7 @@ module.exports = { console.error(error); await message.reactions.removeAll(); await message.react("❌"); - message.reply("there was an error!", embeds.errorEmbed(`${error.message ? error.message : "Unknown error."}`)); + message.reply("there was an error!", embeds.errorEmbed(error.message ? error.message : error[0].message ? error[0].message : "Unknown error.")); } }); }); @@ -80,19 +81,20 @@ module.exports = { .then(async function (tweet) { await message.reactions.removeAll(); await message.react("✅"); + console.log(`[twttr] tweet (https://twitter.com/i/status/${tweet.id_str}) by ${message.author.tag} (${message.author.id}) posted by ${reaction.users.cache.last().tag}: ${status.status}`); message.reply(format(vukkytils.getString("TWEET_APPROVED"), `https://twitter.com/i/status/${tweet.id_str}`)); }) .catch(async function (error) { await message.reactions.removeAll(); await message.react("❌"); - message.reply("there was an error!", embeds.errorEmbed(`${error.message ? error.message : "Unknown error."}`)); - throw error; + message.reply("there was an error!", embeds.errorEmbed(error.message ? error.message : error[0].message ? error[0].message : "Unknown error.")); + console.error(error); }); } } else if (reaction.emoji.name == "⬇") { if(!selfdownvote) { await message.reactions.removeAll(); - if(reaction.users.cache) console.log(`[twttr] tweet denied by ${reaction.users.cache.last().tag}: ${tweet}`); + if(reaction.users.cache) console.log(`[twttr] tweet by ${message.author.tag} (${message.author.id}) denied by ${reaction.users.cache.last().tag}: ${tweet}`); await message.react("❌"); message.reply(vukkytils.getString("TWEET_DENIED")); } else { diff --git a/commands/tweetreply.js b/commands/tweetreply.js index 973cb95a..dc77a889 100644 --- a/commands/tweetreply.js +++ b/commands/tweetreply.js @@ -16,6 +16,7 @@ module.exports = { cooldown: 120, aliases: ["replytweet", "twtr", "tweetr", "twr"], usage: " ", + requiredAPIs: ["twitter"], guildOnly: true, execute(message, args) { let attachments = []; @@ -48,7 +49,7 @@ module.exports = { if(!reaction || !reaction.emoji || !reaction.emoji.name) return message.channel.send("could not get result"); if(reaction.emoji.name == "⬆") { await message.reactions.removeAll(); - if(reaction.users.cache) console.log(`[twttr] tweet reply (${args[0]}) approved by ${reaction.users.cache.last().tag}: ${tweet}`); + if(reaction.users.cache) console.log(`[twttr] tweet reply (${args[0]}) by ${message.author.tag} (${message.author.id}) approved by ${reaction.users.cache.last().tag}: ${tweet}`); var client = new Twitter({ consumer_key: process.env.TWITTER_KEY, consumer_secret: process.env.TWITTER_SECRET, @@ -73,7 +74,7 @@ module.exports = { console.error(error); await message.reactions.removeAll(); await message.react("❌"); - message.reply("there was an error!", embeds.errorEmbed(`${error.message ? error.message : "Unknown error."}`)); + message.reply("there was an error!", embeds.errorEmbed(error.message ? error.message : error[0].message ? error[0].message : "Unknown error.")); } }); }); @@ -85,19 +86,20 @@ module.exports = { .then(async function (tweet) { await message.reactions.removeAll(); await message.react("✅"); + if(reaction.users.cache) console.log(`[twttr] tweet reply (https://twitter.com/i/status/${tweet.id_str}) by ${message.author.tag} (${message.author.id}) posted by ${reaction.users.cache.last().tag}: ${status.status}`); message.reply(format(vukkytils.getString("TWEET_APPROVED"), `https://twitter.com/i/status/${tweet.id_str}`)); }) .catch(async function (error) { await message.reactions.removeAll(); await message.react("❌"); - message.reply("there was an error!", embeds.errorEmbed(`${error.message ? error.message : "Unknown error."}`)); - throw error; + message.reply("there was an error!", embeds.errorEmbed(error.message ? error.message : error[0].message ? error[0].message : "Unknown error.")); + console.error(error); }); } } else if (reaction.emoji.name == "⬇") { if(!selfdownvote) { await message.reactions.removeAll(); - if(reaction.users.cache) console.log(`[twttr] tweet reply (${args[0]}) denied by ${reaction.users.cache.last().tag}: ${tweet}`); + if(reaction.users.cache) console.log(`[twttr] tweet reply (${args[0]}) by ${message.author.tag} (${message.author.id}) denied by ${reaction.users.cache.last().tag}: ${tweet}`); message.react("❌"); message.reply(vukkytils.getString("TWEET_DENIED")); } else { diff --git a/commands/vukkysmp.js b/commands/vukkysmp.js new file mode 100644 index 00000000..8b008b7b --- /dev/null +++ b/commands/vukkysmp.js @@ -0,0 +1,97 @@ +const bot = "802596804977229864"; + +module.exports = { + name: "vukkysmp", + description: "VukkySMP management", + botPermissions: ["EMBED_LINKS"], + execute(message, args) { + async function countdown(message, command, options) { + let messages = ["5...", "4...", "3...", "2...", "1...", "0!"]; + if(options.notif) { + await message.channel.send(`say ${message.author.tag} started a ${options.reverse ? "countup" : "countdown"}.`); + } + if(options.reverse) { + messages = ["Let's get counting!", "1...", "2...", "3...", "4...", "5!"]; + } + await message.channel.send(`title @a actionbar "${messages[0]}"`); + setTimeout(async () => { + await message.channel.send(`title @a actionbar "${messages[1]}"`); + setTimeout(async () => { + await message.channel.send(`title @a actionbar "${messages[2]}"`); + setTimeout(async () => { + await message.channel.send(`title @a actionbar "${messages[3]}"`); + setTimeout(async () => { + await message.channel.send(`title @a actionbar "${messages[4]}"`); + setTimeout(async () => { + await message.channel.send(`title @a actionbar "${messages[5]}"`); + message.channel.send(command); + }, 1000); + }, 1000); + }, 1000); + }, 1000); + }, 1000); + } + if(message.channel.id == "805522341437243432") { + if(args[0] == "save") { + console.log(`[mcserv] ${message.author.id} (${message.author.tag}) saved the data.`); + message.channel.send(`say ${message.author.tag} saved the data.`) + .then(message.channel.send("save-all")) + .then(message.channel.send("title @a actionbar \"Saving your data...\"")); + const filter = response => { + return response.content.includes("INFO] Saved the game") && response.author.id == bot; + }; + message.channel.awaitMessages(filter, { max: 1 }) + .then(collected => { + message.channel.send("title @a actionbar \"Data saved!\""); + }); + } else if (args[0] == "stop") { + console.log(`[mcserv] ${message.author.id} (${message.author.tag}) stopped the server.`); + message.channel.send(`say ${message.author.tag} is shutting down the server.`) + .then(message.channel.send("title @a title \"Shutting down\"")) + .then(message.channel.send("save-all")) + .then(message.channel.send("title @a actionbar \"Saving your data...\"")); + const filter = response => { + return response.content.includes("INFO] Saved the game") && response.author.id == bot; + }; + message.channel.awaitMessages(filter, { max: 1 }) + .then(collected => { + message.channel.send("title @a actionbar \"Data saved!\"") + .then(countdown(message, "stop", { notif: false, reverse: false })); + }); + } else if (args[0] == "reload") { + console.log(`[mcserv] ${message.author.id} (${message.author.tag}) reloaded the plugins.`); + message.channel.send(`say ${message.author.tag} is reloading the plugins.`) + .then(message.channel.send("title @a title \"Lag incoming!\"")) + .then(message.channel.send("reload confirm")); + const filter = response => { + return response.author.id == bot; + }; + message.channel.awaitMessages(filter, { max: 1 }) + .then(collected => { + message.channel.send("title @a title \"Lag ended.\""); + }); + } else if (args[0] == "restart") { + console.log(`[mcserv] ${message.author.id} (${message.author.tag}) restarted the server.`); + message.channel.send(`say ${message.author.tag} is restarting the server.`) + .then(message.channel.send("title @a title \"Restarting\"")) + .then(message.channel.send("save-all")) + .then(message.channel.send("title @a actionbar \"Saving your data...\"")); + const filter = response => { + return response.content.includes("INFO] Saved the game") && response.author.id == bot; + }; + message.channel.awaitMessages(filter, { max: 1 }) + .then(collected => { + message.channel.send("title @a actionbar \"Data saved!\"") + .then(countdown(message, "restart", { notif: false, reverse: false })); + }); + } else if (args[0] == "countdown") { + countdown(message, args.slice(1).join(" "), { notif: true, reverse: false }); + } else if (args[0] == "countup") { + countdown(message, args.slice(1).join(" "), { notif: true, reverse: true }); + } + } else { + message.channel.send(`${message.channel.name} is not in the sudoers file. This incident will be reported.\nIn other words, you're not meant to use this command.`); + console.log(`[mcserv] ${message.author.id} (${message.author.tag}) attempted running mcserv in ${message.channel.id} (${message.channel.name})!`); + } + }, +}; \ No newline at end of file diff --git a/commands/warn.js b/commands/warn.js index 267ba249..3704e020 100644 --- a/commands/warn.js +++ b/commands/warn.js @@ -41,7 +41,7 @@ module.exports = { userPermissions: ["MANAGE_MESSAGES"], usage: "<@user> ", cooldown: 0, - mysql: true, + requiredAPIs: ["mysql"], guildOnly: true, execute(message, args) { if (args.slice(1).join(" ").length < 1) return message.channel.send(errorEmbed(`I was expecting more arguments!\nUsage: \`${process.env.BOT_PREFIX}warn <@user> \``)); diff --git a/commands/warns.js b/commands/warns.js index 5ae38d24..644e2389 100644 --- a/commands/warns.js +++ b/commands/warns.js @@ -10,7 +10,7 @@ module.exports = { name: "warns", description: "View warnings created using VukkyBot", botPermissions: ["EMBED_LINKS", "MANAGE_MESSAGES"], - mysql: true, + requiredAPIs: ["mysql"], guildOnly: true, usage: "<@user | user id> (if not specified, shows self)", aliases: ["warnings"], diff --git a/config.json b/config.json index 7efa76a8..0046cc3f 100644 --- a/config.json +++ b/config.json @@ -78,6 +78,11 @@ }, "wikipedia": { "site": "en.wikipedia.org" + }, + "tweet": { + "blacklist": { + + } } } } \ No newline at end of file diff --git a/counting.js b/counting.js index 1de5e998..d9f4c895 100644 --- a/counting.js +++ b/counting.js @@ -6,6 +6,7 @@ require("dotenv").config(); var sql; const error = chalk.bold.red; +const warn = chalk.yellowBright; const success = chalk.green; var servers = {}; var cheader = `[${vukkytils.getString("COUNTING")}]`; @@ -44,6 +45,8 @@ module.exports = { con.query(sql, function (err, result) { if (err) { if(err.code == "ER_TABLE_EXISTS_ERROR") { + console.log(`${cheader} ${warn("Table already exists")}`); + } else { console.log(`${cheader} ${error("Table creation failed")}`); } } diff --git a/index.js b/index.js index 520c079c..c5e271f5 100644 --- a/index.js +++ b/index.js @@ -16,6 +16,7 @@ const prefix = process.env.BOT_PREFIX; client.commands = new Discord.Collection(); let updateRemindedOn = null; const chokidar = require("chokidar"); +const chalk = require("chalk"); const commandFiles = fs.readdirSync("./commands").filter(file => file.endsWith(".js")); let embedPermissions = 1; @@ -55,7 +56,7 @@ async function checkUpdates(forStartup) { function commandPrep(forStartup) { const commandSpinner = ora(`${vukkytils.getString("STARTUP_LOADING_COMMANDS")}\n`).start(); commandSpinner.prefixText = `[${vukkytils.getString("STARTUP")}]`; - commandSpinner.spinner = "point"; + commandSpinner.spinner = "shark"; commandSpinner.render(); let commandsLoaded = 0; for (const file of commandFiles) { @@ -127,7 +128,7 @@ client.once("ready", async () => { "The Game (i lost)", "RuneLite", "RuneScape", - "Old School Runescape", + "Old School RuneScape", "on Funorb", ]; @@ -172,6 +173,11 @@ client.once("ready", async () => { } }); embeds.setAvatarURL(client.user.displayAvatarURL()); + if(config.misc.mysql) { + if(!process.env.SQL_HOST || !process.env.SQL_PASS || !process.env.SQL_USER || !process.env.SQL_DB) { + console.log(`[mysql] ${chalk.bold.red(vukkytils.getString("MYSQL_MISSING_CREDENTIALS"))}`); + } + } }); const inviteSites = ["discord.gg/", "discord.com/invite/", "discordapp.com/invite/", "discord.co/invite/", "watchanimeattheoffice.com/invite/", "discord.media/invite/"]; @@ -203,7 +209,7 @@ client.on("message", async message => { message.channel.send(embed); } } else { - message.channel.send("There's something wrong with this auto response! Contact the server administrator."); + message.channel.send("There's something wrong with this auto response! Contact the VukkyBot owner or server administrator."); } } @@ -220,7 +226,7 @@ client.on("message", async message => { // Make sure the command exists if (!command) { if(config.misc.invalidCmdReminder) { - let reply = `I've been looking around for a while now, but I don't think **${commandName}** is a command.`; + let reply = format(vukkytils.getString("COMMAND_INVALID"), `**${commandName}**`); if (embedPermissions == 0) return message.channel.send(reply); message.channel.send(embeds.errorEmbed(reply)); } @@ -228,23 +234,35 @@ client.on("message", async message => { } // Handle various exports - if(command.mysql && !config.misc.mysql) { - if (embedPermissions == 0) return message.channel.send(`**${commandName}** is not enabled on this VukkyBot because MySQL is disabled!\nFor the hoster: See https://vukkyltd.github.io/VukkyBot/troubleshooting/mysqldisabled.html for instructions on how to enable it!`); - return message.channel.send(embeds.errorEmbed(`**${commandName}** is not enabled on this VukkyBot because MySQL is disabled!\nFor the hoster: See [the VukkyBot Documentation site](https://vukkyltd.github.io/VukkyBot/troubleshooting/mysqldisabled.html) for instructions on how to enable it!`)); + const requiredAPIs = { + mysql: config.misc.mysql == true, + twitter: process.env.TWITTER_KEY != undefined && process.env.TWITTER_SECRET != undefined && process.env.TWITTER_ACCESS != undefined && process.env.TWITTER_ACCESS_SECRET != undefined + }; + if(command.requiredAPIs) { + if(command.requiredAPIs.includes("mysql") && !requiredAPIs.mysql) { + if (embedPermissions == 0) return message.channel.send(`**${commandName}** is not enabled on this VukkyBot because it needs access to MySQL, but MySQL is disabled.\nFor the hoster: See https://vukkyltd.github.io/VukkyBot/troubleshooting/mysqldisabled.html for instructions on how to enable it!`); + return message.channel.send(embeds.errorEmbed(`**${commandName}** is not enabled on this VukkyBot because it needs access to MySQL, but MySQL is disabled.\nFor the hoster: See [the VukkyBot Documentation site](https://vukkyltd.github.io/VukkyBot/troubleshooting/mysqldisabled.html) for instructions on how to enable it!`)); + } + if(command.requiredAPIs.includes("twitter") && !requiredAPIs.twitter) { + if (embedPermissions == 0) return message.channel.send(`**${commandName}** is not enabled on this VukkyBot because it needs access to the Twitter API, but I don't have access to the Twitter API...`); + return message.channel.send(embeds.errorEmbed(`**${commandName}** is not enabled on this VukkyBot because it needs access to the Twitter API, but I don't have access to the Twitter API...`)); + } } if(command.disabled) { - if (embedPermissions == 0) return message.channel.send(`**${commandName}** is disabled.`); - return message.channel.send(embeds.errorEmbed(`**${commandName}** is disabled.`)); + let errorMsg = `**${commandName}** is disabled.`; + if (embedPermissions == 0) return message.channel.send(errorMsg); + return message.channel.send(embeds.errorEmbed(errorMsg)); } if(command.botOwnerOnly && !config.misc.owner.includes(message.author.id)) { - if (embedPermissions == 0) return message.channel.send(`**${commandName}** requires you to be the owner of this VukkyBot to use it.`); - return message.channel.send(embeds.errorEmbed(`**${commandName}** requires you to be the owner of this VukkyBot to use it.`)); + let errorMsg = format(vukkytils.getString("COMMAND_BOT_OWNER_ONLY"), `**${commandName}**`); + if (embedPermissions == 0) return message.channel.send(errorMsg); + return message.channel.send(embeds.errorEmbed(errorMsg)); } if (command.guildOnly && message.channel.type == "dm") { - return message.channel.send(embeds.errorEmbed(`**${commandName}** cannot be used inside DMs.`)); + return message.channel.send(embeds.errorEmbed(format(vukkytils.getString("COMMAND_GUILD_ONLY"), `**${commandName}**`))); } if (command.args && !args.length) { @@ -297,7 +315,9 @@ client.on("message", async message => { if (now < expirationTime) { const timeLeft = (expirationTime - now) / 1000; console.log(timeLeft.toFixed(0)); - return message.channel.send(embeds.cooldownEmbed(`You need to wait ${timeLeft.toFixed(1)} more second(s) before you can use the \`${command.name}\` command again.`)); + let errorMsg = `You need to wait ${timeLeft.toFixed(1)} more second(s) before you can use the \`${command.name}\` command again.`; + if (embedPermissions == 0) return message.channel.send(errorMsg); + return message.channel.send(embeds.cooldownEmbed(errorMsg)); } } diff --git a/strings/en.json b/strings/en.json index 7780a85d..737fd6d5 100644 --- a/strings/en.json +++ b/strings/en.json @@ -84,6 +84,7 @@ "ABOUT_VUKKYBOT_BOT_VER": "Bot version", "ABOUT_VUKKYBOT_DJS_VER": "discord.js version", "ABOUT_VUKKYBOT_OS_INFO": "OS information", + "ABOUT_VUKKYBOT_BOT_OWNERS": "Bot owners", "DATA_GOTTEN": "Here's your requested data!", "CRYPTO_VALUE": "Value in USD", "CRYPTO_VALUE_CHANGE": "Value change (from 24h ago)", @@ -107,5 +108,9 @@ "INNER_VUKKY_ERROR": "The Vukky seems to be hiding...", "INNER_VUKKY_USER_FETCH_ERROR": "The Vukky seems to be hiding... Are you sure that's a real person?", "WARNING_CANT_SEE_OTHER": "Sorry, but you need the `MANAGE_MESSAGES` permission to see other people's warnings.", - "HELP_NO_DESCRIPTION": "It looks like this command doesn't have any description." + "HELP_NO_DESCRIPTION": "It looks like this command doesn't have any description.", + "MYSQL_MISSING_CREDENTIALS": "Some MySQL credentials are missing.", + "COMMAND_GUILD_ONLY": "%s can't be used in DMs.", + "COMMAND_BOT_OWNER_ONLY": "%s can't be used in DMs.", + "COMMAND_INVALID": "I've been looking around for a while now, but I don't think **${commandName}** is a command." } \ No newline at end of file diff --git a/utilities/embeds.js b/utilities/embeds.js index 34736026..03313f34 100644 --- a/utilities/embeds.js +++ b/utilities/embeds.js @@ -238,7 +238,7 @@ function innerEmbed(image) { .setFooter(versionString, avatarURL); } -function aboutEmbed(botversion, discordjsversion, osinfo) { +function aboutEmbed(botversion, discordjsversion, osinfo, owners) { return new Discord.MessageEmbed() .setColor("#4289c1") .setTitle(`💁‍♂️ ${vukkytils.getString("ABOUT_VUKKYBOT_TITLE")}`) @@ -246,6 +246,7 @@ function aboutEmbed(botversion, discordjsversion, osinfo) { .addField(vukkytils.getString("ABOUT_VUKKYBOT_BOT_VER"), botversion, true) .addField(vukkytils.getString("ABOUT_VUKKYBOT_DJS_VER"), discordjsversion, true) .addField(vukkytils.getString("ABOUT_VUKKYBOT_OS_INFO"), osinfo, true) + .addField(vukkytils.getString("ABOUT_VUKKYBOT_BOT_OWNERS"), owners, true) .setTimestamp() .setFooter(versionString, avatarURL); } From d8758305c7ea3bd91ca2cdaafc368d2f097b3f66 Mon Sep 17 00:00:00 2001 From: Vukky <46850780+Vukky123@users.noreply.github.com> Date: Tue, 27 Apr 2021 14:37:50 +0200 Subject: [PATCH 2/3] patchy --- strings/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings/en.json b/strings/en.json index 737fd6d5..cab120ee 100644 --- a/strings/en.json +++ b/strings/en.json @@ -111,6 +111,6 @@ "HELP_NO_DESCRIPTION": "It looks like this command doesn't have any description.", "MYSQL_MISSING_CREDENTIALS": "Some MySQL credentials are missing.", "COMMAND_GUILD_ONLY": "%s can't be used in DMs.", - "COMMAND_BOT_OWNER_ONLY": "%s can't be used in DMs.", + "COMMAND_BOT_OWNER_ONLY": "%s can only be used by the owners of this VukkyBot.", "COMMAND_INVALID": "I've been looking around for a while now, but I don't think **${commandName}** is a command." } \ No newline at end of file From e186585d9d1a4b37f9de56e2ae4fd1e60eff8233 Mon Sep 17 00:00:00 2001 From: Vukky <46850780+Vukky123@users.noreply.github.com> Date: Fri, 30 Apr 2021 16:46:58 +0200 Subject: [PATCH 3/3] patchy some bullshit --- commands/ohno.js | 2 +- commands/opinion.js | 2 +- commands/rip.js | 2 +- commands/trash.js | 2 +- commands/wanted.js | 2 +- strings/en.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/commands/ohno.js b/commands/ohno.js index 07f7c056..db0afe93 100644 --- a/commands/ohno.js +++ b/commands/ohno.js @@ -5,7 +5,7 @@ const config = require("../config.json"); module.exports = { name: "ohno", description: "oh no! it's stupid", - botPermissions: ["ATTACH_FILES"], + botPermissions: ["ATTACH_FILES", "MANAGE_MESSAGES"], args: true, usage: "", async execute(message, args) { diff --git a/commands/opinion.js b/commands/opinion.js index 86dcbb3a..526e4615 100644 --- a/commands/opinion.js +++ b/commands/opinion.js @@ -5,7 +5,7 @@ const config = require("../config.json"); module.exports = { name: "opinion", description: "father's son makes an opinion", - botPermissions: ["ATTACH_FILES"], + botPermissions: ["ATTACH_FILES", "MANAGE_MESSAGES"], args: true, usage: "[user] ", async execute(message, args) { diff --git a/commands/rip.js b/commands/rip.js index a78b20ce..11256c62 100644 --- a/commands/rip.js +++ b/commands/rip.js @@ -5,7 +5,7 @@ const config = require("../config.json"); module.exports = { name: "rip", description: "rip", - botPermissions: ["ATTACH_FILES"], + botPermissions: ["ATTACH_FILES", "MANAGE_MESSAGES"], usage: "[user]", async execute(message, args) { await message.react(config.misc.emoji.loading); diff --git a/commands/trash.js b/commands/trash.js index b280f935..9335b765 100644 --- a/commands/trash.js +++ b/commands/trash.js @@ -5,7 +5,7 @@ const config = require("../config.json"); module.exports = { name: "trash", description: "trash?", - botPermissions: ["ATTACH_FILES"], + botPermissions: ["ATTACH_FILES", "MANAGE_MESSAGES"], usage: "[user]", async execute(message, args) { await message.react(config.misc.emoji.loading); diff --git a/commands/wanted.js b/commands/wanted.js index d297ebe5..20f857df 100644 --- a/commands/wanted.js +++ b/commands/wanted.js @@ -5,7 +5,7 @@ const config = require("../config.json"); module.exports = { name: "wanted", description: "you are wanted! $5,000 reward!", - botPermissions: ["ATTACH_FILES"], + botPermissions: ["ATTACH_FILES", "MANAGE_MESSAGES"], usage: "[user]", async execute(message, args) { await message.react(config.misc.emoji.loading); diff --git a/strings/en.json b/strings/en.json index cab120ee..77745232 100644 --- a/strings/en.json +++ b/strings/en.json @@ -112,5 +112,5 @@ "MYSQL_MISSING_CREDENTIALS": "Some MySQL credentials are missing.", "COMMAND_GUILD_ONLY": "%s can't be used in DMs.", "COMMAND_BOT_OWNER_ONLY": "%s can only be used by the owners of this VukkyBot.", - "COMMAND_INVALID": "I've been looking around for a while now, but I don't think **${commandName}** is a command." + "COMMAND_INVALID": "I've been looking around for a while now, but I don't think **%s** is a command." } \ No newline at end of file