Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var parts = message.getContent().split(" ");
- if (parts.length < 2) {
- channel.message("```\n" + parts[0] + " <commandName> [scriptUrl]\n```");
- return;
- }
- var scripts = storage.get("scriptList");
- if (scripts == "null") {
- scripts = {};
- } else {
- scripts = JSON.parse(scripts);
- }
- if (parts.length < 3) {
- if (parts[1] in scripts)
- delete scripts[parts[1]];
- channel.message("Removed script from list");
- } else {
- scripts[parts[1]] = parts[2];
- channel.message("Added script to list");
- }
- storage.set("scriptList", JSON.stringify(scripts));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement