mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-10-25 10:32:59 +00:00 
			
		
		
		
	[commands] Delete module when it does not have a setup function.
This commit is contained in:
		| @@ -712,6 +712,8 @@ class Bot(GroupMixin, discord.Client): | ||||
|  | ||||
|         lib = importlib.import_module(name) | ||||
|         if not hasattr(lib, 'setup'): | ||||
|             del lib | ||||
|             del sys.modules[name] | ||||
|             raise discord.ClientException('extension does not have a setup function') | ||||
|  | ||||
|         lib.setup(self) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user