Ajout du rechargement des modules (ya pas encore la commande mais un déchargement/rechargement marche) et ajout de la dépendance oubliée
This commit is contained in:
parent
8ffa9b0175
commit
52bcb60e3a
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,3 @@
|
|||||||
.idea
|
.idea
|
||||||
__pycache__/*
|
*/__pycache__/*
|
||||||
Pipfile.lock
|
Pipfile.lock
|
2
Pipfile
2
Pipfile
@ -5,7 +5,7 @@ name = "pypi"
|
|||||||
|
|
||||||
[packages]
|
[packages]
|
||||||
discord = {extras = ["voice", "doc"], ref = "rewrite", git = "https://github.com/Rapptz/discord.py"}
|
discord = {extras = ["voice", "doc"], ref = "rewrite", git = "https://github.com/Rapptz/discord.py"}
|
||||||
Pillow = "*"
|
packaging = "*"
|
||||||
|
|
||||||
[dev-packages]
|
[dev-packages]
|
||||||
|
|
||||||
|
3
main.py
3
main.py
@ -116,6 +116,7 @@ class LBI(discord.Client):
|
|||||||
try:
|
try:
|
||||||
info("Start loading module {module}...".format(module=module))
|
info("Start loading module {module}...".format(module=module))
|
||||||
imported = importlib.import_module('modules.' + module)
|
imported = importlib.import_module('modules.' + module)
|
||||||
|
importlib.reload(imported)
|
||||||
if issubclass(imported.MainClass, BaseClass):
|
if issubclass(imported.MainClass, BaseClass):
|
||||||
initialized_class = imported.MainClass(self)
|
initialized_class = imported.MainClass(self)
|
||||||
self.modules.update({module: {"imported": imported, "initialized_class": initialized_class}})
|
self.modules.update({module: {"imported": imported, "initialized_class": initialized_class}})
|
||||||
@ -457,4 +458,4 @@ class ClientById:
|
|||||||
|
|
||||||
|
|
||||||
client = LBI()
|
client = LBI()
|
||||||
client.run("NTUwMDkxOTAyMDY2ODg0NjA4.XKfETw.v150BqB-fMo2wCRuSsTLuKXAOyE", max_messages=500000)
|
client.run('NTUwMDkxOTAyMDY2ODg0NjA4.XKpsPQ.T5emitHQDrt7SxfUNgY1awzX-OY', max_messages=500000)
|
||||||
|
Loading…
Reference in New Issue
Block a user