[mod-modules] Réparation du reload

This commit is contained in:
Louis Chauvet 2020-04-05 14:39:58 +02:00
parent a898a48393
commit 483305a645
Signed by: fomys
GPG Key ID: 1ECA046A9615ABA0

View File

@ -71,12 +71,18 @@ class MainClass(BaseClassPython):
if len(args) == 1 and args[0] == "*":
for module in self.get_all_modules():
e = self.client.unload_module(module)
if e:
await message.channel.send(f"An error occurred during the unloading of the module {module}.")
e = self.client.load_module(module)
if e:
await message.channel.send(f"An error occurred during the loading of the module {module}.")
await self.com_list(message, args, kwargs)
return
for arg in args:
e = self.client.unload_module(arg)
if e:
await message.channel.send(f"An error occurred during the unloading of the module {arg}.")
e = self.client.load_module(arg)
if e:
await message.channel.send(f"An error occurred during the loading of the module {arg}.")
await self.com_list(message, [], [])