welcomecenterbot/bot/handlers/command_ask.py
2023-09-12 00:17:28 +03:00

19 lines
527 B
Python

from storage import Profile
from handlers.send_button import show_request_msg
from api import get_member
async def handle_command_ask(msg):
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)}
await show_request_msg(m)
elif "error_code" in r:
print(r)