From 483305a6453b99fe2422e6bf86e534bd2a119212 Mon Sep 17 00:00:00 2001 From: Louis Chauvet Date: Sun, 5 Apr 2020 14:39:58 +0200 Subject: [PATCH] =?UTF-8?q?[mod-modules]=20R=C3=A9paration=20du=20reload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/modules/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/modules/__init__.py b/modules/modules/__init__.py index 5b7710b..31144c1 100644 --- a/modules/modules/__init__.py +++ b/modules/modules/__init__.py @@ -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, [], [])