├── Procfile ├── README.md ├── bot.js ├── commands ├── admin │ ├── ban.js │ ├── clear.js │ ├── kick.js │ ├── lock.js │ ├── lockall.js │ ├── prefix.js │ ├── unbanall.js │ ├── unlock.js │ └── unlockall.js ├── general │ ├── help.js │ ├── invite.js │ ├── serverinfo.js │ ├── stats.js │ ├── support.js │ └── userinfo.js ├── owner │ ├── left-servers.js │ ├── prime.js │ ├── u.js │ └── wordWhitelist.js └── security │ ├── anti-ban.js │ ├── anti-bot.js │ ├── anti-channel.js │ ├── anti-kick.js │ ├── anti-role.js │ ├── anti-spam.js │ ├── anti-webhook.js │ ├── anti.js │ ├── punishment.js │ ├── settings.js │ └── whitelist.js ├── config.js ├── data ├── guild.js ├── owner.js └── user.js ├── events ├── channelCreate.js ├── channelDelete.js ├── guildBanAdd.js ├── guildDelete.js ├── guildMemberAdd.js ├── guildMemberRemove.js ├── message.js ├── roleCreate.js └── roleDelete.js ├── handler └── command.js └── package.json /Procfile: -------------------------------------------------------------------------------- 1 | Worker: node bot.js 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![](https://images-ext-2.discordapp.net/external/zd8CGgTxXIKNRTOCWg8YtDpkHrfwJoVkMXag9flMMIE/%3Fsize%3D1024/https/cdn.discordapp.com/avatars/681553671364018196/94fd33dc53f1662660d718a067bea6fa.png?width=473&height=473) 2 | # JANO 3 | -------------------------------------------------------------------------------- /bot.js: -------------------------------------------------------------------------------- 1 | //=============================== - [ Consts ] - ===================================// 2 | const inlinereply = require('discord-reply'); 3 | const Discord = require("discord.js"); 4 | const { MessageMenuOption, MessageMenu, MessageButton } = require("discord-buttons"); 5 | const bot = new Discord.Client(); 6 | require('discord-buttons')(bot); 7 | const { Color, Image, Footer, Author } = require("./config.js"); 8 | const fs = require("fs"); 9 | const request = require("request"); 10 | const prefix = "e!"; 11 | const { Collection, MessageEmbed } = require("discord.js"); 12 | const { inspect } = require("util"); 13 | let dev = ["681553671364018196"]; 14 | const cmd = require("node-cmd"); 15 | 16 | bot.login("") 17 | global.mongoose = require('mongoose') 18 | mongoose.connect("", { useNewUrlParser: true, useUnifiedTopology: true }).then(() => { 19 | console.log("✅ Connected to the database."); 20 | }).catch((err) => { 21 | console.log("❎ Unable to connect to the Mongodb database. Error:" + err); 22 | }); 23 | global.Guild = require("./data/guild.js"); 24 | global.User = require("./data/user.js"); 25 | //global.Prime = require("./data/prime.js"); 26 | global.Owner = require("./data/owner.js"); 27 | bot.commands = new Collection(); 28 | bot.aliases = new Collection(); 29 | bot.cooldowns = new Collection(); 30 | bot.catagories = fs.readdirSync("./commands/"); 31 | ["command"].forEach(handler => { 32 | require(`./handler/${handler}`)(bot); 33 | }); 34 | /**/ 35 | let util = require("util"), 36 | readdir = util.promisify(fs.readdir); 37 | 38 | const init = async () => { 39 | // Then we load events, which will include our message and ready event. 40 | const evtFiles = await readdir("./events/"); 41 | console.log(`Loading a total of ${evtFiles.length} events.`, "log"); 42 | evtFiles.forEach(file => { 43 | const eventName = file.split(".")[0]; 44 | console.log(`Loading Event: ${eventName}`); 45 | const event = new(require(`./events/${file}`))(bot); 46 | bot.on(eventName, (...args) => event.run(...args, bot)); 47 | delete require.cache[require.resolve(`./events/${file}`)]; 48 | }); 49 | }; 50 | init(); 51 | 52 | bot.on("ready", () => { 53 | console.log(`[!]-------------------------------------[!]`); 54 | console.log(`Display Name : ${bot.user.username}`); 55 | console.log(`Public Prefix : ${prefix}`); 56 | console.log(`Version : v2`); 57 | console.log(`[!]-------------------------------------[!]`); 58 | }); 59 | 60 | bot.on("ready", async () => { 61 | /* let channel = bot.channels.cache.get("890671956054122587"); 62 | channel.send(new Discord.MessageEmbed().setColor(Color).setTimestamp().setThumbnail(bot.user.displayAvatarURL()).setTitle("Whoami Status").addField("Prefix", "`s!`").addField("Status", "<:enable:840230134899671060> Online").addField("Servers", `${bot.guilds.cache.size}`));*/ 63 | await bot.user.setStatus("online"); 64 | await bot.user.setActivity(`${prefix}help expert secuirty bot`, { type: "PLAYING" }); 65 | 66 | 67 | }); 68 | /////////////// 69 | bot.on("message", async message => { 70 | let guild = await Guild.findOne({ guildID: message.guild.id }) 71 | if (message.content.startsWith(`<@${bot.user.id}>`)) { 72 | return message.reply(`My prefix is \`${guild.prefix}\``); 73 | } 74 | }); 75 | ///// 76 | 77 | 78 | //// 79 | /*bot.on("message", async message => { 80 | if (message.content.startsWith(prefix + "menu")) { 81 | 82 | let option1 = new MessageMenuOption() 83 | .setLabel("General") 84 | .setValue("Option 1") 85 | .setDescription("To show general commands!") 86 | .setDefault() 87 | let option2 = new MessageMenuOption() 88 | .setLabel("Moderation") 89 | .setValue("Option 2") 90 | .setDescription("To show moderation commands!") 91 | .setDefault() 92 | let option3 = new MessageMenuOption() 93 | .setLabel("Config") 94 | .setValue("Option 3") 95 | .setDescription("To show config commands!") 96 | .setDefault() 97 | let option4 = new MessageMenuOption() 98 | .setLabel("Security") 99 | .setValue("Option 4") 100 | .setDescription("To show security commands!") 101 | .setDefault() 102 | let selection = new MessageMenu() 103 | .setID("Selection") 104 | .setMaxValues(1) 105 | .setMinValues(1) 106 | .setPlaceholder("Click me to show help menu!") 107 | .addOption(option1) 108 | .addOption(option2) 109 | .addOption(option3) 110 | .addOption(option4) 111 | let embed = new Discord.MessageEmbed() 112 | .setColor(Color).setTitle(`<:AntiVandalism:879031706080911430> This is list for all commands`) 113 | let menumsg = await message.channel.send(embed, selection) 114 | function menuselection(menu) { 115 | switch(menu.values[0]) { 116 | case "Option 1": 117 | menu.reply.send(new Discord.MessageEmbed().setColor(Color).setTitle("General Section").setDescription(`**invite**: Use this command to get the invite link\n\n**support**: Use this command to get the server support link\n\n**stats**: Get more information about the bot\n\n**serverinfo**: Get more information about your server\n\n**ping**: To show ping bot\n\n**userinfo**: Get more information about yourself\n\n**bots**: Get list of the bots on your server,no hidden bots anymor\n\n**vote**: Use this command to get the vote link\n\n**premium**: Get more information premium commands`)) 118 | break; 119 | case "Option 2": 120 | menu.reply.send(new Discord.MessageEmbed().setColor(Color).setTitle("Moderation Section").setDescription(`**ban**: You can ban a member, or multiple members using this command\n\n**kick**: You can kick a member, or multiple members using this command\n\n**bans**: Get list of the bans on your server\n\n**mute**: Mute mentioned member\n\n**purge**: To clear the text channel\n\n**lock**: Locks the current or selected text channels\n\n**unlock**: Unlocks the current or selected text channels\n\n**lockall**: Locks all text channels from your server\n\n**unlockall**: Unlocks all text channels from your server, not recommended\n\n**unbanall**: You can unban all the banned users`)) 121 | break; 122 | case "Option 3": 123 | menu.reply.send(new Discord.MessageEmbed().setColor(Color).setTitle("Config Section").setDescription(`**setlang**: To change language\n\n**setprefix**: Change the prefix of the bot`)) 124 | break; 125 | case "Option 4": 126 | menu.reply.send(new Discord.MessageEmbed().setColor(Color).setTitle("Security Section").setDescription(`**anti**: To show command limits the bot\n\n**settings**: Check your server settings\n\n**punishment**: Change the punishment type of the server\n\n**whitelist**: Security will ignore whitelist users\n\n**logs**: To show log server`)) 127 | break; 128 | } 129 | } 130 | bot.on("clickMenu", (menu) => { 131 | if(menu.message.id == menumsg.id) { 132 | if(menu.clicker.user.id == message.author.id) menuselection(menu) 133 | else menu.reply.send("You are not allowed to pick something", true) 134 | } 135 | }) 136 | } 137 | })*/ 138 | //// 139 | 140 | /*bot.on('ready', () => { 141 | let channel = bot.channels.cache.get("890671934826758145"); 142 | if (channel) channel.join(); 143 | });*/ 144 | 145 | //// 146 | 147 | bot.on("clickButton", async (button) => { 148 | console.log(button.id); 149 | }); 150 | 151 | //=============================== - [ ghostping ] - ===================================// 152 | 153 | /* 154 | bot.on("message", (message) => {}); 155 | bot.on("messageDelete", (message) => { 156 | if (message.mentions.users.first()) { 157 | message.channel.send(new Discord.MessageEmbed().setColor(Color) .setTitle("Ghost Ping Detected!") 158 | .setDescription(`**${message.author}** just pinged **${ 159 | message.mentions.users.first().username 160 | }** and then someone deleted the message!`) 161 | .addField("Deleted message content", `||**${ 162 | message.mentions.users.first().username 163 | }**||`)); 164 | } 165 | }); 166 | bot.on("messageUpdate", (message, newMessage) => { 167 | if (message.mentions.users.first()) { 168 | if (newMessage.mentions.users.first()) return; 169 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setTitle("Ghost Ping Detected!") 170 | .setDescription(`Ghost Ping Found!\n${message.author} just pinged ${ 171 | message.mentions.users.first().username 172 | } and then someone deleted the message!`) 173 | .addField("Deleted message content", `||${ 174 | message.mentions.users.first().username 175 | }||`)); 176 | } 177 | });*/ 178 | 179 | //=============================== - [ antimention ] - ===================================// 180 | 181 | /*bot.on('webhookUpdate', async (channel) => { 182 | if (message.author.bot) return; 183 | let guild = await Guild.findOne({ guildID: message.guild.id }); 184 | if (!guild) { Guild.create({ guildID: message.guild.id }); } 185 | if (guild) { 186 | if (guild.webhook.onoff === "off") return; 187 | 188 | if (message.author.id === message.guild.ownerID) return console.log("owner"); 189 | if (guild.whitelist.find((c) => c.type === message.author.id)) 190 | return console.log("whitelist"); 191 | 192 | channel.guild.fetchAuditLogs({limit: 1, type: "WEBHOOK_CREATE"}).then(data => { 193 | const value = data.entries.first(); 194 | if (value && value.executor) { 195 | const member = channel.guild.members.cache.get(value.executor.id); 196 | if (member) 197 | member.kick().catch(reason => console.error(reason.message)).then(() => console.log(`${member.user.tag} kicked because of webhook created !`)); 198 | } 199 | }).catch(err => console.error(err.message)) 200 | channel.fetchWebhooks().then(webs => webs.each(w => w.delete().catch(reason => console.error(reason.message)).then(() => console.log('Webhook deleted successfully')))).catch(error => console.error(error.message)) 201 | } 202 | }) 203 | */ 204 | ///// 205 | /*bot.on('message', message => { 206 | let non = ['@here','@everyone'] 207 | if(non.some(w => message.content.includes(w))) { 208 | if(message.deletable) { 209 | message.delete() 210 | } 211 | } 212 | })*/ 213 | //=============================== - [ antispam ] - ===================================// 214 | const usersMap = new Map(); 215 | const LIMIT = 5; 216 | const TIME = 6000; 217 | const DIFF = 7000; 218 | 219 | bot.on("message", async message => { 220 | if (!message.channel.guild) return; 221 | let guild = await Guild.findOne({ guildID: message.guild.id }); 222 | if (!guild) { Guild.create({ guildID: message.guild.id }); } 223 | if (guild) { 224 | if (guild.spam.onoff === "off") return; 225 | let Ww = await Owner.findOne({ ownerCode: "681553671364018196" }); 226 | if (Ww.worldWhitelist.find((c) => c.type === message.author.id)) return; 227 | if (message.author.id === message.guild.ownerID) return console.log("owner"); 228 | if (guild.whitelist.find((c) => c.type === message.author.id)) 229 | return console.log("whitelist"); 230 | let pun = guild.punishment; 231 | if (message.author.bot) return; 232 | if (usersMap.has(message.author.id)) { 233 | const userData = usersMap.get(message.author.id); 234 | const { lastMessage, timer } = userData; 235 | const difference = message.createdTimestamp - lastMessage.createdTimestamp; 236 | let msgCount = userData.msgCount; 237 | if (difference > DIFF) { 238 | clearTimeout(timer); 239 | userData.msgCount = 1; 240 | userData.lastMessage = message; 241 | userData.timer = setTimeout(() => { 242 | usersMap.delete(message.author.id); 243 | }, TIME); 244 | usersMap.set(message.author.id, userData); 245 | } else { 246 | ++msgCount; 247 | if (parseInt(msgCount) >= LIMIT) { 248 | if (pun === "") { 249 | if (!message.member.bannable) return console.log(``); 250 | message.channel.guild.members.cache 251 | .get(message.author.id) 252 | .ban() 253 | message.channel.bulkDelete(msgCount, true); 254 | } else { 255 | message.channel.guild.members.cache 256 | .get(message.author.id) 257 | .kick() 258 | .then(k => { 259 | k.guild.owner.send(new Discord.MessageEmbed() 260 | .setColor(Color) 261 | .setDescription(`**${message.author.username}** kicked because spaming in channel!`)); 262 | }); 263 | message.channel.bulkDelete(msgCount, true); 264 | } 265 | } else { 266 | userData.msgCount = msgCount; 267 | usersMap.set(message.author.id, userData); 268 | } 269 | } 270 | } else { 271 | let fn = setTimeout(() => { 272 | usersMap.delete(message.author.id); 273 | }, TIME); 274 | usersMap.set(message.author.id, { 275 | msgCount: 1, 276 | lastMessage: message, 277 | timer: fn 278 | }); 279 | } 280 | } 281 | }); 282 | -------------------------------------------------------------------------------- /commands/admin/ban.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | const { Color } = require("../../config.js"); 3 | 4 | module.exports = { 5 | name: "ban", 6 | aliases: ["band"], 7 | description: "You can ban a member, or multiple members using this command", 8 | usage: ["e!ban [@User]"], 9 | category: ["Moderation"], 10 | enabled: true, 11 | memberPermissions: ["BAN_MEMBERS"], 12 | botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "BAN_MEMBERS"], 13 | ownerOnly: false, 14 | cooldown: 6000, 15 | run: async (client, message, args, dev) => { 16 | 17 | let user = await message.mentions.members.first() || message.guild.members.cache.get(args[1]) || message.guild.members.cache.find(r => r.user.username == args[1]) || message.guild.members.cache.find(r => r.displayName == args[1]) || message.guild.members.cache.find(r => r.id == args[1]) || message.member; 18 | /// 19 | 20 | if (!user) 21 | return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**Based on the role hierarchy, you cannot ban this user**`)).catch(console.error); 22 | 23 | if (user.id === client.user.id) { 24 | return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**You can't kick yourself**`)); 25 | } 26 | 27 | if (user.id === client.user.id) return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**I can't ban myself**`)); 28 | 29 | if (message.guild.ownerID !== message.author.id && user.roles.highest.comparePositionTo(message.member.roles.highest) >= 0) 30 | return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`Usage: e!ban [@User]`)); 31 | 32 | if (!message.guild.member(user).bannable) return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**I cannot ban the mentioned user**`)); 33 | 34 | 35 | const embedBan = new Discord.MessageEmbed() 36 | .setColor(Color) 37 | .setDescription(`<:emoji_54:922264932676931624> **${user}** **banned from the server!**✈️`) 38 | 39 | message.channel.send(embedBan); 40 | user.ban({ reason: args[1] }); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /commands/admin/clear.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "clear", 7 | aliases: ["e!clear"], 8 | description: "To clear the text channel", 9 | usage: ["e!clear [0/100]"], 10 | category: ["Moderation"], 11 | enabled: true, 12 | memberPermissions: [ "MANAGE_MESSAGES" ], 13 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "MANAGE_MESSAGES" ], 14 | ownerOnly: false, 15 | cooldown: 6000, 16 | run: async (bot, message, dev) => { 17 | message.delete() 18 | 19 | /// 20 | let args = message.content.split(" ").slice(1); 21 | let messagecount = parseInt(args); 22 | if (args > 100) { 23 | args = 100 24 | } 25 | if (!messagecount) args = "100"; 26 | message.channel.bulkDelete(messagecount) 27 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**I have cleared **${args}** messages.**`)) 28 | .then(msg => msg.delete({timeout:1500})); 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /commands/admin/kick.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | const { Color } = require("../../config.js"); 3 | 4 | module.exports = { 5 | name: "kick", 6 | aliases: ["kicked"], 7 | description: "You can kick a member, or multiple members using this command", 8 | usage: ["e!kick [@User]"], 9 | category: ["Moderation"], 10 | enabled: true, 11 | memberPermissions: [ "KICK_MEMBERS" ], 12 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS","KICK_MEMBERS" ], 13 | ownerOnly: false, 14 | cooldown: 6000, 15 | run: async (client, message, args, dev) => { 16 | 17 | let user = await message.mentions.members.first() || message.guild.members.cache.get(args[1]) || message.guild.members.cache.find(r => r.user.username == args[1]) || message.guild.members.cache.find(r => r.displayName == args[1]) || message.guild.members.cache.find(r => r.id == args[1]) || message.member; 18 | /// 19 | 20 | if (!user) 21 | return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**Usage: e!kick [@User]**`)).catch(console.error); 22 | 23 | if (user.id === client.user.id) { 24 | return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**can't kick myself**`)); 25 | } 26 | 27 | if (user.id === message.author.id) { 28 | return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**You can't kick yourself**`)); 29 | } 30 | 31 | if (message.mentions.users.size < 1) return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**Mention 1 single user**`)).catch(console.error); 32 | 33 | 34 | if (!message.guild.member(user).kickable) return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**I can't kick the mentioned user**`)); 35 | 36 | 37 | const embedKick = new Discord.MessageEmbed() 38 | .setColor(Color) 39 | .setDescription(`<:emoji_54:922264932676931624> **${user}** **kicked from the server! **`) 40 | 41 | message.channel.send(embedKick); 42 | user.kick(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /commands/admin/lock.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | const { Color } = require("../../config.js"); 3 | 4 | module.exports = { 5 | name: "lock", 6 | aliases: ["E!lock"], 7 | description: "Locks the current or selected text channels", 8 | usage: ["e!lock"], 9 | category: ["Moderation"], 10 | enabled: true, 11 | memberPermissions: [ "MANAGE_CHANNELS" ], 12 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS","MANAGE_CHANNELS" ], 13 | ownerOnly: false, 14 | cooldown: 6000, 15 | run: async (bot, message, args, dev, data) => { 16 | 17 | 18 | 19 | message.channel 20 | .updateOverwrite(message.guild.id, { 21 | SEND_MESSAGES: false 22 | }) 23 | .then(() => { 24 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(` 25 | <:emoji_52:922264893657341972> | **Locked Channel** 26 | **Channel Name** : <#${message.channel.id}> 27 | **Locked By** : <@${message.author.id}> 28 | **Channel Status : Send Message :** ❌ 29 | `)); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /commands/admin/lockall.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | const { Color } = require("../../config.js"); 3 | 4 | module.exports = { 5 | name: "lockall", 6 | aliases: ["E!lockall"], 7 | description: "Locks all text channels from your server", 8 | usage: ["e!lockall"], 9 | category: ["Moderation"], 10 | enabled: true, 11 | memberPermissions: [ "MANAGE_CHANNELS" ], 12 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS","MANAGE_CHANNELS" ], 13 | ownerOnly: false, 14 | cooldown: 6000, 15 | run: async (bot, message, args, dev, data) => { 16 | 17 | 18 | const embed = new Discord.MessageEmbed() 19 | .setColor(Color) 20 | .setDescription(` 21 | <:emoji_51:922264869510737941> | **All Channels Locked** 22 | **All Channel Locked** |${message.guild.channels.cache.size}** 23 | **Channel Name** : <#${message.channel.id}> 24 | **Locked By** : <@${message.author.id}> 25 | **Channel Status : Send Message :** ❌ 26 | `); 27 | message.channel.send(embed); 28 | 29 | message.guild.channels.cache.filter(c => c.name).forEach(async channel => { 30 | channel 31 | .updateOverwrite(message.guild.id, { 32 | SEND_MESSAGES: false 33 | }) 34 | }); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /commands/admin/prefix.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "prefix", 7 | aliases: ["E!prefix"], 8 | description: "Change the prefix of the bot", 9 | usage: ["e!prefix [Prefix]"], 10 | category: ["Moderation"], 11 | enabled: true, 12 | memberPermissions: [ "ADMINISTRATOR" ], 13 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 14 | ownerOnly: false, 15 | cooldown: 10000, 16 | run: async (bot, message, args, dev, data) => { 17 | if(!args[1]) return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`Type something!`)); 18 | if(args[1].length > 5) return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**You need set prefix lower 5 length**`)); 19 | 20 | let dataa = await Guild.findOne({ guildID: message.guild.id }) 21 | 22 | let embed = new Discord.MessageEmbed() 23 | .setColor(Color) 24 | .setDescription(`New prefix in this guild is ⇏ ${args[1]}`) 25 | message.channel.send(embed) 26 | dataa.prefix = args[1]; 27 | dataa.save(); 28 | }}; 29 | -------------------------------------------------------------------------------- /commands/admin/unbanall.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | const { Color } = require("../../config.js"); 3 | 4 | module.exports = { 5 | name: "unbanall", 6 | aliases: ["unbandall"], 7 | description: "You can unban all the banned users", 8 | usage: ["e!unbanall"], 9 | category: ["Moderation"], 10 | enabled: true, 11 | memberPermissions: [ "ADMINISTRATOR" ], 12 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS", "ADMINISTRATOR" ], 13 | ownerOnly: false, 14 | cooldown: 6000, 15 | prime: true, 16 | run: async (bot, message, args, dev) => { 17 | 18 | 19 | if (message.member.hasPermission("ADMINISTRATOR")) { 20 | message.guild.fetchBans().then(bans => { 21 | if (bans.size == 0) { message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**There are no banned users**`)); throw "**No members to unban**"}; 22 | bans.forEach(ban => { 23 | message.guild.members.unban(ban.user.id); 24 | }); 25 | }).then(() => message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**Unbanned all users**`))).catch(e => console.log(e)) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /commands/admin/unlock.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | const { Color } = require("../../config.js"); 3 | 4 | module.exports = { 5 | name: "unlock", 6 | description: "Unlocks the current or selected text channels", 7 | usage: ["e!unlock"], 8 | category: ["Moderation"], 9 | enabled: true, 10 | memberPermissions: [ "MANAGE_CHANNELS" ], 11 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS","MANAGE_CHANNELS" ], 12 | ownerOnly: false, 13 | cooldown: 6000, 14 | run: async (bot, message, args, dev, data) => { 15 | message.channel 16 | .updateOverwrite(message.guild.id, { 17 | SEND_MESSAGES: true 18 | }) 19 | .then(() => { 20 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(` 21 | <:emoji_51:922264869510737941> | **UnLocked Channel** 22 | **Channel Name** : <#${message.channel.id}> 23 | **Locked By** : <@${message.author.id}> 24 | **Channel Status : Send Message :** ✅` 25 | )); 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /commands/admin/unlockall.js: -------------------------------------------------------------------------------- 1 | const Discord = require('discord.js') 2 | const { Color } = require("../../config.js"); 3 | 4 | module.exports = { 5 | name: "unlockall", 6 | 7 | description: "Unlocks all text channels from your server, not recommended", 8 | usage: ["e!unlockall"], 9 | category: ["Moderation"], 10 | enabled: true, 11 | memberPermissions: [ "MANAGE_CHANNELS" ], 12 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS","MANAGE_CHANNELS" ], 13 | ownerOnly: false, 14 | cooldown: 6000, 15 | run: async (bot, message, args, dev, data) => { 16 | 17 | 18 | const embed = new Discord.MessageEmbed() 19 | .setColor(Color) 20 | .setDescription(` 21 | <:emoji_51:922264869510737941> | **All Channels Unlocked** 22 | **All Channel Unlocked** |${message.guild.channels.cache.size}** 23 | **Channel Name** : <#${message.channel.id}> 24 | **Locked By** : <@${message.author.id}> 25 | **Channel Status : Send Message :** ✅ 26 | `); 27 | message.channel.send(embed); 28 | 29 | message.guild.channels.cache.filter(c => c.name).forEach(async channel => { 30 | channel 31 | .updateOverwrite(message.guild.id, { 32 | SEND_MESSAGES: true 33 | }) 34 | }); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /commands/general/help.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { MessageButton, MessageActionRow } = require("discord-buttons"); 4 | const { Color, Image, Footer, Author } = require("../../config.js"); 5 | module.exports = { 6 | name: "help", 7 | aliases: ["e!help","e!help " , "e!h"], 8 | description: "To show you all command of the bot", 9 | usage: ["e!help","e!help "], 10 | category: ["General"], 11 | enabled: true, 12 | memberPermissions: [ "SEND_MESSAGES" ], 13 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 14 | ownerOnly: false, 15 | cooldown: 1000, 16 | run: async (bot, message, args, dev, data) => { 17 | 18 | if (!args[1]) { 19 | let help = new Discord.MessageEmbed() 20 | .setColor(Color) 21 | .setAuthor(Author) 22 | .setImage(Image) 23 | 24 | .setDescription(`<@${bot.user.id}> a security bot to protection your server please use **e!!help** followed by a command name to get more additional information on a command. For example: **e!help**`) 25 | .addField("🛡️ || Security" , "`settings` , `antiban` , `antikick` , `antichannel` , `antirole` , `antispam` , `antibot` , `antiwebhook` , `punishment` , `whitelis` , `anti`") 26 | .addField("⚙️ || Admin" , "`ban` , `kick` , `unbanall` , `clear` , `lock` , `unlock` , `lockall` , `unlockall` , `prefix`") 27 | .addField("<:jano_66:925613617938849812> || General" , "`invite` , `stats` , `serverinfo` , `userinfo`") 28 | .setFooter(Footer) 29 | 30 | let button1 = new MessageButton() 31 | .setStyle('url') 32 | .setURL('https://discord.com/api/oauth2/authorize?client_id=733287493041913877&permissions=8&scope=bot') 33 | .setEmoji(`🌍`) 34 | .setLabel('Invite') 35 | 36 | ////////////// 37 | let button2 = new MessageButton() 38 | .setStyle('url') 39 | .setURL('https://discord.gg/69CEKvnEGY') 40 | .setEmoji(`💢`) 41 | .setLabel('Support') 42 | 43 | 44 | 45 | let row1 = new MessageActionRow() 46 | .addComponents(button1, button2) 47 | 48 | return message.channel.send(help,row1); 49 | } else { 50 | let command = args[1] 51 | if (bot.commands.has(command) || 52 | bot.aliases.has(command)) { 53 | 54 | command = bot.commands.get(command) || bot.aliases.get(command); 55 | let ccmd = "<:disable:840230135046471711> Disabled" 56 | if ( command.enabled ) { 57 | ccmd = "<:enable:840230134899671060> Enabled" 58 | } 59 | let help1 = new Discord.MessageEmbed() 60 | .setColor(Color) 61 | .setThumbnail(message.author.avatarURL()) 62 | .setTitle("**Help**") 63 | .setDescription(command.description || command.name + " this command don't have a description") 64 | .addField("**Usage**", "" + command.usage.join(", ") + "" ) 65 | .addField("**Category**", "" + command.category.join(", ") + "" ) 66 | .addField("**Command is**", ccmd); 67 | message.channel.send(help1) 68 | } 69 | } 70 | }}; 71 | -------------------------------------------------------------------------------- /commands/general/invite.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js") 3 | const { MessageButton, MessageActionRow } = require("discord-buttons"); 4 | const { Color } = require("../../config.js"); 5 | 6 | module.exports = { 7 | name: "invite", 8 | 9 | description: "Use this command to get the invite link", 10 | usage: ["e!invite"], 11 | category: ["General"], 12 | enabled: true, 13 | memberPermissions: ["SEND_MESSAGES"], 14 | botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], 15 | ownerOnly: false, 16 | cooldown: 2000, 17 | run: async (bot, message, args, dev, data) => { 18 | 19 | 20 | let invite = new Discord.MessageEmbed() 21 | .setColor(Color) 22 | .setTitle(`<@${bot.user.id}>`) 23 | .setThumbnail(bot.user.displayAvatarURL()) 24 | .setDescription(`Click Below On Invite Link!`) 25 | 26 | let butn = new MessageButton() 27 | .setStyle('url') 28 | .setURL('https://discord.com/api/oauth2/authorize?client_id=733287493041913877&permissions=8&scope=bot') 29 | .setEmoji(`🔗`) 30 | .setLabel('Invite Link!') 31 | 32 | let row = new MessageActionRow() 33 | .addComponents(butn) 34 | 35 | return message.channel.send(invite,row); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /commands/general/serverinfo.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const { Color } = require("../../config.js"); 3 | const { MessageEmbed } = require('discord.js'); 4 | 5 | const moment = require('moment'); 6 | 7 | const filterLevels = { 8 | 9 | DISABLED: 'Off', 10 | 11 | MEMBERS_WITHOUT_ROLES: 'No Role', 12 | 13 | ALL_MEMBERS: 'Everyone' 14 | 15 | }; 16 | 17 | const verificationLevels = { 18 | 19 | NONE: 'None', 20 | 21 | LOW: 'Low', 22 | 23 | MEDIUM: 'Medium', 24 | 25 | HIGH: '(╯°□°)╯︵ ┻━┻', 26 | 27 | VERY_HIGH: '┻━┻ ミヽ(ಠ益ಠ)ノ彡┻━┻' 28 | 29 | }; 30 | 31 | 32 | module.exports = { 33 | name: "serverinfo", 34 | 35 | description: "Get more information about your server", 36 | usage: ["e!serverinfo"], 37 | category: ["General"], 38 | enabled: true, 39 | memberPermissions: ["SEND_MESSAGES"], 40 | botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], 41 | ownerOnly: false, 42 | cooldown: 3000, 43 | run: async (bot, message, args, dev, data) => { 44 | 45 | const roles = message.guild.roles.cache.sort((a, b) => b.position - a.position).map(role => role.toString()); 46 | 47 | // const prime = await Prime.findOne({Guild: message.guild.id}) 48 | //const premium = prime.prime 49 | 50 | const members = message.guild.members.cache; 51 | 52 | let guild = await Guild.findOne({ guildID: message.guild.id }); 53 | 54 | const channel = message.guild.channels.cache.size; 55 | 56 | const channels = message.guild.channels.cache; 57 | 58 | const emojis = message.guild.emojis.cache; 59 | 60 | const embed = new MessageEmbed() 61 | .setTitle("Guild information") 62 | .setColor(Color) 63 | .setThumbnail(message.guild.iconURL({ dynamic: true })) 64 | .addField("Name", `${message.guild.name}`) 65 | .addField("ID", `${message.guild.id}`) 66 | .addField("Owner", `<@${message.guild.ownerID}>`) 67 | .addField("Explicit Filter", `${filterLevels[message.guild.explicitContentFilter]}`) 68 | .addField("Verification Level", `${verificationLevels[message.guild.verificationLevel]}`) 69 | .addField("Time Created", `${moment(message.guild.createdTimestamp).format('LT')} ${moment(message.guild.createdTimestamp).format('LL')} ${moment(message.guild.createdTimestamp).fromNow()}`) 70 | .addField("Role Count", `${roles.length}`) 71 | .addField("Boost Count", `${message.guild.premiumSubscriptionCount || '0'}`) 72 | .addField("Member Count", `${message.guild.memberCount}`) 73 | .addField("Bots", `${members.filter(member => member.user.bot).size}`) 74 | .addField(`Channels (${channel})`, `${channels.filter(channel => channel.type === 'text').size} Text | ${channels.filter(channel => channel.type === 'voice').size} Voice`) 75 | .addField("Emoji Count", `${emojis.size}`) 76 | 77 | 78 | message.channel.send(embed); 79 | 80 | } 81 | 82 | }; 83 | -------------------------------------------------------------------------------- /commands/general/stats.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { MessageButton, MessageActionRow } = require("discord-buttons"); 4 | const { Color } = require("../../config.js"); 5 | const ms = require('ms'); 6 | const moment = require("moment"); 7 | require("moment-duration-format"); 8 | const os = require('os') 9 | const si = require('systeminformation'); 10 | 11 | module.exports = { 12 | name: "stats", 13 | aliases: ["botinfo"], 14 | description: "Get more information about the bot", 15 | usage: ["s!stats"], 16 | category: ["General"], 17 | enabled: true, 18 | memberPermissions: [ "SEND_MESSAGES" ], 19 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 20 | ownerOnly: false, 21 | cooldown: 2000, 22 | run: async (bot, message, args, dev) => { 23 | 24 | 25 | 26 |  const created = moment(bot.user.createdAt).format("YYYY-MM-DD"); 27 | 28 | const duration1 = moment.duration(message.client.uptime).format(" D [days], H [hrs], m [mins], s [secs]"); 29 | 30 | const cpu = await si.cpu(); 31 |   32 | 33 | 34 | const stats = new Discord.MessageEmbed() 35 | 36 | .setColor(Color) 37 | .setThumbnail(bot.user.displayAvatarURL()) 38 | .setTitle("Expert Stats") 39 | .setDescription(`**Statistics**\n\nServers: ${bot.guilds.cache.size}\nBot Id: ${bot.user.id}\nCommands Count: 19\nBot Created At: ${created}\nPing: ${Math.round(bot.ws.ping)}ms\nUptime: ${duration1}\n\nTotal Memory: ${(os.totalmem() / 1024 / 1024).toFixed(2)} Mbps\nFree Memory: ${(os.freemem() / 1024 / 1024).toFixed(2)} Mbps\nHeap Total: ${(process.memoryUsage().heapTotal / 1024 / 1024).toFixed(2)} Mbps\nHeap Usage: ${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)} Mbps 40 | `) 41 | 42 | 43 | let button1 = new MessageButton() 44 | .setStyle('url') 45 | .setURL('https://discord.com/api/oauth2/authorize?client_id=733287493041913877&permissions=8&scope=bot') 46 | .setLabel('Click Here To Invite Expert') 47 | 48 | 49 | let row1 = new MessageActionRow() 50 | .addComponents(button1) 51 | 52 | return message.channel.send(stats,row1); 53 | 54 | 55 | let button2 = new MessageButton() 56 | .setStyle('url') 57 | .setURL('https://discord.gg/69CEKvnEGY') 58 | .setLabel('My Server') 59 | 60 | 61 | let row2 = new MessageActionRow() 62 | .addComponents(button2) 63 | 64 | return message.channel.send(stats,row2); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /commands/general/support.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js") 3 | const { MessageButton, MessageActionRow } = require("discord-buttons"); 4 | const { Color } = require("../../config.js"); 5 | 6 | module.exports = { 7 | name: "support", 8 | 9 | description: "Use this command to get the invite link", 10 | usage: ["e!support"], 11 | category: ["General"], 12 | enabled: true, 13 | memberPermissions: ["SEND_MESSAGES"], 14 | botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], 15 | ownerOnly: false, 16 | cooldown: 2000, 17 | run: async (bot, message, args, dev, data) => { 18 | 19 | 20 | let invite = new Discord.MessageEmbed() 21 | .setColor(Color) 22 | .setTitle(`<@${bot.user.id}>`) 23 | .setThumbnail(bot.user.displayAvatarURL()) 24 | .setDescription(`Click Below On Link Server!`) 25 | 26 | let butn = new MessageButton() 27 | .setStyle('url') 28 | .setURL('https://discord.gg/69CEKvnEGY') 29 | .setEmoji(`🗳`) 30 | .setLabel('Link Server') 31 | 32 | let row = new MessageActionRow() 33 | .addComponents(butn) 34 | 35 | return message.channel.send(invite,row); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /commands/general/userinfo.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const { MessageEmbed } = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "userinfo", 7 | description: "Get more information about yourself", 8 | usage: ["e!userinfo"], 9 | category: ["General"], 10 | enabled: true, 11 | memberPermissions: [ "SEND_MESSAGES" ], 12 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 13 | ownerOnly: false, 14 | cooldown: 2000, 15 | run: async (bot, message, args) => { 16 | 17 | let member = await message.mentions.members.first() || message.guild.members.cache.get(args[1]) || message.guild.members.cache.find(r => r.user.username == args[1]) || message.guild.members.cache.find(r => r.displayName == args[1]) || message.guild.members.cache.find(r => r.id == args[1]) || message.member; 18 | /// 19 | let nickname = member.nickname !== undefined && member.nickname !== null ? member.nickname : "None"; 20 | /// 21 | const bots = member.user.bot ? "True" : "False"; 22 | /// 23 | /*if (member.premiumSince) { 24 | boost = "Yes" 25 | } else { 26 | boost = "No" 27 | }*/ 28 | /// 29 | 30 | 31 | const embed = new MessageEmbed() 32 | .setColor(Color) 33 | .setThumbnail(member.user.displayAvatarURL()) 34 | .addField("Username", `${member.user.tag}`, true) 35 | .addField("Nickname", `${nickname}`, true) 36 | .addField("User Id", `${member.id}`, true) 37 | .addField("Is Bot", `${bots}`, true) 38 | .addField("Join", member.joinedAt.toDateString()) 39 | .addField("Creation", member.user.createdAt.toDateString()) 40 | .addField("Roles", `${member.roles.cache.filter(r => r.id !== message.guild.id).map(roles => `\`${roles.name}\``).length} Roles: <@&${member._roles.join('> <@&')}>`) 41 | 42 | message.channel.send(embed); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /commands/owner/left-servers.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const { Color } = require("../../config.js"); 3 | const Discord = require("discord.js"); 4 | const ownerid = "681553671364018196"; 5 | 6 | module.exports = { 7 | name: "leave", 8 | enabled: true, 9 | memberPermissions: [ "SEND_MESSAGES" ], 10 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 11 | ownerOnly: true, 12 | cooldown: 6000, 13 | run: async (bot, message, args) => { 14 | if (message.author.id == ownerid) { 15 | let args = message.content.split(" ")[1]; 16 | if (!args) message.channel.send(new Discord.MessageEmbed() 17 | .setColor(Color) 18 | .setDescrpition(`Please type server id`)) 19 | let Guild = bot.guilds.cache.get(args); 20 | if (!Guild) return message.channel.send(new Discord.MessageEmbed() 21 | .setColor(Color) 22 | .setDescription(`Invalid server id`)); 23 | Guild.leave(); 24 | message.channel.send(new Discord.MessageEmbed() 25 | .setColor(Color) 26 | .setDescription(`Done Leave **${Guild.name}**`)) 27 | 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /commands/owner/prime.js: -------------------------------------------------------------------------------- 1 | const moment = require("moment-timezone"); 2 | const parseInt = require("ms") 3 | const day = require("dayjs") 4 | module.exports = { 5 | name: "prime", 6 | enabled: false, 7 | memberPermissions: [ "SEND_MESSAGES" ], 8 | botPermissions: [ "SEND_MESSAGES" ], 9 | ownerOnly: true, 10 | cooldown: 1000, 11 | prime: false, 12 | run: async (bot, message, args, dev) => { 13 | 14 | if (args[1] === "time") { 15 | let data = await Prime.findOne({Guild: message.guild.id }); 16 | if (data) { 17 | if (data.log === "enable") { 18 | let time = day(data.time); 19 | if(!data.time) return message.channel.send(`Your srrver don't have prime bot`) 20 | 21 | 22 | message.channel.send(`Prime bot in this server end in ${time}`) 23 | 24 | } else { 25 | message.channel.send(`This server don't have a prime bot`) 26 | } 27 | } 28 | if (!data) { 29 | message.channel.send(`This server don't have a prime bot`) 30 | } 31 | } else 32 | 33 | if (args[1] === "add") { 34 | if (!args[2]) return message.channel.send(`Please specify guild id`) 35 | if(!bot.guilds.cache.has(args[2])) return message.channel.send(`Your guild id is invalid`) 36 | 37 | 38 | let time = day(args[3]).valueOf();; 39 | let data = await Prime.findOne({ Guild: args[2]}); 40 | if (data) { 41 | data.time = 0; 42 | data.log = "enable"; 43 | data.save() 44 | } 45 | if(!data) { Prime.create({ 46 | Guild: args[2], 47 | time: time, 48 | log: "enable", 49 | Permanent: false 50 | }); } 51 | let time0 = day(time) 52 | 53 | message.channel.send(`Prime bot in this server ${time0}`) 54 | 55 | } else if (args[1] === "remove") { 56 | if (!args[2]) return message.channel.send(`Pleade give me a guild id`) 57 | 58 | let data = await Prime.findOne({ Guild: args[2]}) 59 | 60 | if(data) { 61 | 62 | data.log = "enable"; 63 | data.delete() 64 | } 65 | message.channel.send(`Prime bot on server removed`) 66 | } 67 | 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /commands/owner/u.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "users", 3 | enabled: true, 4 | memberPermissions: [ "SEND_MESSAGES" ], 5 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 6 | ownerOnly: true, 7 | cooldown: 6000, 8 | run: async (bot, message, args) => { 9 | 10 | message.channel.send(`${bot.guilds.cache.reduce((a, g) => a + g.memberCount, 0)} Users!`); 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /commands/owner/wordWhitelist.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "devs", 7 | enabled: true, 8 | memberPermissions: [ "SEND_MESSAGES" ], 9 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 10 | cooldown: 10000, 11 | run: async (bot, message, args, dev) => { 12 | if (message.author.id === "681553671364018196") { 13 | let data = await Owner.findOne({ ownerCode: "681553671364018196" }); 14 | if(!data) { Owner.create({ ownerCode: "681553671364018196" });} 15 | /* 16 | worldWhitelist 17 | */ 18 | 19 | if (args[1] === "add") { 20 | let user = 21 | message.guild.members.cache.get(args[2]) || 22 | message.mentions.members.first(); 23 | if (!user) 24 | return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription( 25 | `<@${message.author.id}> Mention someone` 26 | )); 27 | if(!data.worldWhitelist.find((c) => c.type === user.id)){ 28 | await Owner.findOneAndUpdate( 29 | { 30 | ownerCode: "681553671364018196", 31 | }, 32 | { 33 | $push: { 34 | worldWhitelist: { 35 | type: user.id 36 | } 37 | }, 38 | }) 39 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(` ${user.user.username} Added to developer`)); 40 | } else { 41 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`This man is whitelisted`)); 42 | } 43 | } else if (args[1] === "remove") { 44 | let user = 45 | message.guild.members.cache.get(args[2]) || 46 | message.mentions.members.first(); 47 | if (!user) 48 | return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription( 49 | `<@${message.author.id}> Mention someone` 50 | )); 51 | if(data.worldWhitelist.find((c) => c.type === user.id)){ 52 | await Owner.findOneAndUpdate( 53 | { 54 | ownerCode: "681553671364018196", 55 | }, 56 | { 57 | $pull: { 58 | worldWhitelist: { 59 | type: user.id 60 | } 61 | }, 62 | }) 63 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(` ${user.user.username} Removed in developer`)); 64 | } else { 65 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(` ${user.user.username} Not in developer`)); 66 | }; 67 | } else if (!args[1]) { 68 | if (data.worldWhitelist.length === 0) return message.reply(new Discord.MessageEmbed().setColor(Color).setDescription(`No one developer!`)); 69 | let arrayOfCustomCommands = data.worldWhitelist.map(w => `⇰ <@${w.type}> - ${w.type}`) 70 | 71 | let embed = new Discord.MessageEmbed() 72 | .setTitle("Developer Bot") 73 | .setColor(Color) 74 | .setDescription(arrayOfCustomCommands.slice(0, 15).join('\n')); 75 | message.channel.send(embed); 76 | } 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /commands/security/anti-ban.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "antiban", 7 | aliases: ["anti-ban"], 8 | description: "Prevent others from mass banning your members", 9 | usage: ["e!antiban [number/on/off]"], 10 | category: ["Security"], 11 | enabled: true, 12 | memberPermissions: ["SEND_MESSAGES"], 13 | botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], 14 | ownerOnly: false, 15 | guilOwnerOnly: true, 16 | cooldown: 3000, 17 | run: async (bot, message, args) => { 18 | 19 | let guild = await Guild.findOne({ guildID: message.guild.id }); 20 | let num = args[1]; 21 | if (args[1] === "on") { 22 | guild.ban.onoff = "on"; 23 | guild.save(); 24 | const embed = new Discord.MessageEmbed() 25 | .setColor(Color) 26 | .setDescription(`**The AntiBan system is enabled correctly!** :white_check_mark:`); 27 | return message.channel.send(embed); 28 | } else if (args[1] === "off") { 29 | guild.ban.onoff = "off"; 30 | guild.save(); 31 | const embed1 = new Discord.MessageEmbed() 32 | .setColor(Color) 33 | .setDescription(`**The Antiban system is disabled correctly!** :x:`); 34 | return message.channel.send(embed1); 35 | } 36 | if (isNaN(num) || parseInt(num) < 1) { 37 | const embed2 = new Discord.MessageEmbed() 38 | .setColor(Color) 39 | .setDescription(`**Error :x: \n ${guild.prefix}antiban** \`[on,off,]\` ` 40 | ); 41 | return message.channel.send(embed2); 42 | } 43 | guild.ban.lmite = num; 44 | guild.save(); 45 | const embed3 = new Discord.MessageEmbed() 46 | .setColor(Color) 47 | .setDescription(`**Successfully antiban changed to** **${guild.ban.lmite}** <:emoji_54:922264932676931624>`); 48 | return message.channel.send(embed3); 49 | } 50 | }; 51 | -------------------------------------------------------------------------------- /commands/security/anti-bot.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "antibot", 7 | aliases: ["Antibot", "AntiBot"], 8 | description: "Prevent others from adding bots to your server", 9 | usage: ["e!antibot [on/off]"], 10 | category: ["Security"], 11 | enabled: true, 12 | memberPermissions: [ "SEND_MESSAGES" ], 13 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 14 | ownerOnly: false, 15 | guilOwnerOnly: true, 16 | cooldown: 3000, 17 | run: async (bot, message, args) => { 18 | 19 | let guild = await Guild.findOne({ guildID: message.guild.id }); 20 | let num = args[1]; 21 | if (args[1] === "on") { 22 | guild.bot.onoff = "on"; 23 | guild.save(); 24 | const embed = new Discord.MessageEmbed() 25 | .setColor(Color) 26 | .setDescription(`**The AntiBot system is enabled correctly!** :white_check_mark:`); 27 | return message.channel.send(embed); 28 | } else if (args[1] === "off") { 29 | guild.bot.onoff = "off"; 30 | guild.save(); 31 | const embed1 = new Discord.MessageEmbed() 32 | .setColor(Color) 33 | .setDescription(`**The AntiBot system is disabled correctly!** :x:`); 34 | return message.channel.send(embed1); 35 | } 36 | const embed2 = new Discord.MessageEmbed() 37 | .setColor(Color) 38 | .setDescription(`**Error :x: \n ${guild.prefix}antibot** \`[on,off]\` ` 39 | ); 40 | return message.channel.send(embed2); 41 | } 42 | }; 43 | -------------------------------------------------------------------------------- /commands/security/anti-channel.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "antichannel", 7 | aliases: ["anti-channel"], 8 | description: "Prevent others from crating or deleting channels", 9 | usage: ["e!antichannel [number/on/off]"], 10 | category: ["Security"], 11 | enabled: true, 12 | memberPermissions: ["SEND_MESSAGES"], 13 | botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], 14 | ownerOnly: false, 15 | guilOwnerOnly: true, 16 | cooldown: 3000, 17 | run: async (bot, message, args) => { 18 | 19 | let guild = await Guild.findOne({ guildID: message.guild.id }); 20 | let num = args[1]; 21 | if (args[1] === "on") { 22 | guild.channel.onoff = "on"; 23 | guild.save(); 24 | const embed = new Discord.MessageEmbed() 25 | .setColor(Color) 26 | .setDescription(`**The AntiChannel system is enabled correctly!** :white_check_mark:`); 27 | return message.channel.send(embed); 28 | } else if (args[1] === "off") { 29 | guild.channel.onoff = "off"; 30 | guild.save(); 31 | const embed1 = new Discord.MessageEmbed() 32 | .setColor(Color) 33 | .setDescription(`**The AntiChannel system is disabled correctly!** :x:`); 34 | return message.channel.send(embed1); 35 | } 36 | if (isNaN(num) || parseInt(num) < 1) { 37 | const embed2 = new Discord.MessageEmbed() 38 | .setColor(Color) 39 | .setDescription(`**Error :x: \n ${guild.prefix}antichannel** \`[on,off,]\` ` 40 | ); 41 | return message.channel.send(embed2); 42 | } 43 | guild.channel.lmite = num; 44 | guild.save(); 45 | const embed3 = new Discord.MessageEmbed() 46 | .setColor(Color) 47 | .setDescription(`**Successfully antichannel changed to** **${guild.channel.lmite}** <:emoji_54:922264932676931624> 48 | `); 49 | return message.channel.send(embed3); 50 | } 51 | }; 52 | -------------------------------------------------------------------------------- /commands/security/anti-kick.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "antikick", 7 | aliases: ["AntiKick","Antikick"], 8 | description: "Prevent others from mass kicking your members", 9 | usage: ["e!antikick [number/on/off]"], 10 | category: ["Security"], 11 | enabled: true, 12 | memberPermissions: [ "SEND_MESSAGES" ], 13 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 14 | ownerOnly: false, 15 | guilOwnerOnly: true, 16 | cooldown: 3000, 17 | run: async (bot, message, args) => { 18 | 19 | let guild = await Guild.findOne({ guildID: message.guild.id }); 20 | let num = args[1]; 21 | if (args[1] === "on") { 22 | guild.kick.onoff = "on"; 23 | guild.kick.user = message.author.tag 24 | guild.save(); 25 | const embed = new Discord.MessageEmbed() 26 | .setColor(Color) 27 | .setDescription(`**The AntiKick system is enabled correctly!** :white_check_mark:`); 28 | return message.channel.send(embed); 29 | } else if (args[1] === "off") { 30 | guild.kick.onoff = "off"; 31 | guild.save(); 32 | const embed1 = new Discord.MessageEmbed() 33 | .setColor(Color) 34 | .setDescription(`**The AntiKick system is disabled correctly!** `); 35 | return message.channel.send(embed1); 36 | } 37 | if (isNaN(num) || parseInt(num) < 1){ 38 | const embed2 = new Discord.MessageEmbed() 39 | .setColor(Color) 40 | .setDescription(`**Error :x: \n ${guild.prefix}antikick** \`[on,off,]\` :x:` 41 | ); 42 | return message.channel.send(embed2); 43 | } 44 | guild.kick.user = message.author.tag 45 | guild.kick.lmite = num; 46 | guild.save() 47 | const embed3 = new Discord.MessageEmbed() 48 | .setColor(Color) 49 | .setDescription(`**Successfully antikick changed to** **${guild.kick.lmite}** <:emoji_54:922264932676931624> 50 | `); 51 | return message.channel.send(embed3); 52 | } 53 | }; 54 | -------------------------------------------------------------------------------- /commands/security/anti-role.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "antirole", 7 | aliases: ["Antirole","AntiRole"], 8 | description: "Prevent others from crating or deleting roles", 9 | usage: ["e!antirole [number/on/off]"], 10 | category: ["Security"], 11 | enabled: true, 12 | memberPermissions: ["SEND_MESSAGES"], 13 | botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], 14 | ownerOnly: false, 15 | guilOwnerOnly: true, 16 | cooldown: 3000, 17 | run: async (bot, message, args) => { 18 | 19 | let guild = await Guild.findOne({ guildID: message.guild.id }); 20 | let num = args[1]; 21 | if (args[1] === "on") { 22 | guild.role.onoff = "on"; 23 | guild.save(); 24 | const embed = new Discord.MessageEmbed() 25 | .setColor(Color) 26 | .setDescription(`**The AntiRole system is enabled correctly!** :white_check_mark:`); 27 | return message.channel.send(embed); 28 | } else if (args[1] === "off") { 29 | guild.role.onoff = "off"; 30 | guild.save(); 31 | const embed1 = new Discord.MessageEmbed() 32 | .setColor(Color) 33 | .setDescription(`**The AntiRole system is disabled correctly!** :x:`); 34 | return message.channel.send(embed1); 35 | } 36 | if (isNaN(num) || parseInt(num) < 1) { 37 | const embed2 = new Discord.MessageEmbed() 38 | .setColor(Color) 39 | .setDescription(`**Error :x: \n ${guild.prefix}antirole** \`[on,off,]\` ` 40 | ); 41 | return message.channel.send(embed2); 42 | } 43 | guild.role.lmite = num; 44 | guild.save(); 45 | const embed3 = new Discord.MessageEmbed() 46 | .setColor(Color) 47 | .setDescription(`**Successfully antirole changed to** **${guild.role.lmite}** <:emoji_54:922264932676931624> 48 | `); 49 | return message.channel.send(embed3); 50 | } 51 | }; 52 | -------------------------------------------------------------------------------- /commands/security/anti-spam.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "antispam", 7 | aliases: ["Antispam","AntiSpam"], 8 | description: "With our new spam detect system, prevent anyone from trying to raid your server", 9 | usage: ["e!antispam [on/off]"], 10 | category: ["Security"], 11 | enabled: true, 12 | memberPermissions: ["MANAGE_MESSAGES"], 13 | botPermissions: ["MANAGE_MESSAGES", "EMBED_LINKS"], 14 | ownerOnly: false, 15 | guilOwnerOnly: true, 16 | cooldown: 3000, 17 | prime: false, 18 | run: async (bot, message, args) => { 19 | 20 | let guild = await Guild.findOne({ guildID: message.guild.id }); 21 | let num = args[1]; 22 | if (args[1] === "on") { 23 | guild.spam.onoff = "on"; 24 | guild.save(); 25 | const embed = new Discord.MessageEmbed() 26 | .setColor(Color) 27 | .setDescription(`**The AntiSpam system is enabled correctly!** :white_check_mark:`); 28 | return message.channel.send(embed); 29 | } else if (args[1] === "off") { 30 | guild.spam.onoff = "off"; 31 | guild.save(); 32 | const embed1 = new Discord.MessageEmbed() 33 | .setColor(Color) 34 | .setDescription(`**The AntiSpam system is disabled correctly!** :x:`); 35 | return message.channel.send(embed1); 36 | } 37 | const embed2 = new Discord.MessageEmbed() 38 | .setColor(Color) 39 | .setDescription(`**Error :x: \n ${guild.prefix}antispam** \`[on,off]\` ` 40 | ); 41 | return message.channel.send(embed2); 42 | } 43 | }; 44 | -------------------------------------------------------------------------------- /commands/security/anti-webhook.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "antiwebhook", 7 | aliases: ["antiWebhook","AntiWebhook"], 8 | description: "Prevent others from crating or deleting webhooks", 9 | usage: ["e!antiwebhook [number/on/off]"], 10 | category: ["Security"], 11 | enabled: true, 12 | memberPermissions: ["SEND_MESSAGES"], 13 | botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], 14 | ownerOnly: false, 15 | guilOwnerOnly: true, 16 | cooldown: 3000, 17 | run: async (bot, message, args) => { 18 | 19 | let guild = await Guild.findOne({ guildID: message.guild.id }); 20 | let num = args[1]; 21 | if (args[1] === "on") { 22 | guild.webhook.onoff = "on"; 23 | guild.save(); 24 | const embed = new Discord.MessageEmbed() 25 | .setColor(Color) 26 | .setDescription(`**The AntiWebhook system is enabled correctly!** :white_check_mark:`); 27 | return message.channel.send(embed); 28 | } else if (args[1] === "off") { 29 | guild.webhook.onoff = "off"; 30 | guild.save(); 31 | const embed1 = new Discord.MessageEmbed() 32 | .setColor(Color) 33 | .setDescription(`**The AntiWebhook system is disabled correctly!** :x:`); 34 | return message.channel.send(embed1); 35 | } 36 | const embed2 = new Discord.MessageEmbed() 37 | .setColor(Color) 38 | .setDescription(`**Error :x: \n ${guild.prefix}antiwebhook** \`[on,off]\` ` 39 | ); 40 | return message.channel.send(embed2); 41 | } 42 | }; 43 | -------------------------------------------------------------------------------- /commands/security/anti.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "anti", 7 | description: "To show command limits the bot", 8 | usage: ["e!anti"], 9 | category: ["Security"], 10 | enabled: true, 11 | memberPermissions: [ "ADMINISTRATOR" ], 12 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 13 | ownerOnly: false, 14 | cooldown: 2000, 15 | run: async (bot, message, args, dev) => { 16 | const embed = new Discord.MessageEmbed() 17 | .setColor(Color) 18 | .setTitle("List of all commands security") 19 | .setDescription(`**Type:** \`[on,off,]\`\n\ **antichannel, antirole, antiban, antikick, antispam, antibot**`) 20 | message.channel.send(embed); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /commands/security/punishment.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "punishment", 7 | aliases: ["push","Punish"], 8 | description: "Change the punishment type of the server", 9 | usage: ["e!punishment [kick/ban]"], 10 | category: ["Security"], 11 | enabled: true, 12 | memberPermissions: [ "SEND_MESSAGES" ], 13 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 14 | ownerOnly: false, 15 | guilOwnerOnly: true, 16 | cooldown: 4000, 17 | run: async (bot, message, args, dev) => { 18 | 19 | const embed1 = new Discord.MessageEmbed() 20 | .setColor(Color) 21 | .setDescription(`**Choose punishment** \`RemoveRole\` & \`Ban\` & \`Kick\` `); 22 | if (!args[1]) 23 | return message.channel.send(embed1); 24 | let data = await Guild.findOne({ guildID: message.guild.id }) 25 | if (args[1] === "kick" || args[1] === "ban" || args[1] === "removerole") { 26 | data.punishment = args[1]; 27 | const embed = new Discord.MessageEmbed() 28 | .setColor(Color) 29 | .setDescription(`**Successfully changed the Punishment to** **${data.punishment}** <:emoji_54:922264932676931624>`) 30 | message.channel.send(embed); 31 | data.save(); 32 | } else { 33 | const embed2 = new Discord.MessageEmbed() 34 | .setColor(Color) 35 | .setDescription(`**Error \n ${guild.prefix}punishment** \`[\`kick\`,\`ban\`]\` :x:` 36 | ); 37 | return message.channel.send(embed2); 38 | } 39 | }}; 40 | -------------------------------------------------------------------------------- /commands/security/settings.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs"); 2 | const Discord = require("discord.js"); 3 | const { Color } = require("../../config.js"); 4 | 5 | module.exports = { 6 | name: "settings", 7 | description: "Check your server settings", 8 | usage: ["e!settings"], 9 | category: ["Security"], 10 | enabled: true, 11 | memberPermissions: [ "SEND_MESSAGES" ], 12 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 13 | ownerOnly: false, 14 | guilOwnerOnly: true, 15 | cooldown: 4000, 16 | run: async (bot, message, args, dev) => { 17 | 18 | let data = await Guild.findOne({ guildID: message.guild.id }) 19 | let embed = new Discord.MessageEmbed() 20 | .setColor(Color) 21 | .setThumbnail(message.guild.iconURL()) 22 | 23 | let falsee = `<:jano_64:924983392137773086>`; 24 | let truee = `<:jano_65:924983412215918592>`; 25 | let pun = `<:emoji_54:922264932676931624>`; 26 | 27 | embed.addField(`Prefix in the server`, `**${data.prefix}**`) 28 | 29 | 30 | if (data.ban.onoff === "on") { 31 | embed.addField( 32 | `> **AntiBan**`, 33 | `${truee} \`Enabled\` \n Punish at: **${data.ban.lmite}** ${pun}` 34 | ); 35 | } else if (data.ban.onoff === "off") { 36 | embed.addField( 37 | `> **AntiBan**`, 38 | `${falsee} \`Disabled\` \n Punish at: **${data.ban.lmite}** ${pun}` 39 | ); 40 | } 41 | 42 | if (data.kick.onoff === "on") { 43 | embed.addField( 44 | `> **AntiKick**`, 45 | `${truee} \`Enabled\` \n Punish at: **${data.kick.lmite}** ${pun}` 46 | ); 47 | } else if (data.kick.onoff === "off") { 48 | embed.addField( 49 | `> **AntiKick**`, 50 | `${falsee} \`Disabled\` \n Punish at: **${data.kick.lmite}** ${pun}` 51 | ); 52 | } 53 | 54 | if (data.role.onoff === "on") { 55 | embed.addField( 56 | `> **AntiRole**`, 57 | `${truee} \`Enabled\` \n Punish at: **${data.role.lmite}** ${pun}` 58 | ); 59 | } else if (data.role.onoff === "off") { 60 | embed.addField( 61 | `> **AntiRole**`, 62 | `${falsee} \`Disabled\` \n Punish at: **${data.role.lmite}** ${pun}` 63 | ); 64 | } 65 | 66 | if (data.channel.onoff === "on") { 67 | embed.addField( 68 | `> **AntiChannel**`, 69 | `${truee} \`Enabled\` \n Punish at: **${data.channel.lmite}** ${pun}` 70 | ); 71 | } else if (data.channel.onoff === "off") { 72 | embed.addField( 73 | `> **AntiChannel**`, 74 | `${falsee} \`Disabled\` \n Punish at: **${data.channel.lmite}** ${pun}` 75 | ); 76 | } 77 | 78 | 79 | 80 | let data3 = data.bot.onoff 81 | if (data3 === "on") { 82 | embed.addField(`> **AntiBot**`, `${truee} \`Enabled\` `); 83 | } else if (data3 === "off") { 84 | embed.addField(`> **AntiBot**`, `${falsee} \`Disabled\` `); 85 | } 86 | 87 | 88 | let data2 = data.spam.onoff 89 | if (data2 === "on") { 90 | embed.addField(`> **AntiSpam**`, `${truee} \`Enabled\` `); 91 | } else if (data2 === "off") { 92 | embed.addField(`> **AntiSpam**`, `${falsee} \`Disabled\` `); 93 | } 94 | 95 | if (data.punishment === "kick") { 96 | embed.addField(`> **Punishment**`, `<:kick:842560387295346688>\`Kick\` `); 97 | } else if (data.punishment === "ban") { 98 | embed.addField(`> **Punishment**`, `<:emoji_53:922264913873891338>\`Ban\` `); 99 | } else if (data.punishment === "removerole") { 100 | embed.addField(`> **Punishment**`, `<:emoji_53:922264913873891338>\`Remove Role\` `); 101 | } 102 | 103 | embed.setDescription(`**This is settings security and settings your server**`); 104 | 105 | message.channel.send(embed) 106 | }} 107 | -------------------------------------------------------------------------------- /commands/security/whitelist.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | const { Color } = require("../../config.js"); 3 | 4 | module.exports = { 5 | name: "whitelist", 6 | description: "Security will ignore whitelist users", 7 | usage: ["e!whitelist","e!whitelist [add/remove] [@User]"], 8 | category: ["Security"], 9 | enabled: true, 10 | memberPermissions: [ "SEND_MESSAGES" ], 11 | botPermissions: [ "SEND_MESSAGES", "EMBED_LINKS" ], 12 | ownerOnly: false, 13 | guilOwnerOnly: true, 14 | cooldown: 4000, 15 | run: async (bot, message, args, dev, data) => { 16 | 17 | let dataa = await Guild.findOne({ guildID: message.guild.id }) 18 | if (args[1] === "add") { 19 | let user = 20 | message.guild.members.cache.get(args[2]) || 21 | message.mentions.members.first(); 22 | if (!user) 23 | return message.reply(new Discord.MessageEmbed().setColor(Color).setDescription(`Mention someone`)); 24 | if(!dataa.whitelist.find((c) => c.type === user.id)){ 25 | await Guild.findOneAndUpdate( 26 | { 27 | guildID: message.guild.id, 28 | }, 29 | { 30 | $push: { 31 | whitelist: { 32 | type: user.id 33 | } 34 | }, 35 | }) 36 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`${user.user.username} **Added to whitelist** :white_check_mark:`)); 37 | } else { 38 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**This man is whitelisted**`)); 39 | } 40 | } else if (args[1] === "remove") { 41 | let user = 42 | message.guild.members.cache.get(args[2]) || 43 | message.mentions.members.first(); 44 | if (!user) 45 | return message.reply(new Discord.MessageEmbed().setColor(Color).setDescription(`**Mention someone**`)); 46 | if(dataa.whitelist.find((c) => c.type === user.id)){ 47 | await Guild.findOneAndUpdate( 48 | { 49 | guildID: message.guild.id, 50 | }, 51 | { 52 | $pull: { 53 | whitelist: { 54 | type: user.id 55 | } 56 | }, 57 | }) 58 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`${user.user.username} **Removed in whitelist** :x:`)); 59 | } else { 60 | message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`${user.user.username} **Not in whitelist** :x:`)); 61 | }; 62 | } else if (!args[1]) { 63 | if (dataa.whitelist.length === 0) return message.channel.send(new Discord.MessageEmbed().setColor(Color).setDescription(`**This man is whitelisted**`)); 64 | let arrayOfCustomCommands = dataa.whitelist.map(w => `⇰ <@${w.type}> - ${w.type}`) 65 | 66 | let embed = new Discord.MessageEmbed() 67 | .setTitle("Whitelist Users") 68 | .setColor(Color) 69 | .setDescription(arrayOfCustomCommands.slice(0, 15).join('\n')); 70 | message.channel.send(embed); 71 | } 72 | } 73 | }; 74 | -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | exports.Color = `#2f3136`; 2 | exports.Image = ``; 3 | exports.Footer = ``; 4 | exports.Author = ``; 5 | -------------------------------------------------------------------------------- /data/guild.js: -------------------------------------------------------------------------------- 1 | schema = mongoose.Schema({ 2 | guildID: String, 3 | prefix: { type: String, default: "e!"}, 4 | ban: { 5 | onoff: { type: String, default: "on"}, 6 | lmite: { type: Number, default: "3"} 7 | }, 8 | kick: { 9 | onoff: { type: String, default: "on"}, 10 | lmite: { type: Number, default: "3"} 11 | }, 12 | channel: { 13 | onoff: { type: String, default: "on"}, 14 | lmite: { type: Number, default: "3"} 15 | }, 16 | role: { 17 | onoff: { type: String, default: "on"}, 18 | lmite: { type: Number, default: "3"} 19 | }, 20 | webhook: { 21 | onoff: { type: String, default: "on"} 22 | }, 23 | spam: { 24 | onoff: { type: String, default: "off"} 25 | }, 26 | bot: { 27 | onoff: { type: String, default: "on"} 28 | }, 29 | punishment: { type: String, default: "removerole"}, 30 | whitelist: { type: Array, default: [] }, 31 | time: { type: Number, default: 30} 32 | }); 33 | module.exports = mongoose.model("Guild", schema) 34 | -------------------------------------------------------------------------------- /data/owner.js: -------------------------------------------------------------------------------- 1 | const schema = mongoose.Schema({ 2 | ownerCode: String, 3 | worldWhitelist: { type: Array, default: [] } 4 | }); 5 | module.exports = mongoose.model("Owner", schema) 6 | -------------------------------------------------------------------------------- /data/user.js: -------------------------------------------------------------------------------- 1 | const schema = mongoose.Schema({ 2 | guildID: String, 3 | userID: String, 4 | 5 | channelD: { type: Number, default: 0 }, 6 | channelC: { type: Number, default: 0 }, 7 | roleD: { type: Number, default: 0 }, 8 | roleC: { type: Number, default: 0 }, 9 | ban: { type: Number, default: 0 }, 10 | kick: { type: Number, default: 0 }, 11 | warn: { type: Number, warn: 0 } 12 | }); 13 | module.exports = mongoose.model("User", schema) 14 | -------------------------------------------------------------------------------- /events/channelCreate.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | module.exports = class { 3 | async run(channel) { 4 | const { guild } = channel 5 | try { 6 | const entry1 = await guild.fetchAuditLogs({ type: "CHANNEL_CREATE" }) 7 | .then(audit => audit.entries.first()); 8 | const user2 = entry1.executor; 9 | const guildData = await Guild.findOne({ guildID: guild.id }); 10 | if (!guildData) { Guild.create({ guildID: guild.id }); } 11 | const memberData = await User.findOne({ guildID: guild.id, userID: user2.id }); 12 | if (!memberData) { User.create({ guildID: guild.id, userID: user2.id }); } 13 | if (guildData.channel.onoff === "off") return; 14 | if (user2.id === channel.guild.ownerID) return; 15 | if (guildData.whitelist.find((c) => c.type === user2.id)) return; 16 | let Ww = await Owner.findOne({ ownerCode: "681553671364018196" }); 17 | if (Ww.worldWhitelist.find((c) => c.type === user2.id)) return; 18 | if (guildData.channel.lmite === 1) { 19 | let member = await guild.members.fetch(user2.id) 20 | const embed = new Discord.MessageEmbed() 21 | .setColor("#fc0303") 22 | .setThumbnail(guild.iconURL()) 23 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 24 | .setDescription(`${user2.username} created or deleted 1 channels don’t worry i taked the action!`); 25 | const embed2 = new Discord.MessageEmbed() 26 | .setColor("#fc0303") 27 | .setThumbnail(guild.iconURL()) 28 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 29 | .setDescription(`${user2.username} created or deleted 1 channels i can't take the action!`); 30 | const embed3 = new Discord.MessageEmbed() 31 | .setColor("#fc0303") 32 | .setThumbnail(guild.iconURL()) 33 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 34 | .setDescription(`${user2.username} created or deleted 1 channels i can't take the action!`); 35 | 36 | if (guildData.punishment === "ban") { 37 | if (member.bannable) { 38 | await member.ban({ reason: `Create or Delete 1 channel` }) 39 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 40 | await guild.owner.send(embed).catch(err => {}) 41 | } else { 42 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 43 | await guild.owner.send(embed2).catch(err => {}) 44 | } 45 | } else 46 | if (guildData.punishment === "removerole") { 47 | channel.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 48 | if (r.name !== "@everyone") { 49 | channel.guild.members.cache.get(user2.id).roles.remove(r.id) 50 | } 51 | }).then(bruhlolxd => { 52 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 53 | guild.owner.send(embed3) 54 | }).catch(err => { 55 | }) 56 | } else if (guildData.punishment === "kick") { 57 | if (member.kickable) { 58 | await member.kick({ reason: `Create or Delete 1 channel` }) 59 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 60 | await guild.owner.send(embed).catch(err => {}) 61 | } else { 62 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 63 | await guild.owner.send(embed2).catch(err => {}) 64 | } 65 | } 66 | } else { 67 | memberData.channelC = memberData.channelC + 1; 68 | setTimeout(() => { 69 | if (memberData.channelC !== 0) { 70 | memberData.channelC = 0; 71 | memberData.save(); 72 | } 73 | }, 6000 * 60 * 60) 74 | if (memberData.channelC === guildData.channel.lmite || memberData.channelC > guildData.channel.lmite) { 75 | let member = await guild.members.fetch(user2.id) 76 | const embed = new Discord.MessageEmbed() 77 | .setColor("#fc0303") 78 | .setThumbnail(guild.iconURL()) 79 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 80 | .setDescription(`${user2.username} created or deleted ${guildData.channel.lmite} channels don’t worry i taked the action!`); 81 | const embed2 = new Discord.MessageEmbed() 82 | .setColor("#fc0303") 83 | .setThumbnail(guild.iconURL()) 84 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 85 | .setDescription(`${user2.username} created or deleted ${guildData.channel.lmite} channels i can't take the action!`); 86 | const embed3 = new Discord.MessageEmbed() 87 | .setColor("#fc0303") 88 | .setThumbnail(guild.iconURL()) 89 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 90 | .setDescription(`${user2.username} created or deleted 1 channels i can't take the action!`); 91 | 92 | 93 | if (guildData.punishment === "ban") { 94 | if (member.bannable) { 95 | await member.ban({ reason: `Create or Delete ${guildData.channel.lmite} channels` }) 96 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 97 | await guild.owner.send(embed).catch(err => {}) 98 | } else { 99 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 100 | await guild.owner.send(embed2).catch(err => {}) 101 | } 102 | } else 103 | if (guildData.punishment === "removerole") { 104 | channel.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 105 | if (r.name !== "@everyone") { 106 | channel.guild.members.cache.get(user2.id).roles.remove(r.id) 107 | } 108 | }).then(bruhlolxd => { 109 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 110 | guild.owner.send(embed3) 111 | }).catch(err => { 112 | }) 113 | } else if (guildData.punishment === "kick") { 114 | if (member.kickable) { 115 | await member.kick({ reason: `Create or Delete ${guildData.channel.lmite} channels` }) 116 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 117 | await guild.owner.send(embed).catch(err => {}) 118 | } else { 119 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 120 | await guild.owner.send(embed2).catch(err => {}) 121 | } 122 | } 123 | } 124 | memberData.save(); 125 | } 126 | } catch (err) { 127 | return; 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /events/channelDelete.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | module.exports = class { 3 | async run(channel) { 4 | const { guild } = channel 5 | try { 6 | const entry1 = await guild.fetchAuditLogs({ type: "CHANNEL_DELETE" }) 7 | .then(audit => audit.entries.first()); 8 | const user2 = entry1.executor; 9 | const guildData = await Guild.findOne({ guildID: guild.id }); 10 | if (!guildData) { Guild.create({ guildID: guild.id }); } 11 | const memberData = await User.findOne({ guildID: guild.id, userID: user2.id }); 12 | if (!memberData) { User.create({ guildID: guild.id, userID: user2.id }); } 13 | if (guildData.channel.onoff === "off") return; 14 | if (user2.id === guild.ownerID) return; 15 | if (guildData.whitelist.find((c) => c.type === user2.id)) return; 16 | let Ww = await Owner.findOne({ ownerCode: "681553671364018196" }); 17 | if (Ww.worldWhitelist.find((c) => c.type === user2.id)) return; 18 | if (guildData.channel.lmite === 1) { 19 | let member = await guild.members.fetch(user2.id) 20 | const embed = new Discord.MessageEmbed() 21 | .setColor("#fc0303") 22 | .setThumbnail(guild.iconURL()) 23 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 24 | .setDescription(`${user2.username} created or deleted 1 channels don’t worry i taked the action!`); 25 | const embed2 = new Discord.MessageEmbed() 26 | .setColor("#fc0303") 27 | .setThumbnail(guild.iconURL()) 28 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 29 | .setDescription(`${user2.username} created or deleted 1 channels i can't take the action!`); 30 | const embed3 = new Discord.MessageEmbed() 31 | .setColor("#fc0303") 32 | .setThumbnail(guild.iconURL()) 33 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 34 | .setDescription(`${user2.username} created or deleted 1 channels i can't take the action!`); 35 | 36 | if (guildData.punishment === "ban") { 37 | if (member.bannable) { 38 | await member.ban({ reason: `Create or Delete 1 channel` }) 39 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 40 | await guild.owner.send(embed).catch(err => {}) 41 | const position = channel.position; 42 | const newChannel = await channel.clone(); 43 | newChannel.setPosition(position); 44 | } else { 45 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 46 | await guild.owner.send(embed2).catch(err => {}) 47 | } 48 | } else 49 | if (guildData.punishment === "removerole") { 50 | channel.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 51 | if (r.name !== "@everyone") { 52 | channel.guild.members.cache.get(user2.id).roles.remove(r.id) 53 | } 54 | }).then(bruhlolxd => { 55 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 56 | guild.owner.send(embed3) 57 | }).catch(err => { 58 | }) 59 | } else 60 | if (guildData.punishment === "kick") { 61 | if (member.kickable) { 62 | await member.kick({ reason: `Create or Delete 1 channel` }) 63 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\ID: ${user2.id}`) 64 | await guild.owner.send(embed).catch(err => {}) 65 | const position = channel.position; 66 | const newChannel = await channel.clone(); 67 | newChannel.setPosition(position); 68 | } else { 69 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 70 | await guild.owner.send(embed2).catch(err => {}) 71 | } 72 | } 73 | 74 | } else { 75 | memberData.channelC = memberData.channelC + 1; 76 | setTimeout(() => { 77 | if (memberData.channelC !== 0) { 78 | memberData.channelC = 0; 79 | memberData.save(); 80 | } 81 | }, 6000 * 60 * 60) 82 | if (memberData.channelC === guildData.channel.lmite || memberData.channelC > guildData.channel.lmite) { 83 | let member = await guild.members.fetch(user2.id) 84 | const embed = new Discord.MessageEmbed() 85 | .setColor("#fc0303") 86 | .setThumbnail(guild.iconURL()) 87 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 88 | .setDescription(`${user2.username} created or deleted ${guildData.channel.lmite} channels don’t worry i taked the action!`); 89 | const embed2 = new Discord.MessageEmbed() 90 | .setColor("#fc0303") 91 | .setThumbnail(guild.iconURL()) 92 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 93 | .setDescription(`${user2.username} created or deleted ${guildData.channel.lmite} channels i can't take the action!`); 94 | const embed3 = new Discord.MessageEmbed() 95 | .setColor("#fc0303") 96 | .setThumbnail(guild.iconURL()) 97 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 98 | .setDescription(`${user2.username} created or deleted 1 channels i can't take the action!`); 99 | 100 | if (guildData.punishment === "ban") { 101 | if (member.bannable) { 102 | await member.ban({ reason: `Create or Delete ${guildData.channel.lmite} channels` }) 103 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nId: ${user2.id}`) 104 | await guild.owner.send(embed).catch(err => {}) 105 | } else { 106 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 107 | await guild.owner.send(embed2).catch(err => {}) 108 | } 109 | } else 110 | if (guildData.punishment === "removerole") { 111 | channel.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 112 | if (r.name !== "@everyone") { 113 | channel.guild.members.cache.get(user2.id).roles.remove(r.id) 114 | } 115 | }).then(bruhlolxd => { 116 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 117 | guild.owner.send(embed3) 118 | }).catch(err => { 119 | }) 120 | } else if (guildData.punishment === "kick") { 121 | if (member.kickable) { 122 | await member.kick({ reason: `Create or Delete ${guildData.channel.lmite} channels` }) 123 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\nId: ${user2.id}`) 124 | await guild.owner.send(embed).catch(err => {}) 125 | } else { 126 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 127 | await guild.owner.send(embed2).catch(err => {}) 128 | } 129 | } 130 | } 131 | memberData.save(); 132 | } 133 | } catch (err) { 134 | return; 135 | } 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /events/guildBanAdd.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | module.exports = class { 3 | async run(guild) { 4 | try { 5 | const entry1 = await guild.fetchAuditLogs({ type: "GUILD_BAN_ADD" }) 6 | .then(audit => audit.entries.first()); 7 | const user2 = entry1.executor; 8 | 9 | const guildData = await Guild.findOne({ guildID: guild.id }); 10 | if (!guildData) { Guild.create({ guildID: guild.id }); } 11 | const memberData = await User.findOne({ guildID: guild.id, userID: user2.id }); 12 | if (!memberData) { User.create({ guildID: guild.id, userID: user2.id }); } 13 | if (guildData.ban.onoff === "off") return; 14 | if (user2.id === guild.ownerID) return; 15 | if (guildData.whitelist.find((c) => c.type === user2.id)) return; 16 | let Ww = await Owner.findOne({ ownerCode: "681553671364018196" }); 17 | if (Ww.worldWhitelist.find((c) => c.type === user2.id)) return; 18 | if (guildData.ban.lmite === 1) { 19 | let member = await guild.members.fetch(user2.id) 20 | const embed = new Discord.MessageEmbed() 21 | .setColor("#fc0303") 22 | .setThumbnail(guild.iconURL()) 23 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 24 | .setDescription(`${user2.username} ban 1 member don’t worry i taked the action!`); 25 | const embed2 = new Discord.MessageEmbed() 26 | .setColor("#fc0303") 27 | .setThumbnail(guild.iconURL()) 28 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 29 | .setDescription(`${user2.username} ban 1 member i can't take the action!`) 30 | const embed3 = new Discord.MessageEmbed() 31 | .setColor("#fc0303") 32 | .setThumbnail(guild.iconURL()) 33 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 34 | .setDescription(`${user2.username} ban 1 member i can't take the action!`); 35 | 36 | if (guildData.punishment === "ban") { 37 | if (member.bannable) { 38 | await member.ban({ reason: `Ban 1 member` }) 39 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 40 | await guild.owner.send(embed).catch(err => {}) 41 | } else { 42 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 43 | await guild.owner.send(embed2).catch(err => {}) 44 | } 45 | } else 46 | if (guildData.punishment === "removerole") { 47 | member.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 48 | if (r.name !== "@everyone") { 49 | member.guild.members.cache.get(user2.id).roles.remove(r.id) 50 | } 51 | }).then(bruhlolxd => { 52 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 53 | guild.owner.send(embed3) 54 | }).catch(err => { 55 | }) 56 | } else 57 | if (guildData.punishment === "kick") { 58 | if (member.kickable) { 59 | await member.kick({ reason: `Ban 1 member` }) 60 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 61 | await guild.owner.send(embed).catch(err => {}) 62 | } else { 63 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 64 | await guild.owner.send(embed2).catch(err => {}) 65 | } 66 | } 67 | } else { 68 | memberData.ban = memberData.ban + 1; 69 | setTimeout(() => { 70 | if (memberData.ban !== 0) { 71 | memberData.ban = 0; 72 | memberData.save(); 73 | } 74 | }, 6000 * 60 * 60) 75 | if (memberData.ban === guildData.ban.lmite || memberData.ban > guildData.ban.lmite) { 76 | let member = await guild.members.fetch(user2.id) 77 | const embed = new Discord.MessageEmbed() 78 | .setColor("#fc0303") 79 | .setThumbnail(guild.iconURL()) 80 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 81 | .setDescription(`${user2.username} ban ${guildData.ban.lmite} members don’t worry i taked the action!`); 82 | const embed2 = new Discord.MessageEmbed() 83 | .setColor("#fc0303") 84 | .setThumbnail(guild.iconURL()) 85 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 86 | .setDescription(`${user2.username} ban ${guildData.ban.lmite} members i can't take the action!`); 87 | const embed3 = new Discord.MessageEmbed() 88 | .setColor("#fc0303") 89 | .setThumbnail(guild.iconURL()) 90 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 91 | .setDescription(`${user2.username} ban 1 member i can't take the action!`); 92 | 93 | 94 | if (guildData.punishment === "ban") { 95 | if (member.bannable) { 96 | await member.ban({ reason: `ban ${guildData.ban.lmite} members` }) 97 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 98 | await guild.owner.send(embed).catch(err => {}) 99 | } else { 100 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 101 | await guild.owner.send(embed2).catch(err => {}) 102 | } 103 | } else if (guildData.punishment === "removerole") { 104 | member.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 105 | if (r.name !== "@everyone") { 106 | member.guild.members.cache.get(user2.id).roles.remove(r.id) 107 | } 108 | }).then(bruhlolxd => { 109 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 110 | guild.owner.send(embed3) 111 | }).catch(err => { 112 | }) 113 | } else if (guildData.punishment === "kick") { 114 | if (member.kickable) { 115 | await member.kick({ reason: `Ban ${guildData.ban.lmite} members` }) 116 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 117 | await guild.owner.send(embed).catch(err => {}) 118 | } else { 119 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 120 | await guild.owner.send(embed2).catch(err => {}) 121 | } 122 | } 123 | } 124 | memberData.save(); 125 | } 126 | } catch (err) { 127 | return; 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /events/guildDelete.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | module.exports = class { 3 | async run(guild, bot) { 4 | const text = "Leaving guild **"+guild.name+"** guild member size **"+guild.members.cache.filter((m) => !m.user.bot).size+"** membres, guild bot size("+guild.members.cache.filter((m) => m.user.bot).size+" bots)"; 5 | const logsEmbed = new Discord.MessageEmbed() 6 | .setColor("#2c2f33") 7 | .setDescription(text); 8 | bot.channels.cache.get("681553671364018196").send(logsEmbed); 9 | }}; 10 | -------------------------------------------------------------------------------- /events/guildMemberAdd.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js"); 2 | module.exports = class { 3 | async run(member) { 4 | try { 5 | member.guild.fetch().then(async (guild) => { 6 | const guildData = await Guild.findOne({ guildID: guild.id }); 7 | if (!guildData) { Guild.create({ guildID: guild.id }); } 8 | if (member.user.bot && guildData.bot.onoff === "on") return member.kick("Anti bot"); 9 | }) 10 | } catch (err) { 11 | return; 12 | } 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /events/guildMemberRemove.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | module.exports = class { 3 | async run(member) { 4 | try { 5 | if (member.guild) { 6 | const { guild } = member, 7 | user = member; 8 | const entry1 = await member.guild 9 | .fetchAuditLogs() 10 | .then(audit => audit.entries.first()); 11 | if (entry1.action === "MEMBER_KICK") { 12 | const entry2 = await member.guild 13 | .fetchAuditLogs({ type: "MEMBER_KICK" }) 14 | .then(audit => audit.entries.first()); 15 | const user2 = entry1.executor; 16 | //Fix some err 17 | const guildData = await Guild.findOne({ guildID: guild.id }); 18 | if (!guildData) { Guild.create({ guildID: guild.id }); } 19 | const memberData = await User.findOne({ guildID: guild.id, userID: user2.id }); 20 | if (!memberData) { User.create({ guildID: guild.id, userID: user2.id }); } 21 | if (guildData.kick.onoff === "off") return; 22 | if (user2.id === guild.ownerID) return; 23 | if (guildData.whitelist.find((c) => c.type === user2.id)) return; 24 | let Ww = await Owner.findOne({ ownerCode: "681553671364018196" }); 25 | if (Ww.worldWhitelist.find((c) => c.type === user2.id)) return; 26 | if (guildData.kick.lmite === 1) { 27 | let member = await guild.members.fetch(user2.id) 28 | const embed = new Discord.MessageEmbed() 29 | .setColor("#fc0303") 30 | .setThumbnail(guild.iconURL()) 31 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 32 | .setDescription(`${user2.username} kick 1 member don’t worry i taked the action!`); 33 | const embed2 = new Discord.MessageEmbed() 34 | .setColor("#fc0303") 35 | .setThumbnail(guild.iconURL()) 36 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 37 | .setDescription(`${user2.username} kick 1 member i can't take the action!`); 38 | const embed3 = new Discord.MessageEmbed() 39 | .setColor("FF0000") 40 | .setThumbnail(guild.iconURL()) 41 | .setTitle(`<:punishment:858836973644808192> Actions in the server **${guild.name}**`) 42 | .setDescription(`${user2.username} kick ${guildData.ban.lmite} members i can't take the action!`); 43 | 44 | if (guildData.punishment === "ban") { 45 | if (member.bannable) { 46 | await member.ban({ reason: `Kick 1 member` }) 47 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 48 | await guild.owner.send(embed).catch(err => {}) 49 | } else { 50 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 51 | await guild.owner.send(embed2).catch(err => {}) 52 | } 53 | } else if (guildData.punishment === "removerole") { 54 | member.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 55 | if (r.name !== "@everyone") { 56 | member.guild.members.cache.get(user2.id).roles.remove(r.id) 57 | } 58 | }).then(bruhlolxd => { 59 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 60 | guild.owner.send(embed3) 61 | }).catch(err => { 62 | }) 63 | } else if (guildData.punishment === "kick") { 64 | if (member.kickable) { 65 | await member.kick({ reason: `Kick 1 member` }) 66 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 67 | await guild.owner.send(embed).catch(err => {}) 68 | } else { 69 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 70 | await guild.owner.send(embed2).catch(err => {}) 71 | } 72 | } 73 | } else { 74 | memberData.kick = memberData.kick + 1; 75 | setTimeout(() => { 76 | if (memberData.kick !== 0) { 77 | memberData.kick = 0; 78 | memberData.save(); 79 | } 80 | }, 6000 * 60 * 60) 81 | if (memberData.kick === guildData.kick.lmite || memberData.kick > guildData.kick.lmite) { 82 | let member = await guild.members.fetch(user2.id) 83 | const embed = new Discord.MessageEmbed() 84 | .setColor("#FF0000") 85 | .setThumbnail(guild.iconURL()) 86 | .setTitle(`<:punishment:858836973644808192> Actions in the server **${guild.name}**`) 87 | .setDescription(`${user2.username} kick ${guildData.ban.lmite} members don’t worry i taked the action!`); 88 | const embed2 = new Discord.MessageEmbed() 89 | .setColor("FF0000") 90 | .setThumbnail(guild.iconURL()) 91 | .setTitle(`<:punishment:858836973644808192> Actions in the server **${guild.name}**`) 92 | .setDescription(`${user2.username} kick ${guildData.ban.lmite} members i can't take the action!`); 93 | const embed3 = new Discord.MessageEmbed() 94 | .setColor("FF0000") 95 | .setThumbnail(guild.iconURL()) 96 | .setTitle(`<:punishment:858836973644808192> Actions in the server **${guild.name}**`) 97 | .setDescription(`${user2.username} kick ${guildData.ban.lmite} members i can't take the action!`); 98 | 99 | if (guildData.punishment === "ban") { 100 | if (member.bannable) { 101 | await member.ban({ reason: `Kick ${guildData.ban.lmite} members` }) 102 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 103 | await guild.owner.send(embed).catch(err => {}) 104 | } else { 105 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 106 | await guild.owner.send(embed2).catch(err => {}) 107 | } 108 | } else if (guildData.punishment === "removerole") { 109 | member.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 110 | if (r.name !== "@everyone") { 111 | member.guild.members.cache.get(user2.id).roles.remove(r.id) 112 | } 113 | }).then(bruhlolxd => { 114 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 115 | guild.owner.send(embed3) 116 | }).catch(err => { 117 | }) 118 | } else if (guildData.punishment === "kick") { 119 | if (member.kickable) { 120 | await member.kick({ reason: `Kick ${guildData.ban.lmite} members` }) 121 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 122 | await guild.owner.send(embed).catch(err => {}) 123 | } else { 124 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 125 | await guild.owner.send(embed2).catch(err => {}) 126 | } 127 | } 128 | } 129 | memberData.save(); 130 | } 131 | } 132 | }; 133 | } catch (err) { 134 | return; 135 | } 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /events/message.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | /**/ 3 | module.exports = class { 4 | async run(message,bot) { 5 | const data = {}; 6 | const argsr = {}; 7 | if (message.author.bot) return; 8 | if (message.channel.type === "dm") return; 9 | let guild = await Guild.findOne({ guildID: message.guild.id }); 10 | if(!guild) { Guild.create({ guildID: message.guild.id }); } 11 | data.guild = guild; 12 | let user = await User.findOne({ guildID: message.guild.id, userID: message.author.id }); 13 | if(!user) { User.create({ guildID: message.guild.id, userID: message.author.id });} 14 | data.user = user; 15 | //let prime = await Prime.findOne({ guildID: message.guild.id }); 16 | // if (prime && prime.log === "enable") return;// message.channel.send({ content: `You don't have Premium version` }); 17 | 18 | if (guild) { 19 | if (!message.content.toLowerCase().startsWith(guild.prefix.toLowerCase()) && !message.content.toLowerCase().startsWith("<@828270556758540348>")) return; 20 | let args = message.content.split(" "); 21 | if (message.content.toLowerCase().startsWith(guild.prefix.toLowerCase())) { 22 | const argsrP = await message.content 23 | .slice(guild.prefix.length) 24 | .trim() 25 | .split(/ +/g); 26 | argsr.prefix = argsrP; 27 | } else if (message.content.toLowerCase().startsWith("<@828270556758540348>")) { 28 | const argsrM = await message.content 29 | .slice("<@828270556758540348>".length) 30 | .trim() 31 | .split(/ +/g); 32 | argsr.prefix = argsrM; 33 | }; 34 | const cmd = await argsr.prefix.shift().toLowerCase(); 35 | if (cmd.length === 0) return message.channel.send(`Hello **${message.author.username}**, my prefix on this server is \`${guild.prefix.toLowerCase()}\` Use \`${guild.prefix.toLowerCase()}help\` to get the list of the commands!`); 36 | let command = bot.commands.get(cmd); 37 | if (!command) command = bot.commands.get(bot.aliases.get(cmd)); 38 | if(command) { 39 | //if(command.prime) { 40 | /* let data = await Prime.findOne({Guild: message.guild.id}) 41 | if(!data) return message.channel.send(`This is a premium only command, type s!premium for more info`) 42 | 43 | if(!data.Permanent && Date.now() > data.time){ 44 | data.delete(); 45 | return message.channel.send(`Prime bot on your server ended for buy mor join support server`) 46 | }}*/ 47 | 48 | if (!message.channel.permissionsFor(bot.user).has("SEND_MESSAGES")) return; 49 | if (!command.enabled) return await message.channel.send(`This command is **Disable** for now`) 50 | let Ww = await Owner.findOne({ ownerCode: "681553671364018196" }); 51 | data.ww = Ww; 52 | if (command.ownerOnly && !Ww.worldWhitelist.find((c) => c.type === message.author.id)) return await message.channel.send(`This command is only for owner the bot`); 53 | if (command.guilOwnerOnly) { 54 | if (message.author.id !== message.guild.ownerID && 55 | !Ww.worldWhitelist.find((c) => c.type === message.author.id) 56 | ) return message.channel.send(`This command is only for guildOwner`) 57 | } 58 | let neededPermissions = []; 59 | if(!command.botPermissions.includes("EMBED_LINKS")){ 60 | command.botPermissions.push("EMBED_LINKS"); 61 | } 62 | command.botPermissions.forEach((perm) => { 63 | if(!message.channel.permissionsFor(bot.user).has(perm)){ 64 | neededPermissions.push(perm); 65 | } 66 | }); 67 | if(neededPermissions.length > 0){ 68 | return message.channel.send(`I don't have a ${neededPermissions.map((p) => `\`${p}\``).join(", ")} permissions`); 69 | } 70 | neededPermissions = []; 71 | command.memberPermissions.forEach((perm) => { 72 | if(!message.channel.permissionsFor(message.member).has(perm)){ 73 | neededPermissions.push(perm); 74 | } 75 | }); 76 | if(neededPermissions.length > 0){ 77 | return message.channel.send(`You don't have a ${neededPermissions.map((p) => `\`${p}\``).join(", ")} permissions`); 78 | } 79 | if (!bot.cooldowns.has(command.name)) { 80 | bot.cooldowns.set(command.name, new Discord.Collection()); 81 | } 82 | 83 | const now = Date.now(); 84 | const timestamps = bot.cooldowns.get(command.name); 85 | const cooldownAmount = (command.cooldown || 7000); 86 | if (timestamps.has(message.author.id)) { 87 | const expirationTime = timestamps.get(message.author.id) + cooldownAmount; 88 | if (now < expirationTime) { 89 | const timeLeft = (expirationTime - now)/ 1000; 90 | return message.channel.send(`Please wait **${timeLeft.toFixed(0)}** second`).then(msg=> msg.delete({ timeout:timeLeft.toFixed(1)*1000 })); 91 | } 92 | } 93 | timestamps.set(message.author.id, now); 94 | let prefix = guild.prefix; 95 | if (command) command.run(bot, message, args, prefix, data, cmd, command); 96 | if (!command) return message.channel.send(`I don't have command like this`) 97 | setTimeout(() => timestamps.delete(message.author.id), cooldownAmount); 98 | 99 | } 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /events/roleCreate.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | module.exports = class { 3 | async run(role) { 4 | const { guild } = role 5 | try { 6 | const entry1 = await guild.fetchAuditLogs({ type: "ROLE_CREATE" }) 7 | .then(audit => audit.entries.first()); 8 | const user2 = entry1.executor; 9 | const guildData = await Guild.findOne({ guildID: guild.id }); 10 | if (!guildData) { Guild.create({ guildID: guild.id }); } 11 | const memberData = await User.findOne({ guildID: guild.id, userID: user2.id }); 12 | if (!memberData) { User.create({ guildID: guild.id, userID: user2.id }); } 13 | if (guildData.role.onoff === "off") return; 14 | if (user2.id === guild.ownerID) return; 15 | if (guildData.whitelist.find((c) => c.type === user2.id)) return; 16 | let Ww = await Owner.findOne({ ownerCode: "681553671364018196" }); 17 | if (Ww.worldWhitelist.find((c) => c.type === user2.id)) return; 18 | if (guildData.role.lmite === 1) { 19 | let member = await guild.members.fetch(user2.id) 20 | const embed = new Discord.MessageEmbed() 21 | .setColor("#fc0303") 22 | .setThumbnail(guild.iconURL()) 23 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 24 | .setDescription(`${user2.username} created or deleted 1 roles don’t worry i taked the action!`); 25 | const embed2 = new Discord.MessageEmbed() 26 | .setColor("#fc0303") 27 | .setThumbnail(guild.iconURL()) 28 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 29 | .setDescription(`${user2.username} created or deleted 1 roles i can't take the action!`); 30 | const embed3 = new Discord.MessageEmbed() 31 | .setColor("#fc0303") 32 | .setThumbnail(guild.iconURL()) 33 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 34 | .setDescription(`${user2.username} created or deleted 1 roles i can't take the action!`); 35 | 36 | if (guildData.punishment === "ban") { 37 | if (member.bannable) { 38 | await member.ban({ reason: `Create or Delete 1 role` }) 39 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 40 | await guild.owner.send(embed).catch(err => {}) 41 | } else { 42 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 43 | await guild.owner.send(embed2).catch(err => {}) 44 | } 45 | } else 46 | if (guildData.punishment === "removerole") { 47 | role.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 48 | if (r.name !== "@everyone") { 49 | role.guild.members.cache.get(user2.id).roles.remove(r.id) 50 | } 51 | }).then(bruhlolxd => { 52 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 53 | guild.owner.send(embed3) 54 | }).catch(err => { 55 | }) 56 | } else 57 | if (guildData.punishment === "kick") { 58 | if (member.kickable) { 59 | await member.kick({ reason: `Create or Delete 1 role` }) 60 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 61 | await guild.owner.send(embed).catch(err => {}) 62 | } else { 63 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 64 | await guild.owner.send(embed2).catch(err => {}) 65 | } 66 | } 67 | } else { 68 | memberData.roleC = memberData.roleC + 1; 69 | setTimeout(() => { 70 | if (memberData.roleC !== 0) { 71 | memberData.roleC = 0; 72 | memberData.save(); 73 | } 74 | }, 6000 * 60 * 60) 75 | if (memberData.roleC === guildData.role.lmite || memberData.roleC > guildData.role.lmite) { 76 | let member = await guild.members.fetch(user2.id) 77 | const embed = new Discord.MessageEmbed() 78 | .setColor("#fc0303") 79 | .setThumbnail(guild.iconURL()) 80 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 81 | .setDescription(`${user2.username} created or deleted ${guildData.role.lmite} roles don’t worry i taked the action!`); 82 | const embed2 = new Discord.MessageEmbed() 83 | .setColor("#fc0303") 84 | .setThumbnail(guild.iconURL()) 85 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 86 | .setDescription(`${user2.username} created or deleted ${guildData.role.lmite} roles i can't take the action!`); 87 | const embed3 = new Discord.MessageEmbed() 88 | .setColor("#fc0303") 89 | .setThumbnail(guild.iconURL()) 90 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 91 | .setDescription(`${user2.username} created or deleted 1 roles i can't take the action!`); 92 | 93 | if (guildData.punishment === "ban") { 94 | if (member.bannable) { 95 | await member.ban({ reason: `Create or Delete ${guildData.role.lmite} roles` }) 96 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 97 | await guild.owner.send(embed).catch(err => {}) 98 | } else { 99 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 100 | await guild.owner.send(embed2).catch(err => {}) 101 | } 102 | 103 | } else 104 | if (guildData.punishment === "removerole") { 105 | role.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 106 | if (r.name !== "@everyone") { 107 | role.guild.members.cache.get(user2.id).roles.remove(r.id) 108 | } 109 | }).then(bruhlolxd => { 110 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 111 | guild.owner.send(embed3) 112 | }).catch(err => { 113 | }) 114 | } else if (guildData.punishment === "kick") { 115 | if (member.kickable) { 116 | await member.kick({ reason: `Create or Delete ${guildData.role.lmite} roles` }) 117 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 118 | await guild.owner.send(embed).catch(err => {}) 119 | } else { 120 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 121 | await guild.owner.send(embed2).catch(err => {}) 122 | } 123 | } 124 | } 125 | memberData.save(); 126 | } 127 | } catch (err) { 128 | return; 129 | } 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /events/roleDelete.js: -------------------------------------------------------------------------------- 1 | const Discord = require("discord.js") 2 | module.exports = class { 3 | async run(role) { 4 | const { guild } = role 5 | try { 6 | const entry1 = await guild.fetchAuditLogs({ type: "ROLE_DELETE" }) 7 | .then(audit => audit.entries.first()); 8 | const user2 = entry1.executor; 9 | const guildData = await Guild.findOne({ guildID: guild.id }); 10 | if (!guildData) { Guild.create({ guildID: guild.id }); } 11 | const memberData = await User.findOne({ guildID: guild.id, userID: user2.id }); 12 | if (!memberData) { User.create({ guildID: guild.id, userID: user2.id }); } 13 | if (guildData.role.onoff === "off") return; 14 | if (user2.id === guild.ownerID) return; 15 | if (guildData.whitelist.find((c) => c.type === user2.id)) return; 16 | let Ww = await Owner.findOne({ ownerCode: "681553671364018196" }); 17 | if (Ww.worldWhitelist.find((c) => c.type === user2.id)) return; 18 | if (guildData.role.lmite === 1) { 19 | let member = await guild.members.fetch(user2.id) 20 | const embed = new Discord.MessageEmbed() 21 | .setColor("#fc0303") 22 | .setThumbnail(guild.iconURL()) 23 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 24 | .setDescription(`${user2.username} created or deleted 1 roles don’t worry i taked the action!`); 25 | const embed2 = new Discord.MessageEmbed() 26 | .setColor("#fc0303") 27 | .setThumbnail(guild.iconURL()) 28 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 29 | .setDescription(`${user2.username} created or deleted 1 roles i can't take the action!`); 30 | const embed3 = new Discord.MessageEmbed() 31 | .setColor("#fc0303") 32 | .setThumbnail(guild.iconURL()) 33 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 34 | .setDescription(`${user2.username} created or deleted 1 roles i can't take the action!`); 35 | 36 | if (guildData.punishment === "ban") { 37 | if (member.bannable) { 38 | await member.ban({ reason: `Create or Delete 1 role` }) 39 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 40 | await guild.owner.send(embed).catch(err => {}) 41 | } else { 42 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 43 | await guild.owner.send(embed2).catch(err => {}) 44 | } 45 | } else 46 | if (guildData.punishment === "removerole") { 47 | role.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 48 | if (r.name !== "@everyone") { 49 | role.guild.members.cache.get(user2.id).roles.remove(r.id) 50 | } 51 | }).then(bruhlolxd => { 52 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 53 | guild.owner.send(embed3) 54 | }).catch(err => { 55 | }) 56 | } else 57 | if (guildData.punishment === "kick") { 58 | if (member.kickable) { 59 | await member.kick({ reason: `Create or Delete 1 role` }) 60 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 61 | await guild.owner.send(embed).catch(err => {}) 62 | } else { 63 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 64 | await guild.owner.send(embed2).catch(err => {}) 65 | } 66 | } 67 | } else { 68 | memberData.roleD = memberData.roleD + 1; 69 | setTimeout(() => { 70 | if (memberData.roleD !== 0) { 71 | memberData.roleD = 0; 72 | memberData.save(); 73 | } 74 | }, 6000 * 60 * 60) 75 | if (memberData.roleD === guildData.role.lmite || memberData.roleD > guildData.role.lmite) { 76 | let member = await guild.members.fetch(user2.id) 77 | const embed = new Discord.MessageEmbed() 78 | .setColor("#fc0303") 79 | .setThumbnail(guild.iconURL()) 80 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 81 | .setDescription(`${user2.username} created or deleted ${guildData.role.lmite} roles don’t worry i taked the action!`); 82 | const embed2 = new Discord.MessageEmbed() 83 | .setColor("#fc0303") 84 | .setThumbnail(guild.iconURL()) 85 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 86 | .setDescription(`${user2.username} created or deleted ${guildData.role.lmite} roles i can't take the action!`); 87 | const embed3 = new Discord.MessageEmbed() 88 | .setColor("#fc0303") 89 | .setThumbnail(guild.iconURL()) 90 | .setTitle(`<:punishment:837867514947174431> Actions in the server **${guild.name}**`) 91 | .setDescription(`${user2.username} created or deleted 1 roles i can't take the action!`); 92 | 93 | 94 | 95 | if (guildData.punishment === "ban") { 96 | if (member.bannable) { 97 | await member.ban({ reason: `Create or Delete ${guildData.role.lmite} roles` }) 98 | embed.addField("Ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 99 | await guild.owner.send(embed).catch(err => {}) 100 | } else { 101 | embed2.addField("Can't ban", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 102 | await guild.owner.send(embed2).catch(err => {}) 103 | } 104 | } else 105 | if (guildData.punishment === "removerole") { 106 | role.guild.members.cache.get(user2.id).roles.cache.forEach(r => { 107 | if (r.name !== "@everyone") { 108 | role.guild.members.cache.get(user2.id).roles.remove(r.id) 109 | } 110 | }).then(bruhlolxd => { 111 | embed.addField ("RemoveRole", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 112 | guild.owner.send(embed3) 113 | }).catch(err => { 114 | }) 115 | } else if (guildData.punishment === "kick") { 116 | if (member.kickable) { 117 | await member.kick({ reason: `Create or Delete ${guildData.role.lmite} roles` }) 118 | embed.addField("Kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 119 | await guild.owner.send(embed).catch(err => {}) 120 | } else { 121 | embed2.addField("Can't kick", `Name: ${user2.username}\nTag : ${user2.tag}\nID: ${user2.id}`) 122 | await guild.owner.send(embed2).catch(err => {}) 123 | } 124 | } 125 | } 126 | memberData.save(); 127 | } 128 | } catch (err) { 129 | return; 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /handler/command.js: -------------------------------------------------------------------------------- 1 | const { readdirSync } = require("fs"); 2 | const ascii = require("ascii-table"); 3 | const table = new ascii().setHeading("Command", "Load Status"); 4 | const { Permissions } = require('discord.js'); 5 | 6 | module.exports = client => { 7 | readdirSync("./commands/").forEach(dir => { 8 | const commands = readdirSync(`./commands/${dir}/`).filter(f => 9 | f.endsWith(".js") 10 | ); 11 | for (let file of commands) { 12 | let pull = require(`../commands/${dir}/${file}`); 13 | 14 | if (pull.name) { 15 | client.commands.set(pull.name, pull); 16 | table.addRow(file, "✅"); 17 | } else { 18 | continue; 19 | } 20 | 21 | if (pull.aliases && Array.isArray(pull.aliases)) { 22 | pull.aliases.forEach(alias => client.aliases.set(alias, pull.name)); 23 | } 24 | } 25 | }); 26 | 27 | console.log(table.toString()); 28 | }; 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "4.0.0", 3 | "main": "bot.js", 4 | "scripts": { 5 | "start": "node bot.js" 6 | }, 7 | "dependencies": { 8 | "discord.js": "^12.5.3", 9 | "ascii-table": "0.0.9", 10 | "moment-timezone": "^0.5.33", 11 | "math-expression-evaluator": "^1.3.8", 12 | "discord-buttons": "^4.0.0", 13 | "discord-anti-spam": "^2.5.1", 14 | "express": "^4.17.1", 15 | "systeminformation": "^5.9.0", 16 | "moment-duration-format": "^2.3.2", 17 | "finalhandler": "^1.1.2", 18 | "fs": "^0.0.2", 19 | "superagent": "^6.1.0", 20 | "jimp": "^0.16.1", 21 | "moment": "^2.29.1", 22 | "dayjs": "^1.10.5", 23 | "ms": "^2.1.3", 24 | "os": "^0.1.1", 25 | "discord-reply": "^0.1.0", 26 | "node-opus": "^0.3.3", 27 | "opusscript": "^0.0.8", 28 | "request": "^2.88.2", 29 | "great": "^0.0.4", 30 | "snekfetch": "^4.0.4", 31 | "node-cmd": "^5.0.0", 32 | "util": "^0.12.4", 33 | "common-tags": "^1.8.0", 34 | "locale-parser": "^1.1.1", 35 | "mongoose": "^5.13.4", 36 | "node-fetch": "^2.6.1" 37 | }, 38 | "engines": { 39 | "node": "12.x" 40 | } 41 | } 42 | --------------------------------------------------------------------------------