* Dependency update
discord.py==1.0.1
websockets<7
[style]
black==19.3b0
[Docs]
jinja==2.10.1
urllib3==1.24.2
Changes related to breaking changes from discord.py have also been made
to match
As of this commit, help formatter is back to discord.py's default
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>
* [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>
* 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
* Don't let the system encoding screw with things,
specify opens as happening with utf-8 encoding
* And also deal with encoding issues because windows is a special snowflake
(see: #1366)
* let's just use the encoding param in str() rather than encode/decode...
* Rewritten basic settings
* Ported to V3
* Will saves the dicts
* TriviaSession uses Config
* wait_for is the future
* Out with recursion and redundancy
* Remove typing before first question
* Added payout multiplier setting
* Payout setting uses appropriate check
* Implement actual paying of winner
* Removed trivia lists from repository
* Added payout confirmation message
Also rearranged the order of methods in TriviaSession to better represent the sequential order of running trivia
* Contestant count fixed
Also fixed error when lists folder is missing
* Support for multiple categories per session
* Extra error handling
* Update from rebase
* Use of task cancel
* Nicer docstrings
* Oops
* Better imports
* YAML lists
* Using the trivia list repo (YAY)
* Cast all answers to string since YAML is dumb
* session.stop() is not an async function
* Remove redundant attribute from session
* Sessions manage their own tasks
* Add `redbot/trivia` to .gitignore
* Add PyYAML to requirements.txt
* Parse answers properly before checking
* Add Red-Trivia to reqs
* Better task management and some optimisations
Sessions now just use a flat dict for settings instead of config. This means the settings can't be changed after the session is started, but it removes the need for config to be read for every question.
* Allow lists to override settings
* Fix config logic
* Iteration fixes, config override fixes, task management fixes
* Don't hide dict abuse
* Stats tracking
* Leaderboard implemented
* [leaderboard] ignore self and reverse list
* [leaderboard] Handle empty score counter
* Only count win when max score is reached