From f9674a100b60446f89cb20625fcd5b1e0cce37fa Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 6 Sep 2024 14:51:20 -0400 Subject: [PATCH] fixed mute for invited users --- app/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 8822cc5..ec8e02e 100644 --- a/app/main.py +++ b/app/main.py @@ -50,10 +50,11 @@ async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE) -> # skip if bot if user.is_bot: continue + # mute the user await context.bot.restrict_chat_member( update.message.chat_id, - update.message.from_user.id, + update.message.api_kwargs['new_chat_participant']['id'], restricted_perms ) # checks if user is cas banned, do not unmute or give them a captcha