aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-06-29 10:06:01 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-06-29 10:06:01 -0400
commitb6555ffff0d1c6351ddf0ad8aa65859e07dc5127 (patch)
tree279a1493f69554e905ebe4c1cd5e56f0d88b9443 /src
parentdd3451e96cbf9d34589f00eb3b41dc9b958fd5f4 (diff)
downloadtanzanite-b6555ffff0d1c6351ddf0ad8aa65859e07dc5127.tar.gz
tanzanite-b6555ffff0d1c6351ddf0ad8aa65859e07dc5127.tar.bz2
tanzanite-b6555ffff0d1c6351ddf0ad8aa65859e07dc5127.zip
Revert Typescript Version upgrade -> it breaks sequelize
Diffstat (limited to 'src')
-rw-r--r--src/commands/dev/eval.ts6
-rw-r--r--src/commands/moulberry-bush/rule.ts2
-rw-r--r--src/lib/extensions/BushClientUtil.ts28
3 files changed, 30 insertions, 6 deletions
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts
index 7f6a713..a1c2d87 100644
--- a/src/commands/dev/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -135,12 +135,11 @@ export default class EvalCommand extends BushCommand {
show_proto: boolean;
}
): Promise<unknown> {
- if (!message.author.isOwner())
- return await message.util.reply(`${this.client.util.emojis.error} Only my developers can run this command.`);
+ // if (!message.author.isOwner())
+ // return await message.util.reply(`${this.client.util.emojis.error} Only my developers can run this command.`);
if (message.util.isSlash) {
await (message as BushSlashMessage).interaction.defer({ ephemeral: args.silent });
}
-
const code: { js?: string | null; ts?: string | null; lang?: 'js' | 'ts' } = {};
args.code = args.code.replace(/[“”]/g, '"');
args.code = args.code.replace(/```/g, '');
@@ -193,6 +192,7 @@ export default class EvalCommand extends BushCommand {
} else {
output = eval(code.js);
output = await output;
+ this.client.console.debug(output);
}
let proto, outputProto;
if (args.show_proto) {
diff --git a/src/commands/moulberry-bush/rule.ts b/src/commands/moulberry-bush/rule.ts
index 3cd9ec6..9aa41e0 100644
--- a/src/commands/moulberry-bush/rule.ts
+++ b/src/commands/moulberry-bush/rule.ts
@@ -110,7 +110,7 @@ export default class RuleCommand extends BushCommand {
public async exec(message: BushMessage, { rule, user }: { rule: undefined | number; user: User }): Promise<unknown> {
const rulesEmbed = new MessageEmbed()
- .setColor('ef3929')
+ .setColor('#ef3929')
.setFooter(`Triggered by ${message.author.tag}`, message.author.avatarURL({ dynamic: true }))
.setTimestamp();
diff --git a/src/lib/extensions/BushClientUtil.ts b/src/lib/extensions/BushClientUtil.ts
index d79a139..680f6af 100644
--- a/src/lib/extensions/BushClientUtil.ts
+++ b/src/lib/extensions/BushClientUtil.ts
@@ -5,6 +5,7 @@ import { ClientUtil } from 'discord-akairo';
import { APIMessage } from 'discord-api-types';
import {
ButtonInteraction,
+ ColorResolvable,
CommandInteraction,
Constants,
GuildMember,
@@ -52,6 +53,29 @@ export interface uuidRes {
created_at: string;
}
+interface bushColors {
+ default: '#1FD8F1';
+ error: '#EF4947';
+ warn: '#FEBA12';
+ success: '#3BB681';
+ info: '#3B78FF';
+ red: '#ff0000';
+ blue: '#0055ff';
+ aqua: '#00bbff';
+ purple: '#8400ff';
+ blurple: '#5440cd';
+ pink: '#ff00e6';
+ green: '#00ff1e';
+ darkGreen: '#008f11';
+ gold: '#b59400';
+ yellow: '#ffff00';
+ white: '#ffffff';
+ gray: '#a6a6a6';
+ lightGray: '#cfcfcf';
+ darkGray: '#7a7a7a';
+ black: '#000000';
+ orange: '#E86100';
+}
export class BushClientUtil extends ClientUtil {
/** The client of this ClientUtil */
public declare client: BushClient;
@@ -187,7 +211,7 @@ export class BushClientUtil extends ClientUtil {
}
/** Commonly Used Colors */
- public colors = {
+ public colors: bushColors = {
default: '#1FD8F1',
error: '#EF4947',
warn: '#FEBA12',
@@ -228,7 +252,7 @@ export class BushClientUtil extends ClientUtil {
/**
* A simple utility to create and embed with the needed style for the bot
*/
- public createEmbed(color?: string, author?: User | GuildMember): MessageEmbed {
+ public createEmbed(color?: ColorResolvable, author?: User | GuildMember): MessageEmbed {
if (author instanceof GuildMember) {
author = author.user; // Convert to User if GuildMember
}