Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Laxuzer committed Nov 24, 2021
1 parent 3ad0d9d commit 0f34f89
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/events/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ module.exports = class MessageEvent extends Event {
}
};
function runCmd(client) {
let Context = new Ctx(message, UPrefix, client, cmd.name);
let Context = new Ctx({ message, prefix: UPrefix, client, subCommand: false });
if (cmd.subCommands.length >= 1) {
let CMD = cmd.subCommands.find(e => e.aliases.includes(`${Context.input.args[0]}`.toLowerCase()) || e.rawName == `${Context.input.args[0]}`.toLowerCase());
if (CMD) {
CMD.run(new Ctx(message, UPrefix, client, cmd.name, true));
let subCommand = cmd.subCommands.find(e => e.aliases.includes(`${Context.input.args[0]}`.toLowerCase()) || e.rawName == `${Context.input.args[0]}`.toLowerCase());
if (subCommand) {
subCommand.run(new Ctx({ message, prefix: UPrefix, client, subCommand: true }));
} else {
cmd.run(Context);
}
Expand Down

0 comments on commit 0f34f89

Please sign in to comment.