This commit is contained in:
.[d]. 2023-03-26 14:52:19 -05:00
parent 1db583ced9
commit 6ddab36cce

View File

@ -7,7 +7,6 @@
if SERVICES_TELEGRAM:
#####################
import ipdb
from irc3 import asyncio
import configparser
import logging
@ -110,7 +109,6 @@ if SERVICES_TELEGRAM:
self.id=id
self.title=title
self.type=type
ipdb.set_trace()
context=self.api.getChat(chat_id)
tgc=telegramchat(context.id,context.type,context.title)
FLAG_FOUND=False
@ -155,7 +153,6 @@ if SERVICES_TELEGRAM:
###################################################################################
def main(self):
#self.application=Application.builder().token(TELEGRAM_TOKEN).build()
self.updater=Updater(TELEGRAM_TOKEN,update_queue=asyncio.Queue())
self.api=self.updater.bot
self.dp=Application.builder().token(TELEGRAM_TOKEN).build()
@ -165,15 +162,6 @@ if SERVICES_TELEGRAM:
self.dp.add_error_handler(self.error)
ircbot=guds.memory('ircbot')
asyncio.run_coroutine_threadsafe(self.updater.start_polling(),ircbot.loop)
#self.updater.start_polling()
#self.api=self.updater.bot
#self.dp=self.updater.dispatcher
#self.application.add_handler(CommandHandler("start",self.start))
#self.application.add_handler(CommandHandler("help",help))
#self.application.add_handler(MessageHandler(filters.TEXT,self.echo))
#self.application.add_error_handler(self.error)
#ircbot=guds.memory('ircbot')
#wait self.application.run_polling(),self.ircbot.loop
#######################################################################################
#######################################################################################
@ -185,7 +173,6 @@ if SERVICES_TELEGRAM:
if target==_group[1]:
group=_group[0]
telegrambot=guds.memory('telegrambot')
ipdb.set_trace()
telegrambot.api.send_message(group,msg)
###########################################################################################