From 52bcb60e3a6a213505c456dc0b127b2700dbeaf2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 7 Apr 2019 23:39:48 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20du=20rechargement=20des=20modules=20(ya?= =?UTF-8?q?=20pas=20encore=20la=20commande=20mais=20un=20d=C3=A9chargement?= =?UTF-8?q?/rechargement=20marche)=20et=20ajout=20de=20la=20d=C3=A9pendanc?= =?UTF-8?q?e=20oubli=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- Pipfile | 2 +- main.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index dc3277f..d5484e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .idea -__pycache__/* +*/__pycache__/* Pipfile.lock \ No newline at end of file diff --git a/Pipfile b/Pipfile index 4a1ce3d..382c847 100644 --- a/Pipfile +++ b/Pipfile @@ -5,7 +5,7 @@ name = "pypi" [packages] discord = {extras = ["voice", "doc"], ref = "rewrite", git = "https://github.com/Rapptz/discord.py"} -Pillow = "*" +packaging = "*" [dev-packages] diff --git a/main.py b/main.py index 92e8037..a176e22 100755 --- a/main.py +++ b/main.py @@ -116,6 +116,7 @@ class LBI(discord.Client): try: info("Start loading module {module}...".format(module=module)) imported = importlib.import_module('modules.' + module) + importlib.reload(imported) if issubclass(imported.MainClass, BaseClass): initialized_class = imported.MainClass(self) self.modules.update({module: {"imported": imported, "initialized_class": initialized_class}}) @@ -457,4 +458,4 @@ class ClientById: client = LBI() -client.run("NTUwMDkxOTAyMDY2ODg0NjA4.XKfETw.v150BqB-fMo2wCRuSsTLuKXAOyE", max_messages=500000) +client.run('NTUwMDkxOTAyMDY2ODg0NjA4.XKpsPQ.T5emitHQDrt7SxfUNgY1awzX-OY', max_messages=500000)