2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-31 06:26:04 +00:00

add maybe broken support for callback queries

This commit is contained in:
Nick80835
2020-06-15 14:23:24 -04:00
parent a2a5eadab5
commit b91cce15ba
2 changed files with 33 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ class Loader():
self.command_handler.incoming_commands = {}
self.command_handler.inline_photo_commands = {}
self.command_handler.inline_article_commands = {}
self.command_handler.callback_queries = {}
self.help_dict = {}
errors = ""
@@ -99,6 +100,19 @@ class Loader():
return decorator
def add_callback_query(self, data_id=None, **args):
data_id = args.get("data_id", data_id)
def decorator(func):
self.command_handler.callback_queries[data_id] = {
"function": func,
"extras": args.get('extras', None)
}
return func
return decorator
async def get_text(self, event, with_reply=True, return_msg=False, default=None):
if event.args:
if return_msg: