Compare commits
2 commits
0b4188f214
...
b424b2f813
Author | SHA1 | Date | |
---|---|---|---|
|
b424b2f813 | ||
|
6896751e86 |
89 changed files with 105 additions and 8 deletions
|
@ -2,6 +2,7 @@ import Command from "../../classes/command.js";
|
|||
import { random } from "../../utils/misc.js";
|
||||
|
||||
class EightBallCommand extends Command {
|
||||
static category = "general"
|
||||
static responses = [
|
||||
"It is certain",
|
||||
"It is decidedly so",
|
||||
|
|
|
@ -2,6 +2,7 @@ import { request } from "undici";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class AncientCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
// await this.acknowledge();
|
||||
const controller = new AbortController();
|
||||
|
|
|
@ -2,6 +2,7 @@ import { request } from "undici";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class BirdCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
// await this.acknowledge();
|
||||
const controller = new AbortController();
|
||||
|
|
|
@ -2,6 +2,7 @@ import { request } from "undici";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class CatCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
// await this.acknowledge();
|
||||
const controller = new AbortController();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class DiceCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
const max = this.options.max ?? parseInt(this.args[0]);
|
||||
if (!max) {
|
||||
|
|
|
@ -2,6 +2,7 @@ import { request } from "undici";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class DogCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
// await this.acknowledge();
|
||||
const controller = new AbortController();
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class HomebrewCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params() {
|
||||
return {
|
||||
caption: (this.options.text ?? this.args.join(" ")).toLowerCase().replaceAll("\n", " ")
|
||||
|
|
|
@ -3,6 +3,7 @@ import ImageCommand from "../../classes/imageCommand.js";
|
|||
import { cleanMessage } from "../../utils/misc.js";
|
||||
|
||||
class SonicCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params() {
|
||||
const cleanedMessage = cleanMessage(this.message ?? this.interaction, this.options.text ?? this.args.join(" "));
|
||||
return {
|
||||
|
|
|
@ -2,6 +2,7 @@ import { request } from "undici";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class WikihowCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
// await this.acknowledge();
|
||||
const controller = new AbortController();
|
||||
|
|
|
@ -2,6 +2,7 @@ import Command from "../../classes/command.js";
|
|||
import { clean } from "../../utils/misc.js";
|
||||
|
||||
class Base64Command extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
this.success = false;
|
||||
if (this.type === "classic" && this.args.length === 0) return "You need to provide whether you want to encode or decode the text!";
|
||||
|
|
|
@ -3,6 +3,7 @@ import database from "../../utils/database.js";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class CountCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
if (this.guild && !this.channel.permissionsOf(this.client.user.id.toString()).has("EMBED_LINKS")) {
|
||||
this.success = false;
|
||||
|
|
|
@ -2,6 +2,7 @@ import { request } from "undici";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class DonateCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
// await this.acknowledge();
|
||||
let prefix = "";
|
||||
|
|
|
@ -2,6 +2,7 @@ import { clean } from "../../utils/misc.js";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class EvalCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
const owners = process.env.OWNER.split(",");
|
||||
if (!owners.includes(this.author)) {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { clean } from "../../utils/misc.js";
|
||||
import { clean, htmlescape } from "../../utils/misc.js";
|
||||
import * as util from "util";
|
||||
import { exec as baseExec } from "child_process";
|
||||
const exec = util.promisify(baseExec);
|
||||
import Command from "../../classes/command.js";
|
||||
|
||||
class ExecCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
const owners = process.env.OWNER.split(",");
|
||||
if (!owners.includes(this.author)) {
|
||||
|
@ -15,7 +16,7 @@ class ExecCommand extends Command {
|
|||
const code = this.options.cmd ?? this.args.join(" ");
|
||||
try {
|
||||
const execed = await exec(code);
|
||||
if (execed.stderr) return { html: `<pre><code>${await clean(execed.stderr)}</code></pre>` };
|
||||
if (execed.stderr) return { html: `<pre><code>${htmlescape(await clean(execed.stderr))}</code></pre>` };
|
||||
const cleaned = await clean(execed.stdout);
|
||||
const sendString = `${cleaned}`;
|
||||
if (sendString.length >= 4000) {
|
||||
|
@ -25,7 +26,7 @@ class ExecCommand extends Command {
|
|||
name: "result.txt"
|
||||
};
|
||||
} else {
|
||||
return { html: "<pre><code>"+sendString+"</code></pre>" };
|
||||
return { html: "<pre><code>"+htmlescape(sendString)+"</code></pre>" };
|
||||
}
|
||||
} catch (err) {
|
||||
return `\`ERROR\` ${await clean(err)}`;
|
||||
|
|
|
@ -20,19 +20,28 @@ class HelpCommand extends Command {
|
|||
return { html: html }
|
||||
}
|
||||
if (help.categories[this.args[0].toLowerCase()]) {
|
||||
}
|
||||
}
|
||||
html = `<h2>mrmBot Help</h2><table><tr><th>Command</th><th>Description</th></tr>`
|
||||
html = `<h2>mrmBot Help - ${htmlescape(this.args[0])}</h2><table><tr><th>Command</th><th>Description</th></tr>`
|
||||
for (const [command] of collections.commands) {
|
||||
if (collections.info.get(command).category != this.args[0].toLowerCase()) continue;
|
||||
const description = collections.info.get(command).description;
|
||||
html = html + `<tr><td>${command}</td><td>${description}</td></tr>`
|
||||
}
|
||||
html = html + "</table>"
|
||||
return { html: html }
|
||||
}
|
||||
}
|
||||
const prefix = htmlescape(process.env.PREFIX);
|
||||
html = `<h2>mrmBot Help - Categories</h2><table><tr><th>Category</th><th>Command</th></tr>`
|
||||
for (const category of Object.keys(help.categories)) {
|
||||
html = html + `<tr><td>${category}</td><td>${prefix}help ${category}</td></tr>`
|
||||
}
|
||||
html = html + "</table>"
|
||||
|
||||
return { html: html }
|
||||
// return { html: "<h1>There are no mrmBot Docs Yet</h1>In the meantime, please refer to https://esmbot.net/help.html" };
|
||||
}
|
||||
|
||||
|
||||
static category = "general"
|
||||
static description = "Gets a list of commands";
|
||||
static aliases = ["commands"];
|
||||
static arguments = ["{command}"];
|
||||
|
|
|
@ -6,6 +6,7 @@ import { request } from "undici";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class ImageSearchCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
this.success = false;
|
||||
// if (this.channel && !this.channel.permissionsOf(this.client.user.id.toString()).has("EMBED_LINKS")) return "I don't have the `Embed Links` permission!";
|
||||
|
|
|
@ -2,6 +2,7 @@ import Command from "../../classes/command.js";
|
|||
import { reloadImageConnections } from "../../utils/image.js";
|
||||
|
||||
class ImageReloadCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
const owners = process.env.OWNER.split(",");
|
||||
if (!owners.includes(this.author)) {
|
||||
|
|
|
@ -2,6 +2,7 @@ import Command from "../../classes/command.js";
|
|||
import { connections } from "../../utils/image.js";
|
||||
|
||||
class ImageStatsCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
// await this.acknowledge();
|
||||
let desc = `The bot is currently connected to ${connections.size} image server(s).\n`
|
||||
|
|
|
@ -4,6 +4,7 @@ import Command from "../../classes/command.js";
|
|||
import { getServers } from "../../utils/misc.js";
|
||||
|
||||
class InfoCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
// await this.acknowledge();
|
||||
return { html: `<h1>mrmBot Info/Credits</h1>This instance is managed by <b>${process.env.OWNER.split(",")[0]}</b>.<br>v${version}-mrm (${process.env.GIT_REV})<br>Bot by <a href="https://essem.space"><font color="#FF0000"><i>Essem</i></font></a> and <a href="https://github.com/esmBot/esmBot/graphs/contributors"><i>other contributors</i></a>.<br>Fork by <a href="https://murm.gay"><font color="#18FF00"><b>Murm</b></font></a>.` };
|
||||
|
|
|
@ -3,6 +3,7 @@ import { request } from "undici";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class LengthenCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
// await this.acknowledge();
|
||||
const input = this.options.url ?? this.args.join(" ");
|
||||
|
|
|
@ -2,6 +2,7 @@ import database from "../../utils/database.js";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class PrefixCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
if (!this.guild) return `The current prefix is \`${process.env.PREFIX}\`.`;
|
||||
const guild = await database.getGuild(this.guild.id);
|
||||
|
|
|
@ -3,6 +3,7 @@ import { PassThrough } from "stream";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class QrCreateCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
if (this.args.length === 0) {
|
||||
this.success = false;
|
||||
|
|
|
@ -6,6 +6,7 @@ import Command from "../../classes/command.js";
|
|||
import imageDetect from "../../utils/imagedetect.js";
|
||||
|
||||
class QrReadCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
const image = await imageDetect(this.client, this.message, this.interaction, this.options);
|
||||
this.success = false;
|
||||
|
|
|
@ -2,6 +2,7 @@ import Command from "../../classes/command.js";
|
|||
import imageDetect from "../../utils/imagedetect.js";
|
||||
|
||||
class RawCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
// await this.acknowledge();
|
||||
const image = await imageDetect(this.client, this.message, this.interaction, this.options);
|
||||
|
|
|
@ -3,6 +3,7 @@ import { load } from "../../utils/handler.js";
|
|||
import { paths } from "../../utils/collections.js";
|
||||
|
||||
class ReloadCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
const owners = process.env.OWNER.split(",");
|
||||
if (!owners.includes(this.author)) return "Only the bot owner can reload commands!";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class RestartCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
const owners = process.env.OWNER.split(",");
|
||||
if (!owners.includes(this.author)) {
|
||||
|
|
|
@ -7,6 +7,7 @@ import pm2 from "pm2";
|
|||
import { getServers } from "../../utils/misc.js";
|
||||
|
||||
class StatsCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
const uptime = process.uptime() * 1000;
|
||||
const connUptime = this.client.uptime;
|
||||
|
|
|
@ -6,6 +6,7 @@ import { random } from "../../utils/misc.js";
|
|||
import Command from "../../classes/command.js";
|
||||
|
||||
class YouTubeCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
const query = this.options.query ?? this.args.join(" ");
|
||||
this.success = false;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class NineGagCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
water: "assets/images/9gag.png",
|
||||
gravity: 6
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class AVSCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
water: "assets/images/avs4you.png",
|
||||
gravity: 5,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class BandicamCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
water: "assets/images/bandicam.png",
|
||||
gravity: 2,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class BlurCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
sharp: false
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class BounceCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Makes an image bounce up and down";
|
||||
static aliases = ["bouncy"];
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import ImageCommand from "../../classes/imageCommand.js";
|
|||
import { cleanMessage } from "../../utils/misc.js";
|
||||
|
||||
class CaptionCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params(url) {
|
||||
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
|
||||
let newCaption = cleanMessage(this.message ?? this.interaction, newArgs);
|
||||
|
|
|
@ -3,6 +3,7 @@ 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 {
|
||||
static category = "image-editing"
|
||||
params(url) {
|
||||
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class CircleCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Applies a radial blur effect on an image";
|
||||
static aliases = ["cblur", "radial", "radialblur"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class CropCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Crops an image to 1:1";
|
||||
|
||||
static noImage = "You need to provide an image/GIF to crop!";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class DeepfryCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Deep-fries an image";
|
||||
static aliases = ["fry", "jpeg2", "nuke", "df"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class DeviantArtCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
water: "assets/images/deviantart.png",
|
||||
gravity: 5,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class ExplodeCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Explodes an image";
|
||||
static aliases = ["exp"];
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import emoji from "node-emoji";
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class FlagCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
flagPath = "";
|
||||
|
||||
async criteria() {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class FlipCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Flips an image";
|
||||
|
||||
static noImage = "You need to provide an image/GIF to flip!";
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class FlopCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
flop: true
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class FreezeCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params() {
|
||||
const frameCount = parseInt(this.options.endframe ?? this.args[0]);
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class FunkyCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
water: "assets/images/funky.png",
|
||||
gravity: 3,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class GameXplainCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Makes a GameXplain thumbnail from an image";
|
||||
static aliases = ["gx"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class GIFCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Converts an image into a GIF";
|
||||
static aliases = ["gif", "getgif", "togif", "tgif", "gifify"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class GlobeCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Spins an image";
|
||||
static aliases = ["sphere"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class GrayscaleCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
color: "grayscale"
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class HaaHCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
first: true
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class HooHCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
vertical: true
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class HypercamCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
water: "assets/images/hypercam.png",
|
||||
gravity: 1,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class iFunnyCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
water: "assets/images/ifunny.png",
|
||||
gravity: 8,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class ImplodeCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
implode: true
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class InvertCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Inverts an image";
|
||||
static aliases = ["inverse", "negate", "negative"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class JPEGCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params() {
|
||||
const quality = parseInt(this.options.quality ?? this.args[0]);
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class KineMasterCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
water: "assets/images/kinemaster.png",
|
||||
gravity: 3,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class MagikCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Adds a content aware scale effect to an image";
|
||||
static aliases = ["imagemagic", "imagemagick", "imagemagik", "magic", "magick", "cas", "liquid"];
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import ImageCommand from "../../classes/imageCommand.js";
|
|||
import { cleanMessage } from "../../utils/misc.js";
|
||||
|
||||
class MemeCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
async criteria(text, url) {
|
||||
const [topText, bottomText] = text.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
|
||||
if (topText === "" && bottomText === "") {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class MemeCenterCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
water: "assets/images/memecenter.png",
|
||||
gravity: 9,
|
||||
|
|
|
@ -2,6 +2,7 @@ import ImageCommand from "../../classes/imageCommand.js";
|
|||
import { cleanMessage } from "../../utils/misc.js";
|
||||
|
||||
class MotivateCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
async criteria(text, url) {
|
||||
const [topText, bottomText] = text.replaceAll(url, "").split(/(?<!\\),/).map(elem => elem.trim());
|
||||
if (topText === "" && bottomText === "") {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class PixelateCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Pixelates an image";
|
||||
static aliases = ["pixel", "small"];
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import { random } from "../../utils/misc.js";
|
|||
const names = ["esmBot", "me_irl", "dankmemes", "hmmm", "gaming", "wholesome", "chonkers", "memes", "funny", "lies"];
|
||||
|
||||
class RedditCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params(url) {
|
||||
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class ReverseCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Reverses an image sequence";
|
||||
static aliases = ["backwards"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class ScottCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Makes Scott the Woz show off an image";
|
||||
static aliases = ["woz", "tv", "porn"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class SepiaCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
color: "sepia"
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class SharpenCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
sharp: true
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class ShutterstockCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
water: "assets/images/shutterstock.png",
|
||||
gravity: 5,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class SlowCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params() {
|
||||
const speed = parseInt(this.options.multiplier ?? this.args[0]);
|
||||
return {
|
||||
|
|
|
@ -2,6 +2,7 @@ import ImageCommand from "../../classes/imageCommand.js";
|
|||
import { cleanMessage } from "../../utils/misc.js";
|
||||
|
||||
class SnapchatCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params(url) {
|
||||
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
|
||||
const position = parseFloat(this.options.position);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class SooSCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
soos: true
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class SpeechBubbleCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params() {
|
||||
return {
|
||||
water: this.options.alpha ? "assets/images/speech.png" : "assets/images/speechbubble.png",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class SpeedCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params() {
|
||||
const speed = parseInt(this.options.multiplier ?? this.args[0]);
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class SpinCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Spins an image";
|
||||
static aliases = ["rotate"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class SquishCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Squishes/stretches an image";
|
||||
static aliases = ["squishy", "squash"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class StretchCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
stretch: true
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class SwirlCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Swirls an image";
|
||||
static aliases = ["whirlpool", "distort"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class TileCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Creates a tile pattern from an image";
|
||||
static aliases = ["wall2"];
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ const names = readdirSync(resolve(dirname(fileURLToPath(import.meta.url)), "../.
|
|||
});
|
||||
|
||||
class UncannyCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params(url, name = "unknown") {
|
||||
const newArgs = this.options.text ?? this.args.join(" ");
|
||||
// eslint-disable-next-line prefer-const
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class UncaptionCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params() {
|
||||
const tolerance = parseFloat(this.options.tolerance);
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class UnfreezeCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
loop: true
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class WaaWCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Mirrors the right side of an image onto the left";
|
||||
static aliases = ["magik3", "mirror"];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class WallCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Creates a wall from an image";
|
||||
|
||||
static noImage = "You need to provide an image/GIF to make a wall!";
|
||||
|
|
|
@ -2,6 +2,7 @@ import ImageCommand from "../../classes/imageCommand.js";
|
|||
import { cleanMessage } from "../../utils/misc.js";
|
||||
|
||||
class WhisperCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params(url) {
|
||||
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class WideCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
wide: true
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class WooWCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
params = {
|
||||
vertical: true,
|
||||
first: true
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class ZamnCommand extends ImageCommand {
|
||||
static category = "image-editing"
|
||||
static description = "Adds a \"ZAMN\" reaction to an image";
|
||||
|
||||
static noImage = "You need to provide an image/GIF to \"ZAMN\" at!";
|
||||
|
|
|
@ -3,6 +3,7 @@ import imageDetect from "../../utils/imagedetect.js";
|
|||
import { selectedImages } from "../../utils/collections.js";
|
||||
|
||||
class SelectImageCommand extends Command {
|
||||
static category = "general"
|
||||
async run() {
|
||||
// await this.acknowledge();
|
||||
const message = this.interaction.data.target;
|
||||
|
|
|
@ -5,6 +5,7 @@ import Command from "../../classes/command.js";
|
|||
const blacklist = ["create", "add", "edit", "remove", "delete", "list", "random", "own", "owner"];
|
||||
|
||||
class TagsCommand extends Command {
|
||||
static category = "tags";
|
||||
// todo: attempt to not make this file the worst thing that human eyes have ever seen
|
||||
async run() {
|
||||
this.success = false;
|
||||
|
|
Loading…
Reference in a new issue