A bit of cleanup
This commit is contained in:
parent
a11fee5ff1
commit
f9c8d6b26d
38 changed files with 37 additions and 84 deletions
1
assets/images/region-flags
Submodule
1
assets/images/region-flags
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit c7854e5872b46a75160facabe4100f5ce704c0ae
|
|
@ -3,7 +3,7 @@ const collections = require("../utils/collections.js");
|
|||
const client = require("../utils/client.js");
|
||||
const misc = require("../utils/misc.js");
|
||||
const paginator = require("../utils/pagination/pagination.js");
|
||||
const tips = ["You can change the bot's prefix using the prefix command.", "Image commands also work with images previously posted in that channel.", "You can use the tags commands to save things for later use.", "You can visit https://projectlounge.pw/esmBot/help.html for a web version of this command list.", "You can view a command's aliases by putting the command name after the help command (e.g. help image).", "Parameters wrapped in [] are required, while parameters wrapped in {} are optional."];
|
||||
const tips = ["You can change the bot's prefix using the prefix command.", "Image commands also work with images previously posted in that channel.", "You can use the tags commands to save things for later use.", "You can visit https://projectlounge.pw/esmBot/help.html for a web version of this command list.", "You can view a command's aliases by putting the command name after the help command (e.g. help image).", "Parameters wrapped in [] are required, while parameters wrapped in {} are optional.", "esmBot is hosted and paid for completely out-of-pocket by the main developer. If you want to support development, please consider donating! https://patreon.com/TheEssem"];
|
||||
|
||||
exports.run = async (message, args) => {
|
||||
const guild = await database.guilds.findOne({ id: message.channel.guild.id });
|
||||
|
|
|
@ -2,7 +2,6 @@ const fs = require("fs");
|
|||
const { promisify } = require("util");
|
||||
const client = require("../utils/client.js");
|
||||
const database = require("../utils/database.js");
|
||||
const misc = require("../utils/misc.js");
|
||||
const logger = require("../utils/logger.js");
|
||||
const collections = require("../utils/collections.js");
|
||||
|
||||
|
@ -24,8 +23,7 @@ module.exports = async (message) => {
|
|||
if (message.content.startsWith(prefix) === false) return;
|
||||
|
||||
// separate commands and args
|
||||
const prefixRegex = new RegExp(`^(${misc.regexEscape(prefix)})`);
|
||||
const content = message.content.replace(prefixRegex, "").trim();
|
||||
const content = message.content.substring(prefix.length).trim();
|
||||
const args = content.split(/ +/g);
|
||||
const command = args.shift().toLowerCase();
|
||||
|
||||
|
|
|
@ -40,8 +40,7 @@ class BlurWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
bool sharp;
|
||||
};
|
||||
|
|
|
@ -37,8 +37,7 @@ class BlurpleWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -55,8 +55,7 @@ class CaptionWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string caption, in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -54,8 +54,7 @@ class CaptionTwoWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string caption, in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -36,8 +36,7 @@ class CircleWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -37,8 +37,7 @@ class CropWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -36,8 +36,7 @@ class ExplodeWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n, amount;
|
||||
size_t bytes, type_size;
|
||||
int delay, amount;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -42,8 +42,7 @@ class FlagWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, overlay_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -36,8 +36,7 @@ class FlipWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -36,8 +36,7 @@ class FlopWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <napi.h>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <Magick++.h>
|
||||
|
||||
|
@ -28,8 +27,7 @@ class FreezeWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
bool loop;
|
||||
};
|
||||
|
|
|
@ -41,8 +41,7 @@ class GamexplainWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <napi.h>
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <Magick++.h>
|
||||
|
||||
using namespace std;
|
||||
|
@ -59,8 +58,7 @@ class GlobeWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#include <napi.h>
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <Magick++.h>
|
||||
|
||||
using namespace std;
|
||||
|
@ -30,9 +28,7 @@ class HomebrewWorker : public Napi::AsyncWorker {
|
|||
}
|
||||
|
||||
private:
|
||||
string text, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
string text;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -36,8 +36,7 @@ class InvertWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#include <napi.h>
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <Magick++.h>
|
||||
|
||||
using namespace std;
|
||||
|
@ -25,9 +23,7 @@ class JpegWorker : public Napi::AsyncWorker {
|
|||
}
|
||||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
string in_path;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -40,8 +40,7 @@ class LeakWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -38,8 +38,7 @@ class MagikWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n, amount;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <napi.h>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <Magick++.h>
|
||||
|
||||
|
@ -67,8 +66,7 @@ class MemeWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type, text_top, text_bottom;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -62,8 +62,7 @@ class MirrorWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
bool vertical, first;
|
||||
Blob blob;
|
||||
};
|
||||
|
|
|
@ -36,8 +36,7 @@ class SwirlWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <napi.h>
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <Magick++.h>
|
||||
|
||||
using namespace std;
|
||||
|
@ -70,8 +69,7 @@ class MotivateWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type, top_text, bottom_text;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include <napi.h>
|
||||
#include <iostream>
|
||||
#include <ZXing/ReadBarcode.h>
|
||||
#include <ZXing/TextUtfEncoding.h>
|
||||
|
||||
|
|
|
@ -43,8 +43,7 @@ class ResizeWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n, amount;
|
||||
size_t bytes, type_size;
|
||||
int delay, amount;
|
||||
Blob blob;
|
||||
bool stretch, wide;
|
||||
};
|
||||
|
|
|
@ -37,8 +37,7 @@ class ReverseWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n, amount;
|
||||
size_t bytes, type_size;
|
||||
int delay, amount;
|
||||
Blob blob;
|
||||
bool soos;
|
||||
};
|
||||
|
|
|
@ -45,8 +45,7 @@ class ScottWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -33,8 +33,7 @@ class SonicWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string text, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <napi.h>
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <Magick++.h>
|
||||
|
||||
using namespace std;
|
||||
|
@ -35,8 +34,7 @@ class SpeedWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n, amount;
|
||||
size_t bytes, type_size;
|
||||
int delay, amount;
|
||||
Blob blob;
|
||||
bool slow;
|
||||
};
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <napi.h>
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <Magick++.h>
|
||||
|
||||
using namespace std;
|
||||
|
@ -54,7 +53,6 @@ class SpinWorker : public Napi::AsyncWorker {
|
|||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, n;
|
||||
size_t bytes, type_size;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -48,8 +48,7 @@ class TileWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -45,8 +45,7 @@ class TrumpWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -42,8 +42,7 @@ class WallWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -59,8 +59,7 @@ class WatermarkWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, water_path, type;
|
||||
int delay, wordlength, i, n, gravity;
|
||||
size_t bytes, type_size;
|
||||
int delay, gravity;
|
||||
Blob blob;
|
||||
bool resize, append, mc;
|
||||
};
|
||||
|
|
|
@ -40,8 +40,7 @@ class WdtWorker : public Napi::AsyncWorker {
|
|||
|
||||
private:
|
||||
string in_path, type;
|
||||
int delay, wordlength, i, n;
|
||||
size_t bytes, type_size;
|
||||
int delay;
|
||||
Blob blob;
|
||||
};
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
[![esmBot Support](https://discordapp.com/api/guilds/592399417676529688/embed.png)](https://discord.gg/vfFM7YT) ![GitHub license](https://img.shields.io/github/license/TheEssem/esmBot.svg)
|
||||
|
||||
|
||||
esmBot is an entertainment-focused Discord bot made using [Eris](https://abal.moe/Eris/) with soundboard, utility, and image manipulation commands.
|
||||
esmBot is an easily-extendable, multipurpose, and entertainment-focused Discord bot made using [Eris](https://abal.moe/Eris/) with image, music, and utility commands, alongside many others.
|
||||
|
||||
[![Top.gg](https://top.gg/api/widget/429305856241172480.svg)](https://top.gg/bot/429305856241172480)
|
||||
|
||||
|
@ -11,7 +11,7 @@ You can invite the bot to your server using this link: https://projectlounge.pw/
|
|||
|
||||
A command list can be found [here](https://projectlounge.pw/esmBot/help.html).
|
||||
|
||||
If you want to run it locally for testing purposes, you should install ImageMagick (version >=7), FFmpeg, PostgreSQL, and the Microsoft core fonts:
|
||||
The bot is only supported on Linux/Unix-like operating systems. If you want to run it locally for testing purposes, you should install ImageMagick (version >=7), FFmpeg, PostgreSQL, and the Microsoft core fonts:
|
||||
|
||||
```shell
|
||||
# On most Debian/Ubuntu-based distros you will need to build ImageMagick from source instead of installing from apt/similar package managers.
|
||||
|
|
Loading…
Reference in a new issue