Spaces:
Runtime error
Runtime error
Commit
·
f71e79b
1
Parent(s):
047d9c5
Upload 6 files
Browse files- plugins/cb_buttons.py +1 -1
- plugins/custom_thumbnail.py +3 -3
- plugins/help_text.py +5 -5
- plugins/youtube_dl_button.py +2 -2
- plugins/youtube_dl_echo.py +1 -1
plugins/cb_buttons.py
CHANGED
@@ -38,7 +38,7 @@ from PIL import Image
|
|
38 |
|
39 |
@pyrogram.Client.on_callback_query()
|
40 |
async def button(bot, update):
|
41 |
-
if update.from_user.id in Config.AUTH_USERS:
|
42 |
# logger.info(update)
|
43 |
cb_data = update.data
|
44 |
if ":" in cb_data:
|
|
|
38 |
|
39 |
@pyrogram.Client.on_callback_query()
|
40 |
async def button(bot, update):
|
41 |
+
if update.from_user.id not in Config.AUTH_USERS:
|
42 |
# logger.info(update)
|
43 |
cb_data = update.data
|
44 |
if ":" in cb_data:
|
plugins/custom_thumbnail.py
CHANGED
@@ -28,7 +28,7 @@ logging.getLogger("pyrogram").setLevel(logging.WARNING)
|
|
28 |
|
29 |
@pyrogram.Client.on_message(pyrogram.filters.command(["genthumbnail"]))
|
30 |
async def generate_custom_thumbnail(bot, update):
|
31 |
-
if update.from_user.id in Config.AUTH_USERS:
|
32 |
if update.reply_to_message is not None:
|
33 |
reply_message = update.reply_to_message
|
34 |
if reply_message.media_group_id is not None:
|
@@ -79,7 +79,7 @@ async def generate_custom_thumbnail(bot, update):
|
|
79 |
|
80 |
@pyrogram.Client.on_message(pyrogram.filters.photo)
|
81 |
async def save_photo(bot, update):
|
82 |
-
if update.from_user.id in Config.AUTH_USERS:
|
83 |
if update.media_group_id is not None:
|
84 |
# album is sent
|
85 |
download_location = Config.DOWNLOAD_LOCATION + "/" + str(update.from_user.id) + "/" + str(update.media_group_id) + "/"
|
@@ -106,7 +106,7 @@ async def save_photo(bot, update):
|
|
106 |
|
107 |
@pyrogram.Client.on_message(pyrogram.filters.command(["delthumbnail"]))
|
108 |
async def delthumbnail(bot, update):
|
109 |
-
if update.from_user.id in Config.AUTH_USERS:
|
110 |
download_location = Config.DOWNLOAD_LOCATION + "/" + str(update.from_user.id)
|
111 |
try:
|
112 |
os.remove(download_location + ".jpg")
|
|
|
28 |
|
29 |
@pyrogram.Client.on_message(pyrogram.filters.command(["genthumbnail"]))
|
30 |
async def generate_custom_thumbnail(bot, update):
|
31 |
+
if update.from_user.id not in Config.AUTH_USERS:
|
32 |
if update.reply_to_message is not None:
|
33 |
reply_message = update.reply_to_message
|
34 |
if reply_message.media_group_id is not None:
|
|
|
79 |
|
80 |
@pyrogram.Client.on_message(pyrogram.filters.photo)
|
81 |
async def save_photo(bot, update):
|
82 |
+
if update.from_user.id not in Config.AUTH_USERS:
|
83 |
if update.media_group_id is not None:
|
84 |
# album is sent
|
85 |
download_location = Config.DOWNLOAD_LOCATION + "/" + str(update.from_user.id) + "/" + str(update.media_group_id) + "/"
|
|
|
106 |
|
107 |
@pyrogram.Client.on_message(pyrogram.filters.command(["delthumbnail"]))
|
108 |
async def delthumbnail(bot, update):
|
109 |
+
if update.from_user.id not in Config.AUTH_USERS:
|
110 |
download_location = Config.DOWNLOAD_LOCATION + "/" + str(update.from_user.id)
|
111 |
try:
|
112 |
os.remove(download_location + ".jpg")
|
plugins/help_text.py
CHANGED
@@ -28,7 +28,7 @@ from pyrogram.types.bots_and_keyboards import InlineKeyboardButton, InlineKeyboa
|
|
28 |
|
29 |
@pyrogram.Client.on_message(pyrogram.filters.command(["help"]))
|
30 |
async def help_user(bot, update):
|
31 |
-
if update.from_user.id in Config.AUTH_USERS:
|
32 |
# logger.info(update)
|
33 |
await bot.send_message(
|
34 |
chat_id=update.chat.id,
|
@@ -41,7 +41,7 @@ async def help_user(bot, update):
|
|
41 |
|
42 |
@pyrogram.Client.on_message(pyrogram.filters.command(["start"]))
|
43 |
async def start(bot, update):
|
44 |
-
if update.from_user.id in Config.AUTH_USERS:
|
45 |
# logger.info(update)
|
46 |
await bot.send_message(
|
47 |
chat_id=update.chat.id,
|
@@ -50,11 +50,11 @@ async def start(bot, update):
|
|
50 |
[
|
51 |
[
|
52 |
InlineKeyboardButton(
|
53 |
-
"
|
54 |
),
|
55 |
-
InlineKeyboardButton("Project Channel", url="https://t.me/
|
56 |
],
|
57 |
-
[InlineKeyboardButton("Author", url="https://t.me/
|
58 |
]
|
59 |
),
|
60 |
reply_to_message_id=update.message_id
|
|
|
28 |
|
29 |
@pyrogram.Client.on_message(pyrogram.filters.command(["help"]))
|
30 |
async def help_user(bot, update):
|
31 |
+
if update.from_user.id not in Config.AUTH_USERS:
|
32 |
# logger.info(update)
|
33 |
await bot.send_message(
|
34 |
chat_id=update.chat.id,
|
|
|
41 |
|
42 |
@pyrogram.Client.on_message(pyrogram.filters.command(["start"]))
|
43 |
async def start(bot, update):
|
44 |
+
if update.from_user.id not in Config.AUTH_USERS:
|
45 |
# logger.info(update)
|
46 |
await bot.send_message(
|
47 |
chat_id=update.chat.id,
|
|
|
50 |
[
|
51 |
[
|
52 |
InlineKeyboardButton(
|
53 |
+
"Instagram", url="https://instagram.com/ims_eldrith"
|
54 |
),
|
55 |
+
InlineKeyboardButton("Project Channel", url="https://t.me/url_upload_bots"),
|
56 |
],
|
57 |
+
[InlineKeyboardButton("Author", url="https://t.me/imseldrith")],
|
58 |
]
|
59 |
),
|
60 |
reply_to_message_id=update.message_id
|
plugins/youtube_dl_button.py
CHANGED
@@ -325,9 +325,9 @@ async def youtube_dl_call_back(bot, update):
|
|
325 |
media_album_p = []
|
326 |
if images is not None:
|
327 |
i = 0
|
328 |
-
caption = "© @
|
329 |
if is_w_f:
|
330 |
-
caption = "@
|
331 |
for image in images:
|
332 |
if os.path.exists(str(image)):
|
333 |
if i == 0:
|
|
|
325 |
media_album_p = []
|
326 |
if images is not None:
|
327 |
i = 0
|
328 |
+
caption = "© @url_upload_bots"
|
329 |
if is_w_f:
|
330 |
+
caption = "@myurlxuploaderbot"
|
331 |
for image in images:
|
332 |
if os.path.exists(str(image)):
|
333 |
if i == 0:
|
plugins/youtube_dl_echo.py
CHANGED
@@ -31,7 +31,7 @@ from pyrogram.errors import UserNotParticipant
|
|
31 |
|
32 |
@pyrogram.Client.on_message(pyrogram.filters.regex(pattern=".*http.*"))
|
33 |
async def echo(bot, update):
|
34 |
-
if update.from_user.id in Config.AUTH_USERS:
|
35 |
logger.info(update.from_user)
|
36 |
url = update.text
|
37 |
youtube_dl_username = None
|
|
|
31 |
|
32 |
@pyrogram.Client.on_message(pyrogram.filters.regex(pattern=".*http.*"))
|
33 |
async def echo(bot, update):
|
34 |
+
if update.from_user.id not in Config.AUTH_USERS:
|
35 |
logger.info(update.from_user)
|
36 |
url = update.text
|
37 |
youtube_dl_username = None
|