mirror of
https://github.com/avipatilpro/FileStreamBot.git
synced 2026-01-17 07:02:53 -03:00
Initial Commit
This commit is contained in:
@@ -10,6 +10,7 @@ from FileStream.utils.translation import LANG, BUTTON
|
||||
from pyrogram import filters, Client
|
||||
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, Message
|
||||
from pyrogram.enums.parse_mode import ParseMode
|
||||
import asyncio
|
||||
|
||||
db = Database(Telegram.DATABASE_URL, Telegram.SESSION_NAME)
|
||||
|
||||
@@ -63,7 +64,14 @@ async def start(bot: Client, message: Message):
|
||||
file_id = file_check['file_id']
|
||||
file_name = file_check['file_name']
|
||||
if db_id == usr_cmd:
|
||||
await message.reply_cached_media(file_id=file_id, caption=f'**{file_name}**')
|
||||
if db_id == usr_cmd:
|
||||
filex = await message.reply_cached_media(file_id=file_id, caption=f'**{file_name}**')
|
||||
await asyncio.sleep(3600)
|
||||
try:
|
||||
await filex.delete()
|
||||
await message.delete()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
except FIleNotFound as e:
|
||||
await message.reply_text("**File Not Found**")
|
||||
|
||||
@@ -31,7 +31,7 @@ async def private_receive_handler(bot: Client, message: Message):
|
||||
return
|
||||
|
||||
await is_user_exist(bot, message)
|
||||
if Telegram.FORCE_UPDATES_CHANNEL:
|
||||
if Telegram.FORCE_SUB:
|
||||
if not await is_user_joined(bot, message):
|
||||
return
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user