forked from HoloTech/subathon-tracker-bot
Add simple sockets channel implementation.
This commit is contained in:
+6
-5
@@ -4,7 +4,7 @@ import websockets
|
||||
|
||||
from twitchio.web import AiohttpAdapter
|
||||
|
||||
from meta import Bot, conf, setup_main_logger, args
|
||||
from meta import Bot, conf, setup_main_logger, args, sockets
|
||||
from data import Database
|
||||
|
||||
from modules import twitch_setup
|
||||
@@ -30,10 +30,11 @@ async def main():
|
||||
setup=twitch_setup,
|
||||
)
|
||||
|
||||
try:
|
||||
await bot.start()
|
||||
finally:
|
||||
await bot.close()
|
||||
async with websockets.serve(sockets.root_handler, '', conf.wserver.getint('port')):
|
||||
try:
|
||||
await bot.start()
|
||||
finally:
|
||||
await bot.close()
|
||||
|
||||
|
||||
def _main():
|
||||
|
||||
Reference in New Issue
Block a user