2050 Commits

Author SHA1 Message Date
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
jack1142
8b477db0a6
Update pyenv instructions to install Python 3.8.6 (#4457) 2020-10-03 09:02:34 -08:00
github-actions[bot]
80d99af5b0
Automated Crowdin downstream (#4462)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-10-03 00:30:26 +02:00
Kai K
d26335b01b
[Trivia] MLB Trivia (#4455)
* Create mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update redbot/cogs/trivia/data/lists/mlb.yaml

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update redbot/cogs/trivia/data/lists/mlb.yaml

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>

* Update redbot/cogs/trivia/data/lists/mlb.yaml

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>

* Update redbot/cogs/trivia/data/lists/mlb.yaml

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>

* Update redbot/cogs/trivia/data/lists/mlb.yaml

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>

* Update redbot/cogs/trivia/data/lists/mlb.yaml

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>

* Update redbot/cogs/trivia/data/lists/mlb.yaml

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>

* Update mlb.yaml

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2020-10-01 19:09:45 -04:00
Draper
e79aa21b55
Add util functions extracting end_user_data_statement directly from cog's info.json (#4404)
* get_end_user_statement

* add get_end_user_statement

* I hate docs

* lets make Jack and Zeph happy as they want a version that raises.

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

* rename to `get_end_user_data_statement`

* aaaaaaaaaaaaaaa

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-29 20:58:30 +02:00
Draper
bf63da3655
Stop backing up lavalink logs (#4453) 2020-09-28 08:50:42 -07:00
Fixator10
d6791111f3
fix [p]set nickname when no nickname specified (#4451) 2020-09-28 13:14:49 +02:00
jack1142
23d454cbbe
Fix deprecation mention for shared libs in docs (#4374)
* Fix deprecation mention for shared libs in docs

* Update docs/guide_publish_cogs.rst

Co-authored-by: Vexed <sebdazeley@gmail.com>

Co-authored-by: Vexed <sebdazeley@gmail.com>
2020-09-27 21:28:18 -04:00
absj30
f9741cdd27
Fix typo at function's "end_game" docstring (#4186)
Co-authored-by: Ailton Jr <ailton@edu.unipar.br>
2020-09-27 21:28:07 -04:00
Sharky
3699c246df
[Mod] Account for duplicated mentions (#4359)
* Account for duplicated mentions

* Spelling fix + Wording change

* Requested changes *hopefully*

* forgot to formattttttttttttttttttttttt

* Improve the consistency with existing commands in inconsistent `[p]modset` group

* What was the point of defining `guild` if you didn't end up using it, Jack!?

* I hate you, web editor ಠ益ಠ

* You could have just copy-pasted this Jack, seriously...

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-27 21:27:53 -04:00
jack1142
284080ec83
Update events.py (#4431) 2020-09-27 21:27:29 -04:00
jack1142
a2ae485286
Deprecate is_allowed_by_hierarchy() core util (#4435) 2020-09-27 21:27:22 -04:00
jack1142
a74547bb4e
Update Getting started guide with the link to Index (#4439)
* Update Getting started guide with the link to Index

* Update docs/getting_started.rst

Co-authored-by: Twentysix <Twentysix26@users.noreply.github.com>

Co-authored-by: Twentysix <Twentysix26@users.noreply.github.com>
2020-09-27 21:27:15 -04:00
github-actions[bot]
a6ff5b8e9c
Automated Crowdin downstream (#4445)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-24 22:01:14 +02:00
github-actions[bot]
a09dddb2cf
Automated Crowdin downstream (#4432)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-24 02:14:41 +02:00
Dav
d7da0b4081
[Mod] Pluralize properly in userinfo (#4397)
* Pluralize properly in userinfo

* black

* totally didn't forget roles

* Almost seems like you have a point there...

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

* Yes... right... this one too

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

* Yes, yes we do.

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-21 00:39:44 +02:00
Flame442
47d9069108
[Core] Catch errors about blocked DMs in [p]traceback (#4329) 2020-09-20 19:42:28 +02:00
bobloy
ddc5660f2c
Add custom groups tutorial to Config's docs (#4416)
* Add `Config.custom` tutorial to docs

* Red V2 Data transfer example brought up-to-date as well

* Update docs/framework_config.rst

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

* Update docs/framework_config.rst

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

* Update docs/framework_config.rst

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

* Update docs/framework_config.rst

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

* Update docs/framework_config.rst

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

* Update framework_config.rst

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-20 02:57:37 +02:00
Kowlin
88503bbf24
[Mod] Correctly log and store the previous (nick)name (#4131) 2020-09-20 02:42:12 +02:00
zephyrkul
8a75d75d83
Add quote() function to chat formatting utilities (#4425)
* add quote to chat_formatting

* ...

* jack's request
2020-09-20 02:12:11 +02:00
Dav
980b5fa1c2
[Warnings] Improve consistency in [p]warningset's commands (#4409)
* Be consistent with bool setters in warnings cog

* black
2020-09-20 00:16:42 +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
Dav
4e1ce7524b
[Modlog API] Handle deleted channels in Case.message_content() (#4415)
* Handle deleted channels in case.message_content()

* remove avatar_url + black
2020-09-19 19:39:59 +02:00
TrustyJAID
fec25fcaba
Accept discord.Objects for cases, add last_known_username param in create_case() (#4326)
* [Modlog] Fix typehints for create_case

* Simplify Logic after review

* discord.abc.User to catch both member and user objects and other potential discord.Object's being sent

* fix typehints and Case.edit()

* fix docstrings in create_case

* Add note about last_known_username

* fix the weird thing that scared me
2020-09-19 19:05:00 +02:00
Jamie
6162b0f2bd
[Trivia] Fix machamp/machoke (#4424)
* fix machamp/machoke

* swap order
2020-09-14 08:33:49 -07:00
jack1142
6f600b71d3
Exclude locales folders from code ownership (again) (#4418) 2020-09-10 20:33:11 +02:00
github-actions[bot]
f6fccfc949
Automated Crowdin downstream (#4417)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-10 20:32:04 +02:00
Kowlin
e1b02b2952
Escape regex on spotify URL (#4414) 2020-09-09 11:03:22 +01:00
Kowlin
a80a5ec96e
Create codeql-analysis.yml (#4413)
* Create codeql-analysis.yml

* Remove the matrix support

* Remove autobuild and strategies
2020-09-09 01:12:27 +02:00
Kowlin
a9656dea38
Delete no-NO in favor of nb-NO (#4396) 2020-09-05 02:48:55 +02:00
github-actions[bot]
f8fcabfe10
Automated Crowdin downstream (#4395)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-03 17:26:47 +02:00
Kingsley Zhong
ea7e142494
Add hierarchy checks to [p]warn (#4100)
* Update warnings.py

* Cleanup the code and pass style check.

Co-authored-by: Kowlin <boxedpp@gmail.com>
2020-09-03 16:23:03 +02:00
github-actions[bot]
e1a9b31e9b
Automated Crowdin downstream (#4394)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-03 15:48:34 +02:00
Nathaniel F
59f69c7727
[General] URL encode user input for [p]urban and [p]lmgtfy (#4024)
* URL encode user input in the general cog

Adds URL encoding to `[p]lmgtfy` via `urllib2.parse.quote_plus()`
and to `[p]urban` via `aiohttp.ClientSession.get`'s `params` argument

* Black reformatting
2020-09-03 00:35:27 +02:00
jack1142
0200c2cb3f
Clarify documentation of modlog.create_case() (#4389) 2020-09-02 23:09:59 +02:00
jack1142
b11359eebb
Add float -> int migration to Bank (float was a bug) (#4386)
* Add float -> int migration to Bank (float was a bug)

* wrong refs

* Cause ctx manager compares before and after values...
2020-09-01 02:04:19 +02:00
jack1142
4adf328fac
Update .gitignore with .vscode folder (#4387) 2020-09-01 01:25:46 +02:00
Stonedestroyer
f81cf5960f
Fix typos in doc string. (#4360) 2020-09-01 00:53:25 +02:00
jack1142
2bf9c1260c
Update CODEOWNERS (#4367)
* Update CODEOWNERS

* Prepend with backslash, add downloader fixtures

* Update CODEOWNERS

* Schemas are closely related to Downloader...

...so I should know about the changes to those.

* Would be nice to add my name (thanks Draper)
2020-08-31 16:40:31 +01:00
Vexed
8956f63229
[Mod] Dots and properly capitalise Discord (#4377) 2020-08-31 14:25:43 +01:00
Ian Martin
7d24413846
Ensure Bank API only works with Integers. (#4376)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-08-31 14:24:44 +01:00
PythonTryHard
e1261b92d1
Typo fix on [p]invite command (#4382) 2020-08-31 14:21:15 +01:00
Fixator10
8c89993cd5
JSON schemas for cogs and repos (#4375)
* JSON schemas for cogs and repos

* newline at the end

* capitalization

* Remove *.json from .gitignore

* Remove empty line

* resolve requested changes

* resolve requested changes, again

Co-authored-by: Fixator10 <fixator10@users.noreply.github.com>
2020-08-30 20:20:48 +02:00
github-actions[bot]
ec7c2ca4b9
Automated Crowdin downstream (#4373)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-30 17:42:37 +02: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
Ryan
56b54d4d34
[Docs] Update shields in Readme (#4378)
* python shield option 1

* python shield option 2

* updates shields

* swap pypi and d.py

* new format

* no caps
2020-08-29 04:06:54 +02:00
Neuro Assassin
3534e59cb8
[Dev] Add repl pause (#4366)
* [Dev] Add repl pause

* Update redbot/core/dev_commands.py

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

* Address reviews

* Address reviews x2

* Small consistency fix

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-25 13:24:40 +02:00
Kowlin
eeb5f651b2
Stop the insanity that is this inconsistent command name! (#4328) 2020-08-25 05:18:50 -06:00
TrustyJAID
b0250b91cc
Merge pull request #4325 from zephyrkul/patch-1
[customcom] Gracefully handle timeouts in cc edit
2020-08-25 05:16:37 -06:00
Theo Suricate
ef839722f4
Added length validation for [p]set name and [p]set nickname (#4364) 2020-08-24 14:59:09 +01:00