Skip to content

Commit 475b7ea

Browse files
committed
Fix Force Sub
1 parent 80469b0 commit 475b7ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

helper_func.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import re
55
import asyncio
66
from pyrogram import filters
7+
from pyrogram.enums import ChatMemberStatus
78
from config import FORCE_SUB_CHANNEL, ADMINS
89
from pyrogram.errors.exceptions.bad_request_400 import UserNotParticipant
910
from pyrogram.errors import FloodWait
@@ -19,7 +20,7 @@ async def is_subscribed(filter, client, update):
1920
except UserNotParticipant:
2021
return False
2122

22-
if not member.status in ["creator", "administrator", "member"]:
23+
if not member.status in [ChatMemberStatus.OWNER, ChatMemberStatus.ADMINISTRATOR, ChatMemberStatus.MEMBER]:
2324
return False
2425
else:
2526
return True

0 commit comments

Comments
 (0)