god i love annoying orange

This commit is contained in:
murm 2023-03-19 01:10:48 -04:00
parent 6896751e86
commit b424b2f813
88 changed files with 91 additions and 3 deletions

View file

@ -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",

View file

@ -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();

View file

@ -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();

View file

@ -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();

View file

@ -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) {

View file

@ -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();

View file

@ -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", " ")

View file

@ -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 {

View file

@ -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();

View file

@ -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!";

View file

@ -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;

View file

@ -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 = "";

View file

@ -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)) {

View file

@ -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)}`;

View file

@ -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!";

View file

@ -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)) {

View file

@ -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`

View file

@ -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>.` };

View file

@ -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(" ");

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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!";

View file

@ -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)) {

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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,

View file

@ -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,

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class BlurCommand extends ImageCommand {
static category = "image-editing"
params = {
sharp: false
};

View file

@ -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"];

View file

@ -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);

View file

@ -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 {

View file

@ -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"];

View file

@ -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!";

View file

@ -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"];

View file

@ -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,

View file

@ -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"];

View file

@ -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() {

View file

@ -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!";

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class FlopCommand extends ImageCommand {
static category = "image-editing"
params = {
flop: true
};

View file

@ -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 {

View file

@ -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,

View file

@ -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"];

View file

@ -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"];

View file

@ -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"];

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class GrayscaleCommand extends ImageCommand {
static category = "image-editing"
params = {
color: "grayscale"
};

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class HaaHCommand extends ImageCommand {
static category = "image-editing"
params = {
first: true
};

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class HooHCommand extends ImageCommand {
static category = "image-editing"
params = {
vertical: true
};

View file

@ -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,

View file

@ -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,

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class ImplodeCommand extends ImageCommand {
static category = "image-editing"
params = {
implode: true
};

View file

@ -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"];

View file

@ -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 {

View file

@ -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,

View file

@ -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"];

View file

@ -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 === "") {

View file

@ -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,

View file

@ -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 === "") {

View file

@ -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"];

View file

@ -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 {

View file

@ -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"];

View file

@ -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"];

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class SepiaCommand extends ImageCommand {
static category = "image-editing"
params = {
color: "sepia"
};

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class SharpenCommand extends ImageCommand {
static category = "image-editing"
params = {
sharp: true
};

View file

@ -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,

View file

@ -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 {

View file

@ -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);

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class SooSCommand extends ImageCommand {
static category = "image-editing"
params = {
soos: true
};

View file

@ -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",

View file

@ -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 {

View file

@ -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"];

View file

@ -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"];

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class StretchCommand extends ImageCommand {
static category = "image-editing"
params = {
stretch: true
};

View file

@ -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"];

View file

@ -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"];

View file

@ -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

View file

@ -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 {

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class UnfreezeCommand extends ImageCommand {
static category = "image-editing"
params = {
loop: true
};

View file

@ -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"];

View file

@ -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!";

View file

@ -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 {

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class WideCommand extends ImageCommand {
static category = "image-editing"
params = {
wide: true
};

View file

@ -1,6 +1,7 @@
import ImageCommand from "../../classes/imageCommand.js";
class WooWCommand extends ImageCommand {
static category = "image-editing"
params = {
vertical: true,
first: true

View file

@ -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!";

View file

@ -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;

View file

@ -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;