fix: id is now int for everyone
This commit is contained in:
@@ -33,7 +33,7 @@ WELCOME_VIDEO_NOTE_FP = os.getenv("WELCOME_VIDEO_NOTE_FP", "static/welcome.mp4")
|
|||||||
### Constants ###
|
### Constants ###
|
||||||
|
|
||||||
PAGE_SIZE = 8
|
PAGE_SIZE = 8
|
||||||
VERIFIED_ACCOUNTS = os.getenv("ADMINS", "").split(",")
|
VERIFIED_ACCOUNTS: list[int] = [int(el) for el in os.getenv("ADMINS", "").split(",")]
|
||||||
NOTIFICATION_CHANNEL = os.getenv("NOTIFICATION_CHANNEL")
|
NOTIFICATION_CHANNEL = os.getenv("NOTIFICATION_CHANNEL")
|
||||||
|
|
||||||
if not NOTIFICATION_CHANNEL:
|
if not NOTIFICATION_CHANNEL:
|
||||||
|
|||||||
@@ -6,4 +6,4 @@ from config import VERIFIED_ACCOUNTS
|
|||||||
|
|
||||||
class IsVerified(BaseFilter):
|
class IsVerified(BaseFilter):
|
||||||
async def __call__(self, inline_query: InlineQuery) -> bool:
|
async def __call__(self, inline_query: InlineQuery) -> bool:
|
||||||
return str(inline_query.from_user.id) in str(VERIFIED_ACCOUNTS)
|
return inline_query.from_user.id in VERIFIED_ACCOUNTS
|
||||||
|
|||||||
Reference in New Issue
Block a user