async def muter(moot): """ Used for deleting the messages of muted people """ try: from userbot.modules.sql_helper.spam_mute_sql import is_muted from userbot.modules.sql_helper.gmute_sql import is_gmuted except AttributeError: return muted = is_muted(moot.chat_id) gmuted = is_gmuted(moot.sender_id) rights = ChatBannedRights( until_date=None, send_messages=True, send_media=True, send_stickers=True, send_gifs=True, send_games=True, send_inline=True, embed_links=True, ) if muted: for i in muted: if str(i.sender) == str(moot.sender_id): await moot.delete() await moot.client( EditBannedRequest(moot.chat_id, moot.sender_id, rights)) for i in gmuted: if i.sender == str(moot.sender_id): await moot.delete()
async def muter(moot): """ Used for deleting the messages of muted people """ try: from userbot.modules.sql_helper.spam_mute_sql import is_muted except AttributeError: return muted = is_muted(moot.chat_id) rights = ChatBannedRights( until_date=None, send_messages=True, send_media=True, send_stickers=True, send_gifs=True, send_games=True, send_inline=True, embed_links=True, ) if muted: for i in muted: if str(i.sender) == str(moot.sender_id): try: await moot.delete() await moot.client( EditBannedRequest(moot.chat_id, moot.sender_id, rights)) except (BadRequestError, UserAdminInvalidError, ChatAdminRequiredError, UserIdInvalidError): await moot.client.send_read_acknowledge( moot.chat_id, moot.id)
async def muter(moot): """ Sessize alınan kullanıcıların mesajlarını silmek için kullanılır """ try: from userbot.modules.sql_helper.spam_mute_sql import is_muted from userbot.modules.sql_helper.gmute_sql import is_gmuted except: return muted = is_muted(moot.chat_id) gmuted = is_gmuted(moot.sender_id) rights = ChatBannedRights( until_date=None, send_messages=True, send_media=True, send_stickers=True, send_gifs=True, send_games=True, send_inline=True, embed_links=True, ) if muted: for i in muted: if str(i.sender) == str(moot.sender_id): await moot.delete() try: await moot.client( EditBannedRequest(moot.chat_id, moot.sender_id, rights)) except: pass for i in gmuted: if i.sender == str(moot.sender_id): await moot.delete()
async def muter(e): try: from userbot.modules.sql_helper.spam_mute_sql import is_muted from userbot.modules.sql_helper.gmute_sql import is_gmuted except: return mootd = is_muted(moot.chat_id) gmootd = is_gmuted(moot.sender_id) rights = ChatBannedRights( until_date=None, send_messages=True, send_media=True, send_stickers=True, send_gifs=True, send_games=True, send_inline=True, embed_links=True, ) if mootd: for i in mootd: if str(i.sender) == str(moot.sender_id): await moot.delete() await bot( EditBannedRequest(moot.chat_id, moot.sender_id, rights)) for i in gmootd: if i.sender == str(moot.sender_id): await moot.delete()
async def muter(e): from userbot.modules.sql_helper.spam_mute_sql import is_muted L = is_muted(e.chat_id) if L: for i in L: if str(i.sender) == str(e.sender_id): await e.delete()
async def muter(e): try: from userbot.modules.sql_helper.spam_mute_sql import is_muted from userbot.modules.sql_helper.gmute_sql import is_gmuted except: return L = is_muted(e.chat_id) K = is_gmuted(e.sender_id) if L: for i in L: if str(i.sender) == str(e.sender_id): await e.delete() for i in K: if i.sender == str(e.sender_id): await e.delete()
async def muter(moot): try: from userbot.modules.sql_helper.spam_mute_sql import is_muted from userbot.modules.sql_helper.gmute_sql import is_gmuted except: return mootd = is_muted(moot.chat_id) gmootd = is_gmuted(moot.sender_id) if mootd: for i in mootd: if str(i.sender) == str(moot.sender_id): await moot.delete() for i in gmootd: if i.sender == str(moot.sender_id): await moot.delete()