tg_bot/Handler.py

16 lines
363 B
Python
Raw Permalink Normal View History

2024-12-06 14:20:29 +03:00
class Handler:
def __init__(self):
pass
@staticmethod
def load_callback_query(callback_query: str):
command, query = callback_query.split("?")
params_str = query.split("&")
params = {}
for param in params_str:
t = param.split("=")
params[t[0]] = t[1]
return [command, params]