Eval command tweaks

This commit is contained in:
Erik 2024-04-01 13:47:28 +03:00
parent c5c304d5d9
commit 5f07fd3e15

View File

@ -1,7 +1,5 @@
import { userInfo } from 'os';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { Util, FilterUtil } from '../../../../utilities/index.js';
import { Util as U, FilterUtil as FU } from '../../../../utilities/index.js';
import { inspect } from 'util';
import { CommandOptionType, CommandParams } from '../../../../../@types/Client.js';
import DiscordClient from '../../../DiscordClient.js';
@ -12,6 +10,8 @@ import { ReplyOptions } from '../../../../../@types/Wrappers.js';
const { username } = userInfo();
class EvalCommand extends Command
{
static Util = U;
static FilterUtil = FU;
constructor (client: DiscordClient)
{
super(client, {
@ -32,6 +32,10 @@ class EvalCommand extends Command
if (async?.asBool)
params = `(async () => {${params}})()`;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore // declared for ease of use
const { Util, FilterUtil } = EvalCommand;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore // declared for ease of use
const { guild, author, member, client } = invoker;