diff --git a/Dockerfile b/Dockerfile index c5c0af54..eb0e51e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,12 @@ -FROM debian:latest +FROM nikolaik/python-nodejs:python3.9-nodejs16 RUN apt update && apt upgrade -y -RUN apt install git curl python3-pip ffmpeg -y -RUN pip3 install -U pip -RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && \ - apt-get install -y nodejs && \ - npm i -g npm +RUN apt install ffmpeg -y + COPY requirements.txt /requirements.txt RUN cd / -RUN pip3 install -U -r requirements.txt +RUN pip3 install -U pip && pip3 install -U -r requirements.txt RUN mkdir /VCPlayerBot WORKDIR /VCPlayerBot COPY start.sh /start.sh -CMD ["/bin/bash", "/start.sh"] \ No newline at end of file +CMD ["/bin/bash", "/start.sh"] diff --git a/app.json b/app.json index 7fa4eb30..e31c3679 100644 --- a/app.json +++ b/app.json @@ -72,7 +72,7 @@ }, "REPLY_MESSAGE": { "description": "A reply message to those who message the USER account in PM. Make it blank if you do not need this feature.", - "value": "Helo Ser, Iam a bot to play music, not havimg time to chat with you.", + "value": "Hey, Iam a bot to play music, not having time to chat with you.", "required": false } }, diff --git a/config.py b/config.py index 83f57135..3f7b1f74 100644 --- a/config.py +++ b/config.py @@ -324,10 +324,10 @@ class Config: __You can pass number of seconds to be skipped. Example: /seek 10 to skip 10 sec. /seek -10 to rewind 10 sec.__ 9. Mute the player. -Command: **/mute** +Command: **/vcmute** 10. Unmute the player. -Command : **/unmute** +Command : **/vcunmute** 11. Shows the playlist. Command: **/playlist** diff --git a/env.sample b/env.sample index 736facda..26ad18c2 100644 --- a/env.sample +++ b/env.sample @@ -1,6 +1,6 @@ -API_ID = 12345 -API_HASH = 0123456789abcdef0123456789abcdef -BOT_TOKEN = 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 -SESSION_STRING = ABC-DEF1234ghIkl-zyx57W2v1u123ew11_ABC-DEF1234ghIkl-zyx57W2v1u123ew11 -CHAT = -10012345678 -ADMINS = "1234567890 9876543210" \ No newline at end of file +API_ID=12345 +API_HASH=0123456789abcdef0123456789abcdef +BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 +SESSION_STRING=ABC-DEF1234ghIkl-zyx57W2v1u123ew11_ABC-DEF1234ghIkl-zyx57W2v1u123ew11 +CHAT=-10012345678 +ADMINS=1234567890 9876543210 diff --git a/plugins/commands.py b/plugins/commands.py index 05dd56fa..6ab51520 100644 --- a/plugins/commands.py +++ b/plugins/commands.py @@ -53,7 +53,7 @@ if Config.DATABASE_URI: from utils import db -HOME_TEXT = "Hey [{}](tg://user?id={}) πŸ™‹β€β™‚οΈ\n\nIam A Bot Built To Play or Stream Videos In Telegram VoiceChats.\nI Can Stream Any YouTube Video Or A Telegram File Or Even A YouTube Live." +HOME_TEXT = "Hey [{}](tg://user?id={}) πŸ‘‹\n\nIam A Bot Built To Play or Stream Videos In Telegram VoiceChats.\nI Can Stream Any YouTube Video Or A Telegram File Or Even A YouTube Live." admin_filter=filters.create(is_admin) @Client.on_message(filters.command(['start', f"start@{Config.BOT_USERNAME}"])) @@ -129,11 +129,11 @@ async def start(client, message): return buttons = [ [ - InlineKeyboardButton('βš™οΈ Update Channel', url='https://t.me/subin_works'), - InlineKeyboardButton('🧩 Source', url='https://github.com/subinps/VCPlayerBot') + InlineKeyboardButton('πŸ”” Update Channel', url='https://t.me/subin_works'), + InlineKeyboardButton('πŸ—ƒ Source', url='https://github.com/subinps/VCPlayerBot') ], [ - InlineKeyboardButton('πŸ‘¨πŸΌβ€πŸ¦― Help', callback_data='help_main'), + InlineKeyboardButton('βš™οΈ Help', callback_data='help_main'), InlineKeyboardButton('πŸ—‘ Close', callback_data='close'), ] ] @@ -188,15 +188,15 @@ async def show_help(client, message): async def repo_(client, message): buttons = [ [ - InlineKeyboardButton('🧩 Repository', url='https://github.com/subinps/VCPlayerBot'), - InlineKeyboardButton('βš™οΈ Update Channel', url='https://t.me/subin_works'), + InlineKeyboardButton('πŸ—ƒ Repository', url='https://github.com/subinps/VCPlayerBot'), + InlineKeyboardButton('πŸ”” Update Channel', url='https://t.me/subin_works'), ], [ - InlineKeyboardButton("🎞 How to Deploy", url='https://youtu.be/mnWgZMrNe_0'), + InlineKeyboardButton("❓ How to Deploy", url='https://youtu.be/mnWgZMrNe_0'), InlineKeyboardButton('πŸ—‘ Close', callback_data='close'), ] ] - await message.reply("The source code of this bot is public and can be found at VCPlayerBot.\nYou can deploy your own bot and use in your group.\n\nFeel free to starβ˜€οΈ the repo if you liked it πŸ™ƒ.", reply_markup=InlineKeyboardMarkup(buttons), disable_web_page_preview=True) + await message.reply("The source code of this bot is public and can be found at VCPlayerBot.\nYou can deploy your own bot and use in your group.\n\nFeel free to star 🌟 the repo if you liked it πŸ™ƒ.", reply_markup=InlineKeyboardMarkup(buttons), disable_web_page_preview=True) await delete_messages([message]) @Client.on_message(filters.command(['restart', 'update', f"restart@{Config.BOT_USERNAME}", f"update@{Config.BOT_USERNAME}"]) & admin_filter & chat_filter) diff --git a/requirements.txt b/requirements.txt index 374d8de6..cf58a4b7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,15 @@ git+https://github.com/pyrogram/pyrogram@master -py-tgcalls==0.8.1rc1 +py-tgcalls parse-torrent-name tgcrypto yt-dlp -youtube_search_python -youtube_search +youtube-search-python +httpx==0.14.2 +youtube-search heroku3 pillow motor dnspython pytz apscheduler -python-dotenv \ No newline at end of file +python-dotenv diff --git a/utils/utils.py b/utils/utils.py index 8c42da8b..d38dd07e 100644 --- a/utils/utils.py +++ b/utils/utils.py @@ -1619,6 +1619,8 @@ async def sync_from_db(): for var in Config.CONFIG_LIST: setattr(Config, var, await db.get_config(var)) Config.playlist = await db.get_playlist() + if Config.playlist and Config.SHUFFLE: + await shuffle_playlist() async def add_to_db_playlist(song): if Config.DATABASE_URI: