From 802be087bea874f7eff8f4d097d77e7fcb14e910 Mon Sep 17 00:00:00 2001 From: Alessio Tudisco Date: Fri, 22 Dec 2023 16:45:45 +0100 Subject: [PATCH] chore: minor fixes --- src/spotted/data/user.py | 4 ++-- src/spotted/handlers/mute.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spotted/data/user.py b/src/spotted/data/user.py index bb2b5d60..b1db96f6 100644 --- a/src/spotted/data/user.py +++ b/src/spotted/data/user.py @@ -125,7 +125,7 @@ async def mute(self, bot: Bot, days: int): days(optional): The number of days the user should be muted for. """ await bot.restrict_chat_member( - chat_id=Config.post_get("channel_id"), + chat_id=Config.post_get("community_group_id"), user_id=self.user_id, permissions=ChatPermissions( can_send_messages=False, @@ -147,7 +147,7 @@ async def unmute(self, bot: Bot): bot : the telegram bot """ await bot.restrict_chat_member( - chat_id=Config.post_get("channel_id"), + chat_id=Config.post_get("community_group_id"), user_id=self.user_id, permissions=ChatPermissions( can_send_messages=True, diff --git a/src/spotted/handlers/mute.py b/src/spotted/handlers/mute.py index ca057194..5ec79810 100644 --- a/src/spotted/handlers/mute.py +++ b/src/spotted/handlers/mute.py @@ -33,7 +33,7 @@ async def mute_cmd(update: Update, context: CallbackContext): await user.mute(info.bot, days) await info.bot.send_message( chat_id=Config.post_get("admin_group_id"), - text=f"L'utente è stato mutato per {days} giorn{'o' if days == 1 else 'i'}.", + text=f"L'utente {user.user_id} è stato mutato per {days} giorn{'o' if days == 1 else 'i'}.", ) await info.bot.send_message( chat_id=user.user_id, text=f"Sei stato mutato da Spotted DMI" f"per {days} giorn{'o' if days == 1 else 'i'}"