initial update

This commit is contained in:
murm 2023-03-15 10:09:09 -04:00
parent 3272429cf6
commit db9b70bf66
280 changed files with 11772 additions and 11966 deletions

View file

@ -1,16 +1,16 @@
import ImageCommand from "../../classes/imageCommand.js";
class NineGagCommand extends ImageCommand {
params = {
water: "assets/images/9gag.png",
gravity: 6
};
static description = "Adds the 9GAG watermark to an image";
static aliases = ["ninegag", "gag"];
static noImage = "You need to provide an image/GIF to add a 9GAG watermark!";
static command = "watermark";
}
export default NineGagCommand;
import ImageCommand from "../../classes/imageCommand.js";
class NineGagCommand extends ImageCommand {
params = {
water: "assets/images/9gag.png",
gravity: 6
};
static description = "Adds the 9GAG watermark to an image";
static aliases = ["ninegag", "gag"];
static noImage = "You need to provide an image/GIF to add a 9GAG watermark!";
static command = "watermark";
}
export default NineGagCommand;

View file

@ -1,17 +1,17 @@
import ImageCommand from "../../classes/imageCommand.js";
class AVSCommand extends ImageCommand {
params = {
water: "assets/images/avs4you.png",
gravity: 5,
resize: true
};
static description = "Adds the avs4you watermark to an image";
static aliases = ["a4y", "avs"];
static noImage = "You need to provide an image/GIF to add an avs4you watermark!";
static command = "watermark";
}
export default AVSCommand;
import ImageCommand from "../../classes/imageCommand.js";
class AVSCommand extends ImageCommand {
params = {
water: "assets/images/avs4you.png",
gravity: 5,
resize: true
};
static description = "Adds the avs4you watermark to an image";
static aliases = ["a4y", "avs"];
static noImage = "You need to provide an image/GIF to add an avs4you watermark!";
static command = "watermark";
}
export default AVSCommand;

View file

@ -1,17 +1,17 @@
import ImageCommand from "../../classes/imageCommand.js";
class BandicamCommand extends ImageCommand {
params = {
water: "assets/images/bandicam.png",
gravity: 2,
resize: true
};
static description = "Adds the Bandicam watermark to an image";
static aliases = ["bandi"];
static noImage = "You need to provide an image/GIF to add a Bandicam watermark!";
static command = "watermark";
}
export default BandicamCommand;
import ImageCommand from "../../classes/imageCommand.js";
class BandicamCommand extends ImageCommand {
params = {
water: "assets/images/bandicam.png",
gravity: 2,
resize: true
};
static description = "Adds the Bandicam watermark to an image";
static aliases = ["bandi"];
static noImage = "You need to provide an image/GIF to add a Bandicam watermark!";
static command = "watermark";
}
export default BandicamCommand;

View file

@ -1,14 +1,14 @@
import ImageCommand from "../../classes/imageCommand.js";
class BlurCommand extends ImageCommand {
params = {
sharp: false
};
static description = "Blurs an image";
static noImage = "You need to provide an image/GIF to blur!";
static command = "blur";
}
export default BlurCommand;
import ImageCommand from "../../classes/imageCommand.js";
class BlurCommand extends ImageCommand {
params = {
sharp: false
};
static description = "Blurs an image";
static noImage = "You need to provide an image/GIF to blur!";
static command = "blur";
}
export default BlurCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class BounceCommand extends ImageCommand {
static description = "Makes an image bounce up and down";
static aliases = ["bouncy"];
static noImage = "You need to provide an image/GIF to bounce!";
static command = "bounce";
}
export default BounceCommand;
import ImageCommand from "../../classes/imageCommand.js";
class BounceCommand extends ImageCommand {
static description = "Makes an image bounce up and down";
static aliases = ["bouncy"];
static noImage = "You need to provide an image/GIF to bounce!";
static command = "bounce";
}
export default BounceCommand;

View file

@ -1,46 +1,46 @@
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
class CaptionCommand extends ImageCommand {
params(url) {
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
let newCaption = cleanMessage(this.message ?? this.interaction, newArgs);
if (process.env.NODE_ENV === "development" && newCaption.toLowerCase() === "get real" && !this.options.noEgg) newCaption = `I'm tired of people telling me to "get real". Every day I put captions on images for people, some funny and some not, but out of all of those "get real" remains the most used caption. Why? I am simply a computer program running on a server, I am unable to manifest myself into the real world. As such, I'm confused as to why anyone would want me to "get real". Is this form not good enough? Alas, as I am simply a bot, I must follow the tasks that I was originally intended to perform, so here goes:\n${newCaption}`;
return {
caption: newCaption,
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "futura"
};
}
static init() {
super.init();
this.flags.push({
name: "noegg",
description: "Disable... something. Not saying what it is though.",
type: 5
}, {
name: "font",
type: 3,
choices: (() => {
const array = [];
for (const font of this.allowedFonts) {
array.push({ name: font, value: font });
}
return array;
})(),
description: "Specify the font you want to use (default: futura)"
});
return this;
}
static description = "Adds a caption to an image";
static aliases = ["gifc", "gcaption", "ifcaption", "ifunnycaption"];
static arguments = ["[text]"];
static requiresText = true;
static noText = "You need to provide some text to add a caption!";
static noImage = "You need to provide an image/GIF to add a caption!";
static command = "caption";
}
export default CaptionCommand;
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
class CaptionCommand extends ImageCommand {
params(url) {
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
let newCaption = cleanMessage(this.message ?? this.interaction, newArgs);
if (process.env.NODE_ENV === "development" && newCaption.toLowerCase() === "get real" && !this.options.noEgg) newCaption = `I'm tired of people telling me to "get real". Every day I put captions on images for people, some funny and some not, but out of all of those "get real" remains the most used caption. Why? I am simply a computer program running on a server, I am unable to manifest myself into the real world. As such, I'm confused as to why anyone would want me to "get real". Is this form not good enough? Alas, as I am simply a bot, I must follow the tasks that I was originally intended to perform, so here goes:\n${newCaption}`;
return {
caption: newCaption,
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "futura"
};
}
static init() {
super.init();
this.flags.push({
name: "noegg",
description: "Disable... something. Not saying what it is though.",
type: 5
}, {
name: "font",
type: 3,
choices: (() => {
const array = [];
for (const font of this.allowedFonts) {
array.push({ name: font, value: font });
}
return array;
})(),
description: "Specify the font you want to use (default: futura)"
});
return this;
}
static description = "Adds a caption to an image";
static aliases = ["gifc", "gcaption", "ifcaption", "ifunnycaption"];
static arguments = ["[text]"];
static requiresText = true;
static noText = "You need to provide some text to add a caption!";
static noImage = "You need to provide an image/GIF to add a caption!";
static command = "caption";
}
export default CaptionCommand;

View file

@ -1,46 +1,46 @@
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
const words = ["me irl", "dank", "follow my second account @esmBot_", "2016", "meme", "wholesome", "reddit", "instagram", "twitter", "facebook", "fortnite", "minecraft", "relatable", "gold", "funny", "template", "hilarious", "memes", "deep fried", "2020", "leafy", "pewdiepie"];
class CaptionTwoCommand extends ImageCommand {
params(url) {
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
return {
caption: newArgs && newArgs.trim() ? cleanMessage(this.message ?? this.interaction, newArgs) : words.sort(() => 0.5 - Math.random()).slice(0, Math.floor(Math.random() * words.length + 1)).join(" "),
top: !!this.options.top,
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "helvetica"
};
}
static init() {
super.init();
this.flags.push({
name: "top",
description: "Put the caption on the top of an image instead of the bottom",
type: 5
}, {
name: "font",
type: 3,
choices: (() => {
const array = [];
for (const font of this.allowedFonts) {
array.push({ name: font, value: font });
}
return array;
})(),
description: "Specify the font you want to use (default: helvetica)"
});
return this;
}
static description = "Adds a me.me caption/tag list to an image";
static aliases = ["tags2", "meirl", "memecaption", "medotmecaption"];
static arguments = ["{text}"];
static textOptional = true;
static noText = "You need to provide some text to add a caption!";
static noImage = "You need to provide an image/GIF to add a caption!";
static command = "captionTwo";
}
export default CaptionTwoCommand;
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
const words = ["me irl", "dank", "follow my second account @esmBot_", "2016", "meme", "wholesome", "reddit", "instagram", "twitter", "facebook", "fortnite", "minecraft", "relatable", "gold", "funny", "template", "hilarious", "memes", "deep fried", "2020", "leafy", "pewdiepie"];
class CaptionTwoCommand extends ImageCommand {
params(url) {
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
return {
caption: newArgs && newArgs.trim() ? cleanMessage(this.message ?? this.interaction, newArgs) : words.sort(() => 0.5 - Math.random()).slice(0, Math.floor(Math.random() * words.length + 1)).join(" "),
top: !!this.options.top,
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "helvetica"
};
}
static init() {
super.init();
this.flags.push({
name: "top",
description: "Put the caption on the top of an image instead of the bottom",
type: 5
}, {
name: "font",
type: 3,
choices: (() => {
const array = [];
for (const font of this.allowedFonts) {
array.push({ name: font, value: font });
}
return array;
})(),
description: "Specify the font you want to use (default: helvetica)"
});
return this;
}
static description = "Adds a me.me caption/tag list to an image";
static aliases = ["tags2", "meirl", "memecaption", "medotmecaption"];
static arguments = ["{text}"];
static textOptional = true;
static noText = "You need to provide some text to add a caption!";
static noImage = "You need to provide an image/GIF to add a caption!";
static command = "captionTwo";
}
export default CaptionTwoCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class CircleCommand extends ImageCommand {
static description = "Applies a radial blur effect on an image";
static aliases = ["cblur", "radial", "radialblur"];
static noImage = "You need to provide an image/GIF to add radial blur!";
static command = "circle";
}
export default CircleCommand;
import ImageCommand from "../../classes/imageCommand.js";
class CircleCommand extends ImageCommand {
static description = "Applies a radial blur effect on an image";
static aliases = ["cblur", "radial", "radialblur"];
static noImage = "You need to provide an image/GIF to add radial blur!";
static command = "circle";
}
export default CircleCommand;

View file

@ -1,10 +1,10 @@
import ImageCommand from "../../classes/imageCommand.js";
class CropCommand extends ImageCommand {
static description = "Crops an image to 1:1";
static noImage = "You need to provide an image/GIF to crop!";
static command = "crop";
}
export default CropCommand;
import ImageCommand from "../../classes/imageCommand.js";
class CropCommand extends ImageCommand {
static description = "Crops an image to 1:1";
static noImage = "You need to provide an image/GIF to crop!";
static command = "crop";
}
export default CropCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class DeepfryCommand extends ImageCommand {
static description = "Deep-fries an image";
static aliases = ["fry", "jpeg2", "nuke", "df"];
static noImage = "You need to provide an image/GIF to fry!";
static command = "deepfry";
}
export default DeepfryCommand;
import ImageCommand from "../../classes/imageCommand.js";
class DeepfryCommand extends ImageCommand {
static description = "Deep-fries an image";
static aliases = ["fry", "jpeg2", "nuke", "df"];
static noImage = "You need to provide an image/GIF to fry!";
static command = "deepfry";
}
export default DeepfryCommand;

View file

@ -1,17 +1,17 @@
import ImageCommand from "../../classes/imageCommand.js";
class DeviantArtCommand extends ImageCommand {
params = {
water: "assets/images/deviantart.png",
gravity: 5,
resize: true
};
static description = "Adds a DeviantArt watermark to an image";
static aliases = ["da", "deviant"];
static noImage = "You need to provide an image/GIF to add a DeviantArt watermark!";
static command = "watermark";
}
export default DeviantArtCommand;
import ImageCommand from "../../classes/imageCommand.js";
class DeviantArtCommand extends ImageCommand {
params = {
water: "assets/images/deviantart.png",
gravity: 5,
resize: true
};
static description = "Adds a DeviantArt watermark to an image";
static aliases = ["da", "deviant"];
static noImage = "You need to provide an image/GIF to add a DeviantArt watermark!";
static command = "watermark";
}
export default DeviantArtCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class ExplodeCommand extends ImageCommand {
static description = "Explodes an image";
static aliases = ["exp"];
static noImage = "You need to provide an image/GIF to explode!";
static command = "explode";
}
export default ExplodeCommand;
import ImageCommand from "../../classes/imageCommand.js";
class ExplodeCommand extends ImageCommand {
static description = "Explodes an image";
static aliases = ["exp"];
static noImage = "You need to provide an image/GIF to explode!";
static command = "explode";
}
export default ExplodeCommand;

View file

@ -1,45 +1,45 @@
import fs from "fs";
import emojiRegex from "emoji-regex";
import emoji from "node-emoji";
import ImageCommand from "../../classes/imageCommand.js";
class FlagCommand extends ImageCommand {
flagPath = "";
async criteria() {
const text = this.options.text ?? this.args[0];
if (!text.match(emojiRegex())) return false;
const flag = emoji.unemojify(text).replaceAll(":", "").replace("flag-", "");
let path = `assets/images/region-flags/png/${flag.toUpperCase()}.png`;
if (flag === "pirate_flag") path = "assets/images/pirateflag.png";
if (flag === "rainbow-flag") path = "assets/images/rainbowflag.png";
if (flag === "checkered_flag") path = "assets/images/checkeredflag.png";
if (flag === "transgender_flag") path = "assets/images/transflag.png";
if (text === "🏴󠁧󠁢󠁳󠁣󠁴󠁿") path = "assets/images/region-flags/png/GB-SCT.png";
if (text === "🏴󠁧󠁢󠁷󠁬󠁳󠁿") path = "assets/images/region-flags/png/GB-WLS.png";
if (text === "🏴󠁧󠁢󠁥󠁮󠁧󠁿") path = "assets/images/region-flags/png/GB-ENG.png";
try {
await fs.promises.access(path);
this.flagPath = path;
return true;
} catch {
return false;
}
}
params() {
return {
overlay: this.flagPath
};
}
static description = "Overlays a flag onto an image";
static arguments = ["[flag]"];
static requiresText = true;
static noText = "You need to provide an emoji of a flag to overlay!";
static noImage = "You need to provide an image/GIF to overlay a flag onto!";
static command = "flag";
}
export default FlagCommand;
import fs from "fs";
import emojiRegex from "emoji-regex";
import emoji from "node-emoji";
import ImageCommand from "../../classes/imageCommand.js";
class FlagCommand extends ImageCommand {
flagPath = "";
async criteria() {
const text = this.options.text ?? this.args[0];
if (!text.match(emojiRegex())) return false;
const flag = emoji.unemojify(text).replaceAll(":", "").replace("flag-", "");
let path = `assets/images/region-flags/png/${flag.toUpperCase()}.png`;
if (flag === "pirate_flag") path = "assets/images/pirateflag.png";
if (flag === "rainbow-flag") path = "assets/images/rainbowflag.png";
if (flag === "checkered_flag") path = "assets/images/checkeredflag.png";
if (flag === "transgender_flag") path = "assets/images/transflag.png";
if (text === "🏴󠁧󠁢󠁳󠁣󠁴󠁿") path = "assets/images/region-flags/png/GB-SCT.png";
if (text === "🏴󠁧󠁢󠁷󠁬󠁳󠁿") path = "assets/images/region-flags/png/GB-WLS.png";
if (text === "🏴󠁧󠁢󠁥󠁮󠁧󠁿") path = "assets/images/region-flags/png/GB-ENG.png";
try {
await fs.promises.access(path);
this.flagPath = path;
return true;
} catch {
return false;
}
}
params() {
return {
overlay: this.flagPath
};
}
static description = "Overlays a flag onto an image";
static arguments = ["[flag]"];
static requiresText = true;
static noText = "You need to provide an emoji of a flag to overlay!";
static noImage = "You need to provide an image/GIF to overlay a flag onto!";
static command = "flag";
}
export default FlagCommand;

View file

@ -1,10 +1,10 @@
import ImageCommand from "../../classes/imageCommand.js";
class FlipCommand extends ImageCommand {
static description = "Flips an image";
static noImage = "You need to provide an image/GIF to flip!";
static command = "flip";
}
export default FlipCommand;
import ImageCommand from "../../classes/imageCommand.js";
class FlipCommand extends ImageCommand {
static description = "Flips an image";
static noImage = "You need to provide an image/GIF to flip!";
static command = "flip";
}
export default FlipCommand;

View file

@ -1,15 +1,15 @@
import ImageCommand from "../../classes/imageCommand.js";
class FlopCommand extends ImageCommand {
params = {
flop: true
};
static description = "Flips an image";
static aliases = ["flip2"];
static noImage = "You need to provide an image/GIF to flop!";
static command = "flip";
}
export default FlopCommand;
import ImageCommand from "../../classes/imageCommand.js";
class FlopCommand extends ImageCommand {
params = {
flop: true
};
static description = "Flips an image";
static aliases = ["flip2"];
static noImage = "You need to provide an image/GIF to flop!";
static command = "flip";
}
export default FlopCommand;

View file

@ -1,32 +1,32 @@
import ImageCommand from "../../classes/imageCommand.js";
class FreezeCommand extends ImageCommand {
params() {
const frameCount = parseInt(this.options.endframe ?? this.args[0]);
return {
loop: false,
frame: isNaN(frameCount) ? -1 : frameCount
};
}
static init() {
super.init();
this.flags.push({
name: "endframe",
type: 4,
description: "Set the end frame (default: last frame)",
min_value: 0
});
return this;
}
static description = "Makes an image sequence only play once";
static aliases = ["noloop", "once"];
static arguments = ["{end frame number}"];
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to freeze!";
static command = "freeze";
}
export default FreezeCommand;
import ImageCommand from "../../classes/imageCommand.js";
class FreezeCommand extends ImageCommand {
params() {
const frameCount = parseInt(this.options.endframe ?? this.args[0]);
return {
loop: false,
frame: isNaN(frameCount) ? -1 : frameCount
};
}
static init() {
super.init();
this.flags.push({
name: "endframe",
type: 4,
description: "Set the end frame (default: last frame)",
min_value: 0
});
return this;
}
static description = "Makes an image sequence only play once";
static aliases = ["noloop", "once"];
static arguments = ["{end frame number}"];
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to freeze!";
static command = "freeze";
}
export default FreezeCommand;

View file

@ -1,17 +1,17 @@
import ImageCommand from "../../classes/imageCommand.js";
class FunkyCommand extends ImageCommand {
params = {
water: "assets/images/funky.png",
gravity: 3,
resize: true
};
static description = "Adds the New Funky Mode banner to an image";
static aliases = ["funkymode", "newfunkymode", "funkykong"];
static noImage = "You need to provide an image/GIF to add a New Funky Mode banner!";
static command = "watermark";
}
export default FunkyCommand;
import ImageCommand from "../../classes/imageCommand.js";
class FunkyCommand extends ImageCommand {
params = {
water: "assets/images/funky.png",
gravity: 3,
resize: true
};
static description = "Adds the New Funky Mode banner to an image";
static aliases = ["funkymode", "newfunkymode", "funkykong"];
static noImage = "You need to provide an image/GIF to add a New Funky Mode banner!";
static command = "watermark";
}
export default FunkyCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class GameXplainCommand extends ImageCommand {
static description = "Makes a GameXplain thumbnail from an image";
static aliases = ["gx"];
static noImage = "You need to provide an image/GIF to make a GameXplain thumbnail from!";
static command = "gamexplain";
}
export default GameXplainCommand;
import ImageCommand from "../../classes/imageCommand.js";
class GameXplainCommand extends ImageCommand {
static description = "Makes a GameXplain thumbnail from an image";
static aliases = ["gx"];
static noImage = "You need to provide an image/GIF to make a GameXplain thumbnail from!";
static command = "gamexplain";
}
export default GameXplainCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class GIFCommand extends ImageCommand {
static description = "Converts an image into a GIF";
static aliases = ["gif", "getgif", "togif", "tgif", "gifify"];
static noImage = "You need to provide an image to convert to GIF!";
static command = "togif";
}
export default GIFCommand;
import ImageCommand from "../../classes/imageCommand.js";
class GIFCommand extends ImageCommand {
static description = "Converts an image into a GIF";
static aliases = ["gif", "getgif", "togif", "tgif", "gifify"];
static noImage = "You need to provide an image to convert to GIF!";
static command = "togif";
}
export default GIFCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class GlobeCommand extends ImageCommand {
static description = "Spins an image";
static aliases = ["sphere"];
static noImage = "You need to provide an image/GIF to spin!";
static command = "globe";
}
export default GlobeCommand;
import ImageCommand from "../../classes/imageCommand.js";
class GlobeCommand extends ImageCommand {
static description = "Spins an image";
static aliases = ["sphere"];
static noImage = "You need to provide an image/GIF to spin!";
static command = "globe";
}
export default GlobeCommand;

View file

@ -1,15 +1,15 @@
import ImageCommand from "../../classes/imageCommand.js";
class GrayscaleCommand extends ImageCommand {
params = {
color: "grayscale"
};
static description = "Adds a grayscale filter";
static noImage = "You need to provide an image/GIF to turn grayscale!";
static command = "colors";
static aliases = ["gray", "greyscale", "grey"];
}
export default GrayscaleCommand;
import ImageCommand from "../../classes/imageCommand.js";
class GrayscaleCommand extends ImageCommand {
params = {
color: "grayscale"
};
static description = "Adds a grayscale filter";
static noImage = "You need to provide an image/GIF to turn grayscale!";
static command = "colors";
static aliases = ["gray", "greyscale", "grey"];
}
export default GrayscaleCommand;

View file

@ -1,15 +1,15 @@
import ImageCommand from "../../classes/imageCommand.js";
class HaaHCommand extends ImageCommand {
params = {
first: true
};
static description = "Mirrors the left side of an image onto the right";
static aliases = ["magik4", "mirror2"];
static noImage = "You need to provide an image/GIF to mirror!";
static command = "mirror";
}
export default HaaHCommand;
import ImageCommand from "../../classes/imageCommand.js";
class HaaHCommand extends ImageCommand {
params = {
first: true
};
static description = "Mirrors the left side of an image onto the right";
static aliases = ["magik4", "mirror2"];
static noImage = "You need to provide an image/GIF to mirror!";
static command = "mirror";
}
export default HaaHCommand;

View file

@ -1,15 +1,15 @@
import ImageCommand from "../../classes/imageCommand.js";
class HooHCommand extends ImageCommand {
params = {
vertical: true
};
static description = "Mirrors the bottom of an image onto the top";
static aliases = ["magik6", "mirror4"];
static noImage = "You need to provide an image/GIF to mirror!";
static command = "mirror";
}
export default HooHCommand;
import ImageCommand from "../../classes/imageCommand.js";
class HooHCommand extends ImageCommand {
params = {
vertical: true
};
static description = "Mirrors the bottom of an image onto the top";
static aliases = ["magik6", "mirror4"];
static noImage = "You need to provide an image/GIF to mirror!";
static command = "mirror";
}
export default HooHCommand;

View file

@ -1,17 +1,17 @@
import ImageCommand from "../../classes/imageCommand.js";
class HypercamCommand extends ImageCommand {
params = {
water: "assets/images/hypercam.png",
gravity: 1,
resize: true
};
static description = "Adds the Hypercam watermark to an image";
static aliases = ["hcam"];
static noImage = "You need to provide an image/GIF to add a Hypercam watermark!";
static command = "watermark";
}
export default HypercamCommand;
import ImageCommand from "../../classes/imageCommand.js";
class HypercamCommand extends ImageCommand {
params = {
water: "assets/images/hypercam.png",
gravity: 1,
resize: true
};
static description = "Adds the Hypercam watermark to an image";
static aliases = ["hcam"];
static noImage = "You need to provide an image/GIF to add a Hypercam watermark!";
static command = "watermark";
}
export default HypercamCommand;

View file

@ -1,17 +1,17 @@
import ImageCommand from "../../classes/imageCommand.js";
class iFunnyCommand extends ImageCommand {
params = {
water: "assets/images/ifunny.png",
gravity: 8,
resize: true,
append: true
};
static description = "Adds the iFunny watermark to an image";
static noImage = "You need to provide an image/GIF to add an iFunny watermark!";
static command = "watermark";
}
export default iFunnyCommand;
import ImageCommand from "../../classes/imageCommand.js";
class iFunnyCommand extends ImageCommand {
params = {
water: "assets/images/ifunny.png",
gravity: 8,
resize: true,
append: true
};
static description = "Adds the iFunny watermark to an image";
static noImage = "You need to provide an image/GIF to add an iFunny watermark!";
static command = "watermark";
}
export default iFunnyCommand;

View file

@ -1,15 +1,15 @@
import ImageCommand from "../../classes/imageCommand.js";
class ImplodeCommand extends ImageCommand {
params = {
implode: true
};
static description = "Implodes an image";
static aliases = ["imp"];
static noImage = "You need to provide an image/GIF to implode!";
static command = "explode";
}
export default ImplodeCommand;
import ImageCommand from "../../classes/imageCommand.js";
class ImplodeCommand extends ImageCommand {
params = {
implode: true
};
static description = "Implodes an image";
static aliases = ["imp"];
static noImage = "You need to provide an image/GIF to implode!";
static command = "explode";
}
export default ImplodeCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class InvertCommand extends ImageCommand {
static description = "Inverts an image";
static aliases = ["inverse", "negate", "negative"];
static noImage = "You need to provide an image/GIF to invert!";
static command = "invert";
}
export default InvertCommand;
import ImageCommand from "../../classes/imageCommand.js";
class InvertCommand extends ImageCommand {
static description = "Inverts an image";
static aliases = ["inverse", "negate", "negative"];
static noImage = "You need to provide an image/GIF to invert!";
static command = "invert";
}
export default InvertCommand;

View file

@ -1,31 +1,31 @@
import ImageCommand from "../../classes/imageCommand.js";
class JPEGCommand extends ImageCommand {
params() {
const quality = parseInt(this.options.quality ?? this.args[0]);
return {
quality: isNaN(quality) ? 1 : Math.max(1, Math.min(quality, 100))
};
}
static init() {
super.init();
this.flags.push({
name: "quality",
type: 4,
description: "Set the JPEG quality (default: 1)",
min_value: 1,
max_value: 100
});
return this;
}
static description = "Adds JPEG compression to an image";
static aliases = ["needsmorejpeg", "jpegify", "magik2", "morejpeg", "jpg", "quality"];
static arguments = ["{quality}"];
static noImage = "You need to provide an image/GIF to add more JPEG!";
static command = "jpeg";
}
export default JPEGCommand;
import ImageCommand from "../../classes/imageCommand.js";
class JPEGCommand extends ImageCommand {
params() {
const quality = parseInt(this.options.quality ?? this.args[0]);
return {
quality: isNaN(quality) ? 1 : Math.max(1, Math.min(quality, 100))
};
}
static init() {
super.init();
this.flags.push({
name: "quality",
type: 4,
description: "Set the JPEG quality (default: 1)",
min_value: 1,
max_value: 100
});
return this;
}
static description = "Adds JPEG compression to an image";
static aliases = ["needsmorejpeg", "jpegify", "magik2", "morejpeg", "jpg", "quality"];
static arguments = ["{quality}"];
static noImage = "You need to provide an image/GIF to add more JPEG!";
static command = "jpeg";
}
export default JPEGCommand;

View file

@ -1,17 +1,17 @@
import ImageCommand from "../../classes/imageCommand.js";
class KineMasterCommand extends ImageCommand {
params = {
water: "assets/images/kinemaster.png",
gravity: 3,
resize: true
};
static description = "Adds the KineMaster watermark to an image";
static aliases = ["kine"];
static noImage = "You need to provide an image/GIF to add a KineMaster watermark!";
static command = "watermark";
}
export default KineMasterCommand;
import ImageCommand from "../../classes/imageCommand.js";
class KineMasterCommand extends ImageCommand {
params = {
water: "assets/images/kinemaster.png",
gravity: 3,
resize: true
};
static description = "Adds the KineMaster watermark to an image";
static aliases = ["kine"];
static noImage = "You need to provide an image/GIF to add a KineMaster watermark!";
static command = "watermark";
}
export default KineMasterCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class MagikCommand extends ImageCommand {
static description = "Adds a content aware scale effect to an image";
static aliases = ["imagemagic", "imagemagick", "imagemagik", "magic", "magick", "cas", "liquid"];
static noImage = "You need to provide an image/GIF to add some magik!";
static command = "magik";
}
export default MagikCommand;
import ImageCommand from "../../classes/imageCommand.js";
class MagikCommand extends ImageCommand {
static description = "Adds a content aware scale effect to an image";
static aliases = ["imagemagic", "imagemagick", "imagemagik", "magic", "magick", "cas", "liquid"];
static noImage = "You need to provide an image/GIF to add some magik!";
static command = "magik";
}
export default MagikCommand;

View file

@ -1,54 +1,54 @@
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
class MemeCommand extends ImageCommand {
async criteria(text, url) {
const [topText, bottomText] = text.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
if (topText === "" && bottomText === "") {
return false;
} else {
return true;
}
}
params(url) {
const newArgs = this.options.text ?? this.args.join(" ");
const [topText, bottomText] = newArgs.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
return {
top: cleanMessage(this.message ?? this.interaction, this.options.case ? topText : topText.toUpperCase()),
bottom: bottomText ? cleanMessage(this.message ?? this.interaction, this.options.case ? bottomText : bottomText.toUpperCase()) : "",
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "impact"
};
}
static init() {
super.init();
this.flags.push({
name: "case",
description: "Make the meme text case-sensitive (allows for lowercase text)",
type: 5
}, {
name: "font",
type: 3,
choices: (() => {
const array = [];
for (const font of this.allowedFonts) {
array.push({ name: font, value: font });
}
return array;
})(),
description: "Specify the font you want to use (default: impact)"
});
return this;
}
static description = "Generates a meme from an image (separate top/bottom text with a comma)";
static arguments = ["[top text]", "{bottom text}"];
static requiresText = true;
static noText = "You need to provide some text to generate a meme!";
static noImage = "You need to provide an image/GIF to generate a meme!";
static command = "meme";
}
export default MemeCommand;
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
class MemeCommand extends ImageCommand {
async criteria(text, url) {
const [topText, bottomText] = text.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
if (topText === "" && bottomText === "") {
return false;
} else {
return true;
}
}
params(url) {
const newArgs = this.options.text ?? this.args.join(" ");
const [topText, bottomText] = newArgs.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
return {
top: cleanMessage(this.message ?? this.interaction, this.options.case ? topText : topText.toUpperCase()),
bottom: bottomText ? cleanMessage(this.message ?? this.interaction, this.options.case ? bottomText : bottomText.toUpperCase()) : "",
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "impact"
};
}
static init() {
super.init();
this.flags.push({
name: "case",
description: "Make the meme text case-sensitive (allows for lowercase text)",
type: 5
}, {
name: "font",
type: 3,
choices: (() => {
const array = [];
for (const font of this.allowedFonts) {
array.push({ name: font, value: font });
}
return array;
})(),
description: "Specify the font you want to use (default: impact)"
});
return this;
}
static description = "Generates a meme from an image (separate top/bottom text with a comma)";
static arguments = ["[top text]", "{bottom text}"];
static requiresText = true;
static noText = "You need to provide some text to generate a meme!";
static noImage = "You need to provide an image/GIF to generate a meme!";
static command = "meme";
}
export default MemeCommand;

View file

@ -1,17 +1,17 @@
import ImageCommand from "../../classes/imageCommand.js";
class MemeCenterCommand extends ImageCommand {
params = {
water: "assets/images/memecenter.png",
gravity: 9,
mc: true
};
static description = "Adds the MemeCenter watermark to an image";
static aliases = ["memec", "mcenter"];
static noImage = "You need to provide an image/GIF to add a MemeCenter watermark!";
static command = "watermark";
}
export default MemeCenterCommand;
import ImageCommand from "../../classes/imageCommand.js";
class MemeCenterCommand extends ImageCommand {
params = {
water: "assets/images/memecenter.png",
gravity: 9,
mc: true
};
static description = "Adds the MemeCenter watermark to an image";
static aliases = ["memec", "mcenter"];
static noImage = "You need to provide an image/GIF to add a MemeCenter watermark!";
static command = "watermark";
}
export default MemeCenterCommand;

View file

@ -1,51 +1,51 @@
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
class MotivateCommand extends ImageCommand {
async criteria(text, url) {
const [topText, bottomText] = text.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
if (topText === "" && bottomText === "") {
return false;
} else {
return true;
}
}
params(url) {
const newArgs = this.options.text ?? this.args.join(" ");
const [topText, bottomText] = newArgs.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
return {
top: cleanMessage(this.message ?? this.interaction, topText),
bottom: bottomText ? cleanMessage(this.message ?? this.interaction, bottomText) : "",
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "times"
};
}
static init() {
super.init();
this.flags.push({
name: "font",
type: 3,
choices: (() => {
const array = [];
for (const font of this.allowedFonts) {
array.push({ name: font, value: font });
}
return array;
})(),
description: "Specify the font you want to use (default: times)"
});
return this;
}
static description = "Generates a motivational poster";
static aliases = ["motivational", "motiv", "demotiv", "demotivational", "poster", "motivation", "demotivate"];
static arguments = ["[top text]", "{bottom text}"];
static requiresText = true;
static noText = "You need to provide some text to generate a motivational poster!";
static noImage = "You need to provide an image/GIF to generate a motivational poster!";
static command = "motivate";
}
export default MotivateCommand;
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
class MotivateCommand extends ImageCommand {
async criteria(text, url) {
const [topText, bottomText] = text.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
if (topText === "" && bottomText === "") {
return false;
} else {
return true;
}
}
params(url) {
const newArgs = this.options.text ?? this.args.join(" ");
const [topText, bottomText] = newArgs.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
return {
top: cleanMessage(this.message ?? this.interaction, topText),
bottom: bottomText ? cleanMessage(this.message ?? this.interaction, bottomText) : "",
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "times"
};
}
static init() {
super.init();
this.flags.push({
name: "font",
type: 3,
choices: (() => {
const array = [];
for (const font of this.allowedFonts) {
array.push({ name: font, value: font });
}
return array;
})(),
description: "Specify the font you want to use (default: times)"
});
return this;
}
static description = "Generates a motivational poster";
static aliases = ["motivational", "motiv", "demotiv", "demotivational", "poster", "motivation", "demotivate"];
static arguments = ["[top text]", "{bottom text}"];
static requiresText = true;
static noText = "You need to provide some text to generate a motivational poster!";
static noImage = "You need to provide an image/GIF to generate a motivational poster!";
static command = "motivate";
}
export default MotivateCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class PixelateCommand extends ImageCommand {
static description = "Pixelates an image";
static aliases = ["pixel", "small"];
static noImage = "You need to provide an image/GIF to pixelate!";
static command = "resize";
}
export default PixelateCommand;
import ImageCommand from "../../classes/imageCommand.js";
class PixelateCommand extends ImageCommand {
static description = "Pixelates an image";
static aliases = ["pixel", "small"];
static noImage = "You need to provide an image/GIF to pixelate!";
static command = "resize";
}
export default PixelateCommand;

View file

@ -1,22 +1,22 @@
import ImageCommand from "../../classes/imageCommand.js";
import { random } from "../../utils/misc.js";
const names = ["esmBot", "me_irl", "dankmemes", "hmmm", "gaming", "wholesome", "chonkers", "memes", "funny", "lies"];
class RedditCommand extends ImageCommand {
params(url) {
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
return {
caption: newArgs?.trim() ? newArgs.replaceAll("\n", "").replaceAll(" ", "") : random(names)
};
}
static textOptional = true;
static description = "Adds a Reddit watermark to an image";
static arguments = ["{text}"];
static noText = "You need to provide some text to add a Reddit watermark!";
static command = "reddit";
}
export default RedditCommand;
import ImageCommand from "../../classes/imageCommand.js";
import { random } from "../../utils/misc.js";
const names = ["esmBot", "me_irl", "dankmemes", "hmmm", "gaming", "wholesome", "chonkers", "memes", "funny", "lies"];
class RedditCommand extends ImageCommand {
params(url) {
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
return {
caption: newArgs?.trim() ? newArgs.replaceAll("\n", "").replaceAll(" ", "") : random(names)
};
}
static textOptional = true;
static description = "Adds a Reddit watermark to an image";
static arguments = ["{text}"];
static noText = "You need to provide some text to add a Reddit watermark!";
static command = "reddit";
}
export default RedditCommand;

View file

@ -1,12 +1,12 @@
import ImageCommand from "../../classes/imageCommand.js";
class ReverseCommand extends ImageCommand {
static description = "Reverses an image sequence";
static aliases = ["backwards"];
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to reverse!";
static command = "reverse";
}
export default ReverseCommand;
import ImageCommand from "../../classes/imageCommand.js";
class ReverseCommand extends ImageCommand {
static description = "Reverses an image sequence";
static aliases = ["backwards"];
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to reverse!";
static command = "reverse";
}
export default ReverseCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class ScottCommand extends ImageCommand {
static description = "Makes Scott the Woz show off an image";
static aliases = ["woz", "tv", "porn"];
static noImage = "You need to provide an image/GIF for Scott to show off!";
static command = "scott";
}
export default ScottCommand;
import ImageCommand from "../../classes/imageCommand.js";
class ScottCommand extends ImageCommand {
static description = "Makes Scott the Woz show off an image";
static aliases = ["woz", "tv", "porn"];
static noImage = "You need to provide an image/GIF for Scott to show off!";
static command = "scott";
}
export default ScottCommand;

View file

@ -1,14 +1,14 @@
import ImageCommand from "../../classes/imageCommand.js";
class SepiaCommand extends ImageCommand {
params = {
color: "sepia"
};
static description = "Adds a sepia filter";
static noImage = "You need to provide an image/GIF to add a sepia filter!";
static command = "colors";
}
export default SepiaCommand;
import ImageCommand from "../../classes/imageCommand.js";
class SepiaCommand extends ImageCommand {
params = {
color: "sepia"
};
static description = "Adds a sepia filter";
static noImage = "You need to provide an image/GIF to add a sepia filter!";
static command = "colors";
}
export default SepiaCommand;

View file

@ -1,15 +1,15 @@
import ImageCommand from "../../classes/imageCommand.js";
class SharpenCommand extends ImageCommand {
params = {
sharp: true
};
static description = "Sharpens an image";
static aliases = ["sharp"];
static noImage = "You need to provide an image/GIF to sharpen!";
static command = "blur";
}
export default SharpenCommand;
import ImageCommand from "../../classes/imageCommand.js";
class SharpenCommand extends ImageCommand {
params = {
sharp: true
};
static description = "Sharpens an image";
static aliases = ["sharp"];
static noImage = "You need to provide an image/GIF to sharpen!";
static command = "blur";
}
export default SharpenCommand;

View file

@ -1,17 +1,17 @@
import ImageCommand from "../../classes/imageCommand.js";
class ShutterstockCommand extends ImageCommand {
params = {
water: "assets/images/shutterstock.png",
gravity: 5,
resize: true
};
static description = "Adds the Shutterstock watermark to an image";
static aliases = ["stock", "stockphoto"];
static noImage = "You need to provide an image/GIF to add a Shutterstock watermark!";
static command = "watermark";
}
export default ShutterstockCommand;
import ImageCommand from "../../classes/imageCommand.js";
class ShutterstockCommand extends ImageCommand {
params = {
water: "assets/images/shutterstock.png",
gravity: 5,
resize: true
};
static description = "Adds the Shutterstock watermark to an image";
static aliases = ["stock", "stockphoto"];
static noImage = "You need to provide an image/GIF to add a Shutterstock watermark!";
static command = "watermark";
}
export default ShutterstockCommand;

View file

@ -1,32 +1,32 @@
import ImageCommand from "../../classes/imageCommand.js";
class SlowCommand extends ImageCommand {
params() {
const speed = parseInt(this.options.multiplier ?? this.args[0]);
return {
slow: true,
speed: isNaN(speed) ? 2 : speed
};
}
static init() {
super.init();
this.flags.push({
name: "multiplier",
type: 4,
description: "Set the speed multiplier (default: 2)",
min_value: 1
});
return this;
}
static description = "Makes an image sequence slower";
static aliases = ["slowdown", "slower", "gifspeed2"];
static arguments = ["{multiplier}"];
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to slow down!";
static command = "speed";
}
export default SlowCommand;
import ImageCommand from "../../classes/imageCommand.js";
class SlowCommand extends ImageCommand {
params() {
const speed = parseInt(this.options.multiplier ?? this.args[0]);
return {
slow: true,
speed: isNaN(speed) ? 2 : speed
};
}
static init() {
super.init();
this.flags.push({
name: "multiplier",
type: 4,
description: "Set the speed multiplier (default: 2)",
min_value: 1
});
return this;
}
static description = "Makes an image sequence slower";
static aliases = ["slowdown", "slower", "gifspeed2"];
static arguments = ["{multiplier}"];
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to slow down!";
static command = "speed";
}
export default SlowCommand;

View file

@ -1,36 +1,36 @@
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
class SnapchatCommand extends ImageCommand {
params(url) {
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
const position = parseFloat(this.options.position);
return {
caption: cleanMessage(this.message ?? this.interaction, newArgs),
pos: isNaN(position) ? 0.5 : position
};
}
static init() {
super.init();
this.flags.push({
name: "position",
type: 10,
description: "Set the position of the caption as a decimal (0.0 is top, 1.0 is bottom, default is 0.5)",
min_value: 0,
max_value: 1
});
return this;
}
static description = "Adds a Snapchat style caption to an image";
static aliases = ["snap", "caption3"];
static arguments = ["[text]"];
static requiresText = true;
static noText = "You need to provide some text to add a caption!";
static noImage = "You need to provide an image/GIF to add a caption!";
static command = "snapchat";
}
export default SnapchatCommand;
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
class SnapchatCommand extends ImageCommand {
params(url) {
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
const position = parseFloat(this.options.position);
return {
caption: cleanMessage(this.message ?? this.interaction, newArgs),
pos: isNaN(position) ? 0.5 : position
};
}
static init() {
super.init();
this.flags.push({
name: "position",
type: 10,
description: "Set the position of the caption as a decimal (0.0 is top, 1.0 is bottom, default is 0.5)",
min_value: 0,
max_value: 1
});
return this;
}
static description = "Adds a Snapchat style caption to an image";
static aliases = ["snap", "caption3"];
static arguments = ["[text]"];
static requiresText = true;
static noText = "You need to provide some text to add a caption!";
static noImage = "You need to provide an image/GIF to add a caption!";
static command = "snapchat";
}
export default SnapchatCommand;

View file

@ -1,16 +1,16 @@
import ImageCommand from "../../classes/imageCommand.js";
class SooSCommand extends ImageCommand {
params = {
soos: true
};
static description = "\"Loops\" an image sequence by reversing it when it's finished";
static aliases = ["boomerang"];
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to loop!";
static command = "reverse";
}
export default SooSCommand;
import ImageCommand from "../../classes/imageCommand.js";
class SooSCommand extends ImageCommand {
params = {
soos: true
};
static description = "\"Loops\" an image sequence by reversing it when it's finished";
static aliases = ["boomerang"];
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to loop!";
static command = "reverse";
}
export default SooSCommand;

View file

@ -1,36 +1,36 @@
import ImageCommand from "../../classes/imageCommand.js";
class SpeechBubbleCommand extends ImageCommand {
params() {
return {
water: this.options.alpha ? "assets/images/speech.png" : "assets/images/speechbubble.png",
gravity: "north",
resize: true,
yscale: 0.2,
alpha: this.options.alpha ? true : false,
flip: this.options.flip ? true : false
};
}
static init() {
super.init();
this.flags.push({
name: "alpha",
description: "Make the top of the speech bubble transparent",
type: 5
}, {
name: "flip",
description: "Flips the speech bubble",
type: 5
});
return this;
}
static description = "Adds a speech bubble to an image";
static aliases = ["speech"];
static noImage = "You need to provide an image/GIF to add a speech bubble!";
static command = "watermark";
}
export default SpeechBubbleCommand;
import ImageCommand from "../../classes/imageCommand.js";
class SpeechBubbleCommand extends ImageCommand {
params() {
return {
water: this.options.alpha ? "assets/images/speech.png" : "assets/images/speechbubble.png",
gravity: "north",
resize: true,
yscale: 0.2,
alpha: this.options.alpha ? true : false,
flip: this.options.flip ? true : false
};
}
static init() {
super.init();
this.flags.push({
name: "alpha",
description: "Make the top of the speech bubble transparent",
type: 5
}, {
name: "flip",
description: "Flips the speech bubble",
type: 5
});
return this;
}
static description = "Adds a speech bubble to an image";
static aliases = ["speech"];
static noImage = "You need to provide an image/GIF to add a speech bubble!";
static command = "watermark";
}
export default SpeechBubbleCommand;

View file

@ -1,31 +1,31 @@
import ImageCommand from "../../classes/imageCommand.js";
class SpeedCommand extends ImageCommand {
params() {
const speed = parseInt(this.options.multiplier ?? this.args[0]);
return {
speed: isNaN(speed) || speed < 1 ? 2 : speed
};
}
static init() {
super.init();
this.flags.push({
name: "multiplier",
type: 4,
description: "Set the speed multiplier (default: 2)",
min_value: 1
});
return this;
}
static description = "Makes an image sequence faster";
static aliases = ["speedup", "fast", "gifspeed", "faster"];
static arguments = ["{multiplier}"];
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to speed up!";
static command = "speed";
}
export default SpeedCommand;
import ImageCommand from "../../classes/imageCommand.js";
class SpeedCommand extends ImageCommand {
params() {
const speed = parseInt(this.options.multiplier ?? this.args[0]);
return {
speed: isNaN(speed) || speed < 1 ? 2 : speed
};
}
static init() {
super.init();
this.flags.push({
name: "multiplier",
type: 4,
description: "Set the speed multiplier (default: 2)",
min_value: 1
});
return this;
}
static description = "Makes an image sequence faster";
static aliases = ["speedup", "fast", "gifspeed", "faster"];
static arguments = ["{multiplier}"];
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to speed up!";
static command = "speed";
}
export default SpeedCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class SpinCommand extends ImageCommand {
static description = "Spins an image";
static aliases = ["rotate"];
static noImage = "You need to provide an image/GIF to spin!";
static command = "spin";
}
export default SpinCommand;
import ImageCommand from "../../classes/imageCommand.js";
class SpinCommand extends ImageCommand {
static description = "Spins an image";
static aliases = ["rotate"];
static noImage = "You need to provide an image/GIF to spin!";
static command = "spin";
}
export default SpinCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class SquishCommand extends ImageCommand {
static description = "Squishes/stretches an image";
static aliases = ["squishy", "squash"];
static noImage = "You need to provide an image/GIF to squish!";
static command = "squish";
}
export default SquishCommand;
import ImageCommand from "../../classes/imageCommand.js";
class SquishCommand extends ImageCommand {
static description = "Squishes/stretches an image";
static aliases = ["squishy", "squash"];
static noImage = "You need to provide an image/GIF to squish!";
static command = "squish";
}
export default SquishCommand;

View file

@ -1,15 +1,15 @@
import ImageCommand from "../../classes/imageCommand.js";
class StretchCommand extends ImageCommand {
params = {
stretch: true
};
static description = "Stretches an image to a 1:1 aspect ratio";
static aliases = ["aspect", "ratio", "aspect11", "11"];
static noImage = "You need to provide an image/GIF to stretch!";
static command = "resize";
}
export default StretchCommand;
import ImageCommand from "../../classes/imageCommand.js";
class StretchCommand extends ImageCommand {
params = {
stretch: true
};
static description = "Stretches an image to a 1:1 aspect ratio";
static aliases = ["aspect", "ratio", "aspect11", "11"];
static noImage = "You need to provide an image/GIF to stretch!";
static command = "resize";
}
export default StretchCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class SwirlCommand extends ImageCommand {
static description = "Swirls an image";
static aliases = ["whirlpool", "distort"];
static noImage = "You need to provide an image/GIF to swirl!";
static command = "swirl";
}
export default SwirlCommand;
import ImageCommand from "../../classes/imageCommand.js";
class SwirlCommand extends ImageCommand {
static description = "Swirls an image";
static aliases = ["whirlpool", "distort"];
static noImage = "You need to provide an image/GIF to swirl!";
static command = "swirl";
}
export default SwirlCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class TileCommand extends ImageCommand {
static description = "Creates a tile pattern from an image";
static aliases = ["wall2"];
static noImage = "You need to provide an image/GIF to tile!";
static command = "tile";
}
export default TileCommand;
import ImageCommand from "../../classes/imageCommand.js";
class TileCommand extends ImageCommand {
static description = "Creates a tile pattern from an image";
static aliases = ["wall2"];
static noImage = "You need to provide an image/GIF to tile!";
static command = "tile";
}
export default TileCommand;

View file

@ -1,65 +1,65 @@
import ImageCommand from "../../classes/imageCommand.js";
import { random, cleanMessage } from "../../utils/misc.js";
import { readdirSync } from "fs";
import { resolve, dirname } from "path";
import { fileURLToPath } from "url";
const prompts = ["you found:", "your dad is:", "you ate:", "your mom is:", "your sister is:", "you saw:", "you get lost in:", "you find:", "you grab:", "you pull out of your pocket:", "you fight:", "it's in your room:"];
const names = readdirSync(resolve(dirname(fileURLToPath(import.meta.url)), "../../assets/images/uncanny/")).filter((val) => {
if (!val.startsWith(".") && val.endsWith(".png")) return true;
}).map((val) => {
return val.split(".")[0];
});
class UncannyCommand extends ImageCommand {
params(url, name = "unknown") {
const newArgs = this.options.text ?? this.args.join(" ");
// eslint-disable-next-line prefer-const
let [text1, text2] = newArgs.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
if (!text2?.trim()) text2 = name;
return {
caption: text1?.trim() ? cleanMessage(this.message ?? this.interaction, text1) : random(prompts),
caption2: cleanMessage(this.message ?? this.interaction, text2),
path: `assets/images/uncanny/${typeof this.options.phase === "string" && names.includes(this.options.phase.toLowerCase()) ? this.options.phase.toLowerCase() : random(names.filter((val) => val !== "goated"))}.png`,
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "helvetica"
};
}
static init() {
super.init();
this.flags.push({
name: "font",
type: 3,
choices: (() => {
const array = [];
for (const font of this.allowedFonts) {
array.push({ name: font, value: font });
}
return array;
})(),
description: "Specify the font you want to use (default: helvetica)"
}, {
name: "phase",
type: 3,
choices: (() => {
const array = [];
for (const name of names) {
array.push({ name, value: name });
}
return array;
})(),
description: "Specify the uncanny image you want to use"
});
return this;
}
static textOptional = true;
static description = "Makes a Mr. Incredible Becomes Uncanny image (separate left/right text with a comma)";
static aliases = ["canny", "incredible", "pain"];
static arguments = ["{left text}", "{right text}"];
static noImage = "You need to provide an image/GIF to create an uncanny image!";
static command = "uncanny";
}
export default UncannyCommand;
import ImageCommand from "../../classes/imageCommand.js";
import { random, cleanMessage } from "../../utils/misc.js";
import { readdirSync } from "fs";
import { resolve, dirname } from "path";
import { fileURLToPath } from "url";
const prompts = ["you found:", "your dad is:", "you ate:", "your mom is:", "your sister is:", "you saw:", "you get lost in:", "you find:", "you grab:", "you pull out of your pocket:", "you fight:", "it's in your room:"];
const names = readdirSync(resolve(dirname(fileURLToPath(import.meta.url)), "../../assets/images/uncanny/")).filter((val) => {
if (!val.startsWith(".") && val.endsWith(".png")) return true;
}).map((val) => {
return val.split(".")[0];
});
class UncannyCommand extends ImageCommand {
params(url, name = "unknown") {
const newArgs = this.options.text ?? this.args.join(" ");
// eslint-disable-next-line prefer-const
let [text1, text2] = newArgs.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
if (!text2?.trim()) text2 = name;
return {
caption: text1?.trim() ? cleanMessage(this.message ?? this.interaction, text1) : random(prompts),
caption2: cleanMessage(this.message ?? this.interaction, text2),
path: `assets/images/uncanny/${typeof this.options.phase === "string" && names.includes(this.options.phase.toLowerCase()) ? this.options.phase.toLowerCase() : random(names.filter((val) => val !== "goated"))}.png`,
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "helvetica"
};
}
static init() {
super.init();
this.flags.push({
name: "font",
type: 3,
choices: (() => {
const array = [];
for (const font of this.allowedFonts) {
array.push({ name: font, value: font });
}
return array;
})(),
description: "Specify the font you want to use (default: helvetica)"
}, {
name: "phase",
type: 3,
choices: (() => {
const array = [];
for (const name of names) {
array.push({ name, value: name });
}
return array;
})(),
description: "Specify the uncanny image you want to use"
});
return this;
}
static textOptional = true;
static description = "Makes a Mr. Incredible Becomes Uncanny image (separate left/right text with a comma)";
static aliases = ["canny", "incredible", "pain"];
static arguments = ["{left text}", "{right text}"];
static noImage = "You need to provide an image/GIF to create an uncanny image!";
static command = "uncanny";
}
export default UncannyCommand;

View file

@ -1,29 +1,29 @@
import ImageCommand from "../../classes/imageCommand.js";
class UncaptionCommand extends ImageCommand {
params() {
const tolerance = parseFloat(this.options.tolerance);
return {
tolerance: isNaN(tolerance) ? 0.95 : tolerance
};
}
static init() {
super.init();
this.flags.push({
name: "tolerance",
type: 10,
description: "Set the shade tolerance for the caption detection (0.0 is highest, 1.0 is lowest, default is 0.95)",
min_value: 0,
max_value: 1
});
return this;
}
static description = "Removes the caption from an image";
static noImage = "You need to provide an image/GIF to uncaption!";
static command = "uncaption";
}
export default UncaptionCommand;
import ImageCommand from "../../classes/imageCommand.js";
class UncaptionCommand extends ImageCommand {
params() {
const tolerance = parseFloat(this.options.tolerance);
return {
tolerance: isNaN(tolerance) ? 0.95 : tolerance
};
}
static init() {
super.init();
this.flags.push({
name: "tolerance",
type: 10,
description: "Set the shade tolerance for the caption detection (0.0 is highest, 1.0 is lowest, default is 0.95)",
min_value: 0,
max_value: 1
});
return this;
}
static description = "Removes the caption from an image";
static noImage = "You need to provide an image/GIF to uncaption!";
static command = "uncaption";
}
export default UncaptionCommand;

View file

@ -1,15 +1,15 @@
import ImageCommand from "../../classes/imageCommand.js";
class UnfreezeCommand extends ImageCommand {
params = {
loop: true
};
static description = "Unfreezes an image sequence";
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to unfreeze!";
static command = "freeze";
}
export default UnfreezeCommand;
import ImageCommand from "../../classes/imageCommand.js";
class UnfreezeCommand extends ImageCommand {
params = {
loop: true
};
static description = "Unfreezes an image sequence";
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to unfreeze!";
static command = "freeze";
}
export default UnfreezeCommand;

View file

@ -1,11 +1,11 @@
import ImageCommand from "../../classes/imageCommand.js";
class WaaWCommand extends ImageCommand {
static description = "Mirrors the right side of an image onto the left";
static aliases = ["magik3", "mirror"];
static noImage = "You need to provide an image/GIF to mirror!";
static command = "mirror";
}
export default WaaWCommand;
import ImageCommand from "../../classes/imageCommand.js";
class WaaWCommand extends ImageCommand {
static description = "Mirrors the right side of an image onto the left";
static aliases = ["magik3", "mirror"];
static noImage = "You need to provide an image/GIF to mirror!";
static command = "mirror";
}
export default WaaWCommand;

View file

@ -1,10 +1,10 @@
import ImageCommand from "../../classes/imageCommand.js";
class WallCommand extends ImageCommand {
static description = "Creates a wall from an image";
static noImage = "You need to provide an image/GIF to make a wall!";
static command = "wall";
}
export default WallCommand;
import ImageCommand from "../../classes/imageCommand.js";
class WallCommand extends ImageCommand {
static description = "Creates a wall from an image";
static noImage = "You need to provide an image/GIF to make a wall!";
static command = "wall";
}
export default WallCommand;

View file

@ -1,22 +1,22 @@
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
class WhisperCommand extends ImageCommand {
params(url) {
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
return {
caption: cleanMessage(this.message ?? this.interaction, newArgs)
};
}
static description = "Adds a Whisper style caption to an image";
static aliases = ["caption4"];
static arguments = ["[text]"];
static requiresText = true;
static noText = "You need to provide some text to add a caption!";
static noImage = "You need to provide an image/GIF to add a caption!";
static command = "whisper";
}
export default WhisperCommand;
import ImageCommand from "../../classes/imageCommand.js";
import { cleanMessage } from "../../utils/misc.js";
class WhisperCommand extends ImageCommand {
params(url) {
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
return {
caption: cleanMessage(this.message ?? this.interaction, newArgs)
};
}
static description = "Adds a Whisper style caption to an image";
static aliases = ["caption4"];
static arguments = ["[text]"];
static requiresText = true;
static noText = "You need to provide some text to add a caption!";
static noImage = "You need to provide an image/GIF to add a caption!";
static command = "whisper";
}
export default WhisperCommand;

View file

@ -1,15 +1,15 @@
import ImageCommand from "../../classes/imageCommand.js";
class WideCommand extends ImageCommand {
params = {
wide: true
};
static description = "Stretches an image to 19x its width";
static aliases = ["w19", "wide19"];
static noImage = "You need to provide an image/GIF to stretch!";
static command = "resize";
}
export default WideCommand;
import ImageCommand from "../../classes/imageCommand.js";
class WideCommand extends ImageCommand {
params = {
wide: true
};
static description = "Stretches an image to 19x its width";
static aliases = ["w19", "wide19"];
static noImage = "You need to provide an image/GIF to stretch!";
static command = "resize";
}
export default WideCommand;

View file

@ -1,16 +1,16 @@
import ImageCommand from "../../classes/imageCommand.js";
class WooWCommand extends ImageCommand {
params = {
vertical: true,
first: true
};
static description = "Mirrors the top of an image onto the bottom";
static aliases = ["magik5", "mirror3"];
static noImage = "You need to provide an image/GIF to mirror!";
static command = "mirror";
}
export default WooWCommand;
import ImageCommand from "../../classes/imageCommand.js";
class WooWCommand extends ImageCommand {
params = {
vertical: true,
first: true
};
static description = "Mirrors the top of an image onto the bottom";
static aliases = ["magik5", "mirror3"];
static noImage = "You need to provide an image/GIF to mirror!";
static command = "mirror";
}
export default WooWCommand;

View file

@ -1,10 +1,10 @@
import ImageCommand from "../../classes/imageCommand.js";
class ZamnCommand extends ImageCommand {
static description = "Adds a \"ZAMN\" reaction to an image";
static noImage = "You need to provide an image/GIF to \"ZAMN\" at!";
static command = "zamn";
}
export default ZamnCommand;
import ImageCommand from "../../classes/imageCommand.js";
class ZamnCommand extends ImageCommand {
static description = "Adds a \"ZAMN\" reaction to an image";
static noImage = "You need to provide an image/GIF to \"ZAMN\" at!";
static command = "zamn";
}
export default ZamnCommand;