Begin the purge

This commit is contained in:
Essem 2022-06-07 22:14:16 -05:00
parent 1a86730489
commit 4ac90bc761
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
17 changed files with 0 additions and 337 deletions

View file

@ -1,23 +0,0 @@
import { say } from "cowsay2";
import cows from "cowsay2/cows/index.js";
import Command from "../../classes/command.js";
class CowsayCommand extends Command {
async run() {
if (this.args.length === 0) {
return "You need to provide some text for the cow to say!";
} else if (cows[this.args[0].toLowerCase()] != undefined) {
const cow = cows[this.args.shift().toLowerCase()];
return `\`\`\`\n${say(this.args.join(" "), { cow })}\n\`\`\``;
} else {
return `\`\`\`\n${say(this.args.join(" "))}\n\`\`\``;
}
}
static description = "Makes an ASCII cow say a message";
static aliases = ["cow"];
static arguments = ["{cow}", "[text]"];
static slashAllowed = false;
}
export default CowsayCommand;

View file

@ -1,15 +0,0 @@
import Command from "../../classes/command.js";
class FullwidthCommand extends Command {
async run() {
if (this.args.length === 0) return "You need to provide some text to convert to fullwidth!";
return this.args.join("").replaceAll(/[A-Za-z0-9]/g, (s) => { return String.fromCharCode(s.charCodeAt(0) + 0xFEE0); });
}
static description = "Converts a message to fullwidth/aesthetic text";
static aliases = ["aesthetic", "aesthetics", "aes"];
static arguments = ["[text]"];
static slashAllowed = false;
}
export default FullwidthCommand;

View file

@ -1,33 +0,0 @@
import wrap from "../../utils/wrap.js";
import ImageCommand from "../../classes/imageCommand.js";
class RetroCommand extends ImageCommand {
params() {
let [line1, line2, line3] = this.args.join(" ").replaceAll("&", "\\&amp;").replaceAll(">", "\\&gt;").replaceAll("<", "\\&lt;").replaceAll("\"", "\\&quot;").replaceAll("'", "\\&apos;").replaceAll("%", "\\%").split(",").map(elem => elem.trim());
if (!line2 && line1.length > 15) {
const [split1, split2, split3] = wrap(line1, { width: 15, indent: "" }).split("\n");
line1 = split1;
line2 = split2 ?? "";
line3 = split3 ?? "";
} else {
if (!line2) {
line2 = "";
}
if (!line3) {
line3 = "";
}
}
return { line1, line2, line3 };
}
static description = "Generates a retro text image (separate lines with a comma)";
static arguments = ["[top text]", "{middle text}", "{bottom text}"];
static requiresImage = false;
static requiresText = true;
static noText = "You need to provide some text to make retro!";
static command = "retro";
static slashAllowed = false;
}
export default RetroCommand;

View file

@ -1,35 +0,0 @@
import { random } from "../../utils/misc.js";
import Command from "../../classes/command.js";
class RPSCommand extends Command {
async run() {
if (this.args.length === 0 || (this.args[0] !== "rock" && this.args[0] !== "paper" && this.args[0] !== "scissors")) return "You need to choose whether you want to be rock, paper, or scissors!";
let emoji;
let winOrLose;
const result = random(["rock", "paper", "scissors"]);
switch (result) {
case "rock":
emoji = "✊";
if (this.args[0].toLowerCase() === "paper") winOrLose = true;
break;
case "paper":
emoji = "✋";
if (this.args[0].toLowerCase() === "scissors") winOrLose = true;
break;
case "scissors":
emoji = "✌";
if (this.args[0].toLowerCase() === "rock") winOrLose = true;
break;
default:
break;
}
return this.args[0].toLowerCase() === result ? `${emoji} I chose ${result}. It's a tie!` : `${emoji} I chose ${result}. ${winOrLose ? "You win!" : "You lose!"}`;
}
static description = "Plays rock, paper, scissors with me";
static aliases = ["rockpaperscissors"];
static arguments = ["[rock/paper/scissors]"];
static slashAllowed = false;
}
export default RPSCommand;

View file

@ -1,31 +0,0 @@
import fetch from "node-fetch";
import Command from "../../classes/command.js";
class XKCDCommand extends Command {
async run() {
const url = this.args.length > 0 && this.args[0].match(/^\d+$/) ? `http://xkcd.com/${this.args[0]}/info.0.json` : "http://xkcd.com/info.0.json";
try {
const request = await fetch(url);
const json = await request.json();
return {
embeds: [{
title: json.safe_title,
url: `https://xkcd.com/${json.num}`,
color: 16711680,
description: json.alt,
image: {
url: json.img
}
}]
};
} catch {
return "I couldn't get that XKCD!";
}
}
static description = "Gets an XKCD comic";
static arguments = ["{id}"];
static slashAllowed = false;
}
export default XKCDCommand;

View file

@ -1,13 +0,0 @@
import Command from "../../classes/command.js";
class InviteCommand extends Command {
async run() {
return "You can invite me to your server here: <https://projectlounge.pw/invite>";
}
static description = "Gets my invite link";
static aliases = ["botinfo", "credits"];
static slashAllowed = false;
}
export default InviteCommand;

View file

@ -1,11 +0,0 @@
import ImageCommand from "../../classes/imageCommand.js";
class WhoDidThisCommand extends ImageCommand {
static description = "Creates a \"WHO DID THIS\" meme from an image";
static aliases = ["whodidthis"];
static noImage = "You need to provide an image/GIF to make a \"who did this\" meme!";
static command = "wdt";
}
export default WhoDidThisCommand;