Huge command system overhaul
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user