func
This commit is contained in:
parent
1764b322b1
commit
59b6145192
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import asyncio
|
import asyncio
|
||||||
|
# repository stuff
|
||||||
from config import BOT_USERNAME, IMG_1, IMG_2, IMG_5
|
from config import BOT_USERNAME, IMG_1, IMG_2, IMG_5
|
||||||
from program.utils.inline import stream_markup
|
from program.utils.inline import stream_markup
|
||||||
from driver.design.thumbnail import thumb
|
from driver.design.thumbnail import thumb
|
||||||
@ -13,9 +13,12 @@ from driver.filters import command, other_filters
|
|||||||
from driver.queues import QUEUE, add_to_queue
|
from driver.queues import QUEUE, add_to_queue
|
||||||
from driver.veez import call_py, user
|
from driver.veez import call_py, user
|
||||||
from driver.database.dbpunish import is_gbanned_user
|
from driver.database.dbpunish import is_gbanned_user
|
||||||
|
# pyrogram stuff
|
||||||
from pyrogram import Client
|
from pyrogram import Client
|
||||||
from pyrogram.errors import UserAlreadyParticipant, UserNotParticipant
|
from pyrogram.errors import UserAlreadyParticipant, UserNotParticipant
|
||||||
from pyrogram.types import InlineKeyboardMarkup, Message
|
from pyrogram.types import InlineKeyboardMarkup, Message
|
||||||
|
# py-tgcalls stuff
|
||||||
|
from pytgcalls import idle
|
||||||
from pytgcalls import StreamType
|
from pytgcalls import StreamType
|
||||||
from pytgcalls.types.input_stream import AudioVideoPiped
|
from pytgcalls.types.input_stream import AudioVideoPiped
|
||||||
from pytgcalls.types.input_stream.quality import (
|
from pytgcalls.types.input_stream.quality import (
|
||||||
@ -24,6 +27,7 @@ from pytgcalls.types.input_stream.quality import (
|
|||||||
LowQualityVideo,
|
LowQualityVideo,
|
||||||
MediumQualityVideo,
|
MediumQualityVideo,
|
||||||
)
|
)
|
||||||
|
# youtube-dl stuff
|
||||||
from youtubesearchpython import VideosSearch
|
from youtubesearchpython import VideosSearch
|
||||||
|
|
||||||
|
|
||||||
@ -200,6 +204,7 @@ async def vplay(c: Client, m: Message):
|
|||||||
reply_markup=InlineKeyboardMarkup(buttons),
|
reply_markup=InlineKeyboardMarkup(buttons),
|
||||||
caption=f"🗂 **Name:** [{songname}]({link}) | `video`\n⏱️ **Duration:** `{duration}`\n🧸 **Request by:** {requester}",
|
caption=f"🗂 **Name:** [{songname}]({link}) | `video`\n⏱️ **Duration:** `{duration}`\n🧸 **Request by:** {requester}",
|
||||||
)
|
)
|
||||||
|
await idle()
|
||||||
else:
|
else:
|
||||||
if len(m.command) < 2:
|
if len(m.command) < 2:
|
||||||
await m.reply(
|
await m.reply(
|
||||||
@ -260,6 +265,7 @@ async def vplay(c: Client, m: Message):
|
|||||||
reply_markup=InlineKeyboardMarkup(buttons),
|
reply_markup=InlineKeyboardMarkup(buttons),
|
||||||
caption=f"🗂 **Name:** [{songname}]({url}) | `video`\n⏱ **Duration:** `{duration}`\n🧸 **Request by:** {requester}",
|
caption=f"🗂 **Name:** [{songname}]({url}) | `video`\n⏱ **Duration:** `{duration}`\n🧸 **Request by:** {requester}",
|
||||||
)
|
)
|
||||||
|
await idle()
|
||||||
except Exception as ep:
|
except Exception as ep:
|
||||||
await loser.delete()
|
await loser.delete()
|
||||||
await m.reply_text(f"🚫 error: `{ep}`")
|
await m.reply_text(f"🚫 error: `{ep}`")
|
||||||
@ -324,6 +330,7 @@ async def vplay(c: Client, m: Message):
|
|||||||
reply_markup=InlineKeyboardMarkup(buttons),
|
reply_markup=InlineKeyboardMarkup(buttons),
|
||||||
caption=f"🗂 **Name:** [{songname}]({url}) | `video`\n⏱ **Duration:** `{duration}`\n🧸 **Request by:** {requester}",
|
caption=f"🗂 **Name:** [{songname}]({url}) | `video`\n⏱ **Duration:** `{duration}`\n🧸 **Request by:** {requester}",
|
||||||
)
|
)
|
||||||
|
await idle()
|
||||||
except Exception as ep:
|
except Exception as ep:
|
||||||
await loser.delete()
|
await loser.delete()
|
||||||
await m.reply_text(f"🚫 error: `{ep}`")
|
await m.reply_text(f"🚫 error: `{ep}`")
|
||||||
|
Loading…
Reference in New Issue
Block a user