Add CommandContext

This commit is contained in:
Vylpes 2021-07-18 14:14:32 +01:00
parent 23858f72fc
commit 6e700df0de
5 changed files with 20 additions and 110 deletions

View file

@ -4,6 +4,7 @@ import { readdirSync, existsSync } from "fs";
import { IBaseResponse } from "../contracts/IBaseResponse";
import { Command } from "../type/command";
import { Event } from "../type/event";
import { ICommandContext } from "../contracts/ICommandContext";
export interface IUtilResponse extends IBaseResponse {
context?: {
@ -42,9 +43,15 @@ export class Util {
};
}
}
const context: ICommandContext = {
name: name,
args: args,
message: message,
}
// Run the command and pass the command context with it
command.execute(name, args, message);
command.execute(context);
return {
valid: true,