Commit Graph

817 Commits

Author SHA1 Message Date
bobloy
c80a689927 Longer description of the cog 2021-02-23 17:29:37 -05:00
bobloy
8fd7d31000 Finish the rest of the docstrings 2021-02-23 15:29:45 -05:00
bobloy
777221dc54 Merge branch 'V3/develop' into cog_guide_core 2021-02-18 15:41:29 -05:00
bobloy
c83a0cd3bd Disabled message stuff was missed 2021-02-18 15:40:45 -05:00
github-actions[bot]
e80a00ec1b [i18n] Automated Crowdin downstream (#4829)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-16 19:22:05 +00:00
Andy
1be7435fb5 fix grammar issues (#4763)
in line 28, it used to be "The message will be send to the user", I fixed it to "The message will be sent to the user".

Co-authored-by: Andy <76832778+AndyButAnnoying@users.noreply.github.com>
2021-02-15 23:32:44 +01:00
Andy
9b4363eff3 grammar fixes (#4792)
* grammar fixes

* author(s)
2021-02-15 23:31:01 +01:00
jack1142
6cfaffb8a8 Add i18n deco to Dev and Mutes cog (#4815)
* Add i18n deco to Dev cog

* Add i18n deco to Mutes cog
2021-02-15 00:19:34 +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
jack1142
40368cc379 Fix changing default state for a cog as enabled/disabled (#4768)
* Fix changing default state for a cog as enabled/disabled

* Add `, None`
2021-02-13 17:24:42 -05: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
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
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
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
bobloy
16dfbd1149 Up to command disabledmsg 2021-01-29 16:30:52 -05:00
bobloy
e24379973c Add guild_only check to [p]command listdisabled guild (#4772) 2021-01-29 21:27:01 +01:00
bobloy
cacaf1c313 More docs 2021-01-29 14:14:56 -05: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
bobloy
f401499aff Up to default enabled cog 2021-01-28 19:05:13 -05:00
bobloy
610711299b Merge branch 'V3/develop' into cog_guide_core
# Conflicts:
#	redbot/core/core_commands.py
2021-01-25 17:17:06 -05:00
bobloy
5cfd3e1f9f Redo custominfo to not be terrible 2021-01-25 17:12:40 -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
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
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
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
537656c365 Fix role position checks (#4740) 2021-01-20 13:32:43 -07:00
bobloy
aee645523f Up to command defaultdisablecog 2021-01-20 15:02:42 -05:00
bobloy
b746d48bc0 Up to allowlist 2021-01-20 14:56:53 -05:00
bobloy
0d0b07a79d A little more contact 2021-01-20 14:56:53 -05:00
bobloy
0ff4da0050 tagline and contact 2021-01-20 14:56:53 -05:00
bobloy
da91f94406 spagetthi ctrl+v 2021-01-20 14:56:53 -05:00
bobloy
728e6e1d52 Maxpages and delete delay docstrings 2021-01-20 14:56:53 -05:00
bobloy
94a611726c Docstrings up to helpset pagecharlimit 2021-01-20 14:56:51 -05:00
bobloy
16316d0907 set activity statuses docstrings 2021-01-20 14:55:24 -05:00
bobloy
c5fce970e3 Bullet lists need blank lines. 2021-01-20 14:55:24 -05:00
bobloy
066953f1ac More docstrings into the set command 2021-01-20 14:55:24 -05:00
bobloy
172873f3e0 Some small docstrings 2021-01-20 14:55:24 -05:00
bobloy
c60d948cce Refix line lengths 2021-01-20 14:55:23 -05:00
bobloy
ad5e4fdbf8 "cog packages" for loads 2021-01-20 14:55:21 -05:00
bobloy
04fd00808e docstring semantics 2021-01-20 14:53:25 -05:00
bobloy
8d12fa60a7 Black formatting 2021-01-20 14:52:56 -05:00
bobloy
f789046a1b Up to load docstrings 2021-01-20 14:52:53 -05:00