Added support for multiple processing emojis, fixed issue with local image processing

This commit is contained in:
TheEssem 2021-04-23 15:03:48 -05:00
parent 4e4ae3613f
commit ebfab817d7
4 changed files with 146 additions and 134 deletions

View File

@ -2,6 +2,8 @@ const Command = require("./command.js");
const magick = require("../utils/image.js");
const imageDetect = require("../utils/imagedetect.js");
const collections = require("../utils/collections.js");
const { emotes } = require("../messages.json");
const { random } = require("../utils/misc.js");
class ImageCommand extends Command {
/*this.embed = {
@ -58,7 +60,7 @@ class ImageCommand extends Command {
magickParams.path = image.path;
magickParams.type = image.type;
magickParams.url = image.url; // technically not required but can be useful for text filtering
magickParams.delay = image.delay;
magickParams.delay = image.delay ? image.delay : 0;
if (this.constructor.requiresGIF) magickParams.onlyGIF = true;
} catch (e) {
collections.runningCommands.delete(this.message.author.id);
@ -111,7 +113,7 @@ class ImageCommand extends Command {
}
processMessage(message) {
return message.channel.createMessage(`${process.env.PROCESSING_EMOJI || "<a:processing:479351417102925854>"} Processing... This might take a while`);
return message.channel.createMessage(`${random(emotes) || process.env.PROCESSING_EMOJI || "<a:processing:479351417102925854>"} Processing... This might take a while`);
}
static requiresImage = true;

View File

@ -1,131 +1,140 @@
[
"with your sanity",
"h",
"Club Penguin",
"Skype",
"with yo mama",
"with a bootleg plug-and-play",
"FL Studio: SoundCloud Rapper Edition",
"Funny Fortain",
"Fake Download Button Simulator",
"quick i need playing lines for my discord bot",
"a game",
"anime",
"absolutely nothing",
"Mozilla Firefox",
"Google Chrome",
"music bot now I guess",
"Fortnut",
"epic mashups bro",
"Netscape Navigator",
"Ubuntu (worst linux)",
"Linux",
"Hello Kitty Island Adventure",
"with the Infinity Gauntlet",
"BLJ Simulator",
"Jake Paul videos on repeat",
"gniyalP",
"HaaH WaaW",
"Shrek Extra Large",
"dQw4w9WgXcQ",
"Hong Kong 97",
"Twitter",
"Reddit",
"Super Smash Bros. Ultimate",
"Ryujinx",
"Battletoads for Wii",
"MS Paint",
"Roblox",
"Minecraft",
"Desert Bus",
"Mega Man Legends 3",
"Sonic's Schoolhouse",
"Action 52",
"the funny memes epic",
"Nintendo™",
"Wario World",
"the Cat Piano",
"Pac-Man Championship Edition DX+",
"Pac-Man Championship Edition 2",
"Bottom Text",
"The Elder Scrolls 6",
"Skyrim",
"Game Boy Advance Video",
"Nintendo Switch Online",
"lol 7",
"Meme Run",
"Yoshi for the NES",
"Family Guy",
"Deltarune",
"subscribe to obama",
"yeah",
"semicolon",
"Super Mario Maker 2",
"jeff",
"TikTok",
"woo yeah",
"Mario",
"Microsoft Internet Explorer",
"joe mama",
"Sonic 06",
"Wii Speak Channel",
"Metal Gear Solid 4",
"iPod Music",
"Liquid Sun",
"with your Discord server",
"Scatman's World",
"with a stone, Luigi.",
"Doin' Your Mom by FAttY Spins",
"with a broken god",
"games with the mortals",
"#BringBackNationalSex",
"chiptune",
"foobar2000",
"XMPlay",
"OpenMPT",
"follow @esmBot_ on Twitter",
"with GIFs",
"check out more stuff at projectlounge.pw",
"the",
"sissy hypnosis",
"Yandere Simulator",
"PogChamp",
"yourself",
"sentience",
"with Brody Foxx",
"AOL Instant Messenger",
"beep boop",
"Animal Crossing: New Horizons",
"Hello, Gordon!",
"the j",
"Want esmBot to play some new games? Send suggestions!",
"MilkyTracker",
"with chimps",
"with the TF2 source code",
"alvin the chipmunk nightcore",
"Troll",
"ay yo the pizza here",
"100 gecs",
"with limited resources",
"messages from 2018",
"&caption get real",
"Open Fortress",
"btw I use arch",
"Friday Night Funkin",
"fgsfds",
"Doilus Stage",
"please report any issues you find thank you",
"xfce real",
"OpenRCT2",
"Sus? As in the popular video game Among Us?",
"$19 Fortnite Card",
"Wild Woody",
"RDI Halcyon",
"cry about it",
"KFC",
"Cave Story",
"YouTube ads",
"there are federal agents outside my house",
"less goo",
"WhatsApp"
]
{
"emotes": [
"<a:processing:818243325891051581>",
"<a:glxgears:802272302082293770>",
"<a:spunchbob:834829415661568000>"
],
"messages": [
"with your sanity",
"h",
"Club Penguin",
"Skype",
"with yo mama",
"with a bootleg plug-and-play",
"FL Studio: SoundCloud Rapper Edition",
"Funny Fortain",
"Fake Download Button Simulator",
"quick i need playing lines for my discord bot",
"a game",
"anime",
"absolutely nothing",
"Mozilla Firefox",
"Google Chrome",
"music bot now I guess",
"Fortnut",
"epic mashups bro",
"Netscape Navigator",
"Ubuntu (worst linux)",
"Linux",
"Hello Kitty Island Adventure",
"with the Infinity Gauntlet",
"BLJ Simulator",
"Jake Paul videos on repeat",
"gniyalP",
"HaaH WaaW",
"Shrek Extra Large",
"dQw4w9WgXcQ",
"Hong Kong 97",
"Twitter",
"Reddit",
"Super Smash Bros. Ultimate",
"Ryujinx",
"Battletoads for Wii",
"MS Paint",
"Roblox",
"Minecraft",
"Desert Bus",
"Mega Man Legends 3",
"Sonic's Schoolhouse",
"Action 52",
"the funny memes epic",
"Nintendo™",
"Wario World",
"the Cat Piano",
"Pac-Man Championship Edition DX+",
"Pac-Man Championship Edition 2",
"Bottom Text",
"The Elder Scrolls 6",
"Skyrim",
"Game Boy Advance Video",
"Nintendo Switch Online",
"lol 7",
"Meme Run",
"Yoshi for the NES",
"Family Guy",
"Deltarune",
"subscribe to obama",
"yeah",
"semicolon",
"Super Mario Maker 2",
"jeff",
"TikTok",
"woo yeah",
"Mario",
"Microsoft Internet Explorer",
"joe mama",
"Sonic 06",
"Wii Speak Channel",
"Metal Gear Solid 4",
"iPod Music",
"Liquid Sun",
"with your Discord server",
"Scatman's World",
"with a stone, Luigi.",
"Doin' Your Mom by FAttY Spins",
"with a broken god",
"games with the mortals",
"#BringBackNationalSex",
"chiptune",
"foobar2000",
"XMPlay",
"OpenMPT",
"follow @esmBot_ on Twitter",
"with GIFs",
"check out more stuff at projectlounge.pw",
"the",
"sissy hypnosis",
"Yandere Simulator",
"PogChamp",
"yourself",
"sentience",
"with Brody Foxx",
"AOL Instant Messenger",
"beep boop",
"Animal Crossing: New Horizons",
"Hello, Gordon!",
"the j",
"Want esmBot to play some new games? Send suggestions!",
"MilkyTracker",
"with chimps",
"with the TF2 source code",
"alvin the chipmunk nightcore",
"Troll",
"ay yo the pizza here",
"100 gecs",
"with limited resources",
"messages from 2018",
"&caption get real",
"Open Fortress",
"btw I use arch",
"Friday Night Funkin",
"fgsfds",
"Doilus Stage",
"please report any issues you find thank you",
"xfce real",
"OpenRCT2",
"Sus? As in the popular video game Among Us?",
"$19 Fortnite Card",
"Wild Woody",
"RDI Halcyon",
"cry about it",
"KFC",
"Cave Story",
"YouTube ads",
"there are federal agents outside my house",
"less goo",
"WhatsApp",
"Half Life 3",
"Tower Defense Simulator"
]
}

View File

@ -15,7 +15,7 @@ const database = require("./utils/database.js");
// command collections
const collections = require("./utils/collections.js");
// playing messages
const messages = require("./messages.json");
const { messages } = require("./messages.json");
// other stuff
const misc = require("./utils/misc.js");
// generate help page

View File

@ -2,6 +2,7 @@ const util = require("util");
// random(array) to select a random entry in array
exports.random = (array) => {
if (!array || array.length < 1) return null;
return array[Math.floor(Math.random() * array.length)];
};