tgbot
Advanced tools
+1
-1
| Metadata-Version: 1.1 | ||
| Name: tgbot | ||
| Version: 1.0.dev27 | ||
| Version: 1.0.dev28 | ||
| Summary: Framework to build a Telegram Bot based on a UWSGI Server | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/T-Eberle/tgbot/ |
+1
-1
@@ -8,5 +8,5 @@ [metadata] | ||
| [egg_info] | ||
| tag_build = .dev27 | ||
| tag_build = .dev28 | ||
| tag_date = 0 | ||
| tag_svn_revision = 0 | ||
| Metadata-Version: 1.1 | ||
| Name: tgbot | ||
| Version: 1.0.dev27 | ||
| Version: 1.0.dev28 | ||
| Summary: Framework to build a Telegram Bot based on a UWSGI Server | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/T-Eberle/tgbot/ |
@@ -16,3 +16,3 @@ # -*- coding: utf-8 -*- | ||
| def activatebot(data,wartungsmodus,commands,conversationmethods,callbackclasses,inlinecommands,conversation): | ||
| def activatebot(data,wartungsmodus,commands,conversationmethods,callbackclasses,inlinecommands,messageParser,conversation): | ||
@@ -22,3 +22,3 @@ logger.debug("Message arrived.\nMessage: " + str(data)) | ||
| message = Message(data=data["message"]) | ||
| parsemessage(message,commands,conversationmethods,wartungsmodus,conversation) | ||
| parsemessage(message,commands,conversationmethods,wartungsmodus,messageParser,conversation) | ||
| elif "callback_query" in data: | ||
@@ -25,0 +25,0 @@ callback = CallBackQuery(data=data["callback_query"]) |
@@ -8,3 +8,4 @@ # -*- coding: utf-8 -*- | ||
| from tgbot.basicapi.parser import commandparser | ||
| from tgbot.basicapi.parser import textparser,inlineparser,callbackqueryparser | ||
| from tgbot.basicapi.parser import inlineparser,callbackqueryparser | ||
| from tgbot.basicapi.parser.textparser import MessageAbstract | ||
| from tgbot.resources import emoji | ||
@@ -25,3 +26,3 @@ from tgbot.database.conversation import ConversationAbstract | ||
| def parsemessage(message, botcommands,conversationmethods, wartungsmodus, conversation:ConversationAbstract): | ||
| def parsemessage(message, botcommands,conversationmethods, wartungsmodus,messageParser:MessageAbstract ,conversation:ConversationAbstract): | ||
| user = message.from_User | ||
@@ -42,3 +43,3 @@ # parsereplycommand(message) | ||
| else: | ||
| textparser.parsetext(message) | ||
| messageParser.parsetext(message) | ||
@@ -45,0 +46,0 @@ |
| # -*- coding: utf-8 -*- | ||
| __author__ = 'Thomas' | ||
| def parsetext(message): | ||
| pass | ||
| from abc import ABCMeta,abstractmethod | ||
| class MessageAbstract(metaclass=ABCMeta): | ||
| def parsetext(self,message): | ||
| pass |
@@ -14,2 +14,3 @@ # -*- coding: utf-8 -*- | ||
| import logging | ||
| from tgbot.basicapi.parser.textparser import MessageAbstract | ||
@@ -25,3 +26,3 @@ | ||
| def __init__(self,commandclasses,callbackclasses=None,conversationclasses=None,inlineclasses=None,redis_limitserver=0,redis_convserver=1,configfile="basicconfig.ini",configpath="tgbot.resources.config",wartungsmodus=False,database:Database=None,loggerLevel=logging.INFO,conversation=None): | ||
| def __init__(self,commandclasses,callbackclasses=None,conversationclasses=None,inlineclasses=None,redis_limitserver=0,redis_convserver=1,configfile="basicconfig.ini",configpath="tgbot.resources.config",wartungsmodus=False,database:Database=None,loggerLevel=logging.INFO,messageParser:MessageAbstract=None,conversation=None): | ||
| self.redis_convserver = redis_convserver | ||
@@ -39,2 +40,3 @@ self.redis_limitserver = redis_limitserver | ||
| self.database = database | ||
| self.messageParser = messageParser | ||
| self.conversation = conversation | ||
@@ -60,5 +62,5 @@ logger.setLevel(loggerLevel) | ||
| obj = json.loads(request_body.decode('utf-8')) | ||
| activatebot(obj,self.wartungsmodus,self.commandclasses,self.conversationclasses,self.callbackclasses,self.inlineclasses,self.conversation) | ||
| activatebot(obj,self.wartungsmodus,self.commandclasses,self.conversationclasses,self.callbackclasses,self.inlineclasses,self.messageParser,self.conversation) | ||
| self.database.close() | ||
| return b'' | ||
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
63156
0.59%1034
0.49%