Using the OpenJDK 11 from java.net on Ubuntu 18 reports "11" as the version, which failed the Java version check on loading audio on a new instance. This change will return "11 0" as the version, passing the check, instead of just "11".
Renames the `current_build` key to `current_version`. This means the `current_version` key will always be a dict and never a list, and `current_build` having no defaults means it won't mess with `[p]audioset settings`.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
current_build is now set as a dict, but its default was a list.
This resolves the error an `[p]audioset settings`.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
Fix for `playlist list`: added forgotten variable plus return for formatting (fixes#2190)
i18n addditions: DJ Role toggle, Thumbnail display toggle
`audioset settings`: added missed end of line return
`queue` fix: added indentation to not have the currently playing song info repeated in the queue display when playing local songs
`local play` and `local folder` now display the appropriate menu when DJ role is on.
* Implements our required subset of PEP 440 in redbot.core.VersionInfo
* Added unit tests for version string parsing and comparisons
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Uses classmethods to create predicates
* Classmethods allow using a combination of different parameters to describe context
* Some predicates assign a captured `result` to the predicate object on success
* Added `ReactionPredicate` equivalent to `MessagePredicate`
* Added `utils.menus.start_adding_reactions`, a non-blocking method for adding reactions asynchronously
* Added documentation
* Uses these new utils throughout the core bot
Happened to also find some bugs in places, and places where we were waiting for events without catching `asyncio.TimeoutError`
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
API changes:
- Cogs must now inherit from `commands.Cog` (see #2151 for discussion and more details)
- All functions which are not decorators in the `redbot.core.checks` module are now deprecated in favour of their counterparts in `redbot.core.utils.mod`. This is to make this module more consistent and end the confusing naming convention.
- `redbot.core.checks.check_overrides` function is now gone, overrideable checks can now be created with the `@commands.permissions_check` decorator
- Command, Group, Cog and Context have some new attributes and methods, but they are for internal use so shouldn't concern cog creators (unless they're making a permissions cog!).
- `__permissions_check_before` and `__permissions_check_after` have been replaced: A cog method named `__permissions_hook` will be evaluated as permissions hooks in the same way `__permissions_check_before` previously was. Permissions hooks can also be added/removed/verified through the new `*_permissions_hook()` methods on the bot object, and they will be verified even when permissions is unloaded.
- New utility method `redbot.core.utils.chat_formatting.humanize_list`
- New dependency [`schema`](https://github.com/keleshev/schema)
User-facing changes:
- When a `@bot_has_permissions` check fails, the bot will respond saying what permissions were actually missing.
- All YAML-related `[p]permissions` subcommands now reside under the `[p]permissions acl` sub-group (tbh I still think the whole cog has too many top-level commands)
- The YAML schema for these commands has been changed
- A rule cannot be set as allow and deny at the same time (previously this would just default to allow)
Documentation:
- New documentation for `redbot.core.commands.requires` and `redbot.core.checks` modules
- Renewed documentation for the permissions cog
- `sphinx.ext.doctest` is now enabled
Note: standard discord.py checks will still behave exactly the same way, in fact they are checked before `Requires` is looked at, so they are not overrideable.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Just a test
* another test
* undoing my test
* First solution, style issue
* Works functionally, but there are is a minor style issue
* style fixed
* Revert README changes
* [Audio] Do less strict matching for java version
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* [Audio] Fix java version bounds to account for Oracle's bullshit
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* [Trivia] Move trivia lists back home
Removes red-trivia as a dependency.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Include package data in distribution
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Add test from red-trivia repo, and fix package data setup
* The distribution will now include all files under any data/ sub-directory of a package, as well as all *.po files under any locales/ sub-directory (as it should have been before).
* MANIFEST.in has been simplified to comply with these changes and redbot/cogs/audio/application.yml has been moved to the data/ sub-directory to maintain consistency in how we declare package data.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* [i18n] Use redgettext over pygettext
* Clear out autogenerated `messages.pot` files
* Remove redundant `regen_messages.py` files
* Refactor `generate_strings.py` to use redgettext
* Install redgettext in Travis Crowdin job
* Clean up some problematic usages of gettext function
* Reformat
* Replace generate_strings.py with Makefile argument
* Update to redgettext 2.1, use exclusion pattern
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* [V3] Stop `tmp` dir showing up
* [V3] Remove requirements.txt and declare in install_requires
* Remove requirements.txt from tox.ini
* Update and pin all dependencies and sub-dependencies
* Update for breaking changes
* Reformat
* Update docs/requirements.txt and tox.ini requirements
* Add 3.7 to identifiers and travis/tox builds
* Attempt at fixing the travis build matrix
* Attempt #2
* Attempt 3
* aiohttp.ClientSession.close() -> detach() in sync code
* Add raven-aiohttp to requirements
* Fix stuff in setup.py
- Added discord.py back into requirements list
- Fix typo in alabaster extra requirement
Also in the Pipfile:
- Removed allow_prereleases and explicitly pinned black, since this is the only dep we want a prerelease for.
* Update to Rapptz/discord.py@8ccb98d395
* Add proper 3.7 build in Travis
See travis-ci/travis-ci#9815
* Which version of 3.6 does Xenial install then?
* Maybe we should stop pipenv installing useless stuff
* Nevermind, back to specific minor version
* Remove lots of WET dependency stuff
* Fix egg fragment for dependency link
* [V3 Audio] Fix for playlist queue duplicates
And some sanitizing of playlist names.
* [V3 Audio] Playlist naming standardization
Enforced single-word playlist name across all playlist commands, removed A-Z 0-9 name standardization. [p]playlist delete will still accept playlist names with quotes as there should be a way to remove already-existing playlists with spaces in their name.
* [V3 Audio] Black formatting
* Cleanup quotes in cogs
* More quote cleanup that I missed
fixed a little bit of grammar here and there as well.
* [V3 Warnings] Change allowcustomreasons docstring
To help not confuse users who would believe that the command would use allow or disallow.
* Run black reformat
* [V3 Audio] [p]llsetup fixes
[p]llset wsport changed to not use the rest port setting and both the rest and ws ports were changed to use ints instead of strings.
* [V3 Audio] Version change
* Update travis to not sip pipfile lock
update pipfile dependencies
additional black formatting pass to conform to black 18.5b
* .
* pin async timeout until further discussion of 3.5 support
* .
* [V3 Audio] Update queue and search to use menus
* [V3 Audio] Fix for playlist upload saving
* [V3 Audio] Add position in queue to enqueued songs
Also a bit of cleanup.
* [V3 Audio] Improvements for mobile formatting
* Framework for internationalised command help
* Translator for class docstring of cog
* Remove references to old context module
* Use CogManagerUI as PoC
* Replace all references to RedContext
* Rename CogI18n object to avoid confusion
* Update docs
* Update i18n docs.
* Store translators in list instead of dict
* Change commands module to package, updated refs in cogs
* Updated docs and more references in cogs
* Resolve syntax error
* Update from merge
* [V3 Audio] Add Lavalink Jar build to settings
Added Lavalink Jar build to Lavalink settings since build number now stored in config.
* Forgot import
Added import
* Left align
K im done for real this time