blitzoffline / alphamusic Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
If there's a single track playing and no tracks left in the queue and also the radio mode is enabled, trying to skip the currently playing fails. The radio generates 25 new tracks like it should but the current track continues playing.
Steps to reproduce:
After some investigation it seems like the problem is actually with the radio generator. YouTube seems to now include the currently playing track in the generated list. So a possible fix would be to double skip.
After more investigation, turns out the conclusion of my previous investigation was completely wrong. While youtube does add the currently playing track in the queue, it is being removed before it even gets to the queue. This means that the actual currently playing track continues playing.
Options such as "radio", "volume" and other should probably be stored in a remote database to be saved after restarts. A local database could also be used but would prefer remote in case hosts ever change.
Add a startup parameter that would enable debug mode by default when the app started: -d, --debug
.
Threat a deafen almost like a leave. When all members deafen, add a leave task and clear it when either a member joins or a member undeafens.
Since error messages are only going to be helpful to the sender for the most part, they should only be visible for that user. The upside of making those messages ephemeral is less spam for everyone else. This should extend to Requirement error messages as well.
ATTENTION! Not all messages are supposed to be ephemeral. Messages such as "Cleared the queue" which are confirmation messages should remain public. This is to maintain a public history on all the changes that were made.
Sometimes when everyone leaves VC the bot stays there indefinitely. The leave task doesn't seem to be called at all. I couldn't reproduce it so far but it happened 2 or 3 times since the full release. My first assumption was maybe when there's 2 members in VC with the bot and they both leave at the same time but couldn't reproduce it yet.
Currently the radio mode takes the last song in the playlist and builds a YouTube link like so:
https://www.youtube.com/watch?v=$<song.identifier>&list=RD<song.identifier>
I was thinking that there's a chance the genre changes every time the queue empties and maybe instead keep track of the song that first generated the radio and then use that as the seed (first part where the identifier is used) and keep using the same song as the last song (after RD) instead. This might help keep the radio play similar songs and maybe less repeats(even tho from what I've noticed those are pretty rare anyways).
To debug and find out why!
If a member uses "/play " and the bot is not currently in a voice channel but the member is, the bot tries to find a song and joins the member's voice channel. The problem is that it joins even if it doesn't find a song. It should maybe only join when it finds one so it doesn't create confusion.
Bot muting and suppressing is not properly tracked.
If a bot is both muted and suppressed, the audio broadcast is paused and leave task is properly started but the audio broadcast is resumed and the leave task is cancelled if the bot is unsuppressed or unmuted. This should only happen if the both is both unmuted and unsuppressed.
For some reason the leave task does not make the bot leave anymore.
The current messages are fine for the most part but there are a few such as: "Skipped currently playing song!" which could be improved depending on the context. This message is sent twice, when the user has admin permissions and bypasses all checks and when a vote count reaches the required amount.
The voting system is quite well implemented in my opinion but it could be improved just a bit more. Some things that could be added are expiring votes. Currently the votes persist until either the user that voted or the bot leave the voice channel. It would be nice if they expired after a set time like 5 minutes instead.
Also some commands like "/pause" just don't have a voting system implemented.
Currently the /remove-dupes command can only be used by admins. I need to either remove the voting system since its not used or make use of it and remove the admin only check for the command. I am not really sure what the best approach for this is yet.
Currently the /remove command is admin only but it should be accessible to others as well. I am not really sure how it should work tho.
I have a few ideas tho:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.