fixes-logs-imports

This commit is contained in:
2023-09-18 10:50:48 +03:00
parent cf4f13ae9b
commit 95071ec301
14 changed files with 98 additions and 61 deletions

View File

@@ -1,18 +1,21 @@
from storage import Profile
from handlers.send_button import show_request_msg
from api import get_member
import logging
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
async def handle_command_ask(msg):
print("handling request resend")
logger.info("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)
logger.debug(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)
logger.error(r)