Added new help command and command metadata, various changes
This commit is contained in:
parent
c9f0ff3827
commit
3d225f6547
97 changed files with 456 additions and 155 deletions
2
app.js
2
app.js
|
@ -17,7 +17,7 @@ const handler = require("./utils/handler.js");
|
||||||
|
|
||||||
// registers stuff and logs in the bot
|
// registers stuff and logs in the bot
|
||||||
async function init() {
|
async function init() {
|
||||||
// register commands
|
// register commands and their info
|
||||||
const commands = await readdir("./commands/");
|
const commands = await readdir("./commands/");
|
||||||
logger.log("info", `Attempting to load ${commands.length} commands...`);
|
logger.log("info", `Attempting to load ${commands.length} commands...`);
|
||||||
for (const commandFile of commands) {
|
for (const commandFile of commands) {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
const { random } = require("../utils/misc.js");
|
const { random } = require("../utils/misc.js");
|
||||||
|
const responses = [
|
||||||
exports.run = async () => {
|
|
||||||
const responses = [
|
|
||||||
"It is certain",
|
"It is certain",
|
||||||
"It is decidedly so",
|
"It is decidedly so",
|
||||||
"Without a doubt",
|
"Without a doubt",
|
||||||
|
@ -22,8 +20,12 @@ exports.run = async () => {
|
||||||
"My sources say no",
|
"My sources say no",
|
||||||
"Outlook not so good",
|
"Outlook not so good",
|
||||||
"Very doubtful"
|
"Very doubtful"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
exports.run = async () => {
|
||||||
return `🎱 ${random(responses)}`;
|
return `🎱 ${random(responses)}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["magicball", "magikball", "magic8ball", "magik8ball", "eightball"];
|
exports.aliases = ["magicball", "magikball", "magic8ball", "magik8ball", "eightball"];
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Asks the magic 8-ball a question";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a 9GAG watermark!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a 9GAG watermark!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const watermark = "./assets/images/9gag.png";
|
const watermark = "./assets/images/9gag.png";
|
||||||
const data = gm(image.data).composite(watermark).gravity("East");
|
const data = gm(image.data).composite(watermark).gravity("East");
|
||||||
const resultBuffer = await gmToBuffer(data);
|
const resultBuffer = await gmToBuffer(data);
|
||||||
|
@ -17,3 +17,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["ninegag", "gag"];
|
exports.aliases = ["ninegag", "gag"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Adds the 9gag watermark to an image";
|
|
@ -11,5 +11,6 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["add"];
|
exports.aliases = ["add"];
|
||||||
|
exports.category = 7;
|
||||||
|
exports.help = "Adds a tweet to the database";
|
||||||
exports.requires = "twitter";
|
exports.requires = "twitter";
|
|
@ -11,3 +11,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["pfp", "ava"];
|
exports.aliases = ["pfp", "ava"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Gets a user's avatar";
|
||||||
|
|
|
@ -16,3 +16,6 @@ exports.run = async (message) => {
|
||||||
return `${message.author.mention}, you need to provide a member to ban!`;
|
return `${message.author.mention}, you need to provide a member to ban!`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 2;
|
||||||
|
exports.help = "Bans a server member";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a Bandicam watermark!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a Bandicam watermark!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const watermark = "./assets/images/bandicam.png";
|
const watermark = "./assets/images/bandicam.png";
|
||||||
gm(image.data).size(async (error, size) => {
|
gm(image.data).size(async (error, size) => {
|
||||||
if (error) console.error;
|
if (error) console.error;
|
||||||
|
@ -20,3 +20,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["bandi"];
|
exports.aliases = ["bandi"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Adds the Bandicam watermark to an image";
|
|
@ -15,3 +15,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["birb", "birds", "birbs"];
|
exports.aliases = ["birb", "birds", "birbs"];
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Gets a random bird picture";
|
|
@ -1,12 +1,15 @@
|
||||||
const sharp = require("sharp");
|
const sharp = require("sharp");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to blur!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to blur!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const resultBuffer = await sharp(image.data).blur(5).toBuffer();
|
const resultBuffer = await sharp(image.data).blur(5).toBuffer();
|
||||||
return message.channel.createMessage("", {
|
return message.channel.createMessage("", {
|
||||||
file: resultBuffer,
|
file: resultBuffer,
|
||||||
name: `blur.${image.type}`
|
name: `blur.${image.type}`
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Blurs an image";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to make blurple!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to make blurple!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const data = gm(image.data).threshold(75, true).out("+level-colors").out("\"#7289DA\",white");
|
const data = gm(image.data).threshold(75, true).out("+level-colors").out("\"#7289DA\",white");
|
||||||
const resultBuffer = await gmToBuffer(data);
|
const resultBuffer = await gmToBuffer(data);
|
||||||
return message.channel.createMessage("", {
|
return message.channel.createMessage("", {
|
||||||
|
@ -16,3 +16,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["blurp"];
|
exports.aliases = ["blurp"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Turns an image blurple";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["tape", "flextape", "phil", "philswift"];
|
exports.aliases = ["tape", "flextape", "phil", "philswift"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays the Flex Tape boat sound effect";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["boy", "neutron", "hugh"];
|
exports.aliases = ["boy", "neutron", "hugh"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays the \"boi\" sound effect";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["bro"];
|
exports.aliases = ["bro"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays the \"bruh\" sound effect";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["noyelling", "busyell"];
|
exports.aliases = ["noyelling", "busyell"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays the \"no yelling on the bus\" sound effect";
|
|
@ -19,5 +19,6 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["kitters", "kitties", "kitty", "cattos", "catto", "cats"];
|
exports.aliases = ["kitters", "kitties", "kitty", "cattos", "catto", "cats"];
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Gets a random cat picture";
|
||||||
exports.requires = "cat";
|
exports.requires = "cat";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to add radial blur!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to add radial blur!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const data = gm(image.data).out("-radial-blur", 10);
|
const data = gm(image.data).out("-radial-blur", 10);
|
||||||
const resultBuffer = await gmToBuffer(data);
|
const resultBuffer = await gmToBuffer(data);
|
||||||
return message.channel.createMessage("", {
|
return message.channel.createMessage("", {
|
||||||
|
@ -16,3 +16,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["cblur", "radial", "radialblur"];
|
exports.aliases = ["cblur", "radial", "radialblur"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Applies a radial blur effect on an image";
|
|
@ -1,7 +1,5 @@
|
||||||
const cowsay = require("cowsay");
|
const cowsay = require("cowsay");
|
||||||
|
const cowList = ["beavis.zen",
|
||||||
exports.run = async (message, args) => {
|
|
||||||
const cowList = ["beavis.zen",
|
|
||||||
"bong",
|
"bong",
|
||||||
"bud-frogs",
|
"bud-frogs",
|
||||||
"bunny",
|
"bunny",
|
||||||
|
@ -49,7 +47,9 @@ exports.run = async (message, args) => {
|
||||||
"vader",
|
"vader",
|
||||||
"whale",
|
"whale",
|
||||||
"www"
|
"www"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
exports.run = async (message, args) => {
|
||||||
if (args.length === 0) {
|
if (args.length === 0) {
|
||||||
return `${message.author.mention}, you need to provide some text for the cow to say!`;
|
return `${message.author.mention}, you need to provide some text for the cow to say!`;
|
||||||
} else if (cowList.includes(args[0].toLowerCase())) {
|
} else if (cowList.includes(args[0].toLowerCase())) {
|
||||||
|
@ -64,3 +64,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["cow"];
|
exports.aliases = ["cow"];
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Makes an ASCII cow say a message";
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
return `${message.author.mention}, my DBL page can be found here: <https://discordbots.org/bot/429305856241172480>`;
|
return `${message.author.mention}, my DBL page can be found here: <https://top.gg/bot/429305856241172480>`;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["discordbotlist", "botlist", "discordbots"];
|
exports.aliases = ["discordbotlist", "botlist", "discordbots"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Gets my top.gg page";
|
|
@ -4,3 +4,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["b64decode", "base64decode"];
|
exports.aliases = ["b64decode", "base64decode"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Decodes a Base64 string";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a DeviantArt watermark!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a DeviantArt watermark!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const watermark = "./assets/images/deviantart.png";
|
const watermark = "./assets/images/deviantart.png";
|
||||||
gm(image.data).size(async (error, size) => {
|
gm(image.data).size(async (error, size) => {
|
||||||
if (error) console.error;
|
if (error) console.error;
|
||||||
|
@ -20,3 +20,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["da", "deviant"];
|
exports.aliases = ["da", "deviant"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Adds a DeviantArt watermark to an image";
|
|
@ -13,3 +13,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["roll", "die", "rng", "random"];
|
exports.aliases = ["roll", "die", "rng", "random"];
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Rolls the dice";
|
|
@ -15,3 +15,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["doggos", "doggo", "pupper", "puppers", "dogs", "puppy", "puppies", "pups", "pup"];
|
exports.aliases = ["doggos", "doggo", "pupper", "puppers", "dogs", "puppy", "puppies", "pups", "pup"];
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Gets a random dog picture";
|
|
@ -4,3 +4,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["b64encode", "base64encode"];
|
exports.aliases = ["b64encode", "base64encode"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Encodes a Base64 string";
|
|
@ -13,3 +13,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["run"];
|
exports.aliases = ["run"];
|
||||||
|
exports.category = 7;
|
||||||
|
exports.help = "Executes JavaScript code";
|
|
@ -16,3 +16,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["runcmd"];
|
exports.aliases = ["runcmd"];
|
||||||
|
exports.category = 7;
|
||||||
|
exports.help = "Executes a terminal command";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to explode!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to explode!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const data = gm(image.data).implode([-2]);
|
const data = gm(image.data).implode([-2]);
|
||||||
const resultBuffer = await gmToBuffer(data);
|
const resultBuffer = await gmToBuffer(data);
|
||||||
return message.channel.createMessage("", {
|
return message.channel.createMessage("", {
|
||||||
|
@ -16,3 +16,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["exp"];
|
exports.aliases = ["exp"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Explodes an image";
|
|
@ -3,3 +3,6 @@ const playSound = require("../utils/soundplayer.js");
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
return playSound("./assets/audio/explosion.opus", message);
|
return playSound("./assets/audio/explosion.opus", message);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays an explosion sound effect";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["notification", "notif"];
|
exports.aliases = ["notification", "notif"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays a Discord ping sound effect";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["toot"];
|
exports.aliases = ["toot"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays a fart sound effect";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["openup"];
|
exports.aliases = ["openup"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays the \"FBI OPEN UP\" sound effect";
|
|
@ -33,3 +33,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["request", "report", "complain", "compliment"];
|
exports.aliases = ["request", "report", "complain", "compliment"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Leaves some feedback for the bot owner";
|
|
@ -1,12 +1,15 @@
|
||||||
const sharp = require("sharp");
|
const sharp = require("sharp");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to flip!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to flip!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const resultBuffer = await sharp(image.data).flip().toBuffer();
|
const resultBuffer = await sharp(image.data).flip().toBuffer();
|
||||||
return message.channel.createMessage("", {
|
return message.channel.createMessage("", {
|
||||||
file: resultBuffer,
|
file: resultBuffer,
|
||||||
name: `flip.${image.type}`
|
name: `flip.${image.type}`
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Flips an image";
|
|
@ -1,9 +1,9 @@
|
||||||
const sharp = require("sharp");
|
const sharp = require("sharp");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to flop!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to flop!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const resultBuffer = await sharp(image.data).flop().toBuffer();
|
const resultBuffer = await sharp(image.data).flop().toBuffer();
|
||||||
return message.channel.createMessage("", {
|
return message.channel.createMessage("", {
|
||||||
file: resultBuffer,
|
file: resultBuffer,
|
||||||
|
@ -12,3 +12,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["flip2"];
|
exports.aliases = ["flip2"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Flops an image";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["dance", "defaultdance"];
|
exports.aliases = ["dance", "defaultdance"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays the Fortnite default dance sound";
|
|
@ -4,3 +4,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["aesthetic", "aesthetics", "aes"];
|
exports.aliases = ["aesthetic", "aesthetics", "aes"];
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Converts a message to fullwidth/aesthetic text";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to add New Funky Mode!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to add New Funky Mode!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const watermark = "./assets/images/funky.png";
|
const watermark = "./assets/images/funky.png";
|
||||||
gm(image.data).size(async (error, size) => {
|
gm(image.data).size(async (error, size) => {
|
||||||
if (error) console.error;
|
if (error) console.error;
|
||||||
|
@ -20,3 +20,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["funkymode", "newfunkymode", "funkykong"];
|
exports.aliases = ["funkymode", "newfunkymode", "funkykong"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Adds the New Funky Mode banner to an image";
|
|
@ -5,9 +5,9 @@ const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a GameXplain thumbnail meme!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a GameXplain thumbnail meme!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const template = "./assets/images/gamexplain.png";
|
const template = "./assets/images/gamexplain.png";
|
||||||
const path = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const path = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
require("util").promisify(fs.writeFile)(path, image.data);
|
require("util").promisify(fs.writeFile)(path, image.data);
|
||||||
|
@ -20,3 +20,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["gx"];
|
exports.aliases = ["gx"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Makes a GameXplain thumbnail from an image";
|
|
@ -5,9 +5,9 @@ const gm = require("gm").subClass({
|
||||||
});
|
});
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to mirror!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to mirror!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const data = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const data = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
const data2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const data2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
gm(image.data).gravity("West").crop("50%", 0).strip().write(data2, (error) => {
|
gm(image.data).gravity("West").crop("50%", 0).strip().write(data2, (error) => {
|
||||||
|
@ -26,3 +26,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["magik4", "mirror2"];
|
exports.aliases = ["magik4", "mirror2"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Mirrors the left side of an image onto the right";
|
|
@ -5,8 +5,10 @@ exports.run = async (message, args) => {
|
||||||
return `Successfully banned user with ID \`${args[0]}\`.`;
|
return `Successfully banned user with ID \`${args[0]}\`.`;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
return `${message.author.mention}, I was unable to kick the member. Have you given me permissions?`;
|
return `${message.author.mention}, I was unable to ban the member. Have you given me permissions?`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["prevent", "preban"];
|
exports.aliases = ["prevent", "preban"];
|
||||||
|
exports.category = 2;
|
||||||
|
exports.help = "Bans a member via user id";
|
|
@ -1,6 +1,101 @@
|
||||||
const database = require("../utils/database.js");
|
const database = require("../utils/database.js");
|
||||||
|
const collections = require("../utils/collections.js");
|
||||||
|
const client = require("../utils/client.js");
|
||||||
|
const misc = require("../utils/misc.js");
|
||||||
|
const paginator = require("../utils/pagination/pagination.js");
|
||||||
|
const tips = ["You can change the bot's prefix using the prefix command.", "Image commands also work with images previously posted in that channel.", "You can use the tags commands to save things for later use.", "You can visit https://essem.space/esmBot/commands.html?dev=true for a web version of this command list."];
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message, args) => {
|
||||||
const guild = (await database.guilds.find({ id: message.channel.guild.id }).exec())[0];
|
const guild = (await database.guilds.find({ id: message.channel.guild.id }).exec())[0];
|
||||||
return `${message.author.mention}, my command list can be found here: https://essem.space/esmBot/commands.html?dev=true\nThis server's prefix is \`${guild.prefix}\`.`;
|
const commands = Array.from(collections.commands.keys());
|
||||||
|
if (args.length !== 0 && commands.includes(args[0].toLowerCase())) {
|
||||||
|
const info = collections.info.get(args[0].toLowerCase());
|
||||||
|
const embed = {
|
||||||
|
"embed": {
|
||||||
|
"author": {
|
||||||
|
"name": "esmBot Dev Help",
|
||||||
|
"icon_url": client.user.avatarURL
|
||||||
|
},
|
||||||
|
"title": args[0].toLowerCase(),
|
||||||
|
"description": info.description,
|
||||||
|
"color": 16711680,
|
||||||
|
"fields": [{
|
||||||
|
"name": "Aliases",
|
||||||
|
"value": info.aliases ? info.aliases.join(", ") : "None"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return message.channel.createMessage(embed);
|
||||||
|
} else {
|
||||||
|
const categories = {
|
||||||
|
general: [],
|
||||||
|
moderation: [],
|
||||||
|
tags: [],
|
||||||
|
fun: [],
|
||||||
|
images: [],
|
||||||
|
soundboard: [],
|
||||||
|
admin: []
|
||||||
|
};
|
||||||
|
for (const command of commands) {
|
||||||
|
const category = collections.info.get(command).category;
|
||||||
|
const description = collections.info.get(command).description;
|
||||||
|
if (category === 1) {
|
||||||
|
categories.general.push(`**${command}** - ${description}`);
|
||||||
|
} else if (category === 2) {
|
||||||
|
categories.moderation.push(`**${command}** - ${description}`);
|
||||||
|
} else if (category === 3) {
|
||||||
|
categories.tags.push(`**${command}** - ${description}`);
|
||||||
|
} else if (category === 4) {
|
||||||
|
categories.fun.push(`**${command}** - ${description}`);
|
||||||
|
} else if (category === 5) {
|
||||||
|
categories.images.push(`**${command}** - ${description}`);
|
||||||
|
} else if (category === 6) {
|
||||||
|
categories.soundboard.push(`**${command}** - ${description}`);
|
||||||
|
} else if (category === 7) {
|
||||||
|
categories.admin.push(`**${command}** - ${description}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const pages = [];
|
||||||
|
for (const category of Object.keys(categories)) {
|
||||||
|
const splitPages = categories[category].map((item, index) => {
|
||||||
|
return index % 15 === 0 ? categories[category].slice(index, index + 15) : null;
|
||||||
|
}).filter((item) => {
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
splitPages.forEach(page => {
|
||||||
|
pages.push({
|
||||||
|
title: category.charAt(0).toUpperCase() + category.slice(1),
|
||||||
|
page: page
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const embeds = [];
|
||||||
|
for (const [i, value] of pages.entries()) {
|
||||||
|
embeds.push({
|
||||||
|
"embed": {
|
||||||
|
"author": {
|
||||||
|
"name": "esmBot Dev Help",
|
||||||
|
"icon_url": client.user.avatarURL
|
||||||
|
},
|
||||||
|
"title": value.title,
|
||||||
|
"description": value.page.join("\n"),
|
||||||
|
"color": 16711680,
|
||||||
|
"footer": {
|
||||||
|
"text": `Page ${i + 1} of ${pages.length}`
|
||||||
|
},
|
||||||
|
"fields": [{
|
||||||
|
"name": "Prefix",
|
||||||
|
"value": guild.prefix
|
||||||
|
}, {
|
||||||
|
"name": "Tip",
|
||||||
|
"value": misc.random(tips)
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return paginator(message, embeds);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Gets a list of commands";
|
|
@ -5,9 +5,9 @@ const gm = require("gm").subClass({
|
||||||
});
|
});
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to mirror!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to mirror!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const data = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const data = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
const data2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const data2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
gm(image.data).gravity("South").crop(0, "50%").strip().write(data2, (error) => {
|
gm(image.data).gravity("South").crop(0, "50%").strip().write(data2, (error) => {
|
||||||
|
@ -26,3 +26,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["magik6", "mirror4"];
|
exports.aliases = ["magik6", "mirror4"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Mirrors the bottom of an image onto the top";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a Hypercam watermark!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a Hypercam watermark!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const watermark = "./assets/images/hypercam.png";
|
const watermark = "./assets/images/hypercam.png";
|
||||||
gm(image.data).size(async (error, size) => {
|
gm(image.data).size(async (error, size) => {
|
||||||
if (error) console.error;
|
if (error) console.error;
|
||||||
|
@ -20,3 +20,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["hcam"];
|
exports.aliases = ["hcam"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Adds the Hypercam watermark to an image";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a iFunny watermark!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a iFunny watermark!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const watermark = "./assets/images/ifunny.png";
|
const watermark = "./assets/images/ifunny.png";
|
||||||
gm(image.data).size(async (error, size) => {
|
gm(image.data).size(async (error, size) => {
|
||||||
if (error) console.error;
|
if (error) console.error;
|
||||||
|
@ -18,3 +18,6 @@ exports.run = async (message) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Adds the iFunny watermark to an image";
|
|
@ -32,5 +32,6 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["im", "photo", "img"];
|
exports.aliases = ["im", "photo", "img"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Searches for images on Google";
|
||||||
exports.requires = "google";
|
exports.requires = "google";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to implode!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to implode!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const data = gm(image.data).implode([1]);
|
const data = gm(image.data).implode([1]);
|
||||||
const resultBuffer = await gmToBuffer(data);
|
const resultBuffer = await gmToBuffer(data);
|
||||||
return message.channel.createMessage("", {
|
return message.channel.createMessage("", {
|
||||||
|
@ -16,3 +16,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["imp"];
|
exports.aliases = ["imp"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Implodes an image";
|
|
@ -1,8 +1,8 @@
|
||||||
const client = require("../utils/client.js");
|
const client = require("../utils/client.js");
|
||||||
|
const dev = client.users.get(process.env.OWNER);
|
||||||
|
const artist = client.users.get("401980971517214723");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
const dev = client.users.get(process.env.OWNER);
|
|
||||||
const artist = client.users.get("401980971517214723");
|
|
||||||
const infoEmbed = {
|
const infoEmbed = {
|
||||||
"embed": {
|
"embed": {
|
||||||
"description": "**You are currently using esmBot Dev! Things may change at any time without warning and there will be bugs. Many bugs.**",
|
"description": "**You are currently using esmBot Dev! Things may change at any time without warning and there will be bugs. Many bugs.**",
|
||||||
|
@ -38,3 +38,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["botinfo", "credits"];
|
exports.aliases = ["botinfo", "credits"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Gets some info/credits about me";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to invert!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to invert!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const data = gm(image.data).negative();
|
const data = gm(image.data).negative();
|
||||||
const resultBuffer = await gmToBuffer(data);
|
const resultBuffer = await gmToBuffer(data);
|
||||||
return message.channel.createMessage("", {
|
return message.channel.createMessage("", {
|
||||||
|
@ -16,3 +16,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["inverse", "negate", "negative"];
|
exports.aliases = ["inverse", "negate", "negative"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Inverts an image's colors";
|
|
@ -1,3 +1,6 @@
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
return `${message.author.mention}, you can invite me to your server here: <https://discordapp.com/oauth2/authorize?client_id=515571942418546689&scope=bot&permissions=70642766>`;
|
return `${message.author.mention}, you can invite me to your server here: <https://discordapp.com/oauth2/authorize?client_id=515571942418546689&scope=bot&permissions=70642766>`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Gets my bot invite link";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to add more JPEG!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to add more JPEG!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const data = gm(image.data).setFormat("jpg").quality(1);
|
const data = gm(image.data).setFormat("jpg").quality(1);
|
||||||
const resultBuffer = await gmToBuffer(data);
|
const resultBuffer = await gmToBuffer(data);
|
||||||
return message.channel.createMessage("", {
|
return message.channel.createMessage("", {
|
||||||
|
@ -16,3 +16,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["needsmorejpeg", "jpegify", "magik2", "morejpeg", "jpg"];
|
exports.aliases = ["needsmorejpeg", "jpegify", "magik2", "morejpeg", "jpg"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Adds max JPEG compression to an image";
|
|
@ -16,3 +16,6 @@ exports.run = async (message) => {
|
||||||
return `${message.author.mention}, you need to provide a member to kick!`;
|
return `${message.author.mention}, you need to provide a member to kick!`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 2;
|
||||||
|
exports.help = "Kicks a member";
|
|
@ -5,9 +5,9 @@ const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a Super Smash Bros. leak meme!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a Super Smash Bros. leak meme!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const template = "./assets/images/leak.png";
|
const template = "./assets/images/leak.png";
|
||||||
const path = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const path = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
require("util").promisify(fs.writeFile)(path, image.data);
|
require("util").promisify(fs.writeFile)(path, image.data);
|
||||||
|
@ -20,3 +20,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["smash", "laxchris", "ssbu", "smashleak"];
|
exports.aliases = ["smash", "laxchris", "ssbu", "smashleak"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Creates a fake Smash leak thumbnail from an image";
|
|
@ -5,10 +5,11 @@ exports.run = async (message, args) => {
|
||||||
message.channel.sendTyping();
|
message.channel.sendTyping();
|
||||||
if (args.length === 0 || !urlCheck(args[0])) return `${message.author.mention}, you need to provide a short URL to lengthen!`;
|
if (args.length === 0 || !urlCheck(args[0])) return `${message.author.mention}, you need to provide a short URL to lengthen!`;
|
||||||
if (urlCheck(args[0])) {
|
if (urlCheck(args[0])) {
|
||||||
//const url = await require("url-unshort")().expand(args[0]);
|
|
||||||
const url = await fetch(args[0], { redirect: "manual" });
|
const url = await fetch(args[0], { redirect: "manual" });
|
||||||
return url.headers.get("location") || args[0];
|
return url.headers.get("location") || args[0];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["longurl", "lengthenurl", "longuri", "lengthenuri", "unshorten"];
|
exports.aliases = ["longurl", "lengthenurl", "longuri", "lengthenuri", "unshorten"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Lengthens a short URL";
|
|
@ -23,3 +23,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["imagemagic", "imagemagick", "imagemagik", "magic", "magick", "cas", "liquid"];
|
exports.aliases = ["imagemagic", "imagemagick", "imagemagik", "magic", "magick", "cas", "liquid"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Adds a content aware scale effect to an image";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["yougotmail", "youvegotmail", "aol"];
|
exports.aliases = ["yougotmail", "youvegotmail", "aol"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays the \"You've got mail\" sound effect";
|
|
@ -12,3 +12,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["ach", "achievement", "minecraft"];
|
exports.aliases = ["ach", "achievement", "minecraft"];
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Generates a Minecraft achievement image";
|
|
@ -1,10 +1,10 @@
|
||||||
const { spawn } = require("child_process");
|
const { spawn } = require("child_process");
|
||||||
|
|
||||||
exports.run = async (message, args) => {
|
exports.run = async (message, args) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to generate a meme!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to generate a meme!`;
|
||||||
if (args.length === 0) return `${message.author.mention}, you need to provide some text to generate a meme!`;
|
if (args.length === 0) return `${message.author.mention}, you need to provide some text to generate a meme!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const [topText, bottomText] = args.join(" ").split(",").map(elem => elem.trim());
|
const [topText, bottomText] = args.join(" ").split(",").map(elem => elem.trim());
|
||||||
const child = spawn("./utils/meme.sh", [topText.toUpperCase().replace(/\\/g, "\\\\"), bottomText ? bottomText.toUpperCase().replace(/\\/g, "\\\\") : ""]);
|
const child = spawn("./utils/meme.sh", [topText.toUpperCase().replace(/\\/g, "\\\\"), bottomText ? bottomText.toUpperCase().replace(/\\/g, "\\\\") : ""]);
|
||||||
child.stdin.write(image.data);
|
child.stdin.write(image.data);
|
||||||
|
@ -27,3 +27,6 @@ exports.run = async (message, args) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Generates a meme from an image";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a MemeCenter watermark!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a MemeCenter watermark!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const watermark = "./assets/images/memecenter.png";
|
const watermark = "./assets/images/memecenter.png";
|
||||||
let resultBuffer;
|
let resultBuffer;
|
||||||
gm(image.data).size(async (error, size) => {
|
gm(image.data).size(async (error, size) => {
|
||||||
|
@ -29,3 +29,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["memec", "mcenter"];
|
exports.aliases = ["memec", "mcenter"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Adds the MemeCenter watermark to an image";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["roblox", "commitdie"];
|
exports.aliases = ["roblox", "commitdie"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays the Roblox \"oof\" sound";
|
|
@ -6,3 +6,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["pong"];
|
exports.aliases = ["pong"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Pings the server I'm hosted on";
|
|
@ -23,3 +23,6 @@ exports.run = async (message) => {
|
||||||
return `${message.author.mention}, you need to be in a voice channel first!`;
|
return `${message.author.mention}, you need to be in a voice channel first!`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 7;
|
||||||
|
exports.help = "Plays an audio file";
|
|
@ -13,3 +13,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["setprefix", "changeprefix", "checkprefix"];
|
exports.aliases = ["setprefix", "changeprefix", "checkprefix"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Checks/changes the server prefix";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["juice", "grandma"];
|
exports.aliases = ["juice", "grandma"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays the \"Drink yo prune juice\" sound effect";
|
|
@ -13,3 +13,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["prune"];
|
exports.aliases = ["prune"];
|
||||||
|
exports.category = 2;
|
||||||
|
exports.help = "Purges messages in a channel";
|
|
@ -21,3 +21,6 @@ exports.run = async (message, args) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Generates a QR code";
|
|
@ -3,9 +3,12 @@ const sharp = require("sharp");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image with a QR code to read it!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image with a QR code to read!`;
|
||||||
message.channel.sendTyping();
|
message.channel.sendTyping();
|
||||||
const rawData = await sharp(image.data).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
|
const rawData = await sharp(image.data).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
|
||||||
const qrBuffer = jsqr(rawData.data, rawData.info.width, rawData.info.height);
|
const qrBuffer = jsqr(rawData.data, rawData.info.width, rawData.info.height);
|
||||||
return `\`\`\`\n${qrBuffer.data}\n\`\`\``;
|
return `\`\`\`\n${qrBuffer.data}\n\`\`\``;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Reads a QR code";
|
|
@ -11,3 +11,6 @@ exports.run = async (message, args) => {
|
||||||
if (error) console.error;
|
if (error) console.error;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 7;
|
||||||
|
exports.help = "Reloads a command";
|
|
@ -11,3 +11,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["reboot"];
|
exports.aliases = ["reboot"];
|
||||||
|
exports.category = 7;
|
||||||
|
exports.help = "Restarts me";
|
|
@ -2,9 +2,9 @@ const RetroText = require("retrotext");
|
||||||
|
|
||||||
exports.run = async (message, args) => {
|
exports.run = async (message, args) => {
|
||||||
if (args.length === 0) return `${message.author.mention}, you need to provide some text to generate some retro text!`;
|
if (args.length === 0) return `${message.author.mention}, you need to provide some text to generate some retro text!`;
|
||||||
|
message.channel.sendTyping();
|
||||||
const [line1, line2, line3] = args.join(" ").split(",").map(elem => elem.trim());
|
const [line1, line2, line3] = args.join(" ").split(",").map(elem => elem.trim());
|
||||||
if (/^[\w ]+$/i.test(line1) === false || /^[\w ]+$/i.test(line2) === false || /^[\w ]+$/i.test(line3) === false) return `${message.author.mention}, only alphanumeric characters, spaces, and underscores are allowed!`;
|
if (/^[\w ]+$/i.test(line1) === false || /^[\w ]+$/i.test(line2) === false || /^[\w ]+$/i.test(line3) === false) return `${message.author.mention}, only alphanumeric characters, spaces, and underscores are allowed!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
let text;
|
let text;
|
||||||
if (line3) {
|
if (line3) {
|
||||||
text = new RetroText().setLine(1, line1).setLine(2, line2).setLine(3, line3).setBackgroundStyle("outlineTri").setTextStyle("chrome");
|
text = new RetroText().setLine(1, line1).setLine(2, line2).setLine(3, line3).setBackgroundStyle("outlineTri").setTextStyle("chrome");
|
||||||
|
@ -19,3 +19,6 @@ exports.run = async (message, args) => {
|
||||||
name: "retro.png"
|
name: "retro.png"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Generates a retro text image";
|
|
@ -23,3 +23,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["rockpaperscissors"];
|
exports.aliases = ["rockpaperscissors"];
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Plays rock, paper, scissors with me";
|
|
@ -5,9 +5,9 @@ const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a Scott the Woz TV meme!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a Scott the Woz TV meme!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const template = "./assets/images/scott.png";
|
const template = "./assets/images/scott.png";
|
||||||
const path = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const path = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
require("util").promisify(fs.writeFile)(path, image.data);
|
require("util").promisify(fs.writeFile)(path, image.data);
|
||||||
|
@ -20,3 +20,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["woz", "tv", "porn"];
|
exports.aliases = ["woz", "tv", "porn"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Creates a Scott the Woz TV image";
|
|
@ -43,3 +43,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["server"];
|
exports.aliases = ["server"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Gets some info about the server";
|
|
@ -1,9 +1,9 @@
|
||||||
const sharp = require("sharp");
|
const sharp = require("sharp");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to sharpen!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to sharpen!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const resultBuffer = await sharp(image.data).sharpen(5).toBuffer();
|
const resultBuffer = await sharp(image.data).sharpen(5).toBuffer();
|
||||||
return message.channel.createMessage("", {
|
return message.channel.createMessage("", {
|
||||||
file: resultBuffer,
|
file: resultBuffer,
|
||||||
|
@ -13,3 +13,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["sharp"];
|
exports.aliases = ["sharp"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Sharpens an image";
|
|
@ -9,3 +9,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["urlshorten", "shortenlink", "urishorten", "shortenuri", "shortenurl"];
|
exports.aliases = ["urlshorten", "shortenlink", "urishorten", "shortenuri", "shortenurl"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Shortens a URL";
|
||||||
|
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a Shutterstock watermark!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to add a Shutterstock watermark!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const watermark = "./assets/images/shutterstock.png";
|
const watermark = "./assets/images/shutterstock.png";
|
||||||
gm(image.data).size(async (error, size) => {
|
gm(image.data).size(async (error, size) => {
|
||||||
if (error) console.error;
|
if (error) console.error;
|
||||||
|
@ -20,3 +20,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["stock", "stockphoto"];
|
exports.aliases = ["stock", "stockphoto"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Adds the Shutterstock watermark to an image";
|
|
@ -4,3 +4,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["timestamp", "snowstamp", "snow"];
|
exports.aliases = ["timestamp", "snowstamp", "snow"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Converts a Discord snowflake into a timestamp";
|
|
@ -5,7 +5,7 @@ const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
const wrap = require("../utils/wrap.js");
|
const wrap = require("../utils/wrap.js");
|
||||||
|
|
||||||
exports.run = async (message, args) => {
|
exports.run = async (message, args) => {
|
||||||
if (args.length === 0) return `${message.author.mention}, you need to provide an image to make a Sonic meme!`;
|
if (args.length === 0) return `${message.author.mention}, you need to provide some text to make a Sonic meme!`;
|
||||||
message.channel.sendTyping();
|
message.channel.sendTyping();
|
||||||
const template = "./assets/images/sonic.jpg";
|
const template = "./assets/images/sonic.jpg";
|
||||||
const file = `/tmp/${Math.random().toString(36).substring(2, 15)}.png`;
|
const file = `/tmp/${Math.random().toString(36).substring(2, 15)}.png`;
|
||||||
|
@ -20,3 +20,6 @@ exports.run = async (message, args) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Creates a Sonic speech bubble image";
|
|
@ -3,3 +3,6 @@ exports.run = async (message, args) => {
|
||||||
if (message.content.includes("@everyone") || message.content.includes("@here")) return "I don't know about you, but that seems like a bad idea.";
|
if (message.content.includes("@everyone") || message.content.includes("@here")) return "I don't know about you, but that seems like a bad idea.";
|
||||||
return args.join(" ").repeat(500).substring(0, 500);
|
return args.join(" ").repeat(500).substring(0, 500);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 8;
|
||||||
|
exports.help = "placeholder";
|
|
@ -19,3 +19,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["rotate"];
|
exports.aliases = ["rotate"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Spins an image";
|
|
@ -40,3 +40,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["status", "stat"];
|
exports.aliases = ["status", "stat"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Gets some statistics about me";
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to swirl!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to swirl!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const data = gm(image.data).swirl(180);
|
const data = gm(image.data).swirl(180);
|
||||||
const resultBuffer = await gmToBuffer(data);
|
const resultBuffer = await gmToBuffer(data);
|
||||||
return message.channel.createMessage("", {
|
return message.channel.createMessage("", {
|
||||||
|
@ -16,3 +16,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["whirlpool"];
|
exports.aliases = ["whirlpool"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Swirls an image";
|
|
@ -82,3 +82,14 @@ const setTag = async (content, name, message, guild) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["t", "tag", "ta"];
|
exports.aliases = ["t", "tag", "ta"];
|
||||||
|
exports.category = 3;
|
||||||
|
exports.help = "placeholder";
|
||||||
|
|
||||||
|
/*{
|
||||||
|
default: "Gets a tag",
|
||||||
|
add: "Adds a tag",
|
||||||
|
delete: "Deletes a tag",
|
||||||
|
edit: "Edits a tag",
|
||||||
|
list: "Lists all tags in the server",
|
||||||
|
random: "Gets a random tag"
|
||||||
|
}*/
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to tile!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to tile!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
gm(image.data).command("montage").out("-duplicate").out(24).tile("5x5").geometry("+0+0").stream(async (error, output) => {
|
gm(image.data).command("montage").out("-duplicate").out(24).tile("5x5").geometry("+0+0").stream(async (error, output) => {
|
||||||
if (error) console.error;
|
if (error) console.error;
|
||||||
const data = gm(output).resize("800x800>");
|
const data = gm(output).resize("800x800>");
|
||||||
|
@ -19,3 +19,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["wall2"];
|
exports.aliases = ["wall2"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Creates a tile pattern from an image";
|
|
@ -5,9 +5,9 @@ const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a Trump meme!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a Trump meme!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const template = "./assets/images/trump.png";
|
const template = "./assets/images/trump.png";
|
||||||
const path = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const path = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
require("util").promisify(fs.writeFile)(path, image.data);
|
require("util").promisify(fs.writeFile)(path, image.data);
|
||||||
|
@ -18,3 +18,6 @@ exports.run = async (message) => {
|
||||||
name: "trump.png"
|
name: "trump.png"
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Makes Trump display an image";
|
|
@ -8,4 +8,6 @@ exports.run = async (message, args) => {
|
||||||
return `${message.author.mention}, a tweet with id ${info.data.id_str} has been posted with status code ${info.resp.statusCode} ${info.resp.statusMessage}.`;
|
return `${message.author.mention}, a tweet with id ${info.data.id_str} has been posted with status code ${info.resp.statusCode} ${info.resp.statusMessage}.`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 7;
|
||||||
|
exports.help = "Tweets a message";
|
||||||
exports.requires = "twitter";
|
exports.requires = "twitter";
|
|
@ -47,3 +47,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["user"];
|
exports.aliases = ["user"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Gets info about a user";
|
|
@ -5,9 +5,9 @@ const gm = require("gm").subClass({
|
||||||
});
|
});
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to mirror!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to mirror!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const data = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const data = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
const data2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const data2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
gm(image.data).gravity("East").crop("50%", 0).strip().write(data2, (error) => {
|
gm(image.data).gravity("East").crop("50%", 0).strip().write(data2, (error) => {
|
||||||
|
@ -26,4 +26,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["magik3", "mirror"];
|
exports.aliases = ["magik3", "mirror"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Mirrors the right side of an image onto the left";
|
||||||
|
|
|
@ -4,9 +4,9 @@ const gm = require("gm").subClass({
|
||||||
const gmToBuffer = require("../utils/gmbuffer.js");
|
const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a wall from!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a wall from!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
gm(image.data).resize(128).stream(async (error, output) => {
|
gm(image.data).resize(128).stream(async (error, output) => {
|
||||||
if (error) console.error;
|
if (error) console.error;
|
||||||
const data = gm(output).virtualPixel("tile").matteColor("none").out("-background", "none").resize("512x512!").out("-distort").out("Perspective").out("0,0,57,42 0,128,63,130 128,0,140,60 128,128,140,140");
|
const data = gm(output).virtualPixel("tile").matteColor("none").out("-background", "none").resize("512x512!").out("-distort").out("Perspective").out("0,0,57,42 0,128,63,130 128,0,140,60 128,128,140,140");
|
||||||
|
@ -17,3 +17,6 @@ exports.run = async (message) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Creates a wall from an image";
|
|
@ -5,9 +5,9 @@ const gmToBuffer = require("../utils/gmbuffer.js");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a "who did this" meme!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to make a "who did this" meme!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const template = "./assets/images/whodidthis.png";
|
const template = "./assets/images/whodidthis.png";
|
||||||
const path = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const path = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
require("util").promisify(fs.writeFile)(path, image.data);
|
require("util").promisify(fs.writeFile)(path, image.data);
|
||||||
|
@ -20,3 +20,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["whodidthis"];
|
exports.aliases = ["whodidthis"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Creates a \"WHO DID THIS\" meme from an image";
|
|
@ -18,5 +18,6 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["wiki"];
|
exports.aliases = ["wiki"];
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Gets a random WikiHow image";
|
||||||
exports.requires = "mashape";
|
exports.requires = "mashape";
|
|
@ -5,3 +5,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["windows", "xp"];
|
exports.aliases = ["windows", "xp"];
|
||||||
|
exports.category = 6;
|
||||||
|
exports.help = "Plays the Windows XP startup sound";
|
|
@ -5,9 +5,9 @@ const gm = require("gm").subClass({
|
||||||
});
|
});
|
||||||
|
|
||||||
exports.run = async (message) => {
|
exports.run = async (message) => {
|
||||||
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
const image = await require("../utils/imagedetect.js")(message);
|
||||||
if (image === undefined) return `${message.author.mention}, you need to provide an image to mirror!`;
|
if (image === undefined) return `${message.author.mention}, you need to provide an image to mirror!`;
|
||||||
message.channel.sendTyping();
|
|
||||||
const data = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const data = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
const data2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
const data2 = `/tmp/${Math.random().toString(36).substring(2, 15)}.${image.type}`;
|
||||||
gm(image.data).gravity("North").crop(0, "50%").strip().write(data2, (error) => {
|
gm(image.data).gravity("North").crop(0, "50%").strip().write(data2, (error) => {
|
||||||
|
@ -26,3 +26,5 @@ exports.run = async (message) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["magik5", "mirror3"];
|
exports.aliases = ["magik5", "mirror3"];
|
||||||
|
exports.category = 5;
|
||||||
|
exports.help = "Mirrors the top of an image onto the bottom";
|
|
@ -17,7 +17,10 @@ exports.run = async (message, args) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return message.channel.createMessage(embed);
|
return message.channel.createMessage(embed);
|
||||||
} catch {
|
} catch (e) {
|
||||||
return `${message.author.mention}, I couldn't find that XKCD!`;
|
return `${message.author.mention}, I couldn't get that XKCD!`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Gets an XKCD comic";
|
|
@ -8,3 +8,5 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["yodish"];
|
exports.aliases = ["yodish"];
|
||||||
|
exports.category = 4;
|
||||||
|
exports.help = "Translates a message to Yodish";
|
|
@ -18,5 +18,6 @@ exports.run = async (message, args) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.aliases = ["yt", "video", "ytsearch"];
|
exports.aliases = ["yt", "video", "ytsearch"];
|
||||||
|
exports.category = 1;
|
||||||
|
exports.help = "Searches YouTube";
|
||||||
exports.requires = "google";
|
exports.requires = "google";
|
|
@ -2,3 +2,4 @@ const { Collection } = require("eris");
|
||||||
|
|
||||||
exports.commands = new Collection();
|
exports.commands = new Collection();
|
||||||
exports.aliases = new Collection();
|
exports.aliases = new Collection();
|
||||||
|
exports.info = new Collection();
|
|
@ -9,7 +9,11 @@ exports.load = async (command) => {
|
||||||
if (props.requires === "mashape" && process.env.MASHAPE === "") return logger.log("info", `Mashape/RapidAPI info not provided in config, skipped loading command ${command}...`);
|
if (props.requires === "mashape" && process.env.MASHAPE === "") return logger.log("info", `Mashape/RapidAPI info not provided in config, skipped loading command ${command}...`);
|
||||||
if (props.requires === "twitter" && process.env.TWITTER === "false") return logger.log("info", `Twitter bot disabled, skipped loading command ${command}...`);
|
if (props.requires === "twitter" && process.env.TWITTER === "false") return logger.log("info", `Twitter bot disabled, skipped loading command ${command}...`);
|
||||||
collections.commands.set(command.split(".")[0], props.run);
|
collections.commands.set(command.split(".")[0], props.run);
|
||||||
// add each alias to
|
collections.info.set(command.split(".")[0], {
|
||||||
|
category: props.category,
|
||||||
|
description: props.help,
|
||||||
|
aliases: props.aliases
|
||||||
|
});
|
||||||
if (props.aliases) {
|
if (props.aliases) {
|
||||||
props.aliases.forEach(alias => {
|
props.aliases.forEach(alias => {
|
||||||
collections.aliases.set(alias, command.split(".")[0]);
|
collections.aliases.set(alias, command.split(".")[0]);
|
||||||
|
|
|
@ -18,9 +18,6 @@ module.exports = async (sound, message) => {
|
||||||
playingMessage.delete();
|
playingMessage.delete();
|
||||||
logger.error(error);
|
logger.error(error);
|
||||||
});
|
});
|
||||||
connection.on("warn", (warn) => {
|
|
||||||
logger.warn(warn);
|
|
||||||
});
|
|
||||||
connection.once("end", () => {
|
connection.once("end", () => {
|
||||||
voiceChannel.leave();
|
voiceChannel.leave();
|
||||||
playingMessage.delete();
|
playingMessage.delete();
|
||||||
|
|
Loading…
Reference in a new issue