Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Dev = ["حط ايديك هنا"]
- const Enmap = require("enmap");
- const db = new Enmap({name: "fireking"});
- client["on"]('message', message => {
- db["ensure"]("help", {
- publiccommand: [],
- admincommand: [],
- gamecommand: []
- });
- if(message["author"]["bot"]) return undefined;
- let args = message["content"]["split"](" ");
- if(args[0]["toLowerCase"]() == prefix + `help`) {
- if(db["get"]("onoff", "oo") == "off") return message["channel"]["send"]("**❌ | Help is disabled**");
- let pc = db["get"]("help", "publiccommand")["join"]("\n")
- let ac = db["get"]("help", "admincommand")["join"]("\n")
- let gc = db["get"]("help", "gamecommand")["join"]("\n")
- message["channel"]["send"](`**Public Command:
- ${pc || "No command"}
- \`\`-\`\`
- Admin Command:
- ${ac || "No command"}
- \`\`-\`\`
- Game Command:
- ${gc || "No command"}
- \`\`-\`\`**`)
- } else if(args[0]["toLowerCase"]() == `enable-help`) {
- if(!Dev["includes"](message["author"]["id"])) return undefined;
- db["set"]("onoff", "on", "oo")
- message["channel"]["send"]("**✅ | Done**")
- } else if(args[0]["toLowerCase"]() == prefix + `disable-help`) {
- if(!Dev["includes"](message["author"]["id"])) return undefined;
- db["set"]("onoff", "off", "oo")
- message["channel"]["send"]("**✅ | Done**")
- } else if(args[0]["toLowerCase"]() == prefix + `add-public-command`) {
- let com = message["content"]["split"](" ")["slice"](1)["join"](" ");
- if(!Dev["includes"](message["author"]["id"])) return undefined;
- if(!com) return message["channel"]["send"](`**✅ | Using: \`\`${prefix}add-public-command [command | description]\`\`**`);
- db["pushIn"]('help', "publiccommand", com);
- message["channel"]["send"]("**✅ | Done**")
- } else if(args[0]["toLowerCase"]() == prefix + `add-admin-command`) {
- let com = message["content"]["split"](" ")["slice"](1)["join"](" ");
- if(!Dev["includes"](message["author"]["id"])) return undefined;
- if(!com) return message["channel"]["send"](`**✅ | Using: \`\`${prefix}add-admin-command [command | description]\`\`**`);
- db["pushIn"]('help', "admincommand", com);
- message["channel"]["send"]("**✅ | Done**")
- } else if(args[0]["toLowerCase"]() == prefix + `add-game-command`) {
- let com = message["content"]["split"](" ")["slice"](1)["join"](" ");
- if(!Dev["includes"](message["author"]["id"])) return undefined;
- if(!com) return message["channel"]["send"](`**✅ | Using: \`\`${prefix}add-game-command [command | description]\`\`**`);
- db["pushIn"]('help', "gamecommand", com);
- message["channel"]["send"]("**✅ | Done**")
- } else if(args[0]["toLowerCase"]() == prefix + `remove-public-command`) {
- let com = message["content"]["split"](" ")["slice"](1)["join"](" ");
- if(!Dev["includes"](message["author"]["id"])) return undefined;
- if(!com) return message["channel"]["send"](`**✅ | Using: \`\`${prefix}remove-public-command [command | description]\`\`**`);
- if(!db["get"]("help", "publiccommand")["includes"](com)) return message["channel"]["send"]("**❌ | I can't find this command**");
- db["remove"]("help", com, "publiccommand");
- message["channel"]["send"]("**✅ | Done**")
- } else if(args[0]["toLowerCase"]() == prefix + `remove-admin-command`) {
- let com = message["content"]["split"](" ")["slice"](1)["join"](" ");
- if(!Dev["includes"](message["author"]["id"])) return undefined;
- if(!com) return message["channel"]["send"](`**✅ | Using: \`\`${prefix}remove-admin-command [command | description]\`\`**`);
- if(!db["get"]("help", "admincommand")["includes"](com)) return message["channel"]["send"]("**❌ | I can't find this command**");
- db["remove"]("help", com, "admincommand");
- message["channel"]["send"]("**✅ | Done**")
- } else if(args[0]["toLowerCase"]() == prefix + `remove-game-command`) {
- let com = message["content"]["split"](" ")["slice"](1)["join"](" ");
- if(!Dev["includes"](message["author"]["id"])) return undefined;
- if(!com) return message["channel"]["send"](`**✅ | Using: \`\`${prefix}remove-game-command [command | description]\`\`**`);
- if(!db["get"]("help", "gamecommand")["includes"](com)) return message["channel"]["send"]("**❌ | I can't find this command**");
- db["remove"]("help", com, "gamecommand");
- message["channel"]["send"]("**✅ | Done**")
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment