Port to ESM modules (haha funny), removed cache request, many other changes that I forgot about

This commit is contained in:
Essem 2021-08-19 09:19:14 -05:00
parent 2fe45d842b
commit ae2ebe0337
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
157 changed files with 1661 additions and 897 deletions

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class NineGagCommand extends ImageCommand {
params = {
@ -13,4 +13,4 @@ class NineGagCommand extends ImageCommand {
static command = "watermark";
}
module.exports = NineGagCommand;
export default NineGagCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class BandicamCommand extends ImageCommand {
params = {
@ -14,4 +14,4 @@ class BandicamCommand extends ImageCommand {
static command = "watermark";
}
module.exports = BandicamCommand;
export default BandicamCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class BlurCommand extends ImageCommand {
params = {
@ -11,4 +11,4 @@ class BlurCommand extends ImageCommand {
static command = "blur";
}
module.exports = BlurCommand;
export default BlurCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class BlurpleCommand extends ImageCommand {
params() {
@ -18,4 +18,4 @@ class BlurpleCommand extends ImageCommand {
static aliases = ["blurp"];
}
module.exports = BlurpleCommand;
export default BlurpleCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
const allowedFonts = ["futura", "impact", "helvetica", "arial", "roboto", "noto"];
class CaptionCommand extends ImageCommand {
@ -30,4 +30,4 @@ class CaptionCommand extends ImageCommand {
static command = "caption";
}
module.exports = CaptionCommand;
export default CaptionCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.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 {
@ -23,4 +23,4 @@ class CaptionTwoCommand extends ImageCommand {
static command = "captionTwo";
}
module.exports = CaptionTwoCommand;
export default CaptionTwoCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class CircleCommand extends ImageCommand {
static description = "Applies a radial blur effect on an image";
@ -8,4 +8,4 @@ class CircleCommand extends ImageCommand {
static command = "circle";
}
module.exports = CircleCommand;
export default CircleCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class CropCommand extends ImageCommand {
static description = "Crops an image to 1:1";
@ -7,4 +7,4 @@ class CropCommand extends ImageCommand {
static command = "crop";
}
module.exports = CropCommand;
export default CropCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class DeepfryCommand extends ImageCommand {
static description = "Deep-fries an image";
@ -8,4 +8,4 @@ class DeepfryCommand extends ImageCommand {
static command = "deepfry";
}
module.exports = DeepfryCommand;
export default DeepfryCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class DeviantArtCommand extends ImageCommand {
params = {
@ -14,4 +14,4 @@ class DeviantArtCommand extends ImageCommand {
static command = "watermark";
}
module.exports = DeviantArtCommand;
export default DeviantArtCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class ExplodeCommand extends ImageCommand {
params = {
@ -12,4 +12,4 @@ class ExplodeCommand extends ImageCommand {
static command = "explode";
}
module.exports = ExplodeCommand;
export default ExplodeCommand;

View file

@ -1,7 +1,7 @@
const fs = require("fs");
const emojiRegex = require("emoji-regex");
const emoji = require("node-emoji");
const ImageCommand = require("../../classes/imageCommand.js");
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 = "";
@ -38,4 +38,4 @@ class FlagCommand extends ImageCommand {
static command = "flag";
}
module.exports = FlagCommand;
export default FlagCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class FlipCommand extends ImageCommand {
static description = "Flips an image";
@ -7,4 +7,4 @@ class FlipCommand extends ImageCommand {
static command = "flip";
}
module.exports = FlipCommand;
export default FlipCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class FlopCommand extends ImageCommand {
params = {
@ -12,4 +12,4 @@ class FlopCommand extends ImageCommand {
static command = "flip";
}
module.exports = FlopCommand;
export default FlopCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class FreezeCommand extends ImageCommand {
params() {
@ -18,4 +18,4 @@ class FreezeCommand extends ImageCommand {
static command = "freeze";
}
module.exports = FreezeCommand;
export default FreezeCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class FunkyCommand extends ImageCommand {
params = {
@ -14,4 +14,4 @@ class FunkyCommand extends ImageCommand {
static command = "watermark";
}
module.exports = FunkyCommand;
export default FunkyCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class GameXplainCommand extends ImageCommand {
static description = "Makes a GameXplain thumbnail from an image";
@ -8,4 +8,4 @@ class GameXplainCommand extends ImageCommand {
static command = "gamexplain";
}
module.exports = GameXplainCommand;
export default GameXplainCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class GlobeCommand extends ImageCommand {
static description = "Spins an image";
@ -8,4 +8,4 @@ class GlobeCommand extends ImageCommand {
static command = "globe";
}
module.exports = GlobeCommand;
export default GlobeCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class HaaHCommand extends ImageCommand {
params = {
@ -12,4 +12,4 @@ class HaaHCommand extends ImageCommand {
static command = "mirror";
}
module.exports = HaaHCommand;
export default HaaHCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class HooHCommand extends ImageCommand {
params = {
@ -12,4 +12,4 @@ class HooHCommand extends ImageCommand {
static command = "mirror";
}
module.exports = HooHCommand;
export default HooHCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class HypercamCommand extends ImageCommand {
params = {
@ -14,4 +14,4 @@ class HypercamCommand extends ImageCommand {
static command = "watermark";
}
module.exports = HypercamCommand;
export default HypercamCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class iFunnyCommand extends ImageCommand {
params = {
@ -14,4 +14,4 @@ class iFunnyCommand extends ImageCommand {
static command = "watermark";
}
module.exports = iFunnyCommand;
export default iFunnyCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class ImplodeCommand extends ImageCommand {
params = {
@ -12,4 +12,4 @@ class ImplodeCommand extends ImageCommand {
static command = "explode";
}
module.exports = ImplodeCommand;
export default ImplodeCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class InvertCommand extends ImageCommand {
static description = "Inverts an image";
@ -8,4 +8,4 @@ class InvertCommand extends ImageCommand {
static command = "invert";
}
module.exports = InvertCommand;
export default InvertCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class JPEGCommand extends ImageCommand {
static description = "Adds max JPEG compression to an image";
@ -8,4 +8,4 @@ class JPEGCommand extends ImageCommand {
static command = "jpeg";
}
module.exports = JPEGCommand;
export default JPEGCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class KineMasterCommand extends ImageCommand {
params = {
@ -14,4 +14,4 @@ class KineMasterCommand extends ImageCommand {
static command = "watermark";
}
module.exports = KineMasterCommand;
export default KineMasterCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class LeakCommand extends ImageCommand {
static description = "Creates a fake Smash leak thumbnail";
@ -8,4 +8,4 @@ class LeakCommand extends ImageCommand {
static command = "leak";
}
module.exports = LeakCommand;
export default LeakCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class MagikCommand extends ImageCommand {
static description = "Adds a content aware scale effect to an image";
@ -8,4 +8,4 @@ class MagikCommand extends ImageCommand {
static command = "magik";
}
module.exports = MagikCommand;
export default MagikCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class MemeCommand extends ImageCommand {
params(url) {
@ -19,4 +19,4 @@ class MemeCommand extends ImageCommand {
static command = "meme";
}
module.exports = MemeCommand;
export default MemeCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class MemeCenterCommand extends ImageCommand {
params = {
@ -14,4 +14,4 @@ class MemeCenterCommand extends ImageCommand {
static command = "watermark";
}
module.exports = MemeCenterCommand;
export default MemeCenterCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class MotivateCommand extends ImageCommand {
params(url) {
@ -20,4 +20,4 @@ class MotivateCommand extends ImageCommand {
static command = "motivate";
}
module.exports = MotivateCommand;
export default MotivateCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class PixelateCommand extends ImageCommand {
static description = "Pixelates an image";
@ -8,4 +8,4 @@ class PixelateCommand extends ImageCommand {
static command = "resize";
}
module.exports = PixelateCommand;
export default PixelateCommand;

View file

@ -1,5 +1,5 @@
const ImageCommand = require("../../classes/imageCommand.js");
const { random } = require("../../utils/misc.js");
import ImageCommand from "../../classes/imageCommand.js";
import { random } from "../../utils/misc.js";
const names = ["esmBot", "me_irl", "dankmemes", "hmmm", "gaming", "wholesome", "chonkers", "memes", "funny", "pcmasterrace", "bellybros"];
class RedditCommand extends ImageCommand {
@ -16,4 +16,4 @@ class RedditCommand extends ImageCommand {
static command = "reddit";
}
module.exports = RedditCommand;
export default RedditCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class ReverseCommand extends ImageCommand {
params(url, delay) {
@ -15,4 +15,4 @@ class ReverseCommand extends ImageCommand {
static command = "reverse";
}
module.exports = ReverseCommand;
export default ReverseCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class ScottCommand extends ImageCommand {
static description = "Makes Scott the Woz show off an image";
@ -8,4 +8,4 @@ class ScottCommand extends ImageCommand {
static command = "scott";
}
module.exports = ScottCommand;
export default ScottCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class SharpenCommand extends ImageCommand {
params = {
@ -12,4 +12,4 @@ class SharpenCommand extends ImageCommand {
static command = "blur";
}
module.exports = SharpenCommand;
export default SharpenCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class ShutterstockCommand extends ImageCommand {
params = {
@ -14,4 +14,4 @@ class ShutterstockCommand extends ImageCommand {
static command = "watermark";
}
module.exports = ShutterstockCommand;
export default ShutterstockCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class SlowCommand extends ImageCommand {
params() {
@ -18,4 +18,4 @@ class SlowCommand extends ImageCommand {
static command = "speed";
}
module.exports = SlowCommand;
export default SlowCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class SnapchatCommand extends ImageCommand {
params(url) {
@ -25,4 +25,4 @@ class SnapchatCommand extends ImageCommand {
static command = "snapchat";
}
module.exports = SnapchatCommand;
export default SnapchatCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class SooSCommand extends ImageCommand {
params(url, delay) {
@ -16,4 +16,4 @@ class SooSCommand extends ImageCommand {
static command = "reverse";
}
module.exports = SooSCommand;
export default SooSCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class SpeedCommand extends ImageCommand {
params() {
@ -17,4 +17,4 @@ class SpeedCommand extends ImageCommand {
static command = "speed";
}
module.exports = SpeedCommand;
export default SpeedCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class SpinCommand extends ImageCommand {
static description = "Spins an image";
@ -8,4 +8,4 @@ class SpinCommand extends ImageCommand {
static command = "spin";
}
module.exports = SpinCommand;
export default SpinCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class StretchCommand extends ImageCommand {
params = {
@ -12,4 +12,4 @@ class StretchCommand extends ImageCommand {
static command = "resize";
}
module.exports = StretchCommand;
export default StretchCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class SwirlCommand extends ImageCommand {
static description = "Swirls an image";
@ -8,4 +8,4 @@ class SwirlCommand extends ImageCommand {
static command = "swirl";
}
module.exports = SwirlCommand;
export default SwirlCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class TileCommand extends ImageCommand {
static description = "Creates a tile pattern from an image";
@ -8,4 +8,4 @@ class TileCommand extends ImageCommand {
static command = "tile";
}
module.exports = TileCommand;
export default TileCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class TrumpCommand extends ImageCommand {
static description = "Makes Trump display an image";
@ -7,4 +7,4 @@ class TrumpCommand extends ImageCommand {
static command = "trump";
}
module.exports = TrumpCommand;
export default TrumpCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class UncaptionCommand extends ImageCommand {
static description = "Removes the caption from an image";
@ -7,4 +7,4 @@ class UncaptionCommand extends ImageCommand {
static command = "uncaption";
}
module.exports = UncaptionCommand;
export default UncaptionCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class UnfreezeCommand extends ImageCommand {
params = {
@ -12,4 +12,4 @@ class UnfreezeCommand extends ImageCommand {
static command = "freeze";
}
module.exports = UnfreezeCommand;
export default UnfreezeCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class WaaWCommand extends ImageCommand {
static description = "Mirrors the right side of an image onto the left";
@ -8,4 +8,4 @@ class WaaWCommand extends ImageCommand {
static command = "mirror";
}
module.exports = WaaWCommand;
export default WaaWCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class WallCommand extends ImageCommand {
static description = "Creates a wall from an image";
@ -7,4 +7,4 @@ class WallCommand extends ImageCommand {
static command = "wall";
}
module.exports = WallCommand;
export default WallCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class WhoDidThisCommand extends ImageCommand {
static description = "Creates a \"WHO DID THIS\" meme from an image";
@ -8,4 +8,4 @@ class WhoDidThisCommand extends ImageCommand {
static command = "wdt";
}
module.exports = WhoDidThisCommand;
export default WhoDidThisCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class WhisperCommand extends ImageCommand {
params(url) {
@ -18,4 +18,4 @@ class WhisperCommand extends ImageCommand {
static command = "whisper";
}
module.exports = WhisperCommand;
export default WhisperCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class WideCommand extends ImageCommand {
params = {
@ -12,4 +12,4 @@ class WideCommand extends ImageCommand {
static command = "resize";
}
module.exports = WideCommand;
export default WideCommand;

View file

@ -1,4 +1,4 @@
const ImageCommand = require("../../classes/imageCommand.js");
import ImageCommand from "../../classes/imageCommand.js";
class WooWCommand extends ImageCommand {
params = {
@ -13,4 +13,4 @@ class WooWCommand extends ImageCommand {
static command = "mirror";
}
module.exports = WooWCommand;
export default WooWCommand;