reload all extensions discord py

Solutions on MaxInterview for reload all extensions discord py by the best coders in the world

showing results for - "reload all extensions discord py"
Maria
12 Jun 2020
1# Make sure you don't have a command called "commands"
2@client.command()
3@commands.is_owner() # Makes sure the person running the command is the owner
4async def restart():
5	for filename in os.listdir("./cogs"): # Change "cogs" to your folder name
6		if filename.endswith(".py"):
7			client.reload_extension(f"cogs.{filename[:-3]}") # Change "cogs" to your folder name