Commit 2ec9b5d
Fixed some bugs and made some enhancements in the MusicCog (#67)
* Added music_channels as a new table to be part of schema
* Added MusicCog
- MusicCog has set channel and get channel
* getmusicchannel now mentions the channel instead of listing the id
* Added on_message event to capture messages
* Added youtube searcher
* Changed youtube search to use youtube-search-python pip module
* ID validation now raises MissingRequirementArgument when the id is not valid
* Added video to mp3 downloading
* Changed invalid ids to use UserInputError instead of MissingRequiredArgument
* Implemented basic queue and song playing
* Music controls now check if user is in same channel as bot
* on_message checks if there is an entry in the db first
* Bot can now play songs in a queue
* Added song skip
* Added some comments
* Added stub to create message of the current queue
* Added check if no 'lyric' or 'audio' videos available to use basic search
* Added queue string formatting
- Fixed a bug that caused some song files to not be saved correctly
- Fixed a bug that caused the bot to skip the song if paused
* Added more fields to music_channels table
* Now has a currently playing and queue in specified channel.
- Also made some more methods async
* Added interaction feedback messages for commands
* Added channel reset command
* Changed filepaths to use os.pathsep
* Added queue clear
- Title of songs in queue now use top hit title instead of the video title
* Music is now streamed from youtube instead of downloading a file
* Uses UoY Esports logo as idle image
* Fixed a bug that caused links to not show a preview image
* Player now gets the audio stream at play time instead of search time
- This change means playlists load faster and that it now supports long playlists
- Also added shufflequeue command
* Added pip requirements to requirements.txt
* Looped tasks now stop when the lists are empty and get restarted on song request
* Added daily limiter
* Updated README to include MusicCog commands
* Added time allowance reset on 24hr task.loop
* Now supports multiple requests per message when split by newline
- Fixed a bug that caused links and playlists to be interpreted incorrectly
* Added docstrings and some code cleanup
* Removed grequests requirement
* Removed BeautifulSoup4 requirement
* - Added ENV VAR to enable/disable music cog.
- Changed ENV VAR from GOOGLE_API_PERSONAL to GOOGLE_API.
- Allowed setmusicchannel to take a mentioned channel.
* Included necessary requirements to function within Docker
* Added random header to youtube request to decrease chance of being blocked
* Made suggested changes
* Change channel purge from using math.inf to sys.maxsize
* Fixed an issue where a non-async call was awaited
* Fixed a bug that caused playlists to fail
* Now uses YouTube API to get titles and thumbnails.
* Updated docstrings and added Type hinting
* Added more user feedback for commands
* Fixed a bug that caused messages to not be deleted when the user was not in a valid voice channel
* Removed some unnecessary type hinting for functions with no return
* Fixed a bug that caused the bot to not leave when the channel was empty.
* Updated README to include pausesong
* Fixed an issued caused by not all videos having a "maxres" thumbnail.
* Update src/esportsbot/cogs/MusicCog.py
Co-authored-by: Jasper Law <1jasperlaw@gmail.com>
* Update src/esportsbot/cogs/MusicCog.py
Co-authored-by: Jasper Law <1jasperlaw@gmail.com>
* Fixed an issue that caused the id of a video to not be obtained.
* Updated README
* Fixed a bug where playlists would not play
* Changed how determining if a link is a playlist or a video.
* Changed how determining if a link is a playlist or a video.
* Fixed a bug when removing the current song from the queue will skip the next song too.
* Fixed a bug where time allocated would be used when the video is too long to play
* Fixed an issue where the time allowed would not visually reset, even when the value is actually reset.
* Added command for administrators to reset the music allowance of a server.
* Refactored message deleting in the music channel to be in on_message
* Added setvolume command
* Updated footer of preview message
* Fixed a bug that caused the bot to not leave as the check_marked_channels task was not running
* Added aliases to user-facing commands.
* Minor code cleanup and a few doc strings added.
* Removed time allowance restriction
* No longer polls db each message to check if in music channel
* Combined reaction menu and music bot on_message methods
* Stopped non-youtube URLs being queried
* Updated reST DocStrings to include param and return types
* Base strings added for MusicCog
* Added strings for commands
* Added queue valid options string
* Implemented user facing strings from TOML file
* Removed strict typing for command args that are meant to be integers
* Fixed a bug that caused a crash when a video had None as its view count
* Fixed a bug that caused commands not be processed
* Strict-Typed user_strings attribute to dict
* Fixed on_message handle to prevent role pings
Co-authored-by: Ryth-cs <rts512@york.ac.uk>
Co-authored-by: Jasper Law <1jasperlaw@gmail.com>
Co-authored-by: Ryth-cs <49680490+Ryth-cs@users.noreply.github.com>1 parent a321742 commit 2ec9b5d
File tree
4 files changed
+467
-270
lines changed- src/esportsbot
- cogs
- lib
4 files changed
+467
-270
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
239 | 255 | | |
240 | 256 | | |
241 | 257 | | |
| |||
250 | 266 | | |
251 | 267 | | |
252 | 268 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | 269 | | |
268 | 270 | | |
269 | 271 | | |
| |||
288 | 290 | | |
289 | 291 | | |
290 | 292 | | |
| 293 | + | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
| |||
0 commit comments