46 Commits

Author SHA1 Message Date
Kreus Amredes
b64ece3ee9
[Admin] Add [p]selfroleset clear command (#5387) 2021-10-17 18:51:04 +02:00
Kreus Amredes
b0f93a3ce1
[Admin] Allow selfroleset command to consume multiple roles (#5238)
* Initial commit

* update docs

* remove usage kwargs

* style

* Type hint with SelfRole and not discord.Role

* fix docstring

* Various improvements, fixes

* i need to wake up

* more improvements

* AAAA

* add back check

* Improve converter error

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-01 22:37:45 +00:00
Vexed
982feda858
[Admin] Add logging to serverlock (#5073)
Co-authored-by: Twentysix <Twentysix26@users.noreply.github.com>
2021-05-24 12:03:43 +01:00
OofChair
99b29d0b8e
Grammar fixes (#4793)
* Grammar fixes

I need manage roles permission ->> I need the manage roles permission

* Add quotes, capitalize "Manage Roles"

* Style
2021-05-18 16:39:21 -04:00
Wyn
bee022d1bb
Make [p]selfrole without subcommand "toggle" the selfrole (#4826)
* Merge selfrole and remove into one command

replacement pr

* docs

add to the docs

* Update admin.py

remove register name

* Update admin.rst

* Fixes

* Fix the duplicated command decorators

* Minimize the diff

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-02-16 15:16:16 +01:00
jack1142
85afe19455
Bump black to 20.8b1 (and reformat) (#4371)
* Bump black version

* Reformat with black
2020-08-29 19:12:28 +02:00
Michael H
c0b1e50a5f
Begin work on a data request API (#4045)
[Core] Data Deletion And Disclosure APIs

 - Adds a Data Deletion API
   - Deletion comes in a few forms based on who is requesting
   - Deletion must be handled by 3rd party
 - Adds a Data Collection Disclosure Command
   - Provides a dynamically generated statement from 3rd party
   extensions
 - Modifies the always available commands to be cog compatible
   - Also prevents them from being unloaded accidentally
2020-08-03 15:09:07 +02:00
jack1142
97379afe6d
Fix the cog_before_invoke hook in Admin (#4124) 2020-07-28 15:29:20 +01:00
TrustyJAID
583f093eb0
[Admin] fix erroneous await in _ready.set() (#4107) 2020-07-23 23:19:18 +02:00
Michael H
ec262d4c30
[Announcer] Don't die with a lack of channels (#4089) 2020-07-20 18:51:27 +01:00
jack1142
0c94ce6cc3
Make server lock work again (#3815) 2020-05-01 18:29:57 +02:00
Draper
e4018ec677
Normalize names of attributes with Config instances (#3765)
* Lets normalize how we name config attributes across the bot.

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* ....

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>

* nothing to see here

Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
2020-04-20 19:12:57 +02:00
jack1142
eedec4ff02
fix: use clean prefix in code blocks (#3591) 2020-02-28 21:23:13 +01:00
Flame442
54e65082bc [Admin] Notify when the user has/doesn't have the role when att… (#3408)
* Update admin.py

* Create 3010.enhance.rst
2020-01-18 18:10:25 +00:00
Flame442
fe7770c833 [Admin] Fixes hierarchy issues in [p]selfrole and [p]selfroleset (#3331)
* More fixes

* Update admin.py
2020-01-12 18:01:45 -05:00
Jonas Bohmann
c8f753db0d Fix typo '.foramt()' -> '.format()' in cogs/admin/admin.py (#3255)
* Fix typo '.foramt()' -> '.format()'

* Add changelog file
2020-01-02 12:48:13 -05:00
Flame442
e776b5ca1a [Admin] Code prettification and bugfixing (#3250)
* Facelift for Admin

* Remove unnecessary converter, reorder existing steps

* Delete admin.py

* Delete __init__.py

* Delete test_admin.py

* Remove one extra unneeded check

* Create 3250.bugfix.1.rst

* Create 3250.bugfix.2.rst

* Create 3250.bugfix.3.rst

* Create 3250.bugfix.4.rst

* Create 3250.misc.1.rst

* Create 3250.misc.2.rst

* Create 3250.misc.3.rst

* Create 3250.breaking.1.rst

* Create 3250.breaking.2.rst

* ...

* I hate black...
2020-01-02 09:11:27 -05:00
Friesi
101e977939 Change the hierarchy issue messages (#3016)
* Change the hierarchy issue messages,
because they are difficult to translate with the verb variable.

* Fix typos

* Add changelog entry

* Reformatting with black
2019-09-27 12:10:35 -04:00
jack1142
0bf54fae52 [Admin] Convert set to list because set is not JSON serializable (#2792) 2019-06-23 13:33:27 +10:00
Michael H
ad114295e7
Discord.py dep update 3.1 (#2587)
* 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
2019-04-23 21:40:38 -04:00
TrustyJAID
87c66b2423 [V3 Admin] Fix errors when hierarchy issues are raised (#2498)
* Fix addrole mentioning who we're trying to add the role to

* More things are broken, huh

* formatting...
2019-04-22 19:25:44 -04:00
aikaterna
9730a424ec [Admin] Selfrole list formatting (#2193)
Selfrole list needed a return in between the header and the list.
2018-10-07 08:46:32 +11:00
Toby Harradine
fa692ccc0b [i18n] Pass over economy, filter, general, image, mod
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-06 09:00:31 +10:00
Toby Harradine
0c3d8af8f4 [i18n] Pass over bank, cleanup, customcom, dataconverter, downloader
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
2018-10-06 08:57:49 +10:00
Toby Harradine
3a20c11331 [i18n] User-facing string pass over admin, alias and audio 2018-10-06 08:43:19 +10:00
Michael H
aa8c9c350e [i18n] Start work on named format arguments (#1795) 2018-10-06 08:42:38 +10:00
Toby Harradine
0870403299
Permissions redesign (#2149)
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>
2018-10-01 13:19:25 +10:00
Toby Harradine
75ed749cb3
[Admin] Fix [p]addrole error when a hierarchy issue occurs (#1995) 2018-08-11 12:11:15 +10:00
aikaterna
86579068d9 [V3 Admin] Clean up help strings (#1906) 2018-07-12 03:49:37 +02:00
Michael H
35149f8837 [V3] DM usage fixes (#1919)
* DM usage fixes

* ...

* ...

* ...

* ok, formatting...
2018-07-12 02:46:14 +02:00
Toby Harradine
c0d01f32a6 [V3] Use our own checks instead of discord.py's (#1861)
* [V3] Use our own checks instead of discord.py's

* Remove bot.has_permissions checks too
2018-07-12 02:33:39 +02:00
Michael H
1c2196f78f autohelp changes. (#1836) 2018-07-12 01:23:18 +02:00
Tobotimus
033d0113a5 [V3] Send meaningful responses on conversion failure (#1817)
* [V3] Send meaningful responses on conversion failures

* Replace existing `discord.ext.commands` imports

Just to be sure

* Better Permissions converter response
2018-06-08 21:20:40 -04:00
Michael H
17c7dd658d [V3 Core] Command group automatic help (#1790)
* decorator inheritence

* black format

* add autohelp

* modify commands to use autohelp
2018-06-08 20:54:36 -04:00
Michael H
8610b47a68 [V3 Admin] Announce ignore parameter modification (#1781) 2018-06-02 18:20:01 -04:00
Will
35e9fab701 [V3 Admin] Add notes about case sensitivity for selfrole (#1762) 2018-06-02 11:01:08 +10:00
Tobotimus
14cc701b25 [V3] Update black version and reformat (#1745)
* Update black version and reformat

* Pin black in extras_require
2018-05-29 18:37:00 -08:00
rngesus-wept
537531803a [V3 Admin] Correct spelling of 'hierarchy' (#1714) 2018-05-27 12:25:26 -08:00
Michael H
b88b5a2601 [V3] Update code standards (black code format pass) (#1650)
* ran black: code formatter against `redbot/` with `-l 99`

* badge
2018-05-14 15:33:24 -04:00
TheFixed
d6ef812704 [V3 Admin] fix typo (#1537)
it's -> it is or it has
its -> possessive form of it
2018-04-16 17:36:38 -08:00
Tobotimus
6138b78c07 [V3 Admin] Make [p]announce consume all args into the message (#1394)
* Fix announce (resolves #1390)

* Make other commands consume all args

Also fixes [p]announce channel
2018-03-08 20:45:41 -05:00
Will
57b7db6956 [V3 Admin] Remove guild default channel (#1381)
* Remove guild default channel

* Fix weird set thing
2018-03-06 09:52:26 +11:00
Will
c9a6c0ffcc Converters don't work the way I think they do (#1336)
(No they don't Will -- Kowlin)
2018-02-23 02:21:39 +01:00
Tobotimus
9dbf56f942 [Config] Retrieve/save values with async context manager (#1131)
* [Config] Retrieve/save values with async context manager

* Add a little docstring

* Documentation

* Implement async with syntax in existing modules
2017-12-03 18:07:34 -09:00
Tobotimus
86b18c702c [V3] Custom context class (#988)
* Create custom context class

* Documentation

* Remove old help method, replace with new

* Update from rebase
2017-10-15 21:02:50 -04:00
Will
4ddd576315 [V3 Admin] Rewrite of Squid-Plugins Admin cog (#825)
* Add/remove roles

* Announcement

* Edit role stuff

A bit of refactoring

* Selfrole stuff

* Add announce ignore capabilities

* announce configurations

Announcement fixes

* Serverlock initial commit

* Add some admin tests

better test

* Update for new config

* Add user hierarchy checks

* Fix tests

* Update from rebase

* Fix config getter

* Fix async getters/selfrole
2017-10-14 18:05:08 -04:00