aboutsummaryrefslogtreecommitdiff
path: root/src/listeners/other
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-23 22:02:44 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-23 22:02:44 -0400
commitb015bec7f66526ec5e959ae99865845f4db4b181 (patch)
tree67538c9549b7e0f7cd6a97e9c82db8d8462a19c7 /src/listeners/other
parent5c242f597595b8db71875d92c0afe0a5947442a6 (diff)
downloadtanzanite-b015bec7f66526ec5e959ae99865845f4db4b181.tar.gz
tanzanite-b015bec7f66526ec5e959ae99865845f4db4b181.tar.bz2
tanzanite-b015bec7f66526ec5e959ae99865845f4db4b181.zip
feat: some shit
- fix breaking changes - refactored active punishments into one table - made listeners args have stricter types
Diffstat (limited to 'src/listeners/other')
-rw-r--r--src/listeners/other/consoleListener.ts16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/listeners/other/consoleListener.ts b/src/listeners/other/consoleListener.ts
index ef1efd5..90f9871 100644
--- a/src/listeners/other/consoleListener.ts
+++ b/src/listeners/other/consoleListener.ts
@@ -1,6 +1,8 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-unused-vars */
import { BushListener } from '@lib';
+import { exec } from 'child_process';
+import { promisify } from 'util';
export default class ConsoleListener extends BushListener {
public constructor() {
@@ -12,10 +14,12 @@ export default class ConsoleListener extends BushListener {
public async exec(line: string): Promise<void> {
if (line.startsWith('eval ') || line.startsWith('ev ')) {
- const bot = this.client,
+ const
+ sh = promisify(exec),
+ bot = this.client,
config = this.client.config,
client = this.client,
- { Ban, Global, Guild, Level, ModLog, StickyRole } = await import('@lib'),
+ { ActivePunishment, Global, Guild, Level, ModLog, StickyRole } = await import('@lib'),
{
ButtonInteraction,
Collector,
@@ -26,12 +30,14 @@ export default class ConsoleListener extends BushListener {
MessageAttachment,
MessageButton,
MessageCollector,
- MessageComponentInteractionCollector,
+ InteractionCollector,
MessageEmbed,
MessageSelectMenu,
ReactionCollector,
- Util
- } = require('discord.js');
+ Util,
+ Collection
+ } = await import('discord.js'),
+ { Canvas } = await import('node-canvas');
try {
const input = line.replace('eval ', '').replace('ev ', '');
let output = eval(input);