remove mute/unmute, fix vouch callback

This commit is contained in:
2023-05-04 11:42:52 +03:00
parent 41882595b1
commit aa6975e49a
6 changed files with 46 additions and 43 deletions

View File

@@ -1,5 +1,5 @@
from tgbot.handlers.send_button import show_request_msg
from tgbot.api import unmute_member, mute_member, delete_message
from tgbot.api import delete_message
from tgbot.storage import Profile, storage
from tgbot.config import FEEDBACK_CHAT_ID
@@ -14,11 +14,6 @@ def handle_join(msg):
if len(actor['parents']) == 0 and str(chat_id) != FEEDBACK_CHAT_ID:
# показываем сообщение с кнопкой "поручиться"
show_request_msg(msg)
# до одобрения - мьют
r = mute_member(chat_id, newcomer_id)
print(r)
else:
# за пользователя поручились ранее
pass
@@ -30,9 +25,6 @@ def handle_join(msg):
newcomer['parents'].append(str(from_id))
Profile.save(newcomer)
actor['children'].append(str(m['id']))
r = unmute_member(chat_id, newcomer['id'])
print(r)
# обновляем профиль пригласившего
Profile.save(actor)