aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bot.ts4
-rw-r--r--src/commands/dev/eval.ts (renamed from src/commands/owner/eval.ts)4
-rw-r--r--src/commands/dev/reload.ts (renamed from src/commands/owner/reload.ts)5
-rw-r--r--src/commands/dev/setlevel.ts (renamed from src/commands/owner/setlevel.ts)7
-rw-r--r--src/commands/info/botinfo.ts4
-rw-r--r--src/commands/info/help.ts10
-rw-r--r--src/commands/info/ping.ts4
-rw-r--r--src/commands/info/pronouns.ts4
-rw-r--r--src/commands/moderation/ban.ts4
-rw-r--r--src/commands/moderation/kick.ts4
-rw-r--r--src/commands/moderation/modlog.ts4
-rw-r--r--src/commands/moderation/role.ts4
-rw-r--r--src/commands/moderation/warn.ts4
-rw-r--r--src/commands/moulberry-bush/capeperms.ts4
-rw-r--r--src/commands/moulberry-bush/giveawayping.ts4
-rw-r--r--src/commands/moulberry-bush/level.ts5
-rw-r--r--src/commands/moulberry-bush/rule.ts4
-rw-r--r--src/commands/server-config/prefix.ts (renamed from src/commands/admin/prefix.ts)5
-rw-r--r--src/inhibitors/blacklist/BlacklistInhibitor.ts4
-rw-r--r--src/lib/extensions/BotInhibitor.ts6
-rw-r--r--src/lib/extensions/BotListener.ts6
-rw-r--r--src/lib/extensions/BotTask.ts6
-rw-r--r--src/lib/extensions/BushClient.ts (renamed from src/lib/extensions/BotClient.ts)2
-rw-r--r--src/lib/extensions/BushCommand.ts (renamed from src/lib/extensions/BotCommand.ts)10
-rw-r--r--src/lib/extensions/BushInhibitor.ts6
-rw-r--r--src/lib/extensions/BushListener.ts6
-rw-r--r--src/lib/extensions/BushTask.ts6
-rw-r--r--src/lib/extensions/Util.ts24
-rw-r--r--src/lib/models/Guild.ts4
-rw-r--r--src/lib/utils/Logger.ts6
-rw-r--r--src/listeners/client/ready.ts4
-rw-r--r--src/listeners/client/syncslashcommands.ts4
-rw-r--r--src/listeners/commands/commandblocked.ts4
-rw-r--r--src/listeners/commands/commandstarted.ts8
-rw-r--r--src/listeners/commands/error.ts8
-rw-r--r--src/listeners/commands/slashError.ts8
-rw-r--r--src/listeners/guild/syncunban.ts4
-rw-r--r--src/listeners/message/levels.ts4
-rw-r--r--src/tasks/Unban.ts4
39 files changed, 111 insertions, 107 deletions
diff --git a/src/bot.ts b/src/bot.ts
index a7b555c..ee7ce92 100644
--- a/src/bot.ts
+++ b/src/bot.ts
@@ -1,5 +1,5 @@
-import { BotClient } from './lib/extensions/BotClient';
+import { BushClient } from './lib/extensions/BushClient';
import * as config from './config/options';
-const client: BotClient = new BotClient(config);
+const client: BushClient = new BushClient(config);
client.start();
diff --git a/src/commands/owner/eval.ts b/src/commands/dev/eval.ts
index a63b977..83e63f6 100644
--- a/src/commands/owner/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { MessageEmbed, Message } from 'discord.js';
import { inspect, promisify } from 'util';
import { exec } from 'child_process';
@@ -12,7 +12,7 @@ const clean = (text) => {
else return text;
};
-export default class EvalCommand extends BotCommand {
+export default class EvalCommand extends BushCommand {
public constructor() {
super('eval', {
aliases: ['eval', 'ev'],
diff --git a/src/commands/owner/reload.ts b/src/commands/dev/reload.ts
index 0330b27..64e5745 100644
--- a/src/commands/owner/reload.ts
+++ b/src/commands/dev/reload.ts
@@ -1,12 +1,13 @@
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { stripIndent } from 'common-tags';
import { Message } from 'discord.js';
import { CommandInteraction } from 'discord.js';
-export default class ReloadCommand extends BotCommand {
+export default class ReloadCommand extends BushCommand {
constructor() {
super('reload', {
aliases: ['reload'],
+ category: 'dev',
description: {
content: 'Reloads the bot',
usage: 'reload',
diff --git a/src/commands/owner/setlevel.ts b/src/commands/dev/setlevel.ts
index 6987385..d1701c5 100644
--- a/src/commands/owner/setlevel.ts
+++ b/src/commands/dev/setlevel.ts
@@ -2,19 +2,20 @@ import { ApplicationCommandOptionType } from 'discord-api-types';
import { CommandInteraction } from 'discord.js';
import { User } from 'discord.js';
import { Message } from 'discord.js';
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { SlashCommandOption } from '../../lib/extensions/Util';
import { Level } from '../../lib/models';
import AllowedMentions from '../../lib/utils/AllowedMentions';
-export default class SetLevelCommand extends BotCommand {
+export default class SetLevelCommand extends BushCommand {
constructor() {
super('setlevel', {
aliases: ['setlevel'],
+ category: 'dev',
description: {
content: 'Sets the level of a user',
usage: 'setlevel <user> <level>',
- examples: ['setlevel @Moulberry 69']
+ examples: ['setlevel @Moulberry 69'] //nice
},
args: [
{
diff --git a/src/commands/info/botinfo.ts b/src/commands/info/botinfo.ts
index 8f5f055..e6a4fbb 100644
--- a/src/commands/info/botinfo.ts
+++ b/src/commands/info/botinfo.ts
@@ -1,8 +1,8 @@
import { MessageEmbed, Message, CommandInteraction } from 'discord.js';
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { duration } from 'moment';
-export default class BotInfoCommand extends BotCommand {
+export default class BotInfoCommand extends BushCommand {
constructor() {
super('botinfo', {
aliases: ['botinfo'],
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index 116669c..30c2a21 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -1,11 +1,11 @@
import { Message, MessageEmbed } from 'discord.js';
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { stripIndent } from 'common-tags';
import { ApplicationCommandOptionType } from 'discord-api-types';
import { CommandInteraction } from 'discord.js';
import { SlashCommandOption } from '../../lib/extensions/Util';
-export default class HelpCommand extends BotCommand {
+export default class HelpCommand extends BushCommand {
constructor() {
super('help', {
aliases: ['help'],
@@ -32,7 +32,7 @@ export default class HelpCommand extends BotCommand {
});
}
- private generateEmbed(command?: BotCommand): MessageEmbed {
+ private generateEmbed(command?: BushCommand): MessageEmbed {
const prefix = this.handler.prefix;
if (!command) {
const embed = new MessageEmbed()
@@ -85,7 +85,7 @@ export default class HelpCommand extends BotCommand {
public async exec(
message: Message,
- { command }: { command: BotCommand }
+ { command }: { command: BushCommand }
): Promise<void> {
await message.util.send(this.generateEmbed(command));
}
@@ -97,7 +97,7 @@ export default class HelpCommand extends BotCommand {
if (command) {
await message.reply(
this.generateEmbed(
- this.handler.findCommand(command.value) as BotCommand
+ this.handler.findCommand(command.value) as BushCommand
)
);
} else {
diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts
index e51867f..62b8e60 100644
--- a/src/commands/info/ping.ts
+++ b/src/commands/info/ping.ts
@@ -1,9 +1,9 @@
import { CommandInteraction } from 'discord.js';
import { Message } from 'discord.js';
import { MessageEmbed } from 'discord.js';
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
-export default class PingCommand extends BotCommand {
+export default class PingCommand extends BushCommand {
constructor() {
super('ping', {
aliases: ['ping'],
diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts
index 97cca34..f30a981 100644
--- a/src/commands/info/pronouns.ts
+++ b/src/commands/info/pronouns.ts
@@ -1,4 +1,4 @@
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { User, Message, MessageEmbed } from 'discord.js';
import got, { HTTPError } from 'got';
import { CommandInteraction } from 'discord.js';
@@ -30,7 +30,7 @@ export const pronounMapping = {
};
export type pronounsType = keyof typeof pronounMapping;
-export default class PronounsCommand extends BotCommand {
+export default class PronounsCommand extends BushCommand {
constructor() {
super('pronouns', {
aliases: ['pronouns', 'pronoun'],
diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts
index 556dd6b..1c3b074 100644
--- a/src/commands/moderation/ban.ts
+++ b/src/commands/moderation/ban.ts
@@ -1,6 +1,6 @@
import { User } from 'discord.js';
import { Guild } from '../../lib/models';
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { Ban, Modlog, ModlogType } from '../../lib/models';
import moment from 'moment';
import { Message } from 'discord.js';
@@ -18,7 +18,7 @@ const durationAliases: Record<string, string[]> = {
const durationRegex =
/(?:(\d+)(d(?:ays?)?|h(?:ours?|rs?)?|m(?:inutes?|ins?)?|mo(?:nths?)?|w(?:eeks?|ks?)?)(?: |$))/g;
-export default class PrefixCommand extends BotCommand {
+export default class PrefixCommand extends BushCommand {
constructor() {
super('ban', {
aliases: ['ban'],
diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts
index f31047e..c21352f 100644
--- a/src/commands/moderation/kick.ts
+++ b/src/commands/moderation/kick.ts
@@ -1,10 +1,10 @@
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { Guild, Modlog, ModlogType } from '../../lib/models';
import { GuildMember, Message } from 'discord.js';
import { ApplicationCommandOptionType } from 'discord-api-types';
import { CommandInteraction } from 'discord.js';
-export default class KickCommand extends BotCommand {
+export default class KickCommand extends BushCommand {
constructor() {
super('kick', {
aliases: ['kick'],
diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts
index 320c6b4..b7923ca 100644
--- a/src/commands/moderation/modlog.ts
+++ b/src/commands/moderation/modlog.ts
@@ -1,4 +1,4 @@
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { Message } from 'discord.js';
import { Modlog } from '../../lib/models';
import { MessageEmbed } from 'discord.js';
@@ -6,7 +6,7 @@ import moment from 'moment';
import { stripIndent } from 'common-tags';
import { Argument } from 'discord-akairo';
-export default class ModlogCommand extends BotCommand {
+export default class ModlogCommand extends BushCommand {
constructor() {
super('modlog', {
aliases: ['modlog', 'modlogs'],
diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts
index 2a67e5b..29339a3 100644
--- a/src/commands/moderation/role.ts
+++ b/src/commands/moderation/role.ts
@@ -1,10 +1,10 @@
/* eslint-disable @typescript-eslint/no-empty-function */
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import AllowedMentions from '../../lib/utils/AllowedMentions';
import { Message, Role, GuildMember } from 'discord.js';
import { ApplicationCommandOptionType } from 'discord-api-types';
-export default class RoleCommand extends BotCommand {
+export default class RoleCommand extends BushCommand {
private roleWhitelist: Record<string, string[]> = {
'Partner': ['*', 'Admin Perms', 'Sr. Moderator', 'Moderator'],
'Suggester': [
diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts
index 41e0032..e8b1401 100644
--- a/src/commands/moderation/warn.ts
+++ b/src/commands/moderation/warn.ts
@@ -1,8 +1,8 @@
import { GuildMember, Message } from 'discord.js';
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { Guild, Modlog, ModlogType } from '../../lib/models';
-export default class WarnCommand extends BotCommand {
+export default class WarnCommand extends BushCommand {
public constructor() {
super('warn', {
aliases: ['warn'],
diff --git a/src/commands/moulberry-bush/capeperms.ts b/src/commands/moulberry-bush/capeperms.ts
index 5b3dc10..9832083 100644
--- a/src/commands/moulberry-bush/capeperms.ts
+++ b/src/commands/moulberry-bush/capeperms.ts
@@ -3,7 +3,7 @@ import { MessageEmbed } from 'discord.js';
import { CommandInteraction } from 'discord.js';
import { Message } from 'discord.js';
import got from 'got';
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { SlashCommandOption } from '../../lib/extensions/Util';
interface Capeperms {
@@ -15,7 +15,7 @@ interface User {
perms: string[];
}
-export default class CapePermsCommand extends BotCommand {
+export default class CapePermsCommand extends BushCommand {
private nameMap = {
patreon1: 'Patreon Tier 1',
patreon2: 'Patreon Tier 2',
diff --git a/src/commands/moulberry-bush/giveawayping.ts b/src/commands/moulberry-bush/giveawayping.ts
index d99f475..e6fdd9a 100644
--- a/src/commands/moulberry-bush/giveawayping.ts
+++ b/src/commands/moulberry-bush/giveawayping.ts
@@ -1,10 +1,10 @@
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import AllowedMentions from '../../lib/utils/AllowedMentions';
import { Message, WebhookClient } from 'discord.js';
import { TextChannel } from 'discord.js';
import { NewsChannel } from 'discord.js';
-export default class GiveawayPingCommand extends BotCommand {
+export default class GiveawayPingCommand extends BushCommand {
constructor() {
super('giveawayping', {
aliases: ['giveawayping', 'giveawaypong'],
diff --git a/src/commands/moulberry-bush/level.ts b/src/commands/moulberry-bush/level.ts
index ab08361..decac8a 100644
--- a/src/commands/moulberry-bush/level.ts
+++ b/src/commands/moulberry-bush/level.ts
@@ -3,13 +3,14 @@ import { Message } from 'discord.js';
import { CommandInteractionOption } from 'discord.js';
import { CommandInteraction } from 'discord.js';
import { User } from 'discord.js';
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { Level } from '../../lib/models';
-export default class LevelCommand extends BotCommand {
+export default class LevelCommand extends BushCommand {
constructor() {
super('level', {
aliases: ['level', 'rank'],
+ category: "Moulberry's Bush",
description: {
content: 'Shows the level of a user',
usage: 'level [user]',
diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts
index bd8b08a..69dcb6e 100644
--- a/src/commands/moulberry-bush/rule.ts
+++ b/src/commands/moulberry-bush/rule.ts
@@ -1,11 +1,11 @@
import { Argument } from 'discord-akairo';
import { Message, MessageEmbed, User } from 'discord.js';
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { ApplicationCommandOptionType } from 'discord-api-types';
import { CommandInteraction } from 'discord.js';
import { SlashCommandOption } from '../../lib/extensions/Util';
-export default class RuleCommand extends BotCommand {
+export default class RuleCommand extends BushCommand {
private rules = [
{
title: "Follow Discord's TOS",
diff --git a/src/commands/admin/prefix.ts b/src/commands/server-config/prefix.ts
index 112f6b8..ac85922 100644
--- a/src/commands/admin/prefix.ts
+++ b/src/commands/server-config/prefix.ts
@@ -1,13 +1,14 @@
import { ApplicationCommandOptionType } from 'discord-api-types';
import { CommandInteraction, Message, Guild as DiscordGuild } from 'discord.js';
-import { BotCommand } from '../../lib/extensions/BotCommand';
+import { BushCommand } from '../../lib/extensions/BushCommand';
import { SlashCommandOption } from '../../lib/extensions/Util';
import { Guild } from '../../lib/models';
-export default class PrefixCommand extends BotCommand {
+export default class PrefixCommand extends BushCommand {
constructor() {
super('prefix', {
aliases: ['prefix'],
+ category: "server config",
args: [
{
id: 'prefix'
diff --git a/src/inhibitors/blacklist/BlacklistInhibitor.ts b/src/inhibitors/blacklist/BlacklistInhibitor.ts
index 82db4c2..309815f 100644
--- a/src/inhibitors/blacklist/BlacklistInhibitor.ts
+++ b/src/inhibitors/blacklist/BlacklistInhibitor.ts
@@ -1,6 +1,6 @@
-import { BotInhibitor } from '../../lib/extensions/BotInhibitor';
+import { BushInhibitor } from '../../lib/extensions/BushInhibitor';
-export default class BlacklistInhibitor extends BotInhibitor {
+export default class BlacklistInhibitor extends BushInhibitor {
constructor() {
super('blacklist', {
reason: 'blacklist'
diff --git a/src/lib/extensions/BotInhibitor.ts b/src/lib/extensions/BotInhibitor.ts
deleted file mode 100644
index 960aade..0000000
--- a/src/lib/extensions/BotInhibitor.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { Inhibitor } from 'discord-akairo';
-import { BotClient } from './BotClient';
-
-export class BotInhibitor extends Inhibitor {
- public client: BotClient;
-}
diff --git a/src/lib/extensions/BotListener.ts b/src/lib/extensions/BotListener.ts
deleted file mode 100644
index 9ec17b2..0000000
--- a/src/lib/extensions/BotListener.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { Listener } from 'discord-akairo';
-import { BotClient } from './BotClient';
-
-export class BotListener extends Listener {
- public client: BotClient;
-}
diff --git a/src/lib/extensions/BotTask.ts b/src/lib/extensions/BotTask.ts
deleted file mode 100644
index 4d5cdcd..0000000
--- a/src/lib/extensions/BotTask.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { Task } from 'discord-akairo';
-import { BotClient } from './BotClient';
-
-export class BotTask extends Task {
- public client: BotClient;
-}
diff --git a/src/lib/extensions/BotClient.ts b/src/lib/extensions/BushClient.ts
index c98f50d..8a8ae91 100644
--- a/src/lib/extensions/BotClient.ts
+++ b/src/lib/extensions/BushClient.ts
@@ -18,7 +18,7 @@ import chalk from 'chalk';
export type BotConfig = typeof config;
-export class BotClient extends AkairoClient {
+export class BushClient extends AkairoClient {
public config: BotConfig;
public listenerHandler: ListenerHandler;
public inhibitorHandler: InhibitorHandler;
diff --git a/src/lib/extensions/BotCommand.ts b/src/lib/extensions/BushCommand.ts
index c5d31e9..4f9dc6e 100644
--- a/src/lib/extensions/BotCommand.ts
+++ b/src/lib/extensions/BushCommand.ts
@@ -1,8 +1,8 @@
import { Command, CommandOptions } from 'discord-akairo';
import { APIApplicationCommandOption } from 'discord-api-types';
-import { BotClient } from './BotClient';
+import { BushClient } from './BushClient';
-export interface BotCommandOptions extends CommandOptions {
+export interface BushCommandOptions extends CommandOptions {
slashCommandOptions?: APIApplicationCommandOption[];
description: {
content: string;
@@ -11,9 +11,9 @@ export interface BotCommandOptions extends CommandOptions {
};
}
-export class BotCommand extends Command {
- public client: BotClient;
- constructor(id: string, options?: BotCommandOptions) {
+export class BushCommand extends Command {
+ public client: BushClient;
+ constructor(id: string, options?: BushCommandOptions) {
super(id, options);
this.options = options;
}
diff --git a/src/lib/extensions/BushInhibitor.ts b/src/lib/extensions/BushInhibitor.ts
new file mode 100644
index 0000000..d9a9b68
--- /dev/null
+++ b/src/lib/extensions/BushInhibitor.ts
@@ -0,0 +1,6 @@
+import { Inhibitor } from 'discord-akairo';
+import { BushClient } from './BushClient';
+
+export class BushInhibitor extends Inhibitor {
+ public client: BushClient;
+}
diff --git a/src/lib/extensions/BushListener.ts b/src/lib/extensions/BushListener.ts
new file mode 100644
index 0000000..6a13210
--- /dev/null
+++ b/src/lib/extensions/BushListener.ts
@@ -0,0 +1,6 @@
+import { Listener } from 'discord-akairo';
+import { BushClient } from './BushClient';
+
+export class BushListener extends Listener {
+ public client: BushClient;
+}
diff --git a/src/lib/extensions/BushTask.ts b/src/lib/extensions/BushTask.ts
new file mode 100644
index 0000000..21655e9
--- /dev/null
+++ b/src/lib/extensions/BushTask.ts
@@ -0,0 +1,6 @@
+import { Task } from 'discord-akairo';
+import { BushClient } from './BushClient';
+
+export class BushTask extends Task {
+ public client: BushClient;
+}
diff --git a/src/lib/extensions/Util.ts b/src/lib/extensions/Util.ts
index 54df670..7c1d4b2 100644
--- a/src/lib/extensions/Util.ts
+++ b/src/lib/extensions/Util.ts
@@ -1,5 +1,5 @@
import { ClientUtil } from 'discord-akairo';
-import { BotClient } from './BotClient';
+import { BushClient } from './BushClient';
import { promisify } from 'util';
import { exec } from 'child_process';
import got from 'got';
@@ -57,9 +57,9 @@ export interface SlashCommandOption<T> {
export class Util extends ClientUtil {
/**
* The client of this ClientUtil
- * @type {BotClient}
+ * @type {BushClient}
*/
- public client: BotClient;
+ public client: BushClient;
/**
* The hastebin urls used to post to hastebin, attempts to post in order
* @type {string[]}
@@ -83,7 +83,7 @@ export class Util extends ClientUtil {
* Creates this client util
* @param client The client to initialize with
*/
- constructor(client: BotClient) {
+ constructor(client: BushClient) {
super(client);
}
@@ -273,14 +273,14 @@ export class Util extends ClientUtil {
}
}
- for (const [, botCommand] of this.client.commandHandler.modules) {
- if (botCommand.execSlash) {
- const found = registered.find((i) => i.name == botCommand.id);
+ for (const [, BushCommand] of this.client.commandHandler.modules) {
+ if (BushCommand.execSlash) {
+ const found = registered.find((i) => i.name == BushCommand.id);
const slashdata = {
- name: botCommand.id,
- description: botCommand.description.content,
- options: botCommand.options.slashCommandOptions
+ name: BushCommand.id,
+ description: BushCommand.description.content,
+ options: BushCommand.options.slashCommandOptions
};
if (found?.id && !force) {
@@ -292,7 +292,7 @@ export class Util extends ClientUtil {
)
: fetchedGuild.commands.edit(found.id, slashdata);
this.client.logger.verbose(
- chalk`{yellow Edited slash command ${botCommand.id}${
+ chalk`{yellow Edited slash command ${BushCommand.id}${
guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''
}}`
);
@@ -302,7 +302,7 @@ export class Util extends ClientUtil {
? await this.client.application.commands.create(slashdata)
: fetchedGuild.commands.create(slashdata);
this.client.logger.verbose(
- chalk`{green Created slash command ${botCommand.id}${
+ chalk`{green Created slash command ${BushCommand.id}${
guild !== undefined ? ` in guild ${fetchedGuild.name}` : ''
}}`
);
diff --git a/src/lib/models/Guild.ts b/src/lib/models/Guild.ts
index 1cb3abb..c224bf5 100644
--- a/src/lib/models/Guild.ts
+++ b/src/lib/models/Guild.ts
@@ -1,5 +1,5 @@
import { DataTypes, Optional, Sequelize } from 'sequelize';
-import { BotClient } from '../extensions/BotClient';
+import { BushClient } from '../extensions/BushClient';
import { BaseModel } from './BaseModel';
export interface GuildModel {
@@ -14,7 +14,7 @@ export class Guild
{
id: string;
prefix: string;
- static initModel(seqeulize: Sequelize, client: BotClient): void {
+ static initModel(seqeulize: Sequelize, client: BushClient): void {
Guild.init(
{
id: {
diff --git a/src/lib/utils/Logger.ts b/src/lib/utils/Logger.ts
index f38365e..604b45e 100644
--- a/src/lib/utils/Logger.ts
+++ b/src/lib/utils/Logger.ts
@@ -1,10 +1,10 @@
import { TextChannel } from 'discord.js';
-import { BotClient } from '../extensions/BotClient';
+import { BushClient } from '../extensions/BushClient';
import chalk from 'chalk';
export class Logger {
- private client: BotClient;
- public constructor(client: BotClient) {
+ private client: BushClient;
+ public constructor(client: BushClient) {
this.client = client;
}
private stripColor(text: string): string {
diff --git a/src/listeners/client/ready.ts b/src/listeners/client/ready.ts
index fc43f3c..b13dd36 100644
--- a/src/listeners/client/ready.ts
+++ b/src/listeners/client/ready.ts
@@ -1,7 +1,7 @@
import chalk from 'chalk';
-import { BotListener } from '../../lib/extensions/BotListener';
+import { BushListener } from '../../lib/extensions/BushListener';
-export default class CommandBlockedListener extends BotListener {
+export default class CommandBlockedListener extends BushListener {
public constructor() {
super('ready', {
emitter: 'client',
diff --git a/src/listeners/client/syncslashcommands.ts b/src/listeners/client/syncslashcommands.ts
index febdd1b..d734507 100644
--- a/src/listeners/client/syncslashcommands.ts
+++ b/src/listeners/client/syncslashcommands.ts
@@ -1,6 +1,6 @@
-import { BotListener } from '../../lib/extensions/BotListener';
+import { BushListener } from '../../lib/extensions/BushListener';
-export default class CreateSlashCommands extends BotListener {
+export default class CreateSlashCommands extends BushListener {
constructor() {
super('createslashcommands', {
emitter: 'client',
diff --git a/src/listeners/commands/commandblocked.ts b/src/listeners/commands/commandblocked.ts
index 82e53a9..dee1319 100644
--- a/src/listeners/commands/commandblocked.ts
+++ b/src/listeners/commands/commandblocked.ts
@@ -1,8 +1,8 @@
-import { BotListener } from '../../lib/extensions/BotListener';
+import { BushListener } from '../../lib/extensions/BushListener';
import { Command } from 'discord-akairo';
import { Message } from 'discord.js';
-export default class CommandBlockedListener extends BotListener {
+export default class CommandBlockedListener extends BushListener {
public constructor() {
super('commandBlocked', {
emitter: 'commandHandler',
diff --git a/src/listeners/commands/commandstarted.ts b/src/listeners/commands/commandstarted.ts
index 15eea9d..d81ed59 100644
--- a/src/listeners/commands/commandstarted.ts
+++ b/src/listeners/commands/commandstarted.ts
@@ -1,16 +1,16 @@
import chalk from 'chalk';
import { Message, DMChannel } from 'discord.js';
-import { BotCommand } from '../../lib/extensions/BotCommand';
-import { BotListener } from '../../lib/extensions/BotListener';
+import { BushCommand } from '../../lib/extensions/BushCommand';
+import { BushListener } from '../../lib/extensions/BushListener';
-export default class CommandStartedListener extends BotListener {
+export default class CommandStartedListener extends BushListener {
constructor() {
super('logCommands', {
emitter: 'commandHandler',
event: 'commandStarted'
});
}
- exec(message: Message, command: BotCommand): void {
+ exec(message: Message, command: BushCommand): void {
this.client.logger.verbose(
chalk`{cyan {green ${message.author.tag}} is running {green ${
command.aliases[0]
diff --git a/src/listeners/commands/error.ts b/src/listeners/commands/error.ts
index 37179e7..518545a 100644
--- a/src/listeners/commands/error.ts
+++ b/src/listeners/commands/error.ts
@@ -1,11 +1,11 @@
-import { BotCommand } from '../../lib/extensions/BotCommand';
-import { BotListener } from '../../lib/extensions/BotListener';
+import { BushCommand } from '../../lib/extensions/BushCommand';
+import { BushListener } from '../../lib/extensions/BushListener';
import { stripIndents } from 'common-tags';
import { Message } from 'discord.js';
import { MessageEmbed } from 'discord.js';
import { TextChannel } from 'discord.js';
-export default class CommandErrorListener extends BotListener {
+export default class CommandErrorListener extends BushListener {
constructor() {
super('error', {
emitter: 'commandHandler',
@@ -15,7 +15,7 @@ export default class CommandErrorListener extends BotListener {
async exec(
error: Error,
message: Message,
- command?: BotCommand
+ command?: BushCommand
): Promise<void> {
const errorNumber = Math.floor(Math.random() * 6969696969) + 69; // hehe funy numbers
const errorDevEmbed = this.client.util
diff --git a/src/listeners/commands/slashError.ts b/src/listeners/commands/slashError.ts
index 3b174a3..3f2260d 100644
--- a/src/listeners/commands/slashError.ts
+++ b/src/listeners/commands/slashError.ts
@@ -1,11 +1,11 @@
-import { BotCommand } from '../../lib/extensions/BotCommand';
-import { BotListener } from '../../lib/extensions/BotListener';
+import { BushCommand } from '../../lib/extensions/BushCommand';
+import { BushListener } from '../../lib/extensions/BushListener';
import { stripIndents } from 'common-tags';
import { MessageEmbed } from 'discord.js';
import { TextChannel } from 'discord.js';
import { CommandInteraction } from 'discord.js';
-export default class CommandErrorListener extends BotListener {
+export default class CommandErrorListener extends BushListener {
constructor() {
super('slashError', {
emitter: 'commandHandler',
@@ -15,7 +15,7 @@ export default class CommandErrorListener extends BotListener {
async exec(
error: Error,
message: CommandInteraction,
- command: BotCommand
+ command: BushCommand
): Promise<void> {
const errorNumber = Math.floor(Math.random() * 6969696969) + 69; // hehe funy numbers
const errorDevEmbed = this.client.util
diff --git a/src/listeners/guild/syncunban.ts b/src/listeners/guild/syncunban.ts
index 14f8820..b8a1419 100644
--- a/src/listeners/guild/syncunban.ts
+++ b/src/listeners/guild/syncunban.ts
@@ -1,8 +1,8 @@
import { User, Guild } from 'discord.js';
-import { BotListener } from '../../lib/extensions/BotListener';
+import { BushListener } from '../../lib/extensions/BushListener';
import { Ban } from '../../lib/models';
-export default class CommandBlockedListener extends BotListener {
+export default class CommandBlockedListener extends BushListener {
public constructor() {
super('guildBanRemove', {
emitter: 'client',
diff --git a/src/listeners/message/levels.ts b/src/listeners/message/levels.ts
index 9a5fbe8..3503584 100644
--- a/src/listeners/message/levels.ts
+++ b/src/listeners/message/levels.ts
@@ -1,9 +1,9 @@
import chalk from 'chalk';
import { Message } from 'discord.js';
-import { BotListener } from '../../lib/extensions/BotListener';
+import { BushListener } from '../../lib/extensions/BushListener';
import { Level } from '../../lib/models';
-export default class LevelListener extends BotListener {
+export default class LevelListener extends BushListener {
private levelCooldowns: Set<string> = new Set();
private blacklistedChannels = ['702456294874808330'];
constructor() {
diff --git a/src/tasks/Unban.ts b/src/tasks/Unban.ts
index c6f9a01..6b9d82e 100644
--- a/src/tasks/Unban.ts
+++ b/src/tasks/Unban.ts
@@ -1,10 +1,10 @@
import chalk from 'chalk';
import { DiscordAPIError } from 'discord.js';
import { Op } from 'sequelize';
-import { BotTask } from '../lib/extensions/BotTask';
+import { BushTask } from '../lib/extensions/BushTask';
import { Ban } from '../lib/models';
-export default class UnbanTask extends BotTask {
+export default class UnbanTask extends BushTask {
constructor() {
super('unban', {
delay: 30_000, // 1/2 min