Enormous and huge credits to my boy @itayki from Israel for being with me while waiting for Mr. @TwitFace, AKA Andrew Lungers to release pytgcalls to write this bot.
From Mr. @TwitFace, AKA Andrew Lungers.
So xquiz me for being messy.
- A computer running a Linux distribution with a desktop environment,
- the latest version of Telegram desktop,
pulseaudio
(installation on Ubuntu:apt install pulseaudio
),mplayer
(installation on Ubuntu:apt install mplayer
),python3
(installation on Ubuntu:apt install python3
) andpython3-pip
(installation on Ubuntu:apt install python3-pip
) installed on it.
- Clone the repository and change the dir:
git clone https://github.com/rojserbest/music && cd music
-
Modify
sample_config.py
to use your credenitals and then rename/copy it toconfig.py
:API_ID
: your api id from my.telegram.orgAPI_HASH
: your api hash from my.telegram.orgTOKEN
: your bot token from @BotFatherSUDO_USERS
: a list of user ids which can pause, skip and change volumeLOG_GROUP
: (optional) a group chat id to send "now playing" messages to in a non-spammy way -
Install the required Python packages:
pip(3) install -U -r requirements.txt
- Make sure pulseaudio is running and load a null sink named
MySink
by running:
bash pa.sh
- Run the bot:
python(3) bot.py
- Open Telegram desktop, join a voice chat and set
MySink
as your microphone. - Once you've done the steps above, you can start using and sending YouTube video links to your bot and play them in the voice chat you are currently in with Telegram desktop!
Let's speak in @su_Chats.