2023-04-28 12:24:14 +00:00
|
|
|
from tgbot.storage import Profile
|
|
|
|
from tgbot.handlers.send_button import show_request_msg
|
|
|
|
from tgbot.api import get_member
|
|
|
|
|
|
|
|
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)
|