├── .env.example ├── LICENSE ├── README.md ├── commands ├── Admin │ ├── addcommand.js │ ├── addrole.js │ ├── backup.js │ ├── ban.js │ ├── clear.js │ ├── ctopic.js │ ├── deletecommand.js │ ├── disablewelcome.js │ ├── forceban.js │ ├── kick.js │ ├── lockchannel.js │ ├── mute.js │ ├── setwelcome.js │ ├── slowmode.js │ ├── unban.js │ ├── unlockchannel.js │ ├── unmute.js │ ├── unwarn.js │ ├── warn.js │ └── warnings.js ├── Economy │ ├── balance.js │ ├── buy.js │ ├── daily.js │ ├── deposit.js │ ├── inventory.js │ ├── leaderboard.js │ ├── pay.js │ ├── rob.js │ ├── store.js │ ├── withdraw.js │ └── work.js ├── Fun │ ├── 8ball.js │ ├── advice.js │ ├── ascii.js │ ├── changemymind.js │ ├── compliment.js │ ├── fml.js │ ├── joke.js │ ├── kiss.js │ ├── meme.js │ ├── shit.js │ ├── slap.js │ ├── triggered.js │ └── wouldyourather.js ├── Images │ └── kiss.js ├── Levels │ └── rank.js ├── Memes │ ├── affect.js │ ├── beautiful.js │ ├── changemymind.js │ ├── facepalm.js │ ├── shit.js │ ├── slap.js │ └── triggered.js ├── Music │ ├── autoplay.js │ ├── filter.js │ ├── join.js │ ├── leave.js │ ├── loop.js │ ├── pause.js │ ├── play.js │ ├── queue.js │ ├── resume.js │ ├── seek.js │ ├── skip.js │ ├── stop.js │ └── volume.js └── Utility │ ├── avatar.js │ ├── bmi.js │ ├── botstats.js │ ├── calculator.js │ ├── channelinfo.js │ ├── config.js │ ├── help.js │ ├── igbot.js │ ├── invitations.js │ ├── invites.js │ ├── morse.js │ ├── ping.js │ ├── serverinfo.js │ ├── translate.js │ ├── userinfo.js │ └── weather.js ├── config ├── config.json └── emojis.json ├── data ├── 8ball.json └── wouldyourather.json ├── docs ├── .nojekyll ├── README.md ├── _coverpage.md ├── _navbar.md ├── _sidebar.md ├── about │ └── index.md ├── commands.md ├── contact │ └── index.md ├── faq.md ├── favicon.ico ├── images │ ├── 1588697654399.png │ ├── Bot Logo.png │ ├── forwebsite.png │ └── game-controller.png ├── index.html ├── quickstart.md ├── style.css └── tutorials │ ├── index.md │ ├── installation │ └── index.md │ └── mongodb │ ├── connect.png │ ├── index.md │ └── sidebar.png ├── events & functions └── welcome.js ├── events&functions ├── welcome.js └── xp.js ├── index.js ├── models ├── Guild.model.js └── warnSchema.js └── package.json /.env.example: -------------------------------------------------------------------------------- 1 | { 2 | token= "" 3 | prefix= "?" 4 | ytapi= "" //Not yet used in this bot 5 | mongo_url= "" 6 | blagueApi= "" 7 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### This bot is currently being re-written. No support will be provided for this bot anymore. 2 | -------------------------------------------------------------------------------- /commands/Admin/addcommand.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const db = require('quick.db') 3 | 4 | module.exports = { 5 | name: 'addcommand', 6 | description: "Add a Custom Command to your server!", 7 | usage: "?addcommand ", 8 | aliases: ['addcmd'], 9 | run: async(client, message, args) => { 10 | 11 | if(!message.member.hasPermission('ADMINISTRATOR')) { 12 | if(!message.author.id === message.guild.ownerID) { 13 | return message.channel.send(`You do not have permissions to add custom commands!`) 14 | } 15 | } 16 | if(!args[0]) return message.channel.send(`You Need to provide a Command Name! \n\ 17 | \`addcommand \``) 18 | let commandName = args[0].toLowerCase() 19 | 20 | if(commandName.length > 15) return message.channel.send(`Command Name can only have less than/equal to 15 letters!`) 21 | 22 | let commandResponse = args.slice(1).join(" ") 23 | if(!commandResponse) return message.channel.send(`You need to provide command response i.e. the text you will receive after \ 24 | executing this command! \n \`addcommand \``) 25 | 26 | let database = db.get(`guildConfigurations_${message.guild.id}.commands`) 27 | if(database && database.find(x => x.name === commandName.toLowerCase())) { 28 | return message.channel.send(`This command name is already added in this server's custom commands!`) 29 | } 30 | 31 | let data = { 32 | name: commandName, 33 | response: commandResponse 34 | } 35 | 36 | db.push(`guildConfigurations_${message.guild.id}.commands`, data) 37 | const embed = new MessageEmbed() 38 | .setTitle(`Command Added`) 39 | .setDescription('Added **' + commandName.toLowerCase() + '** as a custom command in this server!') 40 | .setColor('BLUE') 41 | 42 | message.channel.send(embed) 43 | 44 | } 45 | } -------------------------------------------------------------------------------- /commands/Admin/addrole.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js") 2 | 3 | module.exports = { 4 | name: 'addrole', 5 | description: "Adds the mentioned Role to the mentioned User. While using Role name to add, keep in mind it is case sensitive", 6 | usage: "?addrole <@member> <@role>/Role name", 7 | aliases: [], 8 | run: async(client, message, args) => { 9 | if(!message.member.hasPermission('ADMINISTRATOR')) { 10 | const noPerms = new MessageEmbed() 11 | .setDescription(`You don\'t have permissions to add roles.`) 12 | .setColor("RED") 13 | return message.channel.send(noPerms) 14 | } 15 | 16 | const member = message.mentions.members.first() 17 | if(!member) { 18 | const addroleError = new MessageEmbed() 19 | .setDescription(`Please mention a member in order to give them the role`) 20 | .setColor("RED") 21 | return message.channel.send(addroleError) 22 | } 23 | args.shift() 24 | let roleToGive = message.mentions.roles.first() 25 | 26 | if(!roleToGive) { 27 | const addroleError2 = new MessageEmbed() 28 | .setDescription(`No Roles Provided`) 29 | .setColor("RED") 30 | return message.channel.send(addroleError2) 31 | } 32 | const mentionedPosition = member.roles.highest.position 33 | const selfPosition = message.member.roles.highest.position 34 | 35 | if(selfPosition <= mentionedPosition) { 36 | const posi = new MessageEmbed() 37 | .setDescription(`You cannot add role to this member as their role is higher/equal to yours.`) 38 | .setColor("RED") 39 | return message.channel.send(posi) 40 | } 41 | if(member.roles.cache.get(roleToGive.id)) { 42 | const addroleError3 = new MessageEmbed() 43 | .setDescription(`The member already has that role`) 44 | .setColor("RED") 45 | return message.channel.send(addroleError3) 46 | } 47 | member.roles.add(roleToGive) 48 | const embed = new MessageEmbed() 49 | .setDescription(`Role ${roleToGive} has been added to ${member}`) 50 | .setColor("BLUE") 51 | 52 | message.channel.send(embed) 53 | 54 | 55 | } 56 | } -------------------------------------------------------------------------------- /commands/Admin/backup.js: -------------------------------------------------------------------------------- 1 | const backup = require("discord-backup"); 2 | const { MessageEmbed } = require("discord.js"); 3 | 4 | module.exports = { 5 | name: "backup", 6 | description: "Creates a backup for your server", 7 | usage: "?backup [create/load/remove]", 8 | aliases: [], 9 | run: async (client, message, args) => { 10 | let server = message.guild.id; 11 | const action = args[0]; 12 | 13 | if (!message.member.hasPermission("ADMINISTRATOR")) { 14 | const backupError = new MessageEmbed() 15 | .setDescription("You do not Have Permissions to create a backup") 16 | .setColor("RED"); 17 | return message.channel.send(backupError); 18 | } 19 | if (!action) { 20 | const backupActions = new MessageEmbed() 21 | .setDescription( 22 | "No Action Specified. Here are all the actions:- \n\n 1. backup create: Creates a Backup for your server \n 2. backup load: Loads the backup in the server \n 3. backup list: Sends you a list of backups that you have created" 23 | ) 24 | .setColor("RED"); 25 | return message.channel.send(backupActions); 26 | } 27 | 28 | if (action == "create") { 29 | try { 30 | const m = await message.channel.send( 31 | ":arrows_counterclockwise: Making a Backup. Please Wait." 32 | ); 33 | backup 34 | .create(message.guild, { 35 | jsonSave: true, 36 | jsonBeautify: true, 37 | }) 38 | .then((backups) => { 39 | message.channel.send( 40 | `Backup has been created! Backup ID has been sent to ${message.member}` 41 | ); 42 | message.member.send( 43 | `Backup for ${message.guild.name} has been created. \n\n Backup ID: \`${backups.id}\` \n Make sure to copy and save this somewhere.` 44 | ); 45 | m.delete(); 46 | }); 47 | } catch (err) { 48 | console.log(err); 49 | message.channel.send( 50 | "There was an unexpected error while creating a backup" 51 | ); 52 | } 53 | } 54 | 55 | if (action == "load") { 56 | const Id = args[1]; 57 | if(!Id) return message.channel.send('Please provide a Backup ID') 58 | if(isNaN(Id)) return message.channel.send('Invalid ID') 59 | 60 | backup.load(Id, message.guild).then(backup.remove(args[1])); 61 | } 62 | 63 | }, 64 | }; 65 | -------------------------------------------------------------------------------- /commands/Admin/ban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js") 2 | 3 | const userReg = RegExp(/<@!?(\d+)>/) 4 | 5 | module.exports = { 6 | name: 'ban', 7 | description: "Bans a mentioned member", 8 | run: async(client, message, args) => { 9 | const userID = userReg.test(args[0]) ? userReg.exec(args[0])[1] : [0] 10 | const mentionedUser = await message.client.users.fetch(userID).catch(() => null) 11 | 12 | if(!message.member.hasPermission('BAN_MEMBERS')) { 13 | const banerror = new MessageEmbed() 14 | .setDescription("You Don\'t Have Permissions To Ban Members") 15 | .setColor('#34ebe5') 16 | 17 | return message.channel.send(banerror) 18 | } else if(!message.guild.me.hasPermission('BAN_MEMBERS')) { 19 | const banerror2 = new MessageEmbed() 20 | .setDescription("I Don\'t Have Permissions To Ban Members. Make Sure You Have Given Me Appropriate Permissions") 21 | .setColor('#34ebe5') 22 | 23 | return message.channel.send(banerror2) 24 | } else if(!mentionedUser) { 25 | const banerror3 = new MessageEmbed() 26 | .setDescription("You Need To Mention a Member to Ban") 27 | .setColor('#34ebe5') 28 | 29 | return message.channel.send(banerror3) 30 | } 31 | 32 | const allBans = await message.guild.fetchBans() 33 | 34 | if(allBans.get(mentionedUser.id)) { 35 | const banerr = new MessageEmbed() 36 | .setDescription("The User is Already Banned") 37 | .setColor('#34ebe5') 38 | 39 | return message.channel.send(banerr) 40 | } 41 | 42 | const mentionedMember = message.guild.members.cache.get(mentionedUser.id) 43 | 44 | if(mentionedMember) { 45 | const mentionedPosition = mentionedMember.roles.highest.position 46 | const memberPosition = message.member.roles.highest.position 47 | const botPosition = message.guild.me.roles.highest.position 48 | 49 | if(memberPosition <= mentionedPosition) { 50 | const banerr2 = new MessageEmbed() 51 | .setDescription("You Can Not Ban This Member Because their role is higher/equal to yours") 52 | .setColor('#34ebe5') 53 | 54 | return message.channel.send(banerr2) 55 | } else if (botPosition <= mentionedPosition) { 56 | const banerr3 = new MessageEmbed() 57 | .setDescription("I Can Not Ban This Member Because their role is higher/equal to mine") 58 | .setColor('#34ebe5') 59 | 60 | return message.channel.send(banerr3) 61 | } 62 | } 63 | 64 | const reason = args.slice(1).join(' ') 65 | 66 | message.guild.members.ban(mentionedUser.id, {reason: reason}) 67 | 68 | const banSuccess = new MessageEmbed() 69 | .setTitle('Success!') 70 | .setDescription(`Banned ${mentionedUser} ${reason ? `for **${reason}**` : ''}`) 71 | 72 | message.channel.send(banSuccess) 73 | 74 | 75 | } 76 | } -------------------------------------------------------------------------------- /commands/Admin/clear.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: 'clear', 5 | description: "Clears The Mentioned Number of Messages", 6 | run: async(client, message, args) => { 7 | if (!message.member.permissions.has("MANAGE_MESSAGES")) 8 | return message.channel.send(`You Do Not Have Permissions To Use This Command, ${message.author.username}`); 9 | 10 | if (!args[0]) { 11 | return message.channel.send("Please Enter An Amount Between 1 and 100") 12 | } 13 | 14 | let deleteAmount; 15 | 16 | if (parseInt(args[0]) > 100) { 17 | deleteAmount = 100; 18 | 19 | } else { 20 | deleteAmount = parseInt(args[0]); 21 | } 22 | 23 | await message.channel.bulkDelete(deleteAmount, true); 24 | 25 | const embed = new MessageEmbed() 26 | .setDescription(`Successfully Deleted ${deleteAmount} Messages`) 27 | 28 | .setColor('#04E6FF') 29 | 30 | await message.channel.send(embed).then(message => message.delete({timeout: 5000})) 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /commands/Admin/ctopic.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: 'ctopic', 5 | description: "Change the Channel Topic by Just a command \n Using the command without a channel mentioned will change the topic of the channel you're executing the command in", 6 | usage: "?ctopic <#Channel>", 7 | aliases: ['channeltopic'], 8 | run: async(client, message, args) => { 9 | let channel = message.mentions.channels.first() 10 | let topic; 11 | 12 | if(!message.member.hasPermission('MANAGE_CHANNELS')) { 13 | const ctopicError = new MessageEmbed() 14 | .setDescription('You don\'t have permission to change channel topic!') 15 | .setColor('RED') 16 | return message.channel.send(ctopicError) 17 | } 18 | 19 | if(!channel) { 20 | channel = message.channel 21 | topic = args.join(" ") 22 | } else { 23 | topic = args.slice(1).join(" ").trim() 24 | } 25 | 26 | if(!topic) { 27 | const ctopicError2 = new MessageEmbed() 28 | .setDescription('Please provide a new topic!') 29 | .setColor("RED") 30 | 31 | return message.channel.send(ctopicError2) 32 | } 33 | 34 | await channel.setTopic(topic) 35 | const embed = new MessageEmbed() 36 | .setDescription(`Successfully Set the Topic for ${channel} to: \n\n ${topic}`) 37 | .setColor('BLUE') 38 | 39 | message.channel.send(embed) 40 | } 41 | } -------------------------------------------------------------------------------- /commands/Admin/deletecommand.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const db = require('quick.db') 3 | 4 | module.exports = { 5 | name: 'deletecommand', 6 | description: "Deletes a custom command.", 7 | usage: "?deletecommand ", 8 | aliases: ['delcmd'], 9 | run: async(client, message, args) => { 10 | 11 | if(!message.member.hasPermission('ADMINISTRATOR')) { 12 | if(!message.author.id === message.guild.ownerID) { 13 | return message.channel.send(`You do not have permissions to delete this command.`) 14 | } 15 | } 16 | 17 | if(!args[0]) return message.channel.send(`You Need to give a command to delete!\n\n\`deletecommand \``) 18 | let commandName = args[0].toLowerCase() 19 | 20 | let database = db.get(`guildConfigurations_${message.guild.id}.commands`) 21 | if(database) { 22 | let data = database.find(x => x.name === commandName.toLowerCase()) 23 | if(!data) return message.channel.send(`Unable to find the command \`${commandName}\``) 24 | 25 | let value = database.indexOf(data) 26 | delete database[value] 27 | 28 | var filter = database.filter(x => { 29 | return x != null && x != '' 30 | }) 31 | 32 | db.set(`guildConfigurations_${message.guild.id}.commands`, filter) 33 | const embed = new MessageEmbed() 34 | .setTitle(`Command Deleted`) 35 | .setDescription(`Successfully Deleted **${commandName}** command`) 36 | .setColor('BLUE') 37 | 38 | return message.channel.send(embed) 39 | } 40 | else { 41 | return message.channel.send(`I was unable to find that command.`) 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /commands/Admin/disablewelcome.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const db = require('quick.db') 3 | 4 | module.exports = { 5 | name: 'disablewelcome', 6 | description: "Disables the Welcome Plugin", 7 | usage: "?disablewelcome", 8 | alises: [], 9 | run: async(client, message, args) => { 10 | if(!message.member.hasPermission('ADMINISTRATOR')) { 11 | if(!message.author.id === message.guild.ownerID){ 12 | const disablewelcomeError = new MessageEmbed() 13 | .setDescription(`You don\'t have permissions to set welcome channel`) 14 | .setColor("RED") 15 | return message.channel.send(disablewelcomeError) 16 | } 17 | } 18 | let guildConfig = db.get(`guildConfigurations_${message.guild.id}.welcome`) 19 | if(guildConfig === null) guildConfig = 'disabled' 20 | if(guildConfig === 'disabled') { 21 | const disablewelcomeError2 = new MessageEmbed() 22 | .setDescription(`It is already disabled.`) 23 | .setFooter('Use \`config\` to check server configuration') 24 | .setColor("RED") 25 | return message.channel.send(disablewelcomeError2) 26 | } 27 | db.set(`guildConfigurations_${message.guild.id}.welcome`, 'disabled') 28 | const embed = new MessageEmbed() 29 | .setAuthor(`Welcome Plugin has been disabled`) 30 | .setDescription(`You May Use \`setwelcome\` to set a different welcome channel which automatically enables the welcome plugin`) 31 | .setColor("BLUE") 32 | 33 | message.channel.send(embed) 34 | } 35 | } -------------------------------------------------------------------------------- /commands/Admin/forceban.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed, Client } = require("discord.js") 2 | 3 | module.exports = { 4 | name: 'forceban', 5 | description: "Force Ban someone who is not in the server using their user ID", 6 | usage: "?forceban ", 7 | aliases: ['forcedban'], 8 | run: async (client, message, args) => { 9 | 10 | if (!message.member.hasPermission('BAN_MEMBERS')) { 11 | const forcebanError = new MessageEmbed() 12 | .setDescription(`You dont\'t have the permission to ban members`) 13 | .setColor("RED") 14 | 15 | return message.channel.send(forcebanError) 16 | } 17 | 18 | let userID = args[0]; 19 | let reason = args.slice(1).join(" ") || 'Not Specified' 20 | 21 | if (!userID) { 22 | const forcebanError2 = new MessageEmbed() 23 | .setDescription(`You Need to provide a User ID`) 24 | .setColor("RED") 25 | 26 | return message.channel.send(forcebanError2) 27 | } 28 | if (isNaN(args[0])) { 29 | const forcebanError3 = new MessageEmbed() 30 | .setDescription(`This is not a Valid User ID`) 31 | .setColor("RED") 32 | 33 | return message.channel.send(forcebanError3) 34 | } 35 | if (userID === message.author.id) { 36 | const forcebanError4 = new MessageEmbed() 37 | .setDescription(`You can\'t ban yourself`) 38 | .setColor("RED") 39 | return message.channel.send(forcebanError4) 40 | } 41 | if (userID === client.user.id) { 42 | const forcebanError5 = new MessageEmbed() 43 | .setDescription(`I don\'t want to ban myself. But why?`) 44 | .setColor("RED") 45 | return message.channel.send(forcebanError5) 46 | } 47 | 48 | if (message.guild.member(userID)) { 49 | const forcebanError6 = new MessageEmbed() 50 | .setDescription(`This member is in the server already. Use \`ban\` command instead.`) 51 | .setColor("RED") 52 | return message.channel.send(forcebanError6) 53 | } 54 | 55 | client.users.fetch(userID).then(async user => { 56 | await message.guild.members.ban(user.id, { reason: reason }) 57 | const embed = new MessageEmbed() 58 | .setTitle(`Ban Successful`) 59 | .setDescription(`${user.tag} has been banned, from outside the server! \n **Reason:** ${reason}`) 60 | .setColor("BLUE") 61 | 62 | return message.channel.send(embed) 63 | }).catch(error => { 64 | const errorEmbed = new MessageEmbed() 65 | .setDescription(error) 66 | .setColor("RED") 67 | return message.channel.send(errorEmbed) 68 | }) 69 | 70 | } 71 | } -------------------------------------------------------------------------------- /commands/Admin/kick.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js") 2 | 3 | module.exports = { 4 | name: 'kick', 5 | description: "Kicks The Mentioned Member", 6 | run: async(client, message, args) => { 7 | const mentionedMember = message.mentions.members.first() || message.guild.members.cache.get(args[0]) 8 | 9 | if(!message.member.hasPermission('KICK_MEMBERS')) { 10 | const kickerror = new MessageEmbed() 11 | .setDescription("You Don\'t Have Permissions To Kick Members") 12 | .setColor('#34ebe5') 13 | 14 | return message.channel.send(kickerror) 15 | } else if(!message.guild.me.hasPermission('KICK_MEMBERS')) { 16 | const kickerror2 = new MessageEmbed() 17 | .setDescription("I Don\'t Have Permissions To Kick Members. Make Sure You Have Given Me Appropriate Permissions") 18 | .setColor('#34ebe5') 19 | 20 | return message.channel.send(kickerror2) 21 | } else if (!mentionedMember) { 22 | const kickerror3 = new MessageEmbed() 23 | .setDescription("You Need To Mentioned a Member That You Want to Kick") 24 | .setColor('#34ebe5') 25 | 26 | return message.channel.send(kickerror3) 27 | } 28 | 29 | const mentionedPosition = mentionedMember.roles.highest.position 30 | const memberPosition = message.member.roles.highest.position 31 | const botPosition = message.guild.me.roles.highest.position 32 | 33 | if(memberPosition <= mentionedPosition) { 34 | const kickerr = new MessageEmbed() 35 | .setDescription("You Can Not Kick This Member Because their role is higher/equal to yours") 36 | .setColor('#34ebe5') 37 | 38 | return message.channel.send(kickerr) 39 | } else if (botPosition <= mentionedPosition) { 40 | const kickerr2 = new MessageEmbed() 41 | .setDescription("I Can Not Kick This Member Because their role is higher/equal to mine") 42 | .setColor('#34ebe5') 43 | 44 | return message.channel.send(kickerr2) 45 | } 46 | 47 | const reason = args.slice(1).join(' ') 48 | 49 | try { 50 | await mentionedMember.kick([reason]) 51 | 52 | const kickSuccess = new MessageEmbed() 53 | .setTitle('Successful!') 54 | .setDescription(`Kicked ${mentionedMember} ${reason ? `for **${reason}**` : ''}`) 55 | .setColor('#34ebe5') 56 | 57 | message.channel.send(kickSuccess) 58 | 59 | } catch (error) { 60 | console.log(error) 61 | const errorEmbed = new MessageEmbed() 62 | .setDescription("There Was an Unexpected Error Kicking This Member") 63 | .setColor('#34ebe5') 64 | 65 | message.channel.send(errorEmbed) 66 | } 67 | } 68 | } 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /commands/Admin/lockchannel.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js") 2 | 3 | module.exports = { 4 | name: 'lockchannel', 5 | description: "Locks a channels and disallows everyone to send messages!", 6 | usage: "?lockchannel <#channel> ", 7 | aliases: ['lockc'], 8 | run: async(client, message, args) => { 9 | 10 | if(!message.member.hasPermission('MANAGE_CHANNELS')) { 11 | const lockchannelError = new MessageEmbed() 12 | .setDescription('You don\'t have permission to lock channels!') 13 | .setColor("RED") 14 | 15 | return message.channel.send(lockchannelError) 16 | } 17 | 18 | let channel = message.mentions.channels.first(); 19 | let reason = args.join(" ") || 'Not Specified' 20 | 21 | if(channel) { 22 | reason = args.join(" ").slice(22) || 'Not Specified' 23 | } else ( 24 | channel = message.channel 25 | ) 26 | 27 | if(channel.permissionsFor(message.guild.id).has('SEND_MESSAGES') === false) { 28 | const lockchannelError2 = new MessageEmbed() 29 | .setDescription(`${channel} is already locked!`) 30 | .setColor("RED") 31 | 32 | return message.channel.send(lockchannelError2) 33 | } 34 | 35 | channel.updateOverwrite(message.guild.id, { SEND_MESSAGES: false }) 36 | 37 | const embed = new MessageEmbed() 38 | .setTitle(`Channel Locked!`) 39 | .setDescription(`**Channel:** ${channel} \n **Reason:** ${reason}`) 40 | .setColor("BLUE") 41 | 42 | message.channel.send(embed) 43 | 44 | } 45 | } -------------------------------------------------------------------------------- /commands/Admin/mute.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require("discord.js"); 2 | 3 | module.exports = { 4 | name: "mute", 5 | description: "Mutes The Mentioned User!", 6 | run: async (client, message, args) => { 7 | 8 | 9 | if (!message.member.hasPermission("MANAGE_ROLES", "BAN_MEMBERS")) { 10 | return message.channel.send("Sorry, You Don\'t Have Permissions To Mute Anyone!"); 11 | } 12 | if (!message.guild.me.hasPermission("MANAGE_ROLES", "BAN_MEMBERS")) { 13 | return message.channel.send("Sorry, But I don\'t Have Permissions To Mute Anyone!") 14 | 15 | } 16 | 17 | const user = message.mentions.members.first() 18 | 19 | 20 | 21 | 22 | if (!user) { 23 | return message.channel.send("Please Mention The User I Need To Mute"); 24 | } 25 | 26 | if (user.id === message.author.id) { 27 | return message.channel.send("Haha I See What You\'re Trying To Do Here xD"); 28 | } 29 | 30 | let reason = args.slice(1).join(" ") 31 | 32 | if (!reason) { 33 | return message.channel.send("Please Give A Reason To Mute The Person!") 34 | } 35 | 36 | 37 | let muterole = message.guild.roles.cache.find(x => x.name === "Muted") 38 | 39 | if (!muterole) { 40 | return message.channel.send("This Server Doesn\'t Have A Role Name `Muted`") 41 | } 42 | 43 | if (user.roles.cache.has(muterole)) { 44 | return message.channel.send("Given User Is Already Muted") 45 | } 46 | 47 | const embed = new MessageEmbed() 48 | .setAuthor(`You Muted ${message.mentions.users.first().username} | Reason - ${reason}`) 49 | .setColor("BLUE") 50 | 51 | 52 | 53 | 54 | try { 55 | user.roles.add(muterole) 56 | await message.channel.send(embed) 57 | user.send(`You Are Muted in ${message.guild.name}`) 58 | } catch (error){ 59 | console.log(error) 60 | message.channel.send("Make Sure Your Server has a role named `Muted` And the Appropriate Permissions are set!") 61 | } 62 | 63 | } 64 | 65 | } -------------------------------------------------------------------------------- /commands/Admin/setwelcome.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const db = require('quick.db') 3 | 4 | module.exports = { 5 | name: 'setwelcome', 6 | description: "Sets welcome channel", 7 | usage: "?setwelcome <#channel>", 8 | aliases: [], 9 | run: async(client, message, args) => { 10 | if(!message.member.hasPermission('ADMINISTRATOR')) { 11 | if(!message.author.id === message.guild.ownerID){ 12 | const setwelcomeError = new MessageEmbed() 13 | .setDescription(`You don\'t have permissions to set welcome channel`) 14 | .setColor("RED") 15 | return message.channel.send(setwelcomeError) 16 | } 17 | } 18 | const mentionedChannel = message.mentions.channels.first() 19 | if(!mentionedChannel) { 20 | const welcomeError = new MessageEmbed() 21 | .setDescription(`Please Mention a channel where the Welcome messages will be sent.`) 22 | .setColor('RED') 23 | return message.channel.send(welcomeError) 24 | } 25 | const mentionedChannelId = mentionedChannel.id 26 | 27 | db.set(`Welcome_Channel_${message.guild.id}`, `${mentionedChannelId}`) 28 | db.set(`guildConfigurations_${message.guild.id}.welcome`, 'enabled') 29 | 30 | const embed = new MessageEmbed() 31 | .setAuthor('Welcome Plugin has been Enabled') 32 | .setDescription(`Successfully set ${mentionedChannel} as Welcome Channel.`) 33 | .setFooter(`(Use \`disablewelcome\` to turn off welcome plugin)`) 34 | .setColor("BLUE") 35 | 36 | message.channel.send(embed) 37 | 38 | } 39 | } -------------------------------------------------------------------------------- /commands/Admin/slowmode.js: -------------------------------------------------------------------------------- 1 | const { MessageEmbed } = require('discord.js') 2 | const ms = require('ms') 3 | 4 | module.exports = { 5 | name: 'slowmode', 6 | description: "enable/disable slowmode, time units - h(hour), m(minute), s(seconds)", 7 | usage: "?slowmode