update2
This commit is contained in:
parent
53564ea35f
commit
4b3b96b7b0
@ -15,16 +15,15 @@ if SERVICES_TELEGRAM:
|
|||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
import telegram
|
import telegram
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from telegram import ChatAction, ParseMode
|
from telegram.constants import ChatAction, ParseMode
|
||||||
from telegram.ext import (ChatJoinRequestHandler, CommandHandler, Filters,
|
from telegram.ext import (ChatJoinRequestHandler, CommandHandler, filters, MessageHandler, Updater)
|
||||||
MessageHandler, Updater)
|
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
@ -159,7 +158,7 @@ if SERVICES_TELEGRAM:
|
|||||||
self.dp=self.updater.dispatcher
|
self.dp=self.updater.dispatcher
|
||||||
self.dp.add_handler(CommandHandler("start",self.start))
|
self.dp.add_handler(CommandHandler("start",self.start))
|
||||||
self.dp.add_handler(CommandHandler("help",help))
|
self.dp.add_handler(CommandHandler("help",help))
|
||||||
self.dp.add_handler(MessageHandler(Filters.text,self.echo))
|
self.dp.add_handler(MessageHandler(filters.text,self.echo))
|
||||||
self.dp.add_error_handler(self.error)
|
self.dp.add_error_handler(self.error)
|
||||||
self.updater.start_polling()
|
self.updater.start_polling()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user