Huge command system overhaul

This commit is contained in:
Vortrex
2020-12-13 14:44:14 -06:00
parent f97775760b
commit 2ef292d799
19 changed files with 145 additions and 1587 deletions

View File

@@ -20,23 +20,11 @@ const banType = {
function initBanScript() {
console.log("[Asshat.Ban]: Initializing ban script ...");
addBanCommandHandlers();
console.log("[Asshat.Ban]: Ban script initialized!");
}
// ---------------------------------------------------------------------------
function addBanCommandHandlers() {
console.log("[Asshat.Ban]: Adding ban command handlers ...");
let banCommands = getServerData().commands.ban;
for(let i in banCommands) {
addCommandHandler(banCommands[i].command, banCommands[i].handlerFunction);
}
console.log("[Asshat.Ban]: Bans command handlers added! ...");
}
// ---------------------------------------------------------------------------
function accountBanCommand(command, params, client, fromDiscord) {
if(getCommand(command).requireLogin) {
if(!isClientLoggedIn(client)) {