Skip to content

Instantly share code, notes, and snippets.

@imayhaveborkedit
Last active June 10, 2019 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imayhaveborkedit/bcfd424bb22471da5556 to your computer and use it in GitHub Desktop.
Save imayhaveborkedit/bcfd424bb22471da5556 to your computer and use it in GitHub Desktop.
Current musicbot todo list
+ + + + + + + + + + + + + + + + + + +
+
+ [ ] Todo
+ [.] Started
+ [:] Partially done
+ [X] Completed
+ [?] Testing required
+ [#] Scrapped (for now at least)
+ [!] Important
+
+ + + + + + + + + + + + + + + + + + +
[ ] Reorgainze this list into categories
[ ] Consolidate with the list on github
========================================================================
[:] DEBUG MODE
???:
[ ] Play with Graylog (or at least the idea of it)
1.9.7:
[ ] Local playlists. Folders that have files or a [playlist.txt] file with links
[ ] Fix that guy's queue repeat code and add it (playlist stuff, continous queue, shuffle mode, etc)
[ ] autoplaylist: `add` for np -> into list, msg if already in, `drop` for removing an autoplaylist song
[ ] Experiment with responses file for user defined responses/disabling them/setting delete timeouts
[ ] Experiment with ytdl options (like caching, progress hooks) https://github.com/rg3/youtube-dl/blob/master/youtube_dl/YoutubeDL.py#L121-L269
[ ] Experiment with reencoding videos with ffmpeg. wav's are fuckin big
[ ] State information command, lists various states for various things, playing, downloading, etc, if its doing something, list it
[ ] Change some permissions stuff into a decorator that stackfishes the message object and calculates permissions
[ ] Add commands to manage config options
[ ] Add more info to the search page output (length, other stats)
[ ] consider making an event emitter when a song reaches a certain point, either duration or percent completion
[ ] permissions checking for horizontal permissions (blacklisting members of the same group, etc)
[ ] fix durations on entries being none sometimes? (ffprobe checking?)
[ ] something with uploading music files
[ ] song specific volume, only applies to the current song
[ ] Bot management interface (in dms?) for owner (servers, etc)
[ ] Option to watch the stream data from another stream to update now playing etc (requires 2 streams)
[ ] input white/blacklist
[ ] Fix configparser stripping whitespaces (override and add an option for no_strip_whitespace) (or just require quotes)
[ ] Experiment with interactive setup
[ ] Multiline configging in commands in a codeblock (this is for the config changing command, will work out at the time)
[ ] Server specific audio cache?
[ ] Allow search to queue but continue (Would you like to search for another song?)
[ ] Queue multiple songs in a codeblock
[ ] Savevideos for autoplaylist only
[ ] Create player "state locks" (for just pausing right now). This means have different levels of locking based on different conditions
For example, autopausing is one level of lock. If I wanted to add another level, I just add a new lock. When autopausing is removed,
its still paused until the remaining locks are released.
[ ] Async playlist queueing shuffling: just shuffle the entries before they're resolved
[ ] animation type response, like shuffle
[ ] fix shuffle animation (edit into okhand and return empty response)
[ ] Add some sort of "verify players" function to check if there are any playing while disconnected (abstract into some sort of checks/monitor interface with a threadpool)
1.9.6:
[X] Change volume code to use https://docs.python.org/3.5/library/audioop.html
[X] Make a restart exception and catch that exception in run.py to restart the bot
[X] print version of bot on startup
[X] fix clean counting
[X] add instaskip permission
[X] catch errors on move_member in summon
[X] Enable and catch ytdl errors for better error messages
[X] textwrap magic with the helpful error message
[X] Fix voiceclient channel when bot is moved
[X] Streaming media. Perhaps create a special player for it and skip the download stuff
[X] Add stream player object alternative to the normal player
[X] Async-ify soundcloud sets (basically the same way)
[X] Implement .once into EventEmitter (thanks jake)
[X] Fix overagressive autoplaylist deleting (check for if an exception is a ytdl exception, etc)
[X] something about setting avatar and name
[X] Add hard restart (os.excleya dskkfasjdfkasjd whatever)
[X] see about adding *args support to command handlers again
[:] Idiotproof error messages (issue/solution, formatted nicely)
[:] Check config for errors on load (even though it sorta does this, I guess check for sane values)
[.] Format help messages for the help command rework ("Usage:", indented usage formats, newline, 1 line short desc, long desc)
[.] Add helpfulerrors to config instead of os._exit
[.] Queue serialization
[.] add checks for mangled configs
[?] bug: fix autopause/skip/status setting weirdness
[?] Experiment with daemon player threads
[#] rename clean to cleanup
[#] "owner status" permission option, or just multiple owners?
[#] Add logger setup to a function that gets called if debug mode is on (debug_setup or whatever)
[ ] Some sort of update/version check/something feature
[ ] Add song truncation permissions toggle
[ ] Max volume/volume range permissions options?
[ ] Something about disabling link embeds, warning or option or whatever (for what links again?)
[ ] Add dump permissions info command
[ ] Add new bitrate/bandwidth stuff commands (bitrate maybe, bandwidth stuff probably not)
[ ] Fix skip logic with user numbers (leaving, recalc, etc) (If someone voteskips and leaves but hasnt hit the threshold, discard their vote (after x seconds?))
ALSO MAKE SURE YOU TAKE CARE OF COUNTING SKIPS FROM DEFANED USERS WHO SHOULDN'T BE COUNTED.
[ ] Fix autoplaylist stuff:
Not queuing another song means the next song downloads when the previous one ends,
need to create some sort of "ghost" entry that gets overritten when another is added, or download close to the end
[ ] change autopause to look for undeafened channel members?
[ ] Add arguments to prevent changing of status for autopause (ratelimits)
[ ] add config duplicateoptionerror catching code
[ ] unmute "mic" when a song starts
[ ] Fix redirect issues (that one bandcamp issue)
[ ] Fix users adding too many songs because processing songs aren't counted in the queue
[ ] fix fixed disconnect code still doing one more song if its still queuing stuff (wtf was this all about?)
[ ] Make brief command messages actually brief
[ ] Change logger to rotating log or something?
[ ] Add autoplaylist announce option (only if there's a bound channel set, not sure about multiple)
[ ] server specific channel binding
[ ] anti-afk mechanism (send empty voice data every timeout interval - x)
[ ] Playlist operation states (default (queue?), repeat, shuffle, unique shuffle (with param?), etc)
[ ] own song skip permission item
[ ] Autoplaylist alternative: "background" stream that plays when nothing is queued. stopped when something is queued and resumes when the queue empties (after x timeout?)
[X] Print invite url or something when the bot starts and isn't in any servers
[X] suppress resource warning somehow
[X] Add new bins folder to path
[X] For the nazi autoplaylist removal, still remove them from the list, but append them to a removed file with the link and exception text
[X] name player objects (thread names, set .name)
[X] optional ownerid stuff with app info data
[X] autojoin function consolidation
[X] Notifications for when the bot joins a server or when kicked/banned/leaves etc from one
[X] convert all Signal to Signal()
[X] convert :shit: emoji to \N{X} format
[X] Add vc join/leave messages to console
[X] add more timing data to the join voice channel debugging output (might want a section just for this stuff)
[X] Ignore empty voice_state_updates (session id changes)
[X] Figure out why autopausing sometimes doesn't work (random unpausing?)
[X] Make sure new voice state code works and fix pausing bug
[X] Fix logger output encoding thing
[X] deal with errors in setname, etc api calling commands (HTTPException)
[X] Add current entry to serialized data
[X] FIX THE SERIALIZATION
[X] Fix stream entries not playing properly when loaded as current_entry
[X] Write PersistentQueue comment
[X] Add PersistentQueue related config code checks to relevent vc joining code
[X] handle discord.HTTPException in safe_* funcs
[X] fix timedelta garbage
[X] Fix logger handler duplication on restart
[X] Add proper connected message instead of relying on the voice_state_update message
[?] investigate duplicate message deletion attempts
[?] Figure out whats happening with bad data passed to ffmpeg/catch ffmpeg errors (return code?)
[?] abspath entry serialized paths (unused)
[?] limit reconnect attempts? (where?)
[?] update_np_message(server, msg) function
[#] assert entry type is correct in entry deserialization
[#] on-finish empty check
[.] on-play empty check
[.] check autopause conditions after every song
[ ] http://pastebin.com/Z3HimYnx
[ ] Parse permissions file like config (strip commas and stuff)
[ ] custom info level timestamp
[ ] copy configs/etc for backups (may defer to server config rework)
[ ] audio_cache size limiter (delete oldest/limit to x days old, max size, whatever)
[ ] Make sure the autodelete song stuff respects entries in other playlists
[ ] config option for console colors
[ ] add song link in ~queue text (like np) and the auto np message
[ ] make some sort of util function for channel member mute/deaf/whatever checking so I can stop putting check functions everywhere
[ ] move the last check in on_voice_state_update to VoiceStateUpdate with server.voice_client
[!] handle failed resume ready re-setup
----------------------------------------------------------------
Command improvements:
[ ] New commands (names pending):
[ ] leaveserver
[ ] reloadconfig (and reloadperms?)
[ ] remove (song from queue)
[ ] skip:
[ ] When updating skip counts when someone leaves and it hits the threshold, ask for a confirmation vote (any skip vote)
[ ] Enhance skip state: skips by people who have left the channel should be ignored, but not deleted,
skips should only be calculated when people use the command (aka not on join/leave channel)
[ ] play
[ ] playnow (suspend or skip current song)
[ ] playnext (add to the top of the queue)
[ ] search
[ ] make search command less jumpy (message editing)
[ ] pldump
[ ] pldump update <link>
----------------------------------------------------------------
Sanity Checks:
[X] Python 3.5
[X] UTF8
[:] Filesystem env
[X] Create folders as needed
[X] Check if bot is in bad file permissions area and "do something about it"
[:] Detect if writing files is possible and use memory buffers instead, RAM permitting (stream only mode?)
[X] actual musicbot folder
[ ] Add arg parsing to skip checks (internal restart)
[ ] pip via ensurepip
[ ] required python packages (discord.py, etc)
[ ] Make sure pynacl works (from nacl import secret or whatever, might need libsodium)
[ ] ffmpeg (and maybe ffprobe)
[ ] Initalize ffmpeg so we don't get IO lag when we use it (this probably can happen during the eventual sanity check)
[ ] opus?
[ ] cffi
linux subprocess.check_output("find /usr[/local]/include -iname 'ffi.h'", shell=True) (find /usr/include /usr/local/include ...?)
gcc -lffi (cannot find -lffi) vs (... undefined reference to `main')
"echo | gcc -xc++ -E -v -" and parse
[.] Server permission env
[ ] Check permissions in servers on startup
[.] Playlists in autoplaylist
[ ] For autoplaylist playlist stuff, do a non-processing playlist sweep, remove any found and task the expansion
Otherwise, when it runs into one, remove/skip it and do the same. If that was the last one, stall for time
Extras:
[X] Disk space warning (200MB)
----------------------------------------------------------------
Logging:
[X] Convert the rest of the code
[X] Extra logging levels http://stackoverflow.com/questions/2183233/how-to-add-a-custom-loglevel-to-pythons-logging-facility
[X] NOISY: spammy logging lower than DEBUG
[X] VOICEDEBUG: Voice related debug messages (ffmpeg, voice connection, etc)
[X] EVERYTHING: well, everything.
[X] ffmpeg output logger with input args
[X] Pre-bot setup/checks logger
----------------------------------------------------------------
Experimental features:
[ ] Normalization between songs
Will need to process the current song and the next song to find a sort of normalization level
The next song can be processed while the current one is playing and compared when the current song finishes.
Otherwise I hope processing doesn't take very long.
Obviously disabled for stream types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment