Answers for "reload all extensions discord.py"

1

reload all extensions discord.py

# Make sure you don't have a command called "commands"
@client.command()
@commands.is_owner() # Makes sure the person running the command is the owner
async def restart():
	for filename in os.listdir("./cogs"): # Change "cogs" to your folder name
		if filename.endswith(".py"):
			client.reload_extension(f"cogs.{filename[:-3]}") # Change "cogs" to your folder name
Posted by: Guest on April-07-2021

Code answers related to "reload all extensions discord.py"

Python Answers by Framework

Browse Popular Code Answers by Language