Port to ESM modules (haha funny), removed cache request, many other changes that I forgot about
This commit is contained in:
parent
2fe45d842b
commit
ae2ebe0337
157 changed files with 1661 additions and 897 deletions
|
@ -1,5 +1,5 @@
|
|||
const Command = require("../../classes/command.js");
|
||||
const { random } = require("../../utils/misc.js");
|
||||
import Command from "../../classes/command.js";
|
||||
import { random } from "../../utils/misc.js";
|
||||
|
||||
class EightBallCommand extends Command {
|
||||
static responses = [
|
||||
|
@ -34,4 +34,4 @@ class EightBallCommand extends Command {
|
|||
static arguments = ["{text}"];
|
||||
}
|
||||
|
||||
module.exports = EightBallCommand;
|
||||
export default EightBallCommand;
|
|
@ -1,5 +1,5 @@
|
|||
const fetch = require("node-fetch");
|
||||
const Command = require("../../classes/command.js");
|
||||
import fetch from "node-fetch";
|
||||
import Command from "../../classes/command.js";
|
||||
|
||||
class AncientCommand extends Command {
|
||||
async run() {
|
||||
|
@ -30,4 +30,4 @@ class AncientCommand extends Command {
|
|||
static aliases = ["old", "oldmeme", "badmeme"];
|
||||
}
|
||||
|
||||
module.exports = AncientCommand;
|
||||
export default AncientCommand;
|
|
@ -1,5 +1,5 @@
|
|||
const fetch = require("node-fetch");
|
||||
const Command = require("../../classes/command.js");
|
||||
import fetch from "node-fetch";
|
||||
import Command from "../../classes/command.js";
|
||||
|
||||
class BirdCommand extends Command {
|
||||
async run() {
|
||||
|
@ -20,4 +20,4 @@ class BirdCommand extends Command {
|
|||
static aliases = ["birb", "birds", "birbs"];
|
||||
}
|
||||
|
||||
module.exports = BirdCommand;
|
||||
export default BirdCommand;
|
|
@ -1,5 +1,5 @@
|
|||
const fetch = require("node-fetch");
|
||||
const Command = require("../../classes/command.js");
|
||||
import fetch from "node-fetch";
|
||||
import Command from "../../classes/command.js";
|
||||
|
||||
class CatCommand extends Command {
|
||||
async run() {
|
||||
|
@ -31,4 +31,4 @@ class CatCommand extends Command {
|
|||
static aliases = ["kitters", "kitties", "kitty", "cattos", "catto", "cats", "cta"];
|
||||
}
|
||||
|
||||
module.exports = CatCommand;
|
||||
export default CatCommand;
|
|
@ -1,6 +1,6 @@
|
|||
const cowsay = require("cowsay2");
|
||||
const cows = require("cowsay2/cows");
|
||||
const Command = require("../../classes/command.js");
|
||||
import { say } from "cowsay2";
|
||||
import cows from "cowsay2/cows/index.js";
|
||||
import Command from "../../classes/command.js";
|
||||
|
||||
class CowsayCommand extends Command {
|
||||
async run() {
|
||||
|
@ -8,9 +8,9 @@ class CowsayCommand extends Command {
|
|||
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${cowsay.say(this.args.join(" "), { cow })}\n\`\`\``;
|
||||
return `\`\`\`\n${say(this.args.join(" "), { cow })}\n\`\`\``;
|
||||
} else {
|
||||
return `\`\`\`\n${cowsay.say(this.args.join(" "))}\n\`\`\``;
|
||||
return `\`\`\`\n${say(this.args.join(" "))}\n\`\`\``;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,4 +19,4 @@ class CowsayCommand extends Command {
|
|||
static arguments = ["{cow}", "[text]"];
|
||||
}
|
||||
|
||||
module.exports = CowsayCommand;
|
||||
export default CowsayCommand;
|
|
@ -1,4 +1,4 @@
|
|||
const Command = require("../../classes/command.js");
|
||||
import Command from "../../classes/command.js";
|
||||
|
||||
class DiceCommand extends Command {
|
||||
async run() {
|
||||
|
@ -14,4 +14,4 @@ class DiceCommand extends Command {
|
|||
static arguments = ["{number}"];
|
||||
}
|
||||
|
||||
module.exports = DiceCommand;
|
||||
export default DiceCommand;
|
|
@ -1,5 +1,5 @@
|
|||
const fetch = require("node-fetch");
|
||||
const Command = require("../../classes/command.js");
|
||||
import fetch from "node-fetch";
|
||||
import Command from "../../classes/command.js";
|
||||
|
||||
class DogCommand extends Command {
|
||||
async run() {
|
||||
|
@ -20,4 +20,4 @@ class DogCommand extends Command {
|
|||
static aliases = ["doggos", "doggo", "pupper", "puppers", "dogs", "puppy", "puppies", "pups", "pup"];
|
||||
}
|
||||
|
||||
module.exports = DogCommand;
|
||||
export default DogCommand;
|
|
@ -1,4 +1,4 @@
|
|||
const Command = require("../../classes/command.js");
|
||||
import Command from "../../classes/command.js";
|
||||
|
||||
class FullwidthCommand extends Command {
|
||||
async run() {
|
||||
|
@ -11,4 +11,4 @@ class FullwidthCommand extends Command {
|
|||
static arguments = ["[text]"];
|
||||
}
|
||||
|
||||
module.exports = FullwidthCommand;
|
||||
export default FullwidthCommand;
|
|
@ -1,4 +1,4 @@
|
|||
const ImageCommand = require("../../classes/imageCommand.js");
|
||||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class HomebrewCommand extends ImageCommand {
|
||||
params() {
|
||||
|
@ -17,4 +17,4 @@ class HomebrewCommand extends ImageCommand {
|
|||
static command = "homebrew";
|
||||
}
|
||||
|
||||
module.exports = HomebrewCommand;
|
||||
export default HomebrewCommand;
|
|
@ -1,5 +1,5 @@
|
|||
const fetch = require("node-fetch");
|
||||
const Command = require("../../classes/command.js");
|
||||
import fetch from "node-fetch";
|
||||
import Command from "../../classes/command.js";
|
||||
|
||||
class MCCommand extends Command {
|
||||
async run() {
|
||||
|
@ -17,4 +17,4 @@ class MCCommand extends Command {
|
|||
static arguments = ["[text]"];
|
||||
}
|
||||
|
||||
module.exports = MCCommand;
|
||||
export default MCCommand;
|
|
@ -1,5 +1,5 @@
|
|||
const wrap = require("../../utils/wrap.js");
|
||||
const ImageCommand = require("../../classes/imageCommand.js");
|
||||
import wrap from "../../utils/wrap.js";
|
||||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class RetroCommand extends ImageCommand {
|
||||
params() {
|
||||
|
@ -29,4 +29,4 @@ class RetroCommand extends ImageCommand {
|
|||
static command = "retro";
|
||||
}
|
||||
|
||||
module.exports = RetroCommand;
|
||||
export default RetroCommand;
|
|
@ -1,12 +1,12 @@
|
|||
const misc = require("../../utils/misc.js");
|
||||
const Command = require("../../classes/command.js");
|
||||
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 = misc.random(["rock", "paper", "scissors"]);
|
||||
const result = random(["rock", "paper", "scissors"]);
|
||||
switch (result) {
|
||||
case "rock":
|
||||
emoji = "✊";
|
||||
|
@ -31,4 +31,4 @@ class RPSCommand extends Command {
|
|||
static arguments = ["[rock/paper/scissors]"];
|
||||
}
|
||||
|
||||
module.exports = RPSCommand;
|
||||
export default RPSCommand;
|
|
@ -1,5 +1,5 @@
|
|||
const wrap = require("../../utils/wrap.js");
|
||||
const ImageCommand = require("../../classes/imageCommand.js");
|
||||
import wrap from "../../utils/wrap.js";
|
||||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class SonicCommand extends ImageCommand {
|
||||
params() {
|
||||
|
@ -18,4 +18,4 @@ class SonicCommand extends ImageCommand {
|
|||
static command = "sonic";
|
||||
}
|
||||
|
||||
module.exports = SonicCommand;
|
||||
export default SonicCommand;
|
|
@ -1,5 +1,5 @@
|
|||
const fetch = require("node-fetch");
|
||||
const Command = require("../../classes/command.js");
|
||||
import fetch from "node-fetch";
|
||||
import Command from "../../classes/command.js";
|
||||
|
||||
class WikihowCommand extends Command {
|
||||
async run() {
|
||||
|
@ -25,4 +25,4 @@ class WikihowCommand extends Command {
|
|||
static requires = ["mashape"];
|
||||
}
|
||||
|
||||
module.exports = WikihowCommand;
|
||||
export default WikihowCommand;
|
|
@ -1,5 +1,5 @@
|
|||
const fetch = require("node-fetch");
|
||||
const Command = require("../../classes/command.js");
|
||||
import fetch from "node-fetch";
|
||||
import Command from "../../classes/command.js";
|
||||
|
||||
class XKCDCommand extends Command {
|
||||
async run() {
|
||||
|
@ -28,4 +28,4 @@ class XKCDCommand extends Command {
|
|||
static arguments = ["{id}"];
|
||||
}
|
||||
|
||||
module.exports = XKCDCommand;
|
||||
export default XKCDCommand;
|
Loading…
Add table
Add a link
Reference in a new issue