cc
This commit is contained in:
parent
cc85cf5ffd
commit
753b226848
4
main.py
4
main.py
@ -17,7 +17,6 @@ import discord
|
|||||||
from packaging.version import Version
|
from packaging.version import Version
|
||||||
|
|
||||||
from errors import IncompatibleModule
|
from errors import IncompatibleModule
|
||||||
from modules.base import BaseClassPython
|
|
||||||
|
|
||||||
__version__ = "0.1.0"
|
__version__ = "0.1.0"
|
||||||
|
|
||||||
@ -316,6 +315,7 @@ class LBI(discord.Client):
|
|||||||
|
|
||||||
@event
|
@event
|
||||||
def dispatch(self, event, *args, **kwargs):
|
def dispatch(self, event, *args, **kwargs):
|
||||||
|
print(event)
|
||||||
super().dispatch(event, *args, **kwargs)
|
super().dispatch(event, *args, **kwargs)
|
||||||
for module in self.modules.values():
|
for module in self.modules.values():
|
||||||
module["initialized_class"].dispatch(event, *args, **kwargs)
|
module["initialized_class"].dispatch(event, *args, **kwargs)
|
||||||
@ -424,7 +424,7 @@ def execption_handler(loop, context):
|
|||||||
print(os.path.join("/tmp", os.path.dirname(os.path.realpath(__file__))) + ".sock")
|
print(os.path.join("/tmp", os.path.dirname(os.path.realpath(__file__))) + ".sock")
|
||||||
|
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
loop.add_signal_handler(signal.SIGINT, loop.stop)
|
#loop.add_signal_handler(signal.SIGINT, loop.stop)
|
||||||
loop.set_exception_handler(execption_handler)
|
loop.set_exception_handler(execption_handler)
|
||||||
t = loop.create_unix_server(Communication,
|
t = loop.create_unix_server(Communication,
|
||||||
path=os.path.join("/tmp", os.path.dirname(os.path.realpath(__file__)) + ".sock"))
|
path=os.path.join("/tmp", os.path.dirname(os.path.realpath(__file__)) + ".sock"))
|
||||||
|
@ -5,10 +5,10 @@ import traceback
|
|||||||
import collections
|
import collections
|
||||||
import discord
|
import discord
|
||||||
|
|
||||||
from modules.base import BaseClass
|
from modules.base import BaseClassPython
|
||||||
|
|
||||||
|
|
||||||
class MainClass(BaseClass):
|
class MainClass(BaseClassPython):
|
||||||
name = "errors"
|
name = "errors"
|
||||||
description = "Error handling"
|
description = "Error handling"
|
||||||
interactive = True
|
interactive = True
|
||||||
|
Loading…
Reference in New Issue
Block a user