update3
This commit is contained in:
parent
1db583ced9
commit
6ddab36cce
@ -7,7 +7,6 @@
|
|||||||
if SERVICES_TELEGRAM:
|
if SERVICES_TELEGRAM:
|
||||||
#####################
|
#####################
|
||||||
|
|
||||||
import ipdb
|
|
||||||
from irc3 import asyncio
|
from irc3 import asyncio
|
||||||
import configparser
|
import configparser
|
||||||
import logging
|
import logging
|
||||||
@ -110,7 +109,6 @@ if SERVICES_TELEGRAM:
|
|||||||
self.id=id
|
self.id=id
|
||||||
self.title=title
|
self.title=title
|
||||||
self.type=type
|
self.type=type
|
||||||
ipdb.set_trace()
|
|
||||||
context=self.api.getChat(chat_id)
|
context=self.api.getChat(chat_id)
|
||||||
tgc=telegramchat(context.id,context.type,context.title)
|
tgc=telegramchat(context.id,context.type,context.title)
|
||||||
FLAG_FOUND=False
|
FLAG_FOUND=False
|
||||||
@ -155,7 +153,6 @@ if SERVICES_TELEGRAM:
|
|||||||
###################################################################################
|
###################################################################################
|
||||||
|
|
||||||
def main(self):
|
def main(self):
|
||||||
#self.application=Application.builder().token(TELEGRAM_TOKEN).build()
|
|
||||||
self.updater=Updater(TELEGRAM_TOKEN,update_queue=asyncio.Queue())
|
self.updater=Updater(TELEGRAM_TOKEN,update_queue=asyncio.Queue())
|
||||||
self.api=self.updater.bot
|
self.api=self.updater.bot
|
||||||
self.dp=Application.builder().token(TELEGRAM_TOKEN).build()
|
self.dp=Application.builder().token(TELEGRAM_TOKEN).build()
|
||||||
@ -165,15 +162,6 @@ if SERVICES_TELEGRAM:
|
|||||||
self.dp.add_error_handler(self.error)
|
self.dp.add_error_handler(self.error)
|
||||||
ircbot=guds.memory('ircbot')
|
ircbot=guds.memory('ircbot')
|
||||||
asyncio.run_coroutine_threadsafe(self.updater.start_polling(),ircbot.loop)
|
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]:
|
if target==_group[1]:
|
||||||
group=_group[0]
|
group=_group[0]
|
||||||
telegrambot=guds.memory('telegrambot')
|
telegrambot=guds.memory('telegrambot')
|
||||||
ipdb.set_trace()
|
|
||||||
telegrambot.api.send_message(group,msg)
|
telegrambot.api.send_message(group,msg)
|
||||||
|
|
||||||
###########################################################################################
|
###########################################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user