|
@@ -3,7 +3,7 @@ from wbb.utils.inlinefuncs import (
|
|
|
google_search_func, urban_func, translate_func,
|
|
google_search_func, urban_func, translate_func,
|
|
|
alive_function, webss, shortify, wall_func,
|
|
alive_function, webss, shortify, wall_func,
|
|
|
saavn_func, deezer_func, inline_help_func,
|
|
saavn_func, deezer_func, inline_help_func,
|
|
|
- torrent_func
|
|
|
|
|
|
|
+ torrent_func, youtube_func
|
|
|
)
|
|
)
|
|
|
from pyrogram import filters
|
|
from pyrogram import filters
|
|
|
|
|
|
|
@@ -18,7 +18,8 @@ __HELP__ = """
|
|
|
**wall [Query]** - __Find Wallpapers.__
|
|
**wall [Query]** - __Find Wallpapers.__
|
|
|
**saavn [SONG_NAME]** - __Get Songs From Saavn.__
|
|
**saavn [SONG_NAME]** - __Get Songs From Saavn.__
|
|
|
**deezer [SONG_NAME]** - __Get Songs From Deezer.__
|
|
**deezer [SONG_NAME]** - __Get Songs From Deezer.__
|
|
|
-**torrent [QUERY] - __Torrent Search.__"""
|
|
|
|
|
|
|
+**yt [Query]** - __Youtube Search.__
|
|
|
|
|
+**torrent [QUERY]** - __Torrent Search.__"""
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.on_message(filters.command("inline"))
|
|
@app.on_message(filters.command("inline"))
|
|
@@ -121,5 +122,13 @@ async def inline_query_handler(client, query):
|
|
|
cache_time=10
|
|
cache_time=10
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+ elif text.split()[0] == "yt":
|
|
|
|
|
+ tex = text.split(None, 1)[1]
|
|
|
|
|
+ answerss = await youtube_func(answers, tex)
|
|
|
|
|
+ await client.answer_inline_query(
|
|
|
|
|
+ query.id,
|
|
|
|
|
+ results=answerss
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
except (IndexError, TypeError, KeyError, ValueError):
|
|
except (IndexError, TypeError, KeyError, ValueError):
|
|
|
return
|
|
return
|