* [Filter] Performance increases.
The filter was already using re to split words, this just does the entire search in re instead.
A further improvement to this would cache patterns used and update them if the wordlist changes.
* Add a pattern cache
* exit on no-words
* formatting pass
* keep the return type consistent, even though this doesnt break core since this is available to cogs
* ...
* Quit being an idiot
* Slight further improvements, a fix, and restructure
Moved actual set creation out of the inner portion.
Reduced config lookups in case of no filter.
Fixed channel wordlist fetching.
* I really should go back to using a pre-commit hook for the style stuff
This change adds the help text of "If calling from a command or method of your cog, this should be self." from `bundled_data_path` to `cog_data_path`. This bit of text can help people who are unsure of what a "cog instance" is to understand how to use `cog_data_path`.
* [V3 Mod] Use a composite class for mod
This turns mod.py into acomposite class
I've split things in this up based on purpose, including `movetocore`
`movetocore` is a set of things which likely belong in the core bot and
not relying on mod being loaded.
This is part of #2500
Per discussion in discord, this should be the first thing in #2500
merged
* Move this back,
mod was importable,
and this was intended as non-breaking
* Prevent fix from being lost if merged before this.
see Cog-Creators/Red-DiscordBot#2510
* Move case creation to before sending
see #2515
* fix failed merge done in web
* [V3 Audio] Add Spotify support
* [V3 Audio] Update LICENSE
* Appeasing the style gods
* Extra word removal on LICENSE
* Update for #2389
Thanks to TrustyJAID for the help.
* Playlist command support for Spotify URLs or codes
* Add exception for dc while loading Spotify tracks
* Allow Spotify urls by default in audioset restrict
Matches the behavior of Spotify codes already being allowed by default.
* Update audio.py
* .format() moving
* Added a character to try to make Travis behave
- Seek can now seek to a specific position, formatted like 00:00:00 or 00:00. Using negative or positive ints still functions the same as previously and will seek ahead or behind by that value instead.
- This PR requires the `_time_convert` func added in #2465 and should be merged after that one.
Revert player.is_playing check added to the playing players list for audioset status in #2473. This addition would cause no status to be shown when a local track was played and skip was used.
Searching for a song and pressing the reaction to queue a song would not add the song to the queue if `[p]audioset maxlength` was off. This was an omission from #2465.
This addition adds a toggle for having the bot instantly disconnect when the queue ends. It takes precedence over the `[p]audioset emptydisconnect` setting as it disconnects immediately when the queue or single song is finished.
* Fix translations of multiline strings
Resolves#2408.
Also did a few little optimisations here and there, we're no longer just using copied code from another project.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Reformat
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
Also included a Makefile recipe which makes use of the Crowdin CLI's `crowdin download` command. This requires whoever is using it to provide the project's API key in an environment variable, but we may automate this at some point.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
Bot owners can use `[p]playlist download playlistname` to download a playlist file that is compatible with the playlist upload command. Songs can also be exported for v2 use by using `[p]playlist download playlistname True`, which strips out tracks besides YouTube or Soundcloud URLs.
SHARED_LIBRARY Installable types did not have the requirements as
defined in info.json automatically installed. This change updates the
installation of libraries to also install their requirements.
Resolves#2381
* Added `[p]audioset maxlength`, which takes seconds or 00:00-style of formatted input for restricting the player to songs that have a length under that threshold.
- Refactored disconnect_timer, the function behind audioset emptydisconnect, to be more appropriately responsive (thanks to TrustyJAID)
- Refactored status clearing/status changing when emptydisconnect or other Lavalink player statuses would have a TRACK_END event but no QUEUE_END event. This should clear or modify the bot's status event appropriately when [p]audioset status is on and the bot disconnects due to emptydisconnect and ideally play a little nicer with other cogs that set statuses.
This creates a central location to store external API tokens that can be used between cogs without requiring each cog to be loaded for it to work.
A new set option for `[p]set api` is created to assist in forming bot readable API token locations.
This also updates the Streams cog to utilize the central database.
Tokens are moved from the old data locations in core cogs on load.
`[p]local folder` will now accept folder names in the command instead of having to navigate through the reaction menu. Also added an alias of `[p]local start` to help users coming from v2 audio.
Also:
- restart and reconnect if connection settings change
- shutdown and restart if not configured to use external
- show a message in [p]play et al. when the connection hasn't been made
- move the JAR download to manager so audio.py can access it
- only start if no process exists
- bump red-lavalink to 0.2.3
Resolves#2306
Also:
- restart and reconnect if connection settings change
- shutdown and restart if not configured to use external
- show a message in [p]play et al. when the connection hasn't been made
- move the JAR download to manager so audio.py can access it
- only start if no process exists
Resolves#2306