dokku-comp

This commit is contained in:
2023-09-11 23:04:53 +03:00
parent 4be2dc3a45
commit b9a98f1e56
25 changed files with 646 additions and 460 deletions

View File

@@ -2,16 +2,17 @@ from bot.storage import Profile
from bot.handlers.send_button import show_request_msg
from bot.api import get_member
def handle_command_ask(msg):
print('handling request resend')
_cmd, chat_id, member_id = msg['text'].split(' ')
chat_id = chat_id.replace('-', '-100')
r = get_member(chat_id, member_id)
print("handling request resend")
_cmd, chat_id, member_id = msg["text"].split(" ")
chat_id = chat_id.replace("-", "-100")
r = await get_member(chat_id, member_id)
print(r)
m = {}
if 'result' in r:
m['from'] = r['result']['user']
m['chat'] = { 'id': str(chat_id) }
show_request_msg(m)
elif 'error_code' in r:
print(r)
if "result" in r:
m["from"] = r["result"]["user"]
m["chat"] = {"id": str(chat_id)}
await show_request_msg(m)
elif "error_code" in r:
print(r)