Tempo 1.2.0 Release
Release Message 1.2.1:
The inevitable bugfix release. Thankfully this cycle had much fewer bugs than I expected for such a major change. Playlists required a significant refactoring of multiple sections as well as a lot of new code, 766 lines to be exact. After a lot of use and testing I was only able to find one bug which mattered; Sometimes when playing a playlist librespot would fail to authenticate and the playlist would fail to play, and the bot would not leave meaning new songs could not be played without waiting or manually disconnecting it. This is now fixed. As always feel free to open a bug report if you find any more!
Release Message 1.2.0:
With this release I have full playlist support, as well as some bugfixes. you can now create, modify, and delete playlists, as well as import playlists from spotify. I have also fixed a bug surrounding queues length 25+. This will be the last release of the 1.x.x line (except perhaps a minor update for YT playlists or smth like that.) Expect a 2.0 release within the coming months including support for plugins for more backends than yt and spotify, a better UI, and some fun (completely local, and optional) AI voice controls.
Updating
Just drag and drop the new bot.py on top of the old one (replace it) then run $sync
in your server.
Instructions:
- Install the dependencies.
- If you are on windows or MacOS go Download Python. If you are on linux figure it out.
- In your terminal run
python3 -m ensurepip
to make sure pip is installed. - In your terminal run
pip install pynacl discord asyncio youtube_search yt-dlp python-dotenv git+https://github.com/kokarare1212/librespot-python spotipy aiohttp
- If you are on windows download sqlite3. MacOS has this preinstalled. Linux guys can figure this out too.
- If you are on windows or MacOS download ffmpeg. Once again if you use linux: figure it out.
- Download the attached source code .zip file and unzip wherever you would like.
- Get your bot key ready. If you dont know how:
- Go to the Discord developer portal in your web browser.
- Sign in, then select New Application
- Create the Application (give it a name etc)
- Enable Message Content Intent as well as Server Members Intent in the Privileged Gateway Intents category in the Bot section
- Click on Reset Token in the Bot section and copy it
- In your terminal under the directory of the unzipped code folder run
python3 bot.py
. - It will tell you if there is an update available. If there is, update it
- It will ask for your token, give it your token
- It will run and tell you when it is online.
- Invite it to a server. If you dont know how:
- Go back to your bot on the Discord developer portal
- In General Information copy the Application ID.
- Go to the discord bot invite link generator
- Paste your Application ID into the Client ID field
- Enable the View Channels, Send Messages, Use Application Commands, Connect, and Speak permissions
- Click the link at the bottom and add it to a server
- In one server it is in put
$sync
in chat. The bot will sync its slash commands with discord, and will eventually be visible (this is usually fast but can take some time. To do it immediately for one server run$sync ~
. This can result in duplicate commands in that server.)
What is in the bot:
- Basic stop and skip commands
- Audio streaming from:
- Youtube (default)
- Spotify (can be enabled. requires a premium account, so users must provide their username/password)
- Song search from your audio provider
- Scaleable storage (sqlite3)
- Fully featured queue system with the following:
- Song rearrangment
- Song removal
- Shuffle
- Song addition
- Intuitive UI utilizing Discord-bot specific UI features
- Update notifications on launch
- Global Spotify key support (disabled by default)
- Update DMs
- User spotify account trusting (add friends to your account)
- loop support
- playlists
- Import playlists from a linked spotify account
Future To-Do list:
- Import playlists from youtube
- Make UI even better!
- Publicly host the bot myself
- Include systemd service for autostart under linux (just need to pretty it up)
- Remove need for message content intent
Full Changelog: 1.1.4...1.2.0