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.
* 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
* [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
* [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
* Add settings for external lavalink servers
* Add external lavalink server to settings display
* Add simple error handling
* Remove future permissions conflict
Assuming base Red permissions will be accessed with the 'p' command in the future
* Update prev to set requester to user instead of id
* Various fixes
Jukebox: Plebs not in a channel will not have the song cost deducted before the warning to join a channel first.
DJ role: Finer grained permissions for plebs that are alone: they can use prev (if shuffle is off), skip, pause, resume
* Update permissions
* Add track number to footer when queueing
* Add basic playlist saving
More subcommands to come later
* Check if user is not in voice
* Restrict playlist deletion to author and mods
* Add playlist info command
* [V3 Audio] Add voteskip and DJ role
* Fix connection time storage for audiostats
* Update pause command for more explicit handling
Partially fixes#1478. Users will need to use pause twice before resuming until issue no. 20 on the Red-Lavalink repo is addressed.
* Update pause command
* Update pause command
* Add jukebox mode
Adds a price option for enqueuing songs. If DJ mode is active when jukebox mode is active, no one is charged credits as mods are exempt and plebs can't queue songs without the DJ role.
* [V3 Audio] Bump timeout connecting to Lavalink
Lavalink server can take 20-35 seconds to start, bumped to 50 seconds for good measure.
* Update audio.py
Added proper timeout
* Update __init__.py
Removed old timeout
* [V3 Audio] Update audio for Red-Lavalink
* Update requirements for new library
* Fix logic for connect time storage for audiostats
Only store time when connecting to the voice channel.
* Fix repeat
Also remove restriction on if the player is playing.
* Auto-delete existing Now Playing message
* Auto-delete existing notify message
* Wrap line on Now Playing message
* Add connected duration to audiostats
_dynamic_time based on a function written by Redjumpman
* Return negative seek past song start as 00:00:00
* Version number
Ya'll are gonna hate me.
* Initial modifications
* Add initial setup.py
* working setup py help
* Modify setup file to package stuff
* Move a bunch of shit and fix imports
* Fix or skip tests
* Must add init files for find_packages to work
* Move main to scripts folder and rename
* Add shebangs
* Copy over translation files
* WORKING PIP INSTALL
* add dependency information
* Hardcoded version for now, will need to figure out a better way to do this
* OKAY ITS FINALLY FUCKING WORKING
* Add this guy
* Fix stuff
* Change readme to rst
* Remove double sentry opt in
* Oopsie
* Fix this thing
* Aaaand fix test
* Aaaand fix test
* Fix core cog importing and default cog install path
* Adjust readme
* change instance name from optional to required
* Ayyy let's do more dependency injection