MusicBot
MusicBot copied to clipboard
[Suggest] !remove[n] and !play[n] and full logfile
So, we tested the bot a whole lot and we had some people that added inappropriate videos into the playlist. A command where you could remove the n-th song from the playlist would be cool.
We also saw the need to skip a lot songs and play one particular song, without removing the other ones permanently. So, to move one song to the top of the playlist.
Also, a full logfile would be cool. With everything that the bot does. When a song was added to a playlist, who was black- or whitelisted when and which song was played when. And of course all the errors that occur.
I could try to implement some of these functions, but it would take me some while to read into python again and to read into the whole file structure...
More commands are on my todo list, as well as a debug mode. I can add an output file option as well.
Okay, good to know. ^^
If i see it right, all new commands have to be added to the bot.py file, right?
I'm considering moving commands to their own file, but currently yes.
Yeah currently all commands are parsed from function names starting with handle_
defined in bot.py
.
!undo command
Add in to bot.py
async def cmd_undo(self, player, author):
player.playlist.remove_last()
return Response(':put_litter_in_its_place: last track removed', delete_after=10)
and to the playlist.py
def remove_last(self):
self.entries.pop()
#568 Allows for removing a specific song now, logging is also a thing (but is for debug use, not really this) now as well.