-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathstart.py
20 lines (17 loc) · 871 Bytes
/
start.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# This file is a part of TG-FileStreamBot
# Coding : Jyothis Jayanth [@EverythingSuckz]
from pyrogram import filters
from pyrogram.types import Message
from WebStreamer.vars import Var
from WebStreamer.bot import StreamBot
@StreamBot.on_message(filters.command(["start", "help"]) & filters.private)
async def start(_, m: Message):
if Var.ALLOWED_USERS and not ((str(m.from_user.id) in Var.ALLOWED_USERS) or (m.from_user.username in Var.ALLOWED_USERS)):
return await m.reply(
"You are not in the allowed list of users who can use me. \
Check <a href='https://github.com/EverythingSuckz/TG-FileStreamBot#optional-vars'>this link</a> for more info.",
disable_web_page_preview=True, quote=True
)
await m.reply(
f'Hi {m.from_user.mention(style="md")}, Send me a file to get an instant stream link.'
)