This application allows you to control a playlist of songs on YouTube Music using Puppeteer and a Telegram bot. With this setup, you can easily manage and enjoy your favorite music without having to manually interact with YouTube Music.
Feature | Description |
---|---|
Search Music | Search for a specific song to add to the playlist. |
Add to Queue | Add a song to the end of the playlist. |
Add to Play Next | Add a song to play next in the playlist. |
Play | Start playing the playlist. |
Pause | Pause the currently playing song. |
Info Current Playing | Get information about the currently playing song. |
Next | Skip to the next song in the playlist. |
Get Lyrics | Retrieve the lyrics of the currently playing song. |
Vote for Next | Allow users to vote for the next song in the playlist. |
Subscribe & Unsubscribe | Allow users to subscribe and unsubscribe from notifications. |
Feature | Description |
---|---|
Setting Volume | Adjust the volume of the music playback. |
Shuffle | Shuffle the order of songs in the playlist. |
Before running the application, ensure you have the following:
- Node.js installed on your machine
- Telegram bot token (create a bot on Telegram and obtain the token)
- Important: Make sure your Telegram bot has the following settings enabled:
- Inline Mode: Enable inline mode for the bot to process inline queries.
- Inline Feedback: Allow users to provide feedback directly from inline results.
- Important: Make sure your Telegram bot has the following settings enabled:
- Google Chrome or Chromium browser installed (for Puppeteer)
- Database: Currently configured with SQLite. You can change the database configuration in the
prisma/schema.prisma
and.env
file.
Clone the repository:
git clone https://github.com/faytranevozter/playlist-bot.git
Install dependencies:
cd your-repository
pnpm install # or npm install
Create a .env file in the project root and add the following:
DATABASE_URL=your_database_url
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
Run database migration:
pnpm migrate # or npm run migrate
Build the application:
pnpm build # or npm run build
Run the application:
pnpm start # or npm start
- Start a chat with your Telegram bot.
- Use the provided commands to control the playlist as described in the features section.
- To search music just mention the bot and keyword
@playlistbot justin beiber
- Sit back, relax, and enjoy the music!
Feel free to contribute to the project by opening issues or submitting pull requests. Any improvements or bug fixes are highly appreciated.
This project is licensed under the MIT License - see the LICENSE file for details.
Thanks to the creators of Puppeteer, Telegraf, and Prisma for their amazing tools.
For any questions or support, you can reach out to [mfahrurrifai@gmail.com].