welcomecenterbot/src/handlers/command_ask.py

17 lines
509 B
Python
Raw Normal View History

2023-09-06 10:20:50 +00:00
from storage import Profile
from handlers.send_button import show_request_msg
from api import get_member
2023-04-28 12:24:14 +00:00
def handle_command_ask(msg):
print(f'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(r)
m = {}
2023-09-06 10:11:40 +00:00
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)