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
|
||||
__pycache__/*
|
||||
*/__pycache__/*
|
||||
Pipfile.lock
|
2
Pipfile
2
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]
|
||||
|
||||
|
3
main.py
3
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)
|
||||
|
Loading…
Reference in New Issue
Block a user