148 Commits

Author SHA1 Message Date
jack1142
adda30cbee
Bump discord.py to 1.7.0 (#4928)
* Bump discord.py, but to the git version for now

* Import GuildConverter from d.py and deprecate our implementation

* Import PartialMessageConverter in our commands extension

* Use newly added `Cog.has_error_handler()` rather than private method

* Update snowflake regex to use 20 as max length

See Rapptz/discord.py#6501

* Use new supported way for custom cooldown buckets

* Include group args in command signature

* Update code to use `Client.close()` over `Client.logout()`

* Add StageChannelConverter and StoreChannelConverter

* Fix AttributeError in licenseinfo
2021-04-05 21:33:19 +02:00
Toby Harradine
18a23813c8
Better user feedback during slow backend migrations (#2952)
* Better user feedback during slow backend migrations

This uses a tqdm progress bar to keep the user updated on the progress of the migrations.

I didn't realise this was necessary until I did a migration from Mongo to Postgres on CASE, and it took quite a long time to complete, I started to doubt that it was actually making progress.

Also includes a utility to help with tqdm in slow asynchronous for-loops.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Make `async_tqdm` support async-for loops

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Reformat

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>

* Remove unused method

* Remove quotes for the return type annotation

* Few style improvements

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-04-05 09:41:31 +02:00
jack1142
0144cbf88b
Add deprecated-removed directive to Sphinx (#4912)
* Add `deprecated-removed` directive to Sphinx

* Add equivalent function to internal utils
2021-04-03 18:48:17 +02:00
github-actions[bot]
51b73fdd1a
[i18n] Automated Crowdin downstream (#4857)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-26 19:51:59 +01:00
github-actions[bot]
bf30f2078c
[i18n] Automated Crowdin downstream (#4816)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-14 16:57:35 +01:00
kreusada
ee33d46732
Grammar fixes (#4810) 2021-02-13 10:44:02 +01:00
kreusada
82595df730
[Utils] Spoiler Function for Chat Formatting (#4754)
* [Utils] Additional chat formatting functions

* [Utils] Updated docstrings to unify with other docstrings

* [Utils] Spoiler feature for chat_formatting

* Fixes for black style

Co-authored-by: kreusada <67752638+kreus7@users.noreply.github.com>
2021-02-11 22:31:47 +01:00
github-actions[bot]
663876fba3
Automated Crowdin downstream (#4804)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-11 13:20:38 +00:00
kreusada
bf624da51b
Grammar fixes (#4788) 2021-02-05 09:48:34 -05:00
github-actions[bot]
0f8f33fed2
Automated Crowdin downstream (#4734)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-04 18:05:40 +00:00
Predeactor
edbbd76b3c
Document that discord.DMChannel can be used in MessagePredicate (#4718)
* Allow "discord.DMChannel" for MessagePredicate

This closes #4707.

* Optional only takes a single type, use Union

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-21 11:42:10 +01:00
jack1142
537656c365
Fix role position checks (#4740) 2021-01-20 13:32:43 -07:00
Predeactor
d53ff57794
Shorten the audit log reason appropriately, remove unused vars (#4189)
* [Mod] Check for reason length & remove unused vars

This PR also remove unused variable.

* Blame me

* Apply Kowlin order.

Text will get truncate in audit logs in case we're going over 512 characters.

* This is already handled by ban_user()

* Use `get_audit_reason()` in `[p]tempban`

* Add a new kwarg to `get_audit_reason()` instead

* Include `[p]voiceban` and `[p]voiceunban`

* Include Mutes cog

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-12-23 03:22:59 +01:00
github-actions[bot]
7f587ea46b
Automated Crowdin downstream (#4664)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-12-18 19:10:17 +01:00
github-actions[bot]
e2adb29cf3
Automated Crowdin downstream (#4638)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-29 22:04:43 +01:00
Predeactor
0a040ad8e3
Fix wrong words in docstrings of reaction and message predicates (#4593)
* Fix a wrong usage of word in docs

* Let's fix this while we're at it

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-11-11 17:34:33 +01:00
github-actions[bot]
ffcf104dfc
Automated Crowdin downstream (#4567)
Red I18n: "Context comments are changed edition"

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-02 17:32:43 +01:00
PredaaA
34fe88da29
[Menus] Handle ctx.me that can be None when clearing reactions (#3902) 2020-10-21 14:23:36 +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
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
jack1142
a2ae485286
Deprecate is_allowed_by_hierarchy() core util (#4435) 2020-09-27 21:27:22 -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
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
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
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
jack1142
46eb9ce7a0
Remove things past deprecation time (2020-08-05) (#4163) 2020-08-15 13:47:28 +02:00
jack1142
01a6ef3a8f
Add variation selector-16 as appropriate to emojis across Red (#4127) 2020-08-10 03:05:57 +02:00
github-actions[bot]
5f52fb872a
[i18n] Automated Crowdin downstream (#4166)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-06 17:19:59 +02:00
Draper
1a3e264b2a
Make humanize_list() use babel. (#2982)
* Removes `MAX_BALANCE` from bank, user `bank.get_max_balance()` now
`[p]bankset maxbal` can be used to set the maximum bank balance

Signed-off-by: Guy <guyreis96@gmail.com>

* Migrates ``humanize_list`` over to babel, and uses the existing `get_babel_locale` function to get a valid locale based on bot locale.

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

* Migrates ``humanize_list`` over to babel, and uses the existing `get_babel_locale` function to get a valid locale based on bot locale.

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

* Fixes docs

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

* Add reference to Babel's `format_list`

* Add Babel to intersphinx

* remove towncrier entry

* Migrates ``humanize_list`` over to babel, and uses the existing `get_babel_locale` function to get a valid locale based on bot locale.

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

* Fixes docs

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

* Add reference to Babel's `format_list`

* Fix order, make the parameters keyword-only

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-03 15:17:05 +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
Michael H
0d8a899a65
[chat formatting] Add Variation Selector-16 as appropriate (#4105)
- Ensures consistent rendering across devices
  - See:
  https://unicode.org/Public/emoji/12.1/emoji-variation-sequences.txt
2020-07-23 19:40:25 +02:00
jack1142
8c484f86a9
Make bordered() use + for corners if ascii_border=True (#4097) 2020-07-23 12:32:41 +01:00
github-actions[bot]
dcc77cf24f
Automated Crowdin downstream (#4078)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-20 03:30:58 +02:00
Michael H
d869410d36
Add .gitattributes to ensure project consistent line endings (#4037)
- Renormalized as well
2020-07-06 18:53:10 +02:00
aikaterna
7d30e3de14
[Utils] Fix regex for role mentions in MessagePredicate (#4030) 2020-07-01 03:29:16 +02:00
bobloy
8b529f488b
Add 'discord.com/invite' to docs of filter_invites() function (#4027) 2020-06-30 14:49:45 +02:00
bobloy
632840384b
Add discord.com to supported domains in INVITE_URL_RE (#4012)
* Support for discord.com

* Modified to support discord.com requiring `/invite`

* Non-capturing
2020-06-24 20:06:11 +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
477186d09d
Add map(), find() and next() methods to AsyncIter (#3921)
* properly handle prefixes

* Docsss and typehinting

* aaaaaaaaaaa

* Apply suggestions from code review

* ffs

* docs

* docs

* Apply suggestions from code review

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

* skip await if map is none

* implement `.next()`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-06-21 19:47:48 +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
github-actions[bot]
0358473af5
Automated Crowdin downstream (#3984)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-06-18 14:33:59 +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
Draper
4f25e6c1ad
Add information on how to update to out of date message (#3744)
* add a more detailed update help

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

* ...

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

* a bit more clarity

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

* sure thing Jack

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

* add a disclaimer to the update command saying if the user faces any difficulties to check the system appropriate docs and/or support server

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

* add translation support

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

* better translation support for these

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

* Update redbot/core/events.py

Co-Authored-By: Flame442 <34169552+Flame442@users.noreply.github.com>

* Apply suggestions from code review

Co-Authored-By: Flame442 <34169552+Flame442@users.noreply.github.com>

* review

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

* Revert black fuckery

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

* aaaaaaaaaaaaaaaaaaaaaaaaaaa

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

* address jacks review

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

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

* Update redbot/core/events.py

* Update redbot/core/events.py

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

* Apply suggestions from code review

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

* Update redbot/core/utils/_internal_utils.py

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

* Apply suggestions from code review

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-05-27 08:39:53 +02:00
github-actions[bot]
480c3129bd
Automated Crowdin downstream (#3830)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-05-07 16:37:33 +02:00
TrustyJAID
6f6c536236
[Alias] Create caching to call config less frequently (#3788) 2020-04-27 02:25:41 +02:00
PredaaA
c760b43e5a
Allow to disable escaping in chat formatting utils (#3742)
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-04-24 18:17:19 +02:00
jack1142
b1fe807b47
Don't run command checks on each message starting with a prefix (#3718) 2020-04-24 18:12:25 +02:00