Skip to content

Commit

Permalink
Useless
Browse files Browse the repository at this point in the history
  • Loading branch information
KSKOP69 committed Jan 15, 2025
1 parent f9d3cbd commit 64c6713
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions AlexaMusic/plugins/misc/autoleave.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,6 @@ async def auto_leave():
asyncio.create_task(auto_leave())


async def call_mute(chat_id: int):
active_chats = await get_active_chats()
if chat_id not in active_chats:
return False
if not await is_music_playing(chat_id):
return False
userbot = await get_assistant(chat_id)
async for member in userbot.get_call_members(chat_id):
if member is not None and member.chat.id == userbot.id:
return bool(member.is_muted and not member.can_self_unmute)
return False


async def auto_end():
while True:
await asyncio.sleep(5)
Expand All @@ -93,15 +80,6 @@ async def auto_end():
)
except Exception:
pass
if await call_mute(chat_id):
try:
await Alexa.stop_stream(chat_id)
await app.send_message(
chat_id,
"ʙᴏᴛ ᴀᴜᴛᴏᴍᴀᴛɪᴄᴀʟʟʏ ᴄʟᴇᴀʀᴇᴅ ᴛʜᴇ ǫᴜᴇᴜᴇ ᴀɴᴅ ʟᴇғᴛ ᴠɪᴅᴇᴏᴄʜᴀᴛ ʙᴇᴄᴀᴜsᴇ <b>ʙᴏᴛ ɪs ᴍᴜᴛᴇᴅ ᴏɴ ᴠɪᴅᴇᴏᴄʜᴀᴛ.</b>",
)
except Exception:
pass
del autoend[chat_id]


Expand Down

0 comments on commit 64c6713

Please sign in to comment.