Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.client = MPP.client;
- const list = [];
- class country {
- list() {
- if (list.length < 1) return null;
- return list.join(' ').replaceAll(' ', ' ');
- }
- add(name) {
- if (!name) return "No country name entered";
- list.push(name.toUpperCase());
- }
- remove(name) {
- if (!name) return "No country name entered";
- if (list.indexOf(name.toUpperCase()) === -1) return "This country provide dosn't exist";
- delete list[list.indexOf(name.toUpperCase())];
- }
- start(name) {
- if (name) return name+" is not function";
- return undefined;
- }
- pause(name) {
- if (name) return name+" is not a function";
- return undefined;
- }
- resume(name) {
- if (name) return name+" is not a function";
- return undefined;
- }
- stop(name) {
- if (name) return name+" is not a function";
- return undefined;
- }
- size() {
- return list.length;
- }
- }
- let countries = new country();
- const Admin = ["368bff184db7a3c669da1ca5", "384bfbeb4cec729b49d7070b", "b31780465ee191c1d6bc0474"];
- client.on("a", msg => {
- if (msg.a.startsWith("countries." || "Admin.") && Admin.includes(msg.p.id)) {
- let out = "";
- try {
- out = `‹- ${eval(msg.a.substring(0).trim())}`
- } catch (err) {
- if (err) {
- out = `❎ ${err}`
- }
- }
- client.sendArray([{ m: 'a', message: out }])
- }
- if (!Admin.includes(msg.p.id) && msg.a.startsWith("countries." || "Admin.")) {
- MPP.chat.send("You don't have any permission to use this command")
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement