A Telegram Music Bot written in Python using Pyrogram and Py-Tgcalls

Overview

⭐️ Music Player ⭐️

A Telegram Music Bot written in Python using Pyrogram and Py-Tgcalls

made-with-python
LICENSE Contributors Repository Size
Forks Stars Watchers Commit Activity Issues

Features

⚡️ Fast & Light

Starts streaming your inputs while downloading and converting them. Also, it doesn't make produce files.

👮🏻‍♀️ Safe and handy

Restricts control and sensitive commands to admins.

🗑 Clean and spam free

Deletes old playing trash to keep your chats clean.

😎 Has cool controls

Lets you switch stream mode, loop, pause, resume, mute, unmute anytime.

🖼 Has cool thumbnails

Response your commands with cool thumbnails on the chat.

😉 Streams whatever you like

You can stream audio or video files, YouTube videos with any duration, YouTube lives, YouTube playlists and even custom live streams like radios or m3u8 links or files in the place it is hosted!

📊 Streams in multiple places

Allows you to stream different things in multiple chats simultaneously. Each chat will have its own song queue.

🗣 Speaks different languages

Music Player is multilingual and speaks various languages, thanks to the translators.

🚀 Deploy

Deploy on Heroku

☁️ Self Host

$ git clone https://github.com/AsmSafone/MusicPlayer
$ cd MusicPlayer
$ cp sample.env .env
< edit .env with your own values >
$ sudo docker build . -t musicplayer
$ sudo docker run musicplayer

Configs

  • API_ID: Telegram app id.
  • API_HASH: Telegram app hash.
  • SESSION: Pyrogram string session. You can generate from here.
  • SUDOERS: ID of sudo users (separate multiple ids with space).
  • PREFIX: Commad prefixes (separate multiple prefix with space). Eg: ! /
  • LANGUAGE: An available bot language (can change it anytime). Default: en.

📄 Commands


    ping
Usage: Check if alive or not

• 
    
     start | 
     
      help
Usage: Show the help for commands

• 
      
       mode | 
       
        switch Usage: Switch the stream mode (audio/video) • 
        
         p | 
         
          play [song name | youtube link] Usage: Play a song in vc, if already playing add to queue • 
          
           radio | 
           
            stream [radio url | stream link] Usage: Play a live stream in vc, if already playing add to queue • 
            
             pl | 
             
              playlist [youtube playlist link] Usage: Play the whole youtube playlist at once • 
              
               skip | 
               
                next Usage: Skip to the next song • 
                
                 m | 
                 
                  mute Usage: Mute the current stream • 
                  
                   um | 
                   
                    unmute Usage: Unmute the muted stream • 
                    
                     ps | 
                     
                      pause Usage: Pause the current stream • 
                      
                       rs | 
                       
                        resume Usage: Resume the paused stream • 
                        
                         list | 
                         
                          queue Usage: Show the songs in the queue • 
                          
                           mix | 
                           
                            shuffle Usage: Shuflle the queued playlist • 
                            
                             loop | 
                             
                              repeat Usage: Enable or disable the loop mode • 
                              
                               lang | language [language code] Usage: Set the bot language in a group • 
                               
                                ip | 
                                
                                 import Usage: Import queue from exported file • 
                                 
                                  ep | 
                                  
                                   export Usage: Export the queue for import in future • 
                                   
                                    stop | 
                                    
                                     leave Usage: Leave from vc and clear the queue 
                                    
                                   
                                  
                                 
                                
                               
                              
                             
                            
                           
                          
                         
                        
                       
                      
                     
                    
                   
                  
                 
                
               
              
             
            
           
          
         
        
       
      
     
    
   

🗣 Languages

en    English

💜 Contribute

New languages, bug fixes and improvements following our contribution guidelines are warmly welcomed!

🛫 Supports

For any kind of help join our support group.

Credits

📃 License

Music Player is licenced under the GNU Affero General Public License v3.0. Read more here.

Comments
  • arm64 support

    arm64 support

    Will this project available for arm64? When installing on an ARM sbc it gives a warning.

    ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

    Thanks

    help wanted good first issue 
    opened by andreagdipaolo 6
  • Heroku Salesforce policy

    Heroku Salesforce policy

    I Used That website. But still Salesforce. Then a bot in support group told me to rename that forked repo.. so i did it then it shows ( MusicPlayer/main.py not found) as vars ..

    opened by alarskmoedig 3
  • struct.error: unpack requires a buffer of 267 bytes

    struct.error: unpack requires a buffer of 267 bytes

    I've gone through the legacy setup on 2 different machines, I get this same error. Anyone know what it means? The last machine has 24 GB of ram.

    ryan@cpw-eth380:~/MusicPlayer$ python3 main.py WARNING: SPOTIFY_CLIENT_ID or SPOTIFY_CLIENT_SECRET is not set.Bot will work fine but playing songs with spotify playlist won't work.Check your configs or .env file if you want to add them or ask @AsmSupport! Traceback (most recent call last): File "main.py", line 671, in <module> pytgcalls.run() File "/home/ryan/.local/lib/python3.8/site-packages/pytgcalls/sync.py", line 34, in async_to_sync_wrap return loop.run_until_complete(coroutine) File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/home/ryan/.local/lib/python3.8/site-packages/pytgcalls/methods/utilities/run.py", line 31, in run await self.start() File "/home/ryan/.local/lib/python3.8/site-packages/pytgcalls/methods/utilities/start.py", line 36, in start await self._init_mtproto() File "/home/ryan/.local/lib/python3.8/site-packages/pytgcalls/methods/utilities/mtproto_handler.py", line 12, in _init_mtproto await self._app.start() File "/home/ryan/.local/lib/python3.8/site-packages/pytgcalls/mtproto/mtproto_client.py", line 149, in start await self._bind_client.start() File "/home/ryan/.local/lib/python3.8/site-packages/pytgcalls/mtproto/pyrogram_client.py", line 406, in start await self._app.start() File "/home/ryan/.local/lib/python3.8/site-packages/pyrogram/methods/utilities/start.py", line 52, in start is_authorized = await self.connect() File "/home/ryan/.local/lib/python3.8/site-packages/pyrogram/methods/auth/connect.py", line 39, in connect await self.load_session() File "/home/ryan/.local/lib/python3.8/site-packages/pyrogram/client.py", line 674, in load_session await self.storage.open() File "/home/ryan/.local/lib/python3.8/site-packages/pyrogram/storage/memory_storage.py", line 38, in open dc_id, test_mode, auth_key, user_id, is_bot = struct.unpack( struct.error: unpack requires a buffer of 267 bytes ryan@cpw-eth380:~/MusicPlayer$

    opened by ryny24 1
  • Deploy Problem

    Deploy Problem

    Hi, I'm ziad and I have an issue for deploying the project to heroku image It cannot let me go to the deploy project (also my internet is cool it doesn't have any issue) Please rely quick and Thanks for reading this.

    opened by MarshmelloMusicerXD 1
  • [ERROR] unpack requires a buffer of 267 bytes

    [ERROR] unpack requires a buffer of 267 bytes

    File "/usr/local/lib/python3.9/site-packages/pyrogram/storage/memory_storage.py", line 38, in open
        dc_id, test_mode, auth_key, user_id, is_bot = struct.unpack(
    struct.error: unpack requires a buffer of 267 bytes
    

    NOTE: SPOTIFY_CLIENT_ID & SPOTIFY_CLIENT_SECRET was not defined by me.

    opened by noobyysauraj 1
  • Update main.py (Sourcery refactored)

    Update main.py (Sourcery refactored)

    Pull Request #20 refactored by Sourcery.

    Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.

    To incorporate these changes, you can either:

    1. Merge this Pull Request instead of the original, or

    2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

      Incorporate changes via command line
      git fetch https://github.com/AsmSafone/MusicPlayer pull/20/head
      git merge --ff-only FETCH_HEAD
      git push

    NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Help us improve this pull request!

    opened by sourcery-ai[bot] 1
  • Update song.py (Sourcery refactored)

    Update song.py (Sourcery refactored)

    Pull Request #17 refactored by Sourcery.

    Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.

    To incorporate these changes, you can either:

    1. Merge this Pull Request instead of the original, or

    2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

      Incorporate changes via command line
      git fetch https://github.com/AsmSafone/MusicPlayer pull/17/head
      git merge --ff-only FETCH_HEAD
      git push

    NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Help us improve this pull request!

    opened by sourcery-ai[bot] 1
  • Update startup.sh (Sourcery refactored)

    Update startup.sh (Sourcery refactored)

    Pull Request #15 refactored by Sourcery.

    Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.

    To incorporate these changes, you can either:

    1. Merge this Pull Request instead of the original, or

    2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

      Incorporate changes via command line
      git fetch https://github.com/AsmSafone/MusicPlayer pull/15/head
      git merge --ff-only FETCH_HEAD
      git push

    NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Help us improve this pull request!

    opened by sourcery-ai[bot] 1
  • Update main.py (Sourcery refactored)

    Update main.py (Sourcery refactored)

    Pull Request #9 refactored by Sourcery.

    Since the original Pull Request was opened as a fork in a contributor's repository, we are unable to create a Pull Request branching from it.

    To incorporate these changes, you can either:

    1. Merge this Pull Request instead of the original, or

    2. Ask your contributor to locally incorporate these commits and push them to the original Pull Request

      Incorporate changes via command line
      git fetch https://github.com/AsmSafone/MusicPlayer pull/9/head
      git merge --ff-only FETCH_HEAD
      git push

    NOTE: As code is pushed to the original Pull Request, Sourcery will re-run and update (force-push) this Pull Request with new refactorings as necessary. If Sourcery finds no refactorings at any point, this Pull Request will be closed automatically.

    See our documentation here.

    Run Sourcery locally

    Reduce the feedback loop during development by using the Sourcery editor plugin:

    Help us improve this pull request!

    opened by sourcery-ai[bot] 1
  • Update README.md

    Update README.md

    Added "sudo apt-get install npm -y" into the README.md file. The "sudo npm install pm2@latest -g" command requires npm to work, and this update installs/updates npm for the user making the whole installation process flawless.

    opened by AyushDhimann 0
Owner
SAF ONE
Still Learning ... !!
SAF ONE
ShadowMusic - A Telegram Music Bot with proper functions written in Python with Pyrogram and Py-Tgcalls.

⭐️ Shadow Music ⭐️ A Telegram Music Bot written in Python using Pyrogram and Py-Tgcalls Ready to use method A Support Group, Updates Channel and ready

TeamShadow 8 Aug 17, 2022
Telegram bot for stream music on telegram, powered by py-tgcalls and Pyrogram

Telegram Streamer Bot Telegram bot for stream music on telegram, powered by py-tgcalls and Pyrogram ✨ Features Coming soon, help me to improve it ?? C

Shohih Abdul 11 Oct 21, 2022
Telegram Voice Chat Music Player UserBot Written with Pyrogram Smart Plugin and tgcalls

Telegram Voice Chat UserBot A Telegram UserBot to Play Audio in Voice Chats. This is also the source code of the userbot which is being used for playi

Dash Eclipse 7 May 21, 2022
Telegram Group Calls Streaming bot with some useful features, written in Python with Pyrogram and Py-Tgcalls. Supporting platforms like Youtube, Spotify, Resso, AppleMusic, Soundcloud and M3u8 Links.

Yukki Music Bot Yukki Music Bot is a Powerful Telegram Music+Video Bot written in Python using Pyrogram and Py-Tgcalls by which you can stream songs,

Team Yukki 996 Dec 28, 2022
Telegram Voice Chat UserBot made with Pyrogram and MarshalX/tgcalls with playlist and Heroku support

Telegram Voice Chat UserBot A Telegram UserBot to Play Audio in Voice Chats. This is also the source code of the userbot which is being used for playi

Calls Music 164 Nov 12, 2022
veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.

?? Veez Music Bot Music bot for playing music on telegram voice chat group. Requirements ?? FFmpeg NodeJS nodesource.com Python 3.7+ PyTgCalls ?? Get

levina 143 Jun 19, 2022
veez music is a telegram music bot project, allow you to play music on voice chat group telegram.

?? VEEZ MUSIC BOT Veez Music is a telegram bot project that's allow you to play music on telegram voice chat group. Requirements ?? FFmpeg NodeJS node

levina 23 Aug 29, 2021
ELiza music is a telegram music bot project, allow you to play music on voice chat group telegram.

❤️ ?????????? ?????????? ❤️ Unmaintained. The new repo of @MrsElizaRobot is private. (It is no longer based on this source code. The completely rewrit

Team Eliza 2 Dec 8, 2022
Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API.

Tg_PHub_Bot Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API. OS Support All linu

TheProgrammerCat 13 Oct 21, 2022
this is an op music pyrogram music bot.

amanrajputpytgcallmusic this is an op music pyrogram music bot..... this bot user music bot can play music without being admin...... TG-MusicPlayer A

null 2 Dec 27, 2021
A telegram bot script for generating session string using pyrogram and telethon on Telegram bot

String-session-Bot Telegram Bot to generate Pyrogram and Telethon String Session. A star ⭐ from you means a lot to us! Usage Deploy to Heroku Tap on a

Wahyusaputra 8 Oct 28, 2022
Telegram Group Manager Bot + Userbot Written In Python Using Pyrogram.

Telegram Group Manager Bot + Userbot Written In Python Using PyrogramTelegram Group Manager Bot + Userbot Written In Python Using Pyrogram

null 1 Nov 11, 2021
A Simple Telegram Bot That Can Generate Strong Password With Many Features Written In Python Using Pyrogram

Password-Generator-Bot A Simple Telegram Bot That Can Generate Strong Password With Many Features Written In Python Using Pyrogram Features Random Pas

Muhammed Fazin 17 Dec 23, 2022
HinamiRobot - Telegram Group Manager Bot Written In Python Using Pyrogram

✨ HINAMI CHAN ✨ Telegram Group Manager Bot Written In Python Using Pyrogram. Rea

DARK LEGEND088 2 Jan 27, 2022
Telegram Group Manager Bot Written In Python Using Pyrogram.

──「?????????? ????????????????」── Telegram Group Manager Bot Written In Python Using Pyrogram. Deploy To Heroku NOTE: I'm making this note to whoever

Wahyusaputra 3 Feb 12, 2022
Minimal telegram voice chat music bot, in pyrogram.

VCBOT Fully working VC (user)Bot, based on py-tgcalls and py-tgcalls-wrapper with minimal features. Deploying To heroku: Local machine/VPS: git clone

Aditya 33 Nov 12, 2022
Ini adalah UserBot Telegram dengan banyak modul keren. Ditulis dengan Python dengan Telethon dan Py-Tgcalls.

Okaeri-Userbot Okaeri-Userbot = userbot telegram modular yang berjalan di python3 dengan database sqlalchemy. Disclaimer Saya tidak bertanggung jawab

Wahyu 1 Dec 15, 2021
A Video Streaming Telegram Bot written in Python with Pyrogram and PyTgcalls

Video Stream Bot A Video Streaming Telegram Bot written in Python using Pyrogram and PyTgcalls Requirements Python 3.9 Telegram API Telegram Bot Token

Aarav Arora 61 Dec 10, 2022
Anti Spam/NSFW Telegram Bot Written In Python With Pyrogram.

✨ SpamProtectionRobot ✨ Anti Spam/NSFW Telegram Bot Written In Python With Pyrogram. Requirements Python >= 3.7 Install Locally Or On A VPS $ git clon

Akshay Rajput 46 Dec 13, 2022