2245 Commits

Author SHA1 Message Date
jack1142
7df1570d51
Various improvements in usage of Rich in Red (#4726)
* Use Rich's default console object instead of making one

* Bump Rich to version 9.8.2

* Disable indent guides in tracebacks

* Skip empty lines between stack levels in traceback rendering

* Use full width of the terminal when printing tracebacks

* Disabling syntax highlighting on the log messages

* Make logger name bold

* Make logger level bold

* Make URLs in console bold

* Change `bright_blue` and `blue` colors in syntax theme (NEEDS CHANGING)

* Show only one line per stack level in tracebacks

* Shuffle things in `redbot.logging` a bit

* Change logging handler while redirecting stdout in Dev cog

* Revert last two commits...

This reverts commit cf563bd06a6ae398da12713ceef3db9cc903d902.
This reverts commit 6dddf300726ddf89b8924441eed59b67b58faca0.

* Change Rich console to always print to sys.stdout (therefore ignoring stdout redirects)

* Pass cli_flags to init_logging()

* Add a flag to set the amount of extra lines in rich tracebacks

* First take on the syntax theme colors

* Use the Windows trick

* ARE YOU SERIOUS!?

* Remove dead code

* Use Monokai when Terminal application supports truecolor

* Syntax theme update

* Change logger name color

* This is not needed

* Adjust logging level colors

* Add a flag for showing local variables in Rich tracebacks

* change imports a bit

* Remove usage of blue color fully

* Stop highlighting in Red-DiscordBot splash

* Fix unreadable paths in tracebacks

* Make CRITICAL logging level more readable

* Make time in logs more readable

* Fix the first row being bolded in tables

* Update rich to 9.9.0
2021-02-11 14:20:10 -07: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
jack1142
ae87aa396a
Bump Red's deps and all the pip deps used in our Actions (#4572)
* Bump Red's deps

* Bump deps in all our actions

* Don't bump flake8 in Lint Python action

* Bump apsw-wheels too
2021-02-11 02:40:36 +01: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
jack1142
f9848a69b7
So close, and yet so far away - issue forms for the last time tonight (#4784) 2021-02-02 00:50:10 +01:00
Kowlin
082106eb21
Oh boy! more issue templates! (#4783)
* Oh boy! more issue templates!

* Add some descriptions to command_bug.yml

* Update enhancements.yml to refer to "components" since one might want to request API enhancement

* Update feature_request.yml

* Update command_bug.yml

* typo

* I don't think this would cause any issue but I would rather not need another PR

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-02-02 00:35:16 +01:00
jack1142
45f22404d4
Story likes to repeat itself - fix our issue template hopefully for good (#4782)
* Revert "Cut the list in half (#4781)"

This reverts commit 9737c1b5eb9a55e905a8e1221bdf21b0766f320c.

* Story likes to repeat itself

Yet again, Kowlin makes a small mistake that ends up with us making shitton of commits
2021-02-01 22:41:15 +01:00
jack1142
9737c1b5eb
Cut the list in half (#4781) 2021-02-01 21:55:02 +01:00
Kowlin
7c86071a5d
Lets "temporarily" remove these. (#4780) 2021-02-01 21:30:46 +01:00
Kowlin
86fbead609
First attempt at issue templates. (#4779)
* Lets try this new fancy thing

* Rename command_bug.md to command_bug.yml

* Update command_bug.yml

* Cog name before command name, thank you

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-02-01 21:21:12 +01:00
jack1142
8139587e5e
Update d.py to 1.6.0, aiohttp to 3.7.3, Red-Lavalink to 0.7.2 (#4728)
* Bump d.py, aiohttp, Red-Lavalink

* Remove deprecation warnings that are no longer relevant

* Max concurrency things in `Command.prepare()`

* Two random things that date back to times older than d.py 1.1...
2021-02-01 14:49:50 +01:00
Danstr5544
d6de9c1b94
Add a way to reset rolepayday amounts (#4758)
* Add a way to reset rolepayday amounts

* Totally not fixing a typo...

* Jack found a Typo

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

* Max line length Compliancy

Thanks Jack (again lol)

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

* Including rolepaydayamount changes in docs

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-29 21:50:22 +01:00
bobloy
e24379973c
Add guild_only check to [p]command listdisabled guild (#4772) 2021-01-29 21:27:01 +01:00
Predeactor
2bffbd9001
[Core] Fix commands using plural with the same user (#4750)
* [Core] Fix commands using plural with the same user

Some plural checking have also been added to the local blocklist/allowlist and the wording has been revised.

* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* BLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACK

* the

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-29 19:03:24 +00:00
Dennis
51c17110ad
Wrap Red-DiscordBot[postgres] in quotes in Unix install docs (#4697)
* Docs: added brackets escape note for Linux/macOS installation

* Corrected punctuation for bracket escaping note

* Use quotes - those work on cmd, bash, zsh, and probably other shells

* Minimize the diff

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-29 19:39:46 +01:00
Vexed
577dbfddb6
Add a note in systemd guide saying working instance is required (#4769)
* [Docs] Add note about pre-existing Red instance to systemd

* lets actually not just copy paste...
2021-01-28 17:18:02 +01:00
MAX
c11e9afec7
[mod] Improve help of ban/kick commands. (#4715)
* better explain on how to use.

* i.... dont know why i removed that dot.

* don't think that was meant to

* Update kickban.py

* smh

* style????

* hm?

* last try to fix style......

i dont even know how to do this :/

* failing style is fun, trynna learn.

* .....

* not the best way but lets try?

* yep, didnt work dropping softban.

* Update kickban.py

* grammar fix
2021-01-23 21:18:29 -05:00
jack1142
991cd46ea3
Add non-generic message when loading a cog with command name that is already registered (#3870)
* Add non-generic message when loading a cog with command name that is already registered

* Use regex instead and add i18n support

* This requires d.py 1.4
2021-01-23 13:49:03 -07:00
jack1142
ad48ef6efd
Add filterhit case type to Filter (#4739)
* Add `filterhit` case type to Filter

* Wrong `__init__.py` :|
2021-01-23 13:36:53 -07:00
jack1142
69c8781cec
Fix log rotation in Red (#4738)
* Fix log rotation in Red

* Update regexes to only work with single digit suffixes
2021-01-23 13:04:03 -07:00
jack1142
db20cad395
Strip the reason from whitespace in Mutes cog (#4749) 2021-01-23 12:52:50 -07:00
TrustyJAID
e106dfaece
Add [p]listcases command and typing indicator to [p]casesfor (#4426)
* [ModLog] Add [p]listcases and typing indicator to casesfor

* weird

* Address review

* Update redbot/cogs/modlog/modlog.py

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-23 20:48:31 +01:00
Dav
aa0ee3385d
[Mutes] Add ability to send DMs on mute/unmute (#4563)
* handle manual mutes/unmutes

Doing this in the Web-Editor is painful. Let's switch to VSC.

* embed version

* non embed

* config stuff

* testing done

* wow black

* Few things before I start local testing

* Fix new lines

* Make messages not depend on modlog

* Yay voicemutes

* black+import

* what is your ducking problem vscode

* adress review

* this is driving me mad

* Check the config in `_send_dm_notification` to avoid code repetition

* Fix incorrect type hints

* Remove no longer needed line changes

* Remove unused function

* Update the type hints from commit 946299 in the MixinMeta too

* Fixed wrong variable being passed to the method and ensure DMs aren't sent when we couldn't get the member object

* They call me dumb for a reason

* Stop overriding variable with duration + various formatting tweaks

* :(

* We need to differ between voice and text in two places, interesting...

* Show info about no reason provided in embed

* Apparently, the `reason` can also be an empty string :|

* Update redbot/cogs/mutes/mutes.py

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-23 11:29:18 +01:00
jack1142
2ce4a275fc
Fix command usage of [p]choose command (#4733)
* Fix usage in more commands with variadic required arguments

* Restore filter.py
2021-01-22 19:24:27 -05:00
Fabian H
e23d21ec08
Fixed grammatical mistake in allowlist_add. (#4748)
Changed:

            await ctx.send(_("Users has been added to the allowlist."))

to:

            await ctx.send(_("Users have been added to the allowlist."))
2021-01-22 18:25:46 +01:00
El Laggron
cc885090e6
Docstring fixes for dev env values (#4747)
* Docstring change for add_dev_env_value

* Same for remove_dev_env_value
2021-01-22 18:24:19 +01:00
El Laggron
9b97244f9f
[Dev] Customizable environment values (#4667)
* Make the dev env flexible

* Fix rst format in docstrings

* Reproduce current behaviour for _ in repl

* Prevent adding existing or reserved names

* Fix typo with environment

* Docstring changes

Apply suggestions from code review

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

* Get env before loop

* Hey I'm not the only one doing typos

* Keep new messages in env

* Clear exception of stack frames

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

* Include the `channel` variable in the reserved names

* And we're also missing `discord` :)

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-22 16:53:34 +01:00
Predeactor
7630e24822
[Core] Add plural forms in allowlist and blocklist commands (#4705)
* Plurial for blocklist/allowlist

* duh

* Apply suggestions from code review

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-22 02:56:07 +00:00
Lui
8dbabe24e0
[Streams] Use timezone-aware time (#4694)
* [Streams] Remove timezone replacement

* [Streams] Convert naive now time to UTC

* [Streams] Format with black
2021-01-21 16:29:54 +01:00
Lui
5b21d37571
[Streams] Change streamtypes log name (#4744) 2021-01-21 16:15:52 +01:00
bobloy
676f34185d
[Core] Add sensible character lengths to activity statuses (#4663)
* Add sensible character lengths

* Add translation function

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-21 13:41:28 +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
Fixator10
315b3e5c98
Add on_red_before_identify dispatch (#4647)
* add before_identify_hook with `on_identify` dispatch

* move before_identify_hook closer to other "hooks"

* add `red_` prefix to avoid potential conflict

* on_red_before_identify

Co-authored-by: Fixator10 <fixator10@users.noreply.github.com>
2021-01-21 10:20:20 +01:00
bobloy
41e980c517
Fix usage in [p]filter's commands, make commands consistent (#4599)
* Make *words a required argument.

* Also make delete consistant, and name not positional
2021-01-21 00:23:16 +01:00
Ryan
0358055cce
[Docs] Document pyenv workaround for pm2 (#4709)
* add pyenv specific fixes to pm2

* switch note to code-block

* forgot a new line
2021-01-21 00:12:58 +01:00
PredaaA
dcf7368e54
Show command aliases in help with setting to disable (#3040)
* Update help.py

* Create 3040.enhance.rst

* remove towncrier entry

* Make it i18n friendly.

* That was uneeded to change this actually.

* ...

* ..

* .

* Add a setting for aliases.

* DOTS

* Update redbot/core/core_commands.py

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

* Address requested changes maybe

* New format + changes requested.

* okay we'll get there someday

* honk

* aaaaaaaaaaaaaaa

* Black

* Fix missing humanize_timedelta import.

* style

* Two things from my very old pending review, see commit desc

```py
            valid_alias_list = [
                af
                for a in aliases
                if (af := f"{a}")
                and len(af) < 500
                and ((a_counter + len(af)) < 500)
                and (a_counter := a_counter + len(af))
            ]
```
^ This can be simplified:
```suggestion
            valid_alias_list = [
                alias
                for alias in aliases
                if (a_counter := a_counter + len(alias)) < 500
            ]
```
Although I think it would be somewhat clearer to use a `for` loop rather than a list comprehension (+ we can just `break` when there's not gonna be another alias that could fit in the list since it's sorted):
```suggestion
            valid_alias_list = []

            for alias in aliases:
                if (a_counter := a_counter + len(alias)) < 500:
                    valid_alias_list.append(alias)
                else:
                    break
```

* style *again*

* use qualified name of the parent command

* meh

* another meh

* Revert the last commit...

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
2021-01-20 23:40:27 +01:00
jack1142
4138410d33
Ensure no role hierarchy bypassing in Mutes (#4741)
* Ensure no role hierarchy bypassing on bad role configuration

* Do the same for `[p]muteset role`
2021-01-20 13:32:59 -07:00
jack1142
537656c365
Fix role position checks (#4740) 2021-01-20 13:32:43 -07:00
Dav
d7a3da49f0
[Mod] Make tempban not fail if no vanity url is set up (#4714)
* catch if a vanity url is not set up

* black

Co-authored-by: David Bauch <david.bauch@capgemini.com>
2021-01-17 23:42:00 +01:00
Grant LeBlanc
2b5d72c7a4
[Trivia] Add support for payout to multiple trivia winners (#4649)
* Add payout splitting for trivia game tie instances

* Add check for non-human players

* Apply suggestions from code review

* `pay_winner()` -> `pay_winners()`

* style

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-17 23:32:04 +01:00
Ryan
e4d24578b5
[Bank API] Cache global bank settings (#4723)
* cache global bank settings

* Make the global variable name clearer

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-17 23:08:59 +01:00
BreezeQS
2b72f9bb99
[Docs] Restructure of the Host List (#4710)
* Update hostlist

My first pr??

* Rephrase of unsupported warning

Exact reason for lack of container support added. Information about docker support added in case someone finds that repo and tries it.

* Remove azure from free list

Later found unreasonable to include it due to the 750 hours being spread across the entire year, ends up less than 24 hours a week.

* Oops

Fixed something that caused docs build to error

* Removal of extra space

Fix of spelling error noticed during review

Co-authored-by: bobloy <alboblexloy@gmail.com>

* Fix capitalization error

Idk if this was really necessary, but oh well

* Rephrase free tier note

* Rephrase docker warning

* Small changes

Added galaxygate and ramnode, removed contabo, rephrased a few things, added voice region tip.

* Small fix

Just realized i accidentailly removed Contabo

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

Co-authored-by: bobloy <alboblexloy@gmail.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2021-01-16 18:36:22 -05:00
bobloy
8d512e206a
[Docs] Filter Cog Guide (#4579)
* Add filter to index

* Initial generated docs

* Start on docstrings

* More docstrings

* Some more docstrings

* Rest of the doc strings

* Regenerate docs

* Remove unnecessary language. Move to one line.

* Regenerate docs

* Update redbot/cogs/filter/filter.py

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

* Update redbot/cogs/filter/filter.py

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

* Update redbot/cogs/filter/filter.py

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

* Update docs/cog_guides/filter.rst

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

* Update docs/cog_guides/filter.rst

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

* Update docs/cog_guides/filter.rst

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-16 02:10:45 +00:00
jack1142
19711d35b2
Update actions/labeler to use v3 version (#4730) 2021-01-13 04:16:07 +01:00
jack1142
1e1fff0d49
Someone can yell at me later... (#4729) 2021-01-13 04:03:26 +01:00
jack1142
21f75c0711
Fix the negation rules in labeler configuration (#4727) 2021-01-12 14:29:19 +01:00
Flame442
a2d0a364fe
Fix auto labeler error from invalid yaml -> json (#4719) 2021-01-10 00:31:07 +01:00
github-actions[bot]
b76b6305d1
Automated Crowdin downstream (#4703)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-01-07 17:26:35 +00:00
Kowlin
beedc6d2c7
[CI/meta] Add automatic labeling of changed files. (#4674)
* Theoretically this should work!

* Update .github/labeler.yml

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

* Update .github/labeler.yml

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

* Update .github/labeler.yml

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

* Update .github/labeler.yml

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

* Update .github/labeler.yml

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

* Update .github/labeler.yml

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

* *ughhh*

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-07 18:09:14 +01:00