Update tgclient.py

This commit is contained in:
midoks
2023-05-03 12:33:01 +08:00
parent 680b0f09f2
commit 7f21781c0b
+6 -1
View File
@@ -99,7 +99,7 @@ while True:
client = TelegramClient('mdioks', cfg['bot']['api_id'], cfg['bot']['api_hash'])
async def plugins_run():
async def plugins_run_task():
plist = getStartExtCfgByTag('client')
for p in plist:
try:
@@ -110,6 +110,11 @@ async def plugins_run():
writeLog(mw.getTracebackInfo())
writeLog('----- client error end -------')
async def plugins_run():
while True:
await plugins_run_task()
time.sleep(1)
async def main(loop):
await client.start()