Hi there, I am Daan.
A full-stack webdeveloper currently studying (web)design. I'm always open for a challenge, new project or a hackathon, so expect to see me during events like Hacktoberfest or GameJam.
Bring back the music to Discord
License: GNU General Public License v3.0
The bot should be supplied with multiple playlists with songs of different genres so that the end user doesn't need to source their songs themselves.
The music has to be copyright free because broadcasting copyrighted music is against the laws and can cause problems especially when done in bigger servers.
The songs should be copyright free without the need to mention the artist, track name or label it is released under.
Each genre should have at least 10 track and I would recommend some of the following genres to be sourced:
Keep in mind that the genres mentioned above should be used as guidelines, feel free to add more genres or add more tracks.
Add a /nowplaying
command that shows the song that is currently playing, this could be pulled from the status of the bot which is already displaying the song it is playing at that moment.
A command like this can be useful when the bot is not displayed high up in the member list and thus making it more difficult to see the status of the bot.
The bot only uses fs.existsSync
as a check before accessing folders:
Discord-Radio/src/commands/music/stations.ts
Lines 16 to 18 in 2ac4495
This is incorrect, because fs.existsSync
only checks if the path exists, but not if the path refers to a folder. No checks are done when accessing the contents of the music
folder:
Discord-Radio/src/commands/music/play.ts
Lines 103 to 106 in 2ac4495
This issue results in three bugs:
ENOTDIR
error if the music
"folder" is actually a fileENOTDIR
error (without crashing) without a proper error-message when trying to play a station that exists, but isn't a foldermusic
folder when executing /stations
The bot should (in the order of the bugs listed above):
music
folder is missing.music
folder as stationsBug 1 can be reproduced by:
music
folder with a file named music
/stations
commandBugs 2 and 3 can be reproduced by:
test
to the music folder/stations
/play station:test
When the person pressing the switch station button is not in a voice channel it crashes the bot.
The bot should notify the user that you have to be in a voice channel when running the command.
Run the play command to switch radio station to get the prompt with the button, leave the channel and press the button.
Note: This issue also hooks into #28 since it also regards the usage of buttons in this case by people who did not run the command.
As discussed in the comments of PR #17, station names that are too long can cause compatibility issues with the Discord API.
While most operating systems limit the name of a folder to 255 characters, Discord usually imposes stricter limits on the length of fields. By browsing the Discord API it appears that 100 characters is a common limit. To ensure compatibility (now and in the future) we should limit the length a station name is allowed to be (preferably with some buffer so we can add additional data into the field).
I imagine that most users would use short names for their playlists, so a limit like 50 characters shouldn't interfere with the user-experience.
After running the stop command the bot still displays the name of the track it was playing as its status.
The status gets cleared, optionally there could be a default status that can be specified in the configuration file.
You can reproduce this bug by starting it using the /start
command and stopping it again after using the /stop
command.
At the moment songs just get played, Discord has a built in option to change the volume when playing the next song, this should be used to play all songs at the same volume to avoid fluctuations and preventing users from needing to manually adjust the volume each time.
A non-required boolean command option loop
in /play
for looping music in the station should enhance the user experience. Currently, all the music in a station only plays once
After stopping the music, and then running the /nowplaying
command, it shows the last played (and now stopped) track as the one being currently playing
The bot should reply to the /nowplaying
command saying there is no song currently being played
Run the following commands in order:
/play {station}
/stop
/nowplaying
Currently there is no text tutorial on how to host the bot, a file should be added that explains all the steps needed to host the bot yourself, it should also mention the need of external programs like Node.js.
This file should be located in the root directory and be pointed to in the README.md.
Adding a how-to-host.md will make it easier for other people to host the bot without much knowledge about Discord bots or development in Node.js.
Right now when the bot is playing music in the channel you are in and you want to change the radio station by running /play [radio-station]
you get a message saying I am already playing music in your channel.
, while this does work as intended I would like that message to be extended with a button asking if you would like to switch to the specified radio station instead.
This would make using the bot easier because you no longer need to stop the bot first to play a different radio station.
*Note: this feature should use the new button feature added to Discord, not a emoji reaction.
Currently only music in the music folder gets played, this should be changed so that you can create sub folders in that folder that will act as playlists.
When no radio station gets selected it should ask which one you want to play from and preferably show a list of all the available radio stations.
When having a station name with a upper case in the name like Test
for example, it will not be recognized when running the /play
command on Ubuntu, on Windows (10) however it does work.
It should still recognize the folder and start playing the song.
Run the bot on Ubuntu desktop (tested on version: 18.04.6 LTS) and create a radio station with a uppercase in the folder name.
Once the bot is online try to run /play [name of that station with a uppercase]
and get a response that it can not find the radio station.
Add a /stations
command that displays all radio stations that are available, this should be automatically generated by checking for sub folders in the music folder.
This is useful for when not all radio stations are known allowing the user to get a list of all of them.
When using the play command to switch stations someone else who has not ran the command can press the button.
The person that did not use the command should either not be able to press the button or see the message that has the button attached to it.
Run the play command to switch the station and use a different Discord account to press the button.
When there are too many stations and the list of all stations exceeds 4096 the bot crashes with a invalid form body error for the embed.
It should not be able to crash, instead it could warn on startup or don't show all stations to stay under the character limit.
Other solutions are more than welcome to be discussed in the comments.
Create a lot of stations in the music folder with long names so that the combined characters in the names of the stations exceed 4096 and run the /stations
command.
This issue also partially hooks into #20 since it also regards the character limit of stations and could add to preventing to exceed the character limit.
When switching radio stations using the play command the status can get changed to no music!
.
It should display the song that is currently being played.
When using the play command multiple times in a row there is a chance that instead of the current song playing it displays no music!
as the status. The problem is most likely caused by firing the change status function twice and relying on one being executed later than the other.
Right now when using the play command when the bot is already playing music it asks you if you would like to switch stations, when using the button the button stays and can still be used, this should not be possible.
When the button is pressed the button should be removed and the radio station that has been switched to should be displayed.
Right now there is no logo provided for people who want to host this bot their selves, this means that they either have to create a logo by them selves or have to stick to the default Discord profile picture.
The logo should be simple yet clearly indicate that the bot is a music Discord bot, how this is implemented in the logo is up to the person creating it.
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.