228 Commits

Author SHA1 Message Date
jack1142
e1226c6c88
Update to d.py 1.5.1, explicitly request privileged intents (#4423)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-10-21 19:55:25 +01:00
Flame442
694d379aef
[Core] Add default embed colour to [p]set showsettings (#4498)
* Add default color to [p]set showsettings

* I didn't want to since I thought it would be too long, but sure

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-18 21:11:38 +02:00
palmtree5
ec90199950
Add a setting for adding a tick reaction when help is DMed (#4467)
* Tick response for help command

* Make this a setting instead

Co-authored-by: palmtree5 <palmtree5+3577255@users.noreply.github.com>
2020-10-18 16:10:00 +02:00
Stonedestroyer
08bd0567ad
Grammar fixes (#4500)
* Grammar fixes

* More changes

* Grammar

* Error grammar

* Spelling

* Grammar

* REsolves grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* "commited" > "committed"

* apostrophe

* more grammar

* grammar

* `funtion` to `function`

* grammar in alias cog

* grammar in cleanup cog

* grammar in customcom cog

* grammar in mod cog

* grammar in reports cog

* fix grammar in streams cog

* missing apostrophe

* grammar fix in trivia cog

Co-authored-by: Jyu Viole Grace <24418520+thisisjvgrace@users.noreply.github.com>
Co-authored-by: Jyu Viole Grace <thisisjvgrace@users.noreply.github.com>
2020-10-18 08:52:56 +01:00
maxbooiii
33cf275862
[Core] added some missing dots. (#4493)
* core added missing dots

* lower-case
2020-10-18 08:45:32 +01:00
Kowlin
9ae733181b
Handle verified bots, improve errors in [p]set username (#4463)
* handle verified bots, and more specific errors

* stuff

* fuck, I forgot

* Improve errors by splitting into few different messages

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-17 02:45:52 +02:00
Vexed
c441857a4c
[Core] Add two missing full stops to licenseinfo (#4020)
* full stops

* hereafter -> hereinafter

* Add the other stop that was here...

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-14 22:25:08 +02:00
aikaterna
ec94327b15
[Core] Pagify cog unload output properly (#4469)
* [Core] Pagify cog unload output properly

When you unload a large amount of cogs (close to message limit on characters), the character count is easily pushed over 2k characters on the command response with the cog names each being wrapped in 2x backticks. The current implementation breaks in the middle of cog names or wherever else it feels like it. 1600 might have been a safe value for splitting but at 1500 I don't see how multiple short cog names could make it break at least.

* Address review
2020-10-11 17:43:12 +02:00
aikaterna
5c00810166
Use bot name instead of "Red" in [p]info and [p]restart (#4470) 2020-10-11 17:21:54 +02:00
PredaaA
804219df29
Use bot.get_user() instead of get_all_members() in [p]dm (#4472) 2020-10-11 17:19:49 +02:00
Vuks
b45e62f354
[Core] add [p]set api list and [p]set api remove (#4370)
* add get_shared_api_keys

* add set listapi command

* fix typo

* refactor `[p]set listapi` into `[p]set api list`

* remove unnecessary check

* fix decorators

* corrected wording

* add remove_shared_api_services

* add `set api remove`

* further typo sniping

* bugsniping

* minor typo

* aaaaaaaaa

* Apply suggestions from code review

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>

* update api docstring to reflect new subcommands

* Apply suggestions from code review

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* update framework_apikeys.rst with new methods

* Update redbot/core/bot.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* rewrite get_shared_api_services into a special case of
get_shared_api_tokens

* rewrite api_list to include keys and tokens in response

* don't show secrets

* better api_remove response

* black

* remove nonexistent method

* remove unnecessary import

* fix wording

* Improve docstrings and type hints

- added overloads to help out developers a bit more
  * this wasn't necessary, but development tools work better
    with this information
- fixed type hint to use Union as now
  its return type depends on whether `service_name` is passed
- updated docstrings to contain information about the added behavior

* Use `humanize_list()` rather than `str.join()`

This is done for consistency within Red
and it makes the list have the last element joined
with `and` (or its equivalent in chosen locale)

* Use `.format()` after translation is applied

If `.format()` is used before `_()`, the search for translation is done
with the string that already has the dynamic text added,
which results in no matches.

* Add plural support

* Improve error message

Updated message to be more specific
(used phrases: "None of the services" and "had any keys set")
and a bit more nice to the user (judging word "anyway" removed)

* Improve readability of `[p]set api list`

It's a lot clearer when the sublists are indented,
especially on mobile where code blocks aren't colored at all.

New look:
https://user-images.githubusercontent.com/6032823/94614944-3bbd7c80-02a7-11eb-89e4-64bdf06c650b.png

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-05 22:10:14 +02:00
Fixator10
d6791111f3
fix [p]set nickname when no nickname specified (#4451) 2020-09-28 13:14:49 +02:00
Flame442
47d9069108
[Core] Catch errors about blocked DMs in [p]traceback (#4329) 2020-09-20 19:42:28 +02:00
PredaaA
343efba4d5
Handle aiohttp errors in [p]set avatar (#4437)
* [Core comands] Handle aiohttp errors in set avatar

* Update redbot/core/core_commands.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-19 19:51:38 +02:00
PythonTryHard
e1261b92d1
Typo fix on [p]invite command (#4382) 2020-08-31 14:21:15 +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
Theo Suricate
ef839722f4
Added length validation for [p]set name and [p]set nickname (#4364) 2020-08-24 14:59:09 +01:00
maxbooiii
5cd3a5b5af
missing dots (#4031) 2020-08-23 03:13:09 +02:00
Dav
581bdaa496
[Core] Make core_commands.py comply with #4048 (#4138)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-08-16 11:37:29 +01:00
Vexed
61df4f88b3
[Core] A few data API grammar improvements (#4164)
* stuff

* .

* oops

* aaaaaaaaaa
2020-08-07 00:22:08 +02:00
Dav
297ba8f2b7
[Core] Typo fix (#4035) 2020-08-06 18:54:44 +02:00
Michael H
068ce24513
[Core Commands] Add Help settings view (#4022)
* add help settings view

* Update redbot/core/commands/help.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* natural language handling of time intervals is useful

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-06 03:38:34 +02:00
Michael H
4f808306ba
Add a provisional API for replacing the help formatter (#4011)
* Adds an API for replacing the help formatter

* Apply suggestions from code review

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* add note about provisionality

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-06 02:12:14 +02:00
Neuro Assassin
5221b1e4a3
Fix missing self argument in [p]licenseinfo (#4154) 2020-08-04 14:13:23 +02:00
jack1142
775528ce9b
Reject package (extension) names that can't be valid Python identifiers (#3679)
* Reject package names that can't be valid Python identifiers

* Add info to `[p](re)load`

* Improve internal consistency of package vs cog
2020-08-03 15:17:27 +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
Michael H
d73ad3115f
Prevent LicenseInfo command from being a source of user command spam (#4110)
* Prevent LicenseInfo command from being a source of user command spam

* add dep-warn explaining whats needed for this

* name issues

* Tests...

* An empty commit unbroke some of it, but still style issues
2020-07-29 02:39:37 +02:00
Jamie
260a2d5c78
Use mod/admin_or_permissions instead of just mod/admin. (#4109)
* Update modcheck.

* _or_permissions for set nickname & serverprefix
2020-07-29 01:38:19 +02:00
Michael H
1d80fe9aec
Create cog disabling API (#4043)
* create cog disbale base

* Because defaults...

* lol

* announcer needs to respect this

* defaultdict mishap

* Allow None as guild

- Mostly for interop with with ctx.guild

* a whitespace issue

* Apparently, I broke this too

* Apply suggestions from code review

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* This can probably be more optimized later, but since this is a cached value, it's not a large issue

* Report tunnel closing

* mod too

* whitespace issue

* Fix Artifact of prior method naming

* these 3 places should have the check if i understood it correctly

* Announce the closed tunnels

* tunnel oversight

* Make the player stop at next track

* added where draper said to put it

* Apply suggestions from code review

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
2020-07-28 20:52:36 +02:00
Draper
d30e83b5fc
Reduce config calls when changing white/blacklist and use sets for their cache (#3910)
* optimise use of config ctx manager to reduce calls to config

* fine you potato

* since jack said yes i'll abuse it

* Apply suggestions from code review

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* difference_update and update

* Apply suggestions from code review

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/settings_caches.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

* one last tweak

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-07-08 19:25:14 +02:00
Draper
e0b922c949
Make localwhitelist check if caller will still be able to use bot after changes (#3903)
* Check invokers theoretical perms in localwhitelist add before completing command

* remove unnecessary code

* add check to remove

* ignore bot owner and server owner

* Update core_commands.py

* lets not crash shit
2020-07-07 20:08:06 +02:00
Michael H
60df447550
Add settings view commands (#4041)
Any group which sent help + settings views has had the settings view
  split into a seperate command. This ensures that custom help behavior
  does not interfere with settings views.
2020-07-07 00:53:41 +02:00
Vexed
2cf7a1f80d
[Core] Docstring full stops and a few other grammar fixes (#4023)
* core full stops/other grammar fixes

* need to read better (i'm keeping it on two lines)

* apply review

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-07-06 20:21:45 +02:00
jack1142
b49b53934d
Update deprecation warnings (#3608)
* Make deprecation notice specify minor release based on soonest date

* Stop specifying a specific release in shared libs deprecation notice

* Add actual deprecation warning for `APIToken` (OMG, this is so cool)

* Add dates (2020-08-05 for all)

* address review

* improve consistency

* Add __dir__ and show APIToken in docs (or maybe I want to annoy Flame)

* fix module name when importing non-existent name from parent package

* Fix stack level used by depr warn in `redbot.core.commands`
2020-06-22 03:25:33 +02:00
Draper
175fbebd73
Move logic for fetching latest Red version info to internal util (#3904)
* Only Send out of date message to Final builds available on PyPi

* Only Send out of date message to Final builds available on PyPi

* sorted the resulting list so that the newest build is first in the list

* forgot about this one

* well jack is a bitch but we love him.

* simplify logic

* Add the new function to `__all__`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-06-18 22:21:59 +02:00
Vexed
3a0574eae8
[Core] Change [p]embedset user docstring and message to explicitly say DMs only (#3972)
* change docstring and message to explicitly say DMs

* didn't think i'd need to run black...

* wrong branch...

This reverts commit aa6aa5cf4bcf9ff66e8c3e1636daa03feee47e97.

* wait its the right branch

* review - seperate enabled & disabled strings

* review

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-06-18 16:00:08 +02:00
Vexed
f58f6bb6d2
Update dm docstring for readability and grammar (+ period in contact) (#3946)
* update `dm` docstring

* few changes

* hmm

* cant make my mind up how to word it

* fk i forgot "and"

this is the last one, i promise

* add missing full stop in `contact` as im in this area of core_commands

* oh, see ^^^ review

* `click on` instead of `select`

Co-authored-by: Vexed01 <>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-06-11 19:31:49 +02:00
Draper
76efb16f96
[UX] Add "server" alias for commands that have "guild" in name (#3947) 2020-06-11 18:56:57 +02:00
Predeactor
d411873503
Only trigger cooldown when message is parsed in [p]contact (#3942) 2020-06-11 18:54:11 +02:00
Flame442
f0a4c1c252
[Core Commands] Fix [p]set custominfo error (#3923) 2020-06-11 18:46:30 +02:00
Draper
b1d394eac5
[Core] Add a text only version to [p]info (#3907)
* ...

* Finish implementation

* some people think an embedless world brings joy ... I agree to disagree.
2020-06-11 15:07:27 +02:00
Neuro Assassin
7a86cc4bf3
[Core] Add bot.set_prefixes() (#3890)
* Add bot.set_prefixes; change set serverprefix and set prefix to new method

* Address requested changes

* Apply suggestions from code review

* One more

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-05-31 00:57:49 +02:00
jack1142
ed89f70f98
Fix uses of re.sub() (#3826)
* Fix uses of `re.sub()` (pt. 1)

* Fix uses of `re.sub()` (pt. 2)

* Fix uses of `re.sub()` (pt. 3)

* Fix uses of `re.sub()` (pt. 4)

* Revert commands.py
2020-05-28 23:51:53 +02:00
Neuro Assassin
ef76affd77
Fix local blacklist and whitelist commands (#3857) 2020-05-19 02:22:05 +02:00
Predeactor
fb26ecf577
Fix casing and add missing dot in two commands (#3851) 2020-05-15 15:55:28 +02:00
Qais Patankar
7d28581915
Fix 'authentification' typo (#3823) 2020-05-06 20:20:52 +02:00
Flame442
aaee2d9294
Fix incorrect docstring in [p]helpset maxpages (#3817) 2020-05-01 18:30:58 +02:00
Draper
bd3d0dd64d
Show current driver in [p]debuginfo (#3794)
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-04-26 16:07:57 +02:00
Draper
ad979180e5
Make the largest loops lazier and async to avoid blocking (#3767)
* lets reduce config calls here

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

* 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>

* Just a tiny PR improving config call in a lot of places (Specially events and Help)

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

* stop using `bot.guilds` in `on_command_add`

* Just a tiny PR improving config call in a lot of places (Specially events and Help)

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

* missed this one

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

* nothing to see here

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

* lets reduce config calls here

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

* Just a tiny PR improving config call in a lot of places (Specially events and Help)

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

* stop using `bot.guilds` in `on_command_add`

* missed this one

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

* welp

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

* welp

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

* welp

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

* jack

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

* Update redbot/cogs/mod/kickban.py

Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/cogs/filter/filter.py

Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>

* jack

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

* make all large loops async to avoid blocking larger bots

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

* ...

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

* okay now working AsyncGen

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

* may or may not have forgotten black

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

* Apply suggestions from code review

Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>

* jack's review

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

* DOCS

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

* DOCS

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

* Apply suggestions from code review

Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>

* jack

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

* Apply suggestions from code review

Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/utils/__init__.py

Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>

* Update redbot/core/utils/__init__.py

Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>

* avoid loop if possible and if not only iterate once

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-04-20 19:56:28 +02:00
jack1142
465812b673
Add a command to remove bot's avatar (#3757)
* Add a command to remove bot's avatar

* blah
2020-04-20 19:40:14 +02:00