god i love annoying orange
This commit is contained in:
parent
6896751e86
commit
b424b2f813
88 changed files with 91 additions and 3 deletions
|
@ -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!";
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = "";
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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)}`;
|
||||
|
|
|
@ -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!";
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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`
|
||||
|
|
|
@ -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>.` };
|
||||
|
|
|
@ -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(" ");
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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!";
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue