Skip to content

Commit

Permalink
Alexa Music
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTeamAlexa authored Nov 29, 2023
1 parent 8869d49 commit 62f2cf4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions AlexaMusic/plugins/misc/autoleave.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import asyncio
from datetime import datetime

from pyrogram.enums import ChatType

import config
from AlexaMusic import app
from AlexaMusic.core.call import Alexa, autoend
Expand All @@ -26,12 +28,12 @@ async def auto_leave():
for num in assistants:
client = await get_client(num)
try:
async for i in client.iter_dialogs():
async for i in client.get_dialogs():
chat_type = i.chat.type
if chat_type in [
"supergroup",
"group",
"channel",
ChatType.SUPERGROUP,
ChatType.GROUP,
ChatType.CHANNEL,
]:
chat_id = i.chat.id
if (
Expand Down

0 comments on commit 62f2cf4

Please sign in to comment.