Update main.py
Browse files
main.py
CHANGED
@@ -16,6 +16,16 @@ logging.basicConfig(
|
|
16 |
)
|
17 |
logging.getLogger("pyrogram").setLevel(logging.WARNING)
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
WELCOME_TEXT = """
|
20 |
Hey! {first_name}
|
21 |
|
@@ -156,6 +166,8 @@ async def check_membership(channel_id, bot, msg):
|
|
156 |
& filters.private
|
157 |
)
|
158 |
async def welcome_start(client: Client, message: Message):
|
|
|
|
|
159 |
response = set_user_update_in_db(
|
160 |
user_id=message.from_user.id,
|
161 |
first_name=message.from_user.first_name,
|
@@ -196,6 +208,8 @@ async def welcome_start(client: Client, message: Message):
|
|
196 |
& ~filters.forwarded
|
197 |
)
|
198 |
async def searchhub(client: Client, message: Message):
|
|
|
|
|
199 |
user_id = message.from_user.id
|
200 |
query = message.text.split(" ", 1)[1] if len(message.command) > 1 else None
|
201 |
if not query:
|
@@ -255,6 +269,8 @@ def is_pornohub_url(url):
|
|
255 |
& ~filters.forwarded
|
256 |
)
|
257 |
async def porno_download(client: Client, message: Message):
|
|
|
|
|
258 |
user_id = message.from_user.id
|
259 |
link = message.text.split(" ", 1)[1] if len(message.command) > 1 else None
|
260 |
if not link:
|
|
|
16 |
)
|
17 |
logging.getLogger("pyrogram").setLevel(logging.WARNING)
|
18 |
|
19 |
+
NOT_ALLOWED_NON_PROGRAMMER = [
|
20 |
+
466019692, # @myexcid,
|
21 |
+
1423479724, # tonic,
|
22 |
+
883761960, # ari
|
23 |
+
6824458358, # None
|
24 |
+
1982318761, # paman
|
25 |
+
6477856957 # test
|
26 |
+
]
|
27 |
+
|
28 |
+
|
29 |
WELCOME_TEXT = """
|
30 |
Hey! {first_name}
|
31 |
|
|
|
166 |
& filters.private
|
167 |
)
|
168 |
async def welcome_start(client: Client, message: Message):
|
169 |
+
if message.from_user.id in NOT_ALLOWED_NON_PROGRAMMER:
|
170 |
+
return await message.reply_text("As long as the account is restricted, you will not be able to send messages to bots")
|
171 |
response = set_user_update_in_db(
|
172 |
user_id=message.from_user.id,
|
173 |
first_name=message.from_user.first_name,
|
|
|
208 |
& ~filters.forwarded
|
209 |
)
|
210 |
async def searchhub(client: Client, message: Message):
|
211 |
+
if message.from_user.id in NOT_ALLOWED_NON_PROGRAMMER:
|
212 |
+
return await message.reply_text("As long as the account is restricted, you will not be able to send messages to bots")
|
213 |
user_id = message.from_user.id
|
214 |
query = message.text.split(" ", 1)[1] if len(message.command) > 1 else None
|
215 |
if not query:
|
|
|
269 |
& ~filters.forwarded
|
270 |
)
|
271 |
async def porno_download(client: Client, message: Message):
|
272 |
+
if message.from_user.id in NOT_ALLOWED_NON_PROGRAMMER:
|
273 |
+
return await message.reply_text("As long as the account is restricted, you will not be able to send messages to bots")
|
274 |
user_id = message.from_user.id
|
275 |
link = message.text.split(" ", 1)[1] if len(message.command) > 1 else None
|
276 |
if not link:
|