Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

Commit

Permalink
minor logging additions
Browse files Browse the repository at this point in the history
  • Loading branch information
zapteryx committed Aug 22, 2019
1 parent 29a1a04 commit 86f270f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/base.js
Expand Up @@ -30,7 +30,7 @@ function changeStatus() {
}

module.exports.commands = [{cmd: "presence", desc: "Change the bot's presence (online, idle, dnd, invisible).", perm: []}, {cmd: "status", desc: "Add or remove messages to the bot's playing status.", perm: []}, {cmd: "eval", desc: "Evaluates code.", perm: []}, {cmd: "load", desc: "Load an unloaded module.", perm: []}, {cmd: "reload", desc: "Reload a loaded module.", perm: []}, {cmd: "gprefix", desc: "Change the global default prefix.", perm: []}];
module.exports.events = [];
module.exports.events = ["guildCreate", "guildDelete"];
module.exports.actions = function (type, cmd, body, obj) {
if (cmd == "eval") {
try {evaled = eval(body).toString(); obj.channel.createMessage("**Success!** Output:\n```js\n" + evaled + "```");}
Expand Down Expand Up @@ -156,6 +156,12 @@ module.exports.actions = function (type, cmd, body, obj) {
}
}
}
else if (type == "guildCreate") {
console.log("[Guilds] Joined guild " + obj.name + " (" + obj.id + ") with " + obj.memberCount + " members.")
}
else if (type == "guildDelete") {
console.log("[Guilds] Left guild " + obj.name + " (" + obj.id + ") with " + obj.memberCount + " members.")
}
}
module.exports.managersOnly = true;
module.exports.name = "base";

0 comments on commit 86f270f

Please sign in to comment.