diff --git a/CHECKS b/CHECKS deleted file mode 100644 index cd5d101..0000000 --- a/CHECKS +++ /dev/null @@ -1,3 +0,0 @@ -WAIT=10 -TIMEOUT=10 -ATTEMPTS=5 # 10 * 5 = 50 secs diff --git a/bot/handlers/callback_vouch.py b/bot/handlers/callback_vouch.py index eb9b9f1..4dd938f 100644 --- a/bot/handlers/callback_vouch.py +++ b/bot/handlers/callback_vouch.py @@ -59,7 +59,7 @@ async def handle_button(callback_query): actor["children"].append(str(newcomer_id)) Profile.save(actor) - chat_id = str(callback_query["message"]["chat"]["id"]) + chat_id = str(vars(callback_query["message"]["chat"])["id"]) print("accept join request") r = await approve_chat_join_request(chat_id, newcomer_id) diff --git a/bot/handlers/handle_feedback.py b/bot/handlers/handle_feedback.py index 4744408..1050f82 100644 --- a/bot/handlers/handle_feedback.py +++ b/bot/handlers/handle_feedback.py @@ -3,12 +3,9 @@ import json from api import ( send_message, forward_message, - delete_message, get_chat_administrators, ) -from handlers.send_button import show_request_msg -from utils.mention import userdata_extract -from storage import storage, Profile +from storage import storage from config import FEEDBACK_CHAT_ID import logging logger = logging.getLogger(__name__) @@ -45,7 +42,7 @@ async def handle_answer(msg): answered_msg = msg.get("reply_to_message") if answered_msg: if "from" not in answered_msg: - answered_msg["from"] = vars(msg.from_user) + answered_msg["from"] = msg.get("from_user") r = await get_chat_administrators(msg["chat"]["id"]) logger.debug(r) admins = []