Skip to content

Instantly share code, notes, and snippets.

@doge
Created Sep 30, 2020
Embed
What would you like to do?
mass leave discord servers
import discord
client = discord.Client()
token = "your-client-token"
whitelist = [
# discord guild ids you don't want to leave
123456789012345678,
876543210987654321
]
@client.event
async def on_ready():
for guild in client.guilds:
try:
if guild.id not in whitelist:
server = client.get_guild(guild.id)
await server.leave()
except Exception as e:
print(e)
client.run(token, bot=False)
@Heyheyitskk26

This comment has been minimized.

Copy link

@Heyheyitskk26 Heyheyitskk26 commented Jun 21, 2021

How do I import this code into discord?

@shaurya11123

This comment has been minimized.

Copy link

@shaurya11123 shaurya11123 commented Jul 18, 2021

through repl.it

@COD1EINE

This comment has been minimized.

Copy link

@COD1EINE COD1EINE commented Aug 19, 2021

through repl.it

can u help?

@doge

This comment has been minimized.

Copy link
Owner Author

@doge doge commented Aug 20, 2021

through repl.it

can u help?

you must have some knowledge of coding if you're on github. import the code into a site like repl.it and fill in the variables.

@COD1EINE

This comment has been minimized.

Copy link

@COD1EINE COD1EINE commented Aug 21, 2021

through repl.it

can u help?

you must have some knowledge of coding if you're on github. import the code into a site like repl.it and fill in the variables.

k , thanks <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment