Compare commits

...

676 Commits

Author SHA1 Message Date
Kreusada
6603cd1a86 Check attach_files permission inside send_interactive (#6552)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2025-05-25 17:04:35 -04:00
Kreusada
1daf56f3d8 Add Group.all method explanation to Config framework (#6550)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2025-05-25 14:48:47 -04:00
Kreusada
b3f0349ba2 [Docs] Update publishing cogs guide with [botname] substitution tip (#6539)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2025-05-25 14:39:02 -04:00
A Frozen Lake
bfc3561928 Fix formatting of [p]names. (#6538)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2025-05-25 14:33:28 -04:00
github-actions[bot]
8d8918b3c6 Version bump to 3.5.21.dev1 (#6571)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-03 16:13:01 +00:00
github-actions[bot]
550cf49bc8 Version bump to 3.5.20 (#6570)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-03 18:06:21 +02:00
Jakub Kuczys
313eeffc84 Red 3.5.20 - Changelog (#6569) 2025-05-03 15:42:37 +00:00
Jakub Kuczys
88e1f72467 Bump dependencies (#6568) 2025-05-03 16:35:33 +01:00
aikaterna
3c6146d6ca Bump YT plugin to 1.13.1 (#6566) 2025-05-03 17:30:26 +02:00
aikaterna
bfab9cc5f8 [Audio] Update application.yml generation for new sources (#6567)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2025-05-03 17:26:05 +02:00
github-actions[bot]
07ee31a88f Version bump to 3.5.20.dev1 (#6562)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-27 03:19:35 +02:00
github-actions[bot]
bd61c105e0 Version bump to 3.5.19 (#6560)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-27 03:01:18 +02:00
github-actions[bot]
db0e831a2e Automated Crowdin downstream (#6561)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-27 03:01:03 +02:00
Jakub Kuczys
d7a56f1518 Red 3.5.19 - Changelog (#6559) 2025-04-27 03:00:39 +02:00
Jakub Kuczys
5f2c6d19d1 Bump dependencies + drop F40, add F42 to support matrix (#6558) 2025-04-27 02:56:38 +02:00
Jakub Kuczys
7b3600ecb1 Bump YT plugin version to 1.13.0 (#6557) 2025-04-27 00:08:36 +00:00
github-actions[bot]
6f5f34c80a Version bump to 3.5.19.dev1 (#6546)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-26 20:15:13 +01:00
github-actions[bot]
2e902b067e Version bump to 3.5.18 (#6545)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-26 20:04:52 +01:00
Jakub Kuczys
61695daded Red 3.5.18 - Changelog (#6544) 2025-03-26 20:00:45 +01:00
Jakub Kuczys
10889642ce Bump dependencies (#6543) 2025-03-26 18:53:40 +00:00
Kreusada
a3b254fe8e [Audio] Bump YT source plugin version (#6542) 2025-03-26 19:52:00 +01:00
github-actions[bot]
71554c981d Version bump to 3.5.18.dev1 (#6535)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-08 20:45:09 +00:00
github-actions[bot]
e1225029b0 Version bump to 3.5.17 (#6533)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-08 21:37:30 +01:00
github-actions[bot]
85923d4c0f Automated Crowdin downstream (#6534)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-08 21:36:48 +01:00
Jakub Kuczys
19b34c63b2 Red 3.5.17 - Changelog (#6532)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2025-03-08 21:24:16 +01:00
Kowlin
60e819159f Bump d.py and Jinja2 (#6531) 2025-03-08 20:44:22 +01:00
Jakub Kuczys
0f4c7b0fe6 Bump deps (including d.py 2.5 bump) (#6529)
Co-authored-by: Kowlin <10947836+Kowlin@users.noreply.github.com>
2025-03-04 23:38:37 +01:00
aikaterna
3bf7c64d01 [Audio] Bump YT plugin version (#6530) 2025-03-04 22:57:52 +01:00
Karlo Prikratki
4558b72082 Fix YouTube upcoming stream's embed not being timezone-agnostic (#6527) 2025-02-15 23:33:15 +01:00
github-actions[bot]
73958d87f1 Version bump to 3.5.17.dev1 (#6522)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-06 02:44:41 +01:00
github-actions[bot]
d6054412f4 Version bump to 3.5.16 (#6520)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-06 02:36:23 +01:00
github-actions[bot]
5cf69bdc51 Automated Crowdin downstream (#6521)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-06 02:35:50 +01:00
Jakub Kuczys
2fd6ea88d9 Red 3.5.16 - Changelog (#6519) 2025-02-06 02:31:40 +01:00
Jakub Kuczys
50ad59a6c8 Catch TypeError when setting global locale (#6518) 2025-02-06 02:31:03 +01:00
Jakub Kuczys
dfc1e742f8 Handle invalid locale configuration graciously during startup (#6517) 2025-02-05 19:42:42 -05:00
github-actions[bot]
769c319ffd Version bump to 3.5.16.dev1 (#6516)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-03 02:13:08 +00:00
github-actions[bot]
3c1f2cddfd Version bump to 3.5.15 (#6514)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-03 02:43:09 +01:00
github-actions[bot]
1299db0f3a Automated Crowdin downstream (#6515)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-02-03 01:41:27 +00:00
Jakub Kuczys
c58d208ca2 Red 3.5.15 - Changelog (#6513) 2025-02-03 02:38:31 +01:00
Jakub Kuczys
c308ea0184 Bump dependencies and drop openSUSE Leap 15.5 (#6512) 2025-02-03 02:35:02 +01:00
Kowlin
8e0948d560 Truncate service names in [p]set api modal (#6502) 2025-02-01 18:36:37 -05:00
aikaterna
952a372652 [Audio] Bump YT plugin version (#6511) 2025-02-01 23:56:01 +01:00
Jakub Kuczys
a0c1713e78 Split public and private i18n APIs (#6022) 2025-01-26 19:33:06 -05:00
Jakub Kuczys
8b1daf1ad0 Move private things in modlog and redbot.core.errors (#6020) 2025-01-26 18:49:03 -05:00
Jakub Kuczys
dcdef9d798 Use build.jobs.install to avoid installing unnecessary deps (#6508) 2025-01-27 00:28:07 +01:00
Jakub Kuczys
f962aeb7b8 Split public and private config/driver APIs (#6024) 2025-01-26 18:25:53 -05:00
Jakub Kuczys
b13b1f8f16 Add explicit Sphinx config to .readthedocs.yml (#6507) 2025-01-27 00:10:10 +01:00
Jakub Kuczys
6bf2a88995 Single-source supported Java versions in Audio code (#6500) 2025-01-26 14:03:20 -08:00
Kowlin
22888f8014 Bump actions to V4 (#6504) 2025-01-07 20:41:17 +00:00
Jakub Kuczys
ba44370020 Add subnet masks in CIDR notation as answers to computers trivia (#6495) 2025-01-07 21:31:27 +01:00
Jakub Kuczys
cd0e8750c1 Allow usage of [p]audioset logs in DMs (#6499) 2024-12-28 16:48:24 -08:00
github-actions[bot]
679289fd1c Version bump to 3.5.15.dev1 (#6498)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-25 04:34:06 +00:00
github-actions[bot]
ce6489325e Version bump to 3.5.14 (#6496)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-25 05:25:15 +01:00
github-actions[bot]
d64cbdf83e Automated Crowdin downstream (#6497)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-25 04:24:55 +00:00
Jakub Kuczys
66d1c87b5a Red 3.5.14 - Changelog (#6493) 2024-12-25 05:20:47 +01:00
Jakub Kuczys
3888f09cfa Fix safety of `[p]repo list` (#6494) 2024-12-24 23:09:00 -05:00
Jakub Kuczys
8ad9c55d50 Bump dependencies and update OS matrix (#6492) 2024-12-24 19:54:56 +01:00
Glas
3aac07a4d7 Explain how to remove URL restrictions in the play error message (#6348)
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-12-24 15:22:02 +01:00
Kowlin
bd26e7d5af Fix permissions fetching for User Installable Bots (#6457)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-12-24 14:16:03 +00:00
Karlo Prikratki
9392077434 Allow passing multiple cogs to slash enablecog and slash disablecog (#6001)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2024-12-23 22:49:19 -05:00
Chovin
1f48919005 Add a separate timeout for Lavalink download (#6461)
Co-authored-by: chovin <chovin@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-12-24 04:08:49 +01:00
TrustyJAID
fdaa869130 [Help command] Utilize copy to clipboard (#6244)
Co-authored-by: Kreusada Ignad Amredes <67752638+Kreusada@users.noreply.github.com>
2024-12-24 03:23:26 +01:00
Michael Oliveira
18614b1604 Respect [p]bypasscooldowns in [p]slash sync (#6465) 2024-12-24 03:04:11 +01:00
Michael Oliveira
016684bcce Add methods for getting app command IDs/mentions from cache (#6278)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-12-24 03:02:16 +01:00
Kowlin
5cfb8edab8 ANSI formatting support (#5538)
Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
Co-authored-by: Vexed <vex@vexcodes.com>
Co-authored-by: Jack Tealey <67752638+Kreusada@users.noreply.github.com>
2024-12-24 01:20:42 +00:00
cdaman3141
150692538f Fixed [p]ban raising an unhandled error if an ID too large is provided (#6486)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-12-24 01:12:33 +00:00
TrustyJAID
f4ffc6bc80 Add support for SimpleMenu to use custom select options (#6480)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-12-24 02:00:41 +01:00
Kevin Wang
9419f2642a Allow enforcing reason to be filled in Mod cog commands (#6477)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-12-24 01:58:57 +01:00
Jakub Kuczys
f0a29e9815 Support [botname] substitutions in cog install messages too (#6491) 2024-12-23 19:18:36 -05:00
aikaterna
d29ae723c1 Bump YT plugin version (#6490) 2024-12-22 23:15:43 +01:00
Jakub Kuczys
9920628948 Bump YT plugin version and update LL server config (#6488) 2024-12-17 21:28:05 -08:00
Ascensionn
48b2fe77c0 [p]warn ask to ban when user not in server (#6481)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2024-12-08 13:42:22 -05:00
palmtree5
33e0eac741 Remove deprecated options from .pylintrc (#6462)
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2024-11-17 17:01:31 +00:00
Kyla
2871992772 Define view once inside menus.menu for button menus (#6472) 2024-11-17 16:24:30 +00:00
Seaswimmer
30058c0f73 Add links to the output of [p]repo list (#6284)
Co-authored-by: Seaswimmer <102361830+SeaswimmerTheFsh@users.noreply.github.com>
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2024-10-29 18:10:02 +00:00
Jakub Kuczys
4134881fae Optimize Trivia list loading (#6336)
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2024-10-29 17:58:28 +00:00
Lemon Rose
4396323205 [Trivia] Add non-punctuated alias (#5889)
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2024-10-29 17:46:58 +00:00
sravan
4e27059209 [Core] Add error handling when [p]load tries to load "locales" (#6466) 2024-10-20 16:20:29 -04:00
Jakub Kuczys
d3887b595f Fix release helper subcommands (#6451) 2024-09-15 02:49:04 +02:00
Jakub Kuczys
005b8af10a Update docs vars to work with RTD changes (#6410) 2024-09-11 05:32:36 +02:00
Kreusada Ignar Yadrak
d304da7a16 [Downloader] Support [botname] substitutions in cog install messages (#6443) 2024-09-11 05:32:18 +02:00
Kreusada
f3c89ad8bd Fix header utility docstring (#6444) 2024-09-02 00:51:14 +02:00
Kreusada
05cf9b7f39 Add header, hyperlink and subtext utilities (#6102)
Co-authored-by: Kowlin <10947836+Kowlin@users.noreply.github.com>
2024-09-01 21:40:12 +00:00
Jakub Kuczys
907a3f7561 Split out non-Python assets in Publish Release workflow (#6440) 2024-08-28 15:47:35 +02:00
Mellow
2595c9de10 [Trivia] Correct typos in World Cup trivia list for Golden Glove questions (#6441) 2024-08-27 18:02:53 +01:00
Jakub Kuczys
8be7b0850c Version bump to 3.5.14.dev1 2024-08-27 02:12:58 +02:00
Jakub Kuczys
61ec913789 Change Red 3.5.13 release date 2024-08-27 02:00:28 +02:00
Jakub Kuczys
88b11f2b9c Add missing perm to Publish Release workflow 2024-08-27 02:00:13 +02:00
Jakub Kuczys
9ca0ced2d8 Fix publish release workflow 2024-08-27 01:54:47 +02:00
github-actions[bot]
a5a178bfaf Version bump to 3.5.13 (#6438)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-27 01:22:52 +02:00
github-actions[bot]
eeb90aaa45 Automated Crowdin downstream (#6439)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-26 23:21:43 +00:00
Jakub Kuczys
b7a59b5e4c Red 3.5.13 - Changelog (#6437) 2024-08-27 01:12:13 +02:00
Jakub Kuczys
2769ea025f Bump dependencies (#6436) 2024-08-26 18:08:50 -04:00
aikaterna
818420a641 [Audio] Fix trying to send notify message with no channel object (#6429) 2024-08-26 19:53:30 +02:00
aikaterna
3c49a77e34 [Audio] Update Lavalink.jar and yt source build numbers (#6435)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-08-26 19:51:59 +02:00
Jakub Kuczys
90691ba2b9 Generate default LL server config and attach it to GH release (#6430) 2024-08-26 19:34:37 +02:00
Guyonsteroids
68f2806204 [Trivia] Correct Stephen to Steven (#6434)
Co-authored-by: Artemis6969 <82315185+Artemis6969@users.noreply.github.com>
2024-08-24 23:33:20 +02:00
github-actions[bot]
903992f48a Version bump to 3.5.13.dev1 (#6428)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-08 04:25:02 +02:00
github-actions[bot]
e4b75f5333 Version bump to 3.5.12 (#6426)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-08 04:11:33 +02:00
github-actions[bot]
254d5a91d6 Automated Crowdin downstream (#6427)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-08 02:11:20 +00:00
Jakub Kuczys
b979a7c4d1 Red 3.5.12 - Changelog (#6425) 2024-08-07 19:08:08 -07:00
aikaterna
54a29174ea [Audio] Update yt source version (#6424) 2024-08-07 22:38:46 +02:00
aikaterna
5bbced5b0d [Audio] Fix llset secured (#6423) 2024-08-07 22:36:27 +02:00
github-actions[bot]
5b21c89505 Version bump to 3.5.12.dev1 (#6421)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-04 22:07:27 +00:00
github-actions[bot]
04d856cfb0 Version bump to 3.5.11 (#6419)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-08-04 23:54:31 +02:00
github-actions[bot]
701339f8a1 Automated Crowdin downstream (#6420)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-04 23:51:49 +02:00
Jakub Kuczys
3d04d696c1 Red 3.5.11 - Changelog (#6418) 2024-08-04 23:47:44 +02:00
Jakub Kuczys
0b8bcef86c Bump dependencies (#6417) 2024-08-04 23:37:47 +02:00
Kowlin
2d47d75919 Fix unmuting when a mod isn't a mod anymore. (#6411)
Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>
2024-08-04 23:01:34 +02:00
Jakub Kuczys
7eb26da647 Bump YT source plugin version to 1.5.1 and add custom plugin config (#6415) 2024-08-04 12:33:59 -07:00
Kowlin
699471f27a Forcefully shutdown RPC to prevent hangs (#6412) 2024-08-04 21:28:17 +02:00
Jakub Kuczys
2c2080df12 Set ProcessType in macOS auto-restart service to 'interactive' (#6416) 2024-08-04 12:19:28 -07:00
anopem
fa7236af63 Get viewer count from stream data instead of user profile data (#6413) 2024-07-21 13:08:22 -08:00
Ryan
601816abc0 Allow SimpleMenu to delete ephemeral responses (#6304) 2024-07-18 23:35:52 +02:00
Lemon Rose
bf8c0d03b5 [RedTree] add UserFeedbackCheckFailure for app_commands (#6397)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-07-12 13:30:22 -04:00
Jakub Kuczys
2e40ec4a1a Use PEP 508's req @ url syntax instead of deprecated egg fragments (#6408) 2024-07-12 18:08:43 +02:00
github-actions[bot]
9b9fdf555b Version bump to 3.5.11.dev1 (#6406)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-11 01:20:16 +02:00
Jakub Kuczys
7dee8d7963 Last-minute changelog fixes 2024-07-11 01:11:18 +02:00
github-actions[bot]
0281d6c93e Version bump to 3.5.10 (#6404)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-11 01:03:12 +02:00
github-actions[bot]
f4c8077268 Automated Crowdin downstream (#6405)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-11 01:02:52 +02:00
Jakub Kuczys
7b8acd7ef6 Red 3.5.10 - Changelog (#6403) 2024-07-11 00:42:52 +02:00
Jakub Kuczys
6ee976c341 Bump dependencies (#6402) 2024-07-10 17:47:46 -04:00
Michael Oliveira
0b0b23b971 Fix @commands.can_manage_channel always passing (#6398) 2024-07-10 20:41:24 +02:00
Jakub Kuczys
2b1e603124 Bump d.py version to 2.4.0 (#6401)
Co-authored-by: Ryan <yamikaitou@gmail.com>
2024-07-10 20:36:47 +02:00
Jakub Kuczys
dd61b669b0 Use YouTube source plugin over the deprecated built-in source (#6373)
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2024-07-10 07:13:23 -07:00
Michael Oliveira
57b76bc0d7 Fix info.json keys in approved CC guide (#6382) 2024-07-10 14:53:40 +02:00
Seaswimmer
573e5c2b40 Docs: remove Atom from the list of recommended editors (#6388) 2024-07-10 14:45:36 +02:00
Jakub Kuczys
ad1e1aa2ba OS support spring cleaning spree (#6386) 2024-06-30 21:11:02 +02:00
TrustyJAID
4242a7adf2 Fix an issue with autocomplete in ignored channels/servers (#6375) 2024-05-06 19:53:37 -04:00
Jakub Kuczys
e03f97d1cd Update macOS instructions to use default cask (#6368) 2024-05-04 14:18:31 -07:00
Jakub Kuczys
975c0007fe Add Ubuntu 24.04 instructions + support for Fedora 40 (#6364) 2024-04-29 01:22:56 -04:00
github-actions[bot]
bef3aa5f69 Version bump to 3.5.10.dev1 (#6363)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-21 02:12:28 +00:00
github-actions[bot]
cbf8247e6e Version bump to 3.5.9 (#6361)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-21 04:04:51 +02:00
github-actions[bot]
23c86d7850 Automated Crowdin downstream (#6362)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-21 04:04:35 +02:00
Jakub Kuczys
aa21091b84 Red 3.5.9 - Changelog (#6359) 2024-04-21 03:58:37 +02:00
Jakub Kuczys
72ec88aa3c Fix humanize_timedelta() docstring to account for negative values (#6360) 2024-04-20 21:55:33 -04:00
aikaterna
b1f331e51f [Audio] Update Lavalink.jar build (#6358) 2024-04-21 03:04:51 +02:00
TrustyJAID
0c9c210dbb Prevent OverflowError from very large timedeltas in Mutes (#6353) 2024-04-21 03:01:28 +02:00
Jakub Kuczys
47d4675f52 Fix error message edge case in parse_timedelta (#6357) 2024-04-21 00:27:40 +02:00
aikaterna
80d0bab29a Update Lavalink repo links to new lavalink-devs org owner (#6356) 2024-04-21 00:12:02 +02:00
Jakub Kuczys
e61327a65c Fix potential API compatibility issue in parse_timedelta() (#6355) 2024-04-20 23:42:20 +02:00
Zephyrkul
11ebd40dfa Fix TimedeltaConverter allowing negative values by default (#6354)
Co-authored-by: zephyrkul <zephyrkul@users.noreply.github.com>
2024-04-20 23:17:38 +02:00
Zephyrkul
00e41d38f9 Improve timedelta conversions (#6349)
Co-authored-by: zephyrkul <zephyrkul@users.noreply.github.com>
2024-04-14 12:58:00 -06:00
Zephyrkul
afb4f6079a humanize_timedelta improvements (#6350)
Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>
Co-authored-by: zephyrkul <zephyrkul@users.noreply.github.com>
2024-04-14 12:56:42 -06:00
Louis Dominic
97b467939c Increase default timeout for ctx.send_interactive to 60 (#6352) 2024-04-11 21:18:40 -08:00
TrustyJAID
f54499eaba Increase default timeout for send_interactive to 60 (#6346) 2024-04-04 20:21:05 +02:00
gip
f8d6bbb0af Added discord timestamps (#6264)
Co-authored-by: palmtree5 <3577255+palmtree5@users.noreply.github.com>
2024-04-03 23:32:15 -08:00
github-actions[bot]
24afd61a85 Version bump to 3.5.9.dev1 (#6345)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-01 02:18:15 +00:00
github-actions[bot]
8e118733ea Version bump to 3.5.8 (#6343)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-01 04:05:22 +02:00
github-actions[bot]
f01c0ec675 Automated Crowdin downstream (#6344)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-01 02:04:48 +00:00
Jakub Kuczys
94d12cb45f Red 3.5.8 - Changelog (#6338) 2024-04-01 04:01:25 +02:00
Jakub Kuczys
e9ed52cf16 Fix placement of empty Trivia list check (#6335) 2024-03-31 21:11:00 -04:00
Jakub Kuczys
194dea545d Update Mutes docs with timeout changes (#6341) 2024-04-01 03:00:53 +02:00
aikaterna
59400204e8 [Trivia] Fix descriptions on Star Wars and Star Trek (#6342) 2024-04-01 02:45:34 +02:00
aikaterna
1c863c7b3b [Audio] Update Lavalink.jar build (#6340) 2024-04-01 02:11:11 +02:00
TrustyJAID
ad9e00d1d9 Menuify [p]activemutes command (#6266) 2024-04-01 02:06:38 +02:00
TrustyJAID
463f0c5e6d Add support for timeouts to Mutes cog (#5604)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2024-04-01 02:05:37 +02:00
Jakub Kuczys
e71312ede0 Update LL version stringification and make parsing stricter (#6334) 2024-03-31 14:26:36 -07:00
Kreusada
48d74712bc Implement [p]trivia info and add DESCRIPTION to trivia schema (#5897)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-03-31 03:11:17 +02:00
Jakub Kuczys
c3a493a500 Bump dependencies (#6333) 2024-03-30 17:56:11 -04:00
Jakub Kuczys
4034ddd452 Add Amazon Linux 2023 install guide (#6331) 2024-03-30 17:20:07 -04:00
Jakub Kuczys
2ae1eb9ec9 Ask for confirmation when path passed to addpath seems incorrect (#6330) 2024-03-27 00:57:47 -04:00
github-actions[bot]
0b390fe2f6 Version bump to 3.5.8.dev1 (#6328)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-24 01:07:22 +01:00
github-actions[bot]
b2e7458353 Version bump to 3.5.7 (#6326)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-24 00:33:29 +01:00
github-actions[bot]
6adb7e6de7 Automated Crowdin downstream (#6327)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-23 23:31:24 +00:00
Jakub Kuczys
1756593785 Red 3.5.7 - Changelog (#6325) 2024-03-23 19:27:42 -04:00
Karlo Prikratki
c3b96b7a9e Update image formats listed as supported by set bot avatar (#6323)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-03-24 00:21:30 +01:00
Jakub Kuczys
a26b9d6d3a Fix behavior of the menu() function calls without user param (#6324) 2024-03-23 16:16:44 -07:00
Jakub Kuczys
76c2c75f2c Fix release helper not considering workflow status (#6320) 2024-03-24 00:14:31 +01:00
github-actions[bot]
afabc4769d Version bump to 3.5.7.dev1 (#6319)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-22 01:06:06 +00:00
github-actions[bot]
b5e6231408 Version bump to 3.5.6 (#6317)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-22 01:58:11 +01:00
github-actions[bot]
de1141af98 Automated Crowdin downstream (#6318)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-03-22 01:56:41 +01:00
Jakub Kuczys
24cc3115fe Fix missing Crowdin CLI bump for Prepare Release workflow (#6316) 2024-03-22 01:42:49 +01:00
Jakub Kuczys
a3e371e0ab Red 3.5.6 - Changelog (#6314)
Co-authored-by: palmtree5 <3577255+palmtree5@users.noreply.github.com>
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2024-03-21 20:36:35 -04:00
Jakub Kuczys
bc76d53cd5 Update Crowdin CLI to v3 (#6313) 2024-03-21 23:14:46 +01:00
Jakub Kuczys
273ad147c8 Bump dependencies (#6312) 2024-03-21 19:28:21 +01:00
aikaterna
3a81e8327f [Audio] Update Lavalink.jar build (#6305) 2024-03-18 01:38:00 +01:00
Auguste Charpentier
8c2976504a Add user param to menu() (#4913)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-03-18 01:35:53 +01:00
Michael Oliveira
4c7a691ec9 Add note to refresh client after syncing slash commands (#6298) 2024-03-18 01:29:17 +01:00
Michael Oliveira
f5011a90e1 Fix editrole color (#6270) 2024-03-18 01:17:12 +01:00
Jakub Kuczys
0c83fcd495 Add explicit mention of word 'provisional' for version guarantee exclusions (#6311) 2024-03-17 20:15:17 -04:00
Jakub Kuczys
293d8065ec Remove traceback suppression from buttonized menu() (#6310) 2024-03-17 18:53:06 -04:00
Jakub Kuczys
a30f9ff7e6 Update install guides with new OS support matrix (#6309) 2024-03-17 18:13:43 -04:00
Blizzard the Wolf
edfb9ffe62 Update ModLog to include info about [p]modlogset (#6300) 2024-03-05 19:45:22 +00:00
Glas
f5f684bad5 [General] Update lmgtfy to our own fork of NatoBoram/lmgtfy (#6269) 2024-03-03 16:56:48 -05:00
Lemon Rose
9dc7462d0f Prohibit zero-length prefixes in [p]set [server]prefix (#6013)
Co-authored-by: Kreusada Ignad Amredes <67752638+Kreusada@users.noreply.github.com>
2024-02-27 15:18:33 +00:00
Jakub Kuczys
9345b691b3 Ask for confirmation before setting prefix on first-time setup (#6287)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2024-02-26 18:15:07 -05:00
Kreusada Ignad Amredes
185b607544 Fix markdown formatting in [p]streamalert list (#6292) 2024-02-26 18:09:36 -05:00
Michael Oliveira
ff09713aad Fix edge case where perm names are not validated in custom Red decos (#6291) 2024-02-11 10:42:25 +01:00
Dav
dbd71db6a8 [Help] Send menus to dm if maxpages is 0 (#5375)
Co-authored-by: Dav <dav@mail.stopdavabuse.de>
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2024-01-19 15:06:14 -05:00
yeetbruises
409ece427f Add a start_dm option to SimpleMenu (#6286)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-01-14 22:17:19 -05:00
goettner
569840e9e6 [Alias] Aliased commands retain newlines (#4656)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2024-01-08 19:34:48 -05:00
Michael Oliveira
a393a10ceb Fix spelling mistake in [p]slash sync error (#6285) 2024-01-08 01:31:35 +01:00
aikaterna
531b4fe357 Humanize number fix (#6283)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2024-01-03 19:13:26 -05:00
Kreusada Ramicario
47a267b38b [Help] Allow prefix formatting in taglines (#4972)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2024-01-01 23:25:02 -05:00
Michael Oliveira
d322d91a18 [Audio] Fix attachment suffix reading on playlist upload w/ urllib (#6280) 2023-12-29 13:11:27 -08:00
Zephyrkul
76abb7cab2 [modlog] Use new audit log event (#5970)
Co-authored-by: zephyrkul <zephyrkul@users.noreply.github.com>
2023-12-26 17:06:48 -05:00
Jan
ecccea6781 Detect git authentication failure (#5420)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2023-12-23 19:23:39 -05:00
michael-is-qcde
da8cabaf50 [Trivia] Add Doom trivia (#4803)
Co-authored-by: msaeo <no email available>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-12-23 19:01:30 -05:00
Kreusada Ramicario
3fd0afd87d Update FIFA World Cup trivia list with changes from 2022 tournament (#5931) 2023-11-12 16:23:24 -05:00
Jakub Kuczys
fef3fc19ca Fix AUTHOR field in startrek trivia (#6267) 2023-11-06 23:23:48 +01:00
Jakub Kuczys
8997bf6002 Prefer force_registration=true in Config documentation (#6259)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2023-11-06 17:06:36 -05:00
Jacob Bowen
eb3267e332 Add startrek Trivia list (#2946)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
Co-authored-by: Kowlin <10947836+Kowlin@users.noreply.github.com>
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2023-11-06 21:49:41 +00:00
Jakub Kuczys
ca84cc9c2a Fix broken "Edit on GitHub" URLs in docs (#6258) 2023-11-06 16:00:36 -05:00
Lydia
6c4a5e5407 [General] Update LMGTFY link (#6255) 2023-11-06 15:57:55 -05:00
github-actions[bot]
7dfe24397e Version bump to 3.5.6.dev1 (#6252)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-14 20:51:50 +00:00
Jakub Kuczys
63359ce831 Fix changelog date 2023-09-14 22:43:25 +02:00
github-actions[bot]
6b81d80588 Version bump to 3.5.5 (#6250)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-14 22:02:52 +02:00
github-actions[bot]
97377a9f8d Automated Crowdin downstream (#6251)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-14 20:02:01 +00:00
Jakub Kuczys
56377b0596 Red 3.5.5 - Changelog (#6249)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2023-09-14 21:50:17 +02:00
Jakub Kuczys
4d4cb14725 Bump dependencies (#6248) 2023-09-14 21:36:34 +02:00
Jakub Kuczys
1132498f6c Fix [p]diagnoseissues edge case for commands without a cog (#6237) 2023-09-13 22:04:21 -04:00
Kreusada
5069f464cc Sort cogs alphabetically inside [p]cog list (#6215) 2023-09-14 01:35:59 +02:00
Jakub Kuczys
2157ed4f9b Fix formatting of nested result lists in [p]diagnoseissues (#6238)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2023-09-13 20:24:50 +00:00
MAX
ef098c8d02 fix the discord format in ban, kick and tempban (#6245)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2023-09-13 20:22:22 +00:00
Karlo Prikratki
64deccff5f [Streams] Switch to Twitch's newer follower endpoint (#6247) 2023-09-06 10:41:35 -08:00
Jakub Kuczys
d844c6f1f8 Bump Python versions in pyenv instructions (#6241) 2023-08-27 23:31:21 +02:00
Jakub Kuczys
9ef4271afa Use more restrictive tag pattern in publish release workflow (#6242) 2023-08-26 21:02:49 +02:00
github-actions[bot]
bb2e3687fc Version bump to 3.5.5.dev1 (#6235)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-12 16:38:51 +02:00
github-actions[bot]
979a6aa9eb Version bump to 3.5.4 (#6233)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-12 16:26:04 +02:00
github-actions[bot]
0747b92653 Automated Crowdin downstream (#6234)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-12 14:25:40 +00:00
Jakub Kuczys
47cc879b80 Red 3.5.4 - Changelog (#6232) 2023-08-12 16:19:24 +02:00
Auguste Charpentier
b6471797cc Remove type-breaking annotation on cog_i18n decorator (#6231)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-08-12 14:13:24 +00:00
Jakub Kuczys
742339a990 Bump dependencies (#6225) 2023-08-12 16:11:03 +02:00
aikaterna
e8c89d4d08 [Audio] Update Lavalink.jar build (#6221) 2023-08-12 04:50:43 +02:00
ADudeCalledLeo
483682dfb5 Fix Picarto channel avatar in Streams cog (#6230) 2023-08-12 04:50:10 +02:00
Jakub Kuczys
100de11ce6 Fix http errors for interaction deferring and message changes (#6229) 2023-08-11 02:51:36 +02:00
Jakub Kuczys
dbb91dfce8 Fix poor fuzzy results due to changes in rapidfuzz 3.0 (#6224)
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2023-08-09 22:03:21 -07:00
Jakub Kuczys
3ac2512c14 Fix local search's issue with bad escapes causing non-local playback (#6223) 2023-08-09 20:50:44 -07:00
Predä
a06a704365 Make use of dpy commands.Range on set status commands (#6227) 2023-08-10 03:15:41 +02:00
Predä
9e23c3a5b8 Add custom status support (#6226)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-08-10 02:45:24 +02:00
Jakub Kuczys
1248927fb6 Update supported versions in the security policy (#6222) 2023-08-06 19:29:51 +02:00
github-actions[bot]
93b51acf31 Version bump to 3.5.4.dev1 (#6213)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-24 21:40:32 +02:00
github-actions[bot]
7e03756f06 Version bump to 3.5.3 (#6211)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-24 20:16:02 +02:00
github-actions[bot]
d04cc36bc6 Automated Crowdin downstream (#6212)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-07-24 20:15:23 +02:00
Jakub Kuczys
6fbcdfc74a Red 3.5.3 - Changelog (#6210)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2023-07-24 20:06:42 +02:00
Jakub Kuczys
7e05bec6a0 Include instance name in the instance not found error (#6206) 2023-07-24 14:00:23 -04:00
Jakub Kuczys
6f920daeed Improve unreleased Command.is_enabled() and document related methods (#6209)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2023-07-23 21:12:33 -04:00
Jakub Kuczys
df7bbe5b55 Add changelog to PyPI project URLs (#6207) 2023-07-24 00:41:23 +02:00
Jakub Kuczys
8e1b906012 Bump dependencies (#6185) 2023-07-23 23:14:36 +02:00
Jakub Kuczys
ba210bd08e Use action='extend' for all multi-argument cli flags (#6200) 2023-07-19 22:47:38 +02:00
Jakub Kuczys
d8e584b5e8 Fix CancelledError handling in done callbacks of cog init tasks (#6203) 2023-07-19 22:45:44 +02:00
Jakub Kuczys
bad23a4a93 Ensure bot doesn't indefinitely hang on an exception in on_ready (#6202) 2023-07-19 22:44:38 +02:00
Zephyrkul
48cfde7b8c Fix _ValueCtxManager.__await__ typehint (#6163)
Co-authored-by: zephyrkul <zephyrkul@users.noreply.github.com>
2023-07-19 22:13:54 +02:00
Kreusada
8ee3ac9352 [Cleanup] Fix [p]cleanup self inside DMs (#6197) 2023-06-29 06:06:44 +02:00
Jakub Kuczys
9c85917dad Handle exception chaining and groups in Dev's traceback handling (#6178) 2023-06-22 01:42:01 +02:00
Jakub Kuczys
fdcbe00143 Include command-line arguments in debuginfo (#6164)
Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>
2023-06-22 01:15:40 +02:00
TrustyJAID
7dff136937 Add ConfirmView utility (#6176)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-06-21 10:47:47 -06:00
Jakub Kuczys
49bf103891 Update the Lavalink version parsing and add tests for it (#6093) 2023-06-21 15:52:00 +02:00
Om
41204ccf77 Pass timeout to SimpleMenu (#6173) 2023-06-20 23:18:58 +02:00
AAA3A
b1c3b37235 Clear the view in [p]set api after timeout (#6166) 2023-06-20 13:09:01 +02:00
Jakub Kuczys
4dc7efab29 Hide diffs for .po files by default (#6168) 2023-06-20 12:38:20 +02:00
aikaterna
85cf0f52d9 Update Audio terminology in LICENSE (#6193) 2023-06-20 12:00:01 +02:00
Jakub Kuczys
8acc1c3e02 Support and switch to Java 17 everywhere except CentOS 7 (#6190) 2023-06-20 11:29:50 +02:00
Jakub Kuczys
be5751a7ea Handle empty name case when splitting description field in help (#5941) 2023-06-19 14:15:34 +02:00
AAA3A
30dc128c39 Shorten max page size in [p]slash list to account for box size (#6167) 2023-06-19 14:02:33 +02:00
Jakub Kuczys
3b92c225ac Add a usage example to get_end_user_data_statement_or_raise() (#6171) 2023-06-19 14:00:55 +02:00
Draper
9d04f17cd2 Add an option to auto-use default HTTP(S) port for Lavalink (#5629)
Co-authored-by: Jakub Kuczys <me@jacken.men>
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2023-06-19 13:56:59 +02:00
Kreusada
31700a226e Fix NUMBER_EMOJIS breakages inside Audio (#6170)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-06-19 13:44:51 +02:00
Jakub Kuczys
dc94c96c9e Drop Fedora 36, RHEL 8.4, Ubuntu 18.04 + extras (#6189) 2023-06-18 02:06:47 +02:00
Jakub Kuczys
10e09d6abc d.py 2.3 / pomelo changes (#6130)
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com>
2023-06-14 04:56:50 +02:00
Jakub Kuczys
3abf4cac05 Use backtracking resolver in pip-compile (#6184) 2023-06-12 19:08:27 +02:00
Michael Oliveira
9b7aa17564 Clarify requirements for delisting an approved cog (#6180)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-06-05 18:43:24 -04:00
Predä
f47d1dffb3 Use a SnowflakeList for Command disable instead of checks (#5552) 2023-05-17 21:33:04 +01:00
github-actions[bot]
edb3369169 Version bump to 3.5.3.dev1 (#6162)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-14 20:42:48 +00:00
github-actions[bot]
e8ce3d8682 Version bump to 3.5.2 (#6160)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-14 22:18:32 +02:00
github-actions[bot]
a59e73a605 Automated Crowdin downstream (#6161)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-14 22:17:45 +02:00
Jakub Kuczys
69cf604e0e Fix workflow completion watcher in release helper 2023-05-14 22:15:47 +02:00
Jakub Kuczys
1ec95beb56 Red 3.5.2 - Changelog (#6157) 2023-05-14 21:59:14 +02:00
Jakub Kuczys
1262921b17 Handle delete_after in interaction error handling for followup (#6159) 2023-05-14 21:55:10 +02:00
Michael Oliveira
8dfa5c2a86 Fix interaction docs example code (#6154)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-05-14 12:12:04 +02:00
Jakub Kuczys
327f2fed50 Bump dependencies (#6155) 2023-05-13 14:16:35 -04:00
Ryan Ramboer
6cd7a380f4 Update bad looking 'diff' code blocks with 'markdown' (#6152)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-05-13 19:21:27 +02:00
TrustyJAID
ecb60c0856 Fix menus passing PartialEmoji instead of str (#6143) 2023-05-13 18:14:42 +02:00
Jakub Kuczys
cbe50bf82e Use proper Parameter type in CustomCommands cog (#6149)
Co-authored-by: Jamie <31554168+flaree@users.noreply.github.com>
2023-05-13 16:55:10 +01:00
Jakub Kuczys
a2132ad0a5 Add global prefixes to debuginfo (#6153) 2023-05-13 16:45:25 +01:00
Vexed
2386b8363f Fix visual issues with Discord's new Markdown (#6101)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-05-13 12:39:57 +02:00
Jakub Kuczys
7f820dab0c Fix max heapsize calculation on 32-bit platforms (#6150) 2023-05-12 16:51:59 -07:00
Karlo Prikratki
5893d590a7 Fix NoneType error and channelmute saying user is already muted (#6144)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-05-12 21:54:10 +02:00
Karlo Prikratki
59216e2632 Fix set serverprefix docstring and update its docs (#6004)
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2023-05-12 21:33:34 +02:00
Jakub Kuczys
31b975eecc Address change in behavior of bool(Permissions()) on d.py 2.x (#6148) 2023-05-12 14:02:41 -04:00
Jakub Kuczys
2369017f6a Add data_manager.instance_name() public API (#6146) 2023-05-12 11:53:53 +01:00
Jakub Kuczys
91f19c7410 Make mentions of x86-64-v2 accurate for AMD (#6147) 2023-05-12 11:04:18 +01:00
Jakub Kuczys
70ca8ff1f4 Add snippet numbers to filenames in the Dev cog to fix exception formatting (#6135) 2023-05-11 18:27:19 -04:00
Jakub Kuczys
e7d7eba68f Fix the bot starting when using --debuginfo (#6131) 2023-05-11 16:55:13 -04:00
Jakub Kuczys
1d828c447c Update documentation with x86-64-v2 changes (#6141) 2023-05-11 00:33:47 -04:00
Ben Armstrong
66fe981ea8 Include vendored menus update for guild attribute (#6139) 2023-05-10 17:11:20 +02:00
github-actions[bot]
41d89c7b54 Version bump to 3.5.2.dev1 (#6128)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-04 08:45:55 +02:00
github-actions[bot]
30d452b311 Version bump to 3.5.1 (#6126)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-05-04 08:27:53 +02:00
github-actions[bot]
c52ef73097 Automated Crowdin downstream (#6127)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-04 08:22:59 +02:00
Jakub Kuczys
d3310f80fa Red 3.5.1 - Changelog (#6125)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-05-04 08:20:46 +02:00
Jakub Kuczys
d7455ff568 Include --no-cogs flag in Updating Red document (#6123) 2023-05-04 08:16:36 +02:00
Jakub Kuczys
b52f7ede46 Fix ValueError on bot startup when update is available (#6124) 2023-05-04 08:16:11 +02:00
github-actions[bot]
1d654c2edc Version bump to 3.5.1.dev1 (#6122)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-04 07:44:35 +02:00
github-actions[bot]
a04fb84ffd Version bump to 3.5.0 (#6118)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-04 06:26:43 +02:00
Jakub Kuczys
5f4b0e853e Fix issues with channel unmutes for mute data from 3.4.x (#6121) 2023-05-04 06:22:54 +02:00
Jakub Kuczys
c541425b57 Mention bank cog in Read before updating section for 3.5 (#6120)
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2023-05-04 05:40:03 +02:00
github-actions[bot]
7b80043d19 Automated Crowdin downstream (#6119)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-05-04 03:04:41 +02:00
Flame442
b3fd90ae4c Red 3.5.0 - Changelog (#6106)
Co-authored-by: Jakub Kuczys <me@jacken.men>
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2023-05-04 02:53:02 +02:00
Jakub Kuczys
525c3885cd Fix broken links to d.py's docs pages (#6117) 2023-05-03 16:32:25 -07:00
Jakub Kuczys
ba1bf23363 Remove unused ConversionFailure (#6113) 2023-05-03 23:49:12 +02:00
Jakub Kuczys
970f8a7a1e Bump dependencies (#6100) 2023-05-02 20:35:08 -04:00
Jakub Kuczys
8996aee7fb Fix shutdown handling failing when exit code is not ExitCodes instance (#6112) 2023-05-02 20:25:35 -04:00
Jakub Kuczys
af307377ad Update exit codes in the autostart doc for Windows (#6111) 2023-05-02 20:08:09 -04:00
Jakub Kuczys
0cc9bccb86 Drop Debian (not RPi OS) 10, add Fedora 38 and Ubuntu 23.04 (#6110) 2023-05-02 19:07:53 -04:00
Jakub Kuczys
2fe251ecf3 Port TiV changes applied to voice channels to stage channels (#6109) 2023-05-02 19:05:44 -04:00
Jakub Kuczys
f1439a37c8 Add Incompatible changes document (#5603)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-05-02 18:04:17 -04:00
Jakub Kuczys
b7c710ac04 Make it possible to set slowmode in stage/voice channels (#6108) 2023-05-02 16:05:51 -04:00
Jakub Kuczys
6a53d7dcd5 Add checks submodule to redbot.core.app_commands (#6107) 2023-05-02 10:50:55 -04:00
Jakub Kuczys
4edf975996 Merge pull request #6099 from Jackenmen/bump_black
Reformat with Black 2023 formatting changes
2023-05-02 00:55:19 +02:00
Jakub Kuczys
3de5b56216 Bump Black and its deps 2023-05-02 00:52:02 +02:00
Jakub Kuczys
226d8d734d Reformat with Black 2023 formatting changes 2023-05-02 00:51:29 +02:00
Flame442
6cef8408e8 Fix help breaking when removing a command without removing its cog (#6104) 2023-04-28 02:01:46 +02:00
Kowlin
2abafbcc10 Add guide for slash commands (#6008)
Co-authored-by: Jamie <31554168+flaree@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-27 18:51:11 -04:00
Vexed
db1892da65 Fix AttributeError from slash command tree (#6103) 2023-04-27 22:20:18 +02:00
Jakub Kuczys
5fecff0779 Bump platformdirs to 3.x and remove the migration code for 2.x (#6098) 2023-04-25 07:29:10 +02:00
Jakub Kuczys
d8d4b4f15a Improve consistency of shutdown message across Python versions (#6095) 2023-04-24 14:29:51 -04:00
Jakub Kuczys
c6551f4bcc Suppress importlib 3.12 warning about load_module (#6094) 2023-04-24 14:09:18 -04:00
Flame442
ab8f00ae7b [Trivia] Fix string interpolation in test errors (#5955)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-21 01:52:56 +02:00
Jakub Kuczys
e2737a08d2 Stop manually adding category to automated PRs (#6089) 2023-04-20 15:43:36 +02:00
Jakub Kuczys
588fa19594 Red 3.4.19 - Changelog (#6082)
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-20 03:51:34 +02:00
Jakub Kuczys
1ed64949aa Add require_var_positional=True to [p]selfroleset add/remove (#6084) 2023-04-19 21:41:55 -04:00
aikaterna
0d284cabe9 Use the contributor list URL instead of the org in [p]info (#6079)
Co-authored-by: Kowlin <git@wyvern.blue>
2023-04-20 02:34:11 +02:00
aikaterna
e1f5d65d16 [Audio] Update Lavalink.jar build (#6033)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 21:32:56 +02:00
Jakub Kuczys
9681cac820 Bump Red-Lavalink to stable 0.11.0 (#6030) 2023-04-19 04:07:31 +02:00
Jakub Kuczys
f48f0bd1d1 Fix wrong extract location in Publish Release workflow (#6029) 2023-04-19 03:30:52 +02:00
aikaterna
f98db62b69 [Audio] Don't escape formatting on Playlist Enqueued message (#6025) 2023-04-17 18:39:10 -04:00
Jakub Kuczys
f051eae92d Privatize APIs by renaming or removing them from __all__ (#6021) 2023-04-17 17:44:33 -04:00
AAA3A
eafbb06756 Add public positive_int and finite_float converters (#5969)
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2023-04-17 22:33:44 +01:00
Samuel
fa305cb060 [Help] Optimisation on getting commands in Cog-help (#5354)
Co-authored-by: npc203 <npc203@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-16 17:17:10 -04:00
Jakub Kuczys
64c72e79b5 Switch the Publish Release workflow to use OpenID Connect (#6012) 2023-04-16 22:53:27 +02:00
Samuel
c2da29c93e Dispatch a cog unload event [on_cog_remove] (#5570)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-15 16:56:17 -04:00
Jakub Kuczys
67f4dd5201 Fix missing app_commands import (#6019) 2023-04-15 15:29:27 -04:00
Jakub Kuczys
2c4bd38ba1 Show source code in tracebacks sent by Dev cog commands (#5843)
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2023-04-15 10:30:19 +01:00
Flame442
aa51fd9ad1 Allow force enabling app commands using flag in extras (#6018) 2023-04-14 15:59:21 -06:00
Flame442
ccdd1ca892 Add global checks to app commands (#6015) 2023-04-14 15:58:02 -06:00
yuansheng1549
030607fb04 Add Traceback prompt (#5851)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-14 18:50:39 +02:00
Draper
896d5e9200 Remove deprecated checks in checks module (#6016) 2023-04-13 23:15:22 +02:00
Jakub Kuczys
d47c91cca8 Allow any Messageable in MessagePredicate's channel parameter (#5942)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-13 15:21:56 -04:00
Jakub Kuczys
145b2e43ce Allow any Messageable in MessagePredicate's channel parameter (#5942)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-13 15:21:36 -04:00
Jakub Kuczys
533f036ed2 Improve performance of pagify() (#5698)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2023-04-13 14:52:54 -04:00
Kreusada
79d11e947c Use the commands module instead of checks for permission decorators (#5463)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-13 14:16:12 -04:00
Jakub Kuczys
a70f444255 Add brew shellenv to shell profile in macOS install guide (#5993) 2023-04-13 12:48:47 -04:00
Jakub Kuczys
44e129bc66 Add redbot.core.app_commands namespace (#6006) 2023-03-27 20:49:59 -04:00
Kowlin
c79d0d723e Fix the handling of PartialMessageable channels (#6005)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-03-27 19:35:36 -04:00
Kowlin
0a5aa94cde Fix file endings (#6002) 2023-03-21 23:34:01 +01:00
Flame442
f06b734e15 Application Command Manager (#5992)
Co-authored-by: Danny <1695103+Rapptz@users.noreply.github.com>
2023-03-20 21:31:37 +01:00
Kowlin
b2e17775a0 Bump just Discord.py to 2.2.2 (#5998) 2023-03-20 17:59:06 +01:00
Kowlin
469b2de391 Drop the launcher (#5999)
Co-authored-by: palmtree5 <3577255+palmtree5@users.noreply.github.com>
2023-03-18 22:25:56 -04:00
Flame442
d597c35fff [Docs] Windows batch autostart docs (#5996) 2023-03-19 02:44:19 +01:00
Flame442
6774801649 Always allow licenseinfo to be run with a mention prefix (#5865)
Co-authored-by: Zephyrkul <23347632+Zephyrkul@users.noreply.github.com>
2023-03-18 22:32:52 +01:00
Dav
7c7e5edb19 [Modlog]Raise error instead of failing silently on invalid arguments (#5386)
Co-authored-by: Dav <dav@mail.stopdavabuse.de>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-03-18 17:31:28 -04:00
Vexed
2ab204438e Document setting overrides in Trivia list format (#5390)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-03-02 15:54:51 +01:00
Kreusada
8de6b97700 Add JSON Schema for Trivia Lists (#5565)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-03-02 15:43:55 +01:00
Tom Marcot
d9c46342d4 Fix typos issues (#5977)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-02-14 04:36:40 +00:00
Lioness100
a89a27cadf docs: fix typos (#5989)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-02-13 21:36:09 -05:00
Jakub Kuczys
9811e4e871 Fix labeler patterns for changelogs (#5987) 2023-02-13 00:17:51 +01:00
Jakub Kuczys
6c32ff58e4 Revamp of automatically applied PR labels (#5954)
Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2023-02-12 23:34:00 +01:00
aikaterna
7e7d5322b7 [Audio] Use more of the newer Managed/Unmanaged terminology (#5952)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-02-12 22:07:46 +01:00
Leet
e0c335eda2 [Trivia] Handle FileNotFoundError when adding a custom trivia list (#5950) 2023-02-03 13:52:43 -05:00
Jakub Kuczys
d0f22a7773 Fallback to asyncio's default exception handler when possible (#5813)
Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2023-01-31 11:02:49 -05:00
keqking
c390b89bd2 [Core] fix error in [p]ignore list (#5973) 2023-01-23 14:49:05 -05:00
Jakub Kuczys
2168585ee1 Improve changelog format (#5602)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2023-01-23 14:39:15 -05:00
Jakub Kuczys
794d486bc0 Bump OS version ranges - Fedora to <36, 37>, macOS to <11, 13> (#5974) 2023-01-19 11:54:37 +01:00
Jakub Kuczys
0358aabd1f Use newer RTD config syntax (#5774) 2023-01-15 17:01:13 +01:00
aikaterna
a13870b45f Remove llsetup alias for llset (#5953)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-01-14 15:33:03 +01:00
Lemon Rose
eda1288bea Add missing help descriptions for flags in redbot-setup (#5818)
Co-authored-by: Lemon Rose <japandotorg@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
Co-authored-by: Leet <36166244+leetfin@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-01-14 14:18:01 +00:00
Jakub Kuczys
f13d910f66 Disallow NaN and Infinity in Trivia CONFIG schema (#5949) 2023-01-02 06:13:12 +01:00
Vexed
b493103dcb Improve validation in trivia (#5947)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-01-02 05:24:27 +01:00
Jakub Kuczys
7db635a05b Change 'Managed' to 'External' in [p]llset secured's output (#5944) 2022-12-31 16:35:06 -08:00
Kreusada
b98156c589 Use usage attr to remove appended underscore for from_ parameter in [p]reorderpath (#5946) 2022-12-30 17:28:44 -05:00
Ryan
82e92a8dc3 Update enqueued track message to distinguish album from playlist (#5569)
Co-authored-by: aleclol <50505980+aleclol@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-12-30 04:48:44 +01:00
Predä
60a9d47003 Core - Add invoke error message customisation (#5894)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-12-30 04:43:37 +01:00
Jakub Kuczys
88a348210c Add support for sdists and git-archive to _get_version() (#5814)
Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-12-30 03:52:49 +01:00
Jakub Kuczys
fa6b2f8c10 Fix incorrect default argument value in [p]streamalert twitch (#5945) 2022-12-30 03:24:05 +01:00
Jakub Kuczys
519acedf46 Make some dependency changes, support Python 3.10 and 3.11 (#5611)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-12-30 03:21:57 +01:00
Karlo Prikratki
d3308af0e2 [Streams] Add toggleable button to stream alerts (#5856)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-12-29 20:18:26 +01:00
Karlo Prikratki
9b1171ea8c Use Discord's relative timestamps as command cooldown countdown (#5893)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-12-29 17:55:11 +01:00
Flame442
0e97c26b2d Test implicit subclass type conversion in config defaults/sets (#5874)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-12-29 06:50:18 +01:00
Honkertonken
19ebd02595 Change/Update casing in findcog command. (#5772)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-12-28 00:52:02 +01:00
Jakub Kuczys
99479342ea Fix ordering of 3.0.0.dev1 and 3.0.0a1.dev1 versions (#5932) 2022-12-27 17:22:56 -05:00
Kreusada
abb0101420 [CogManagerUI] Resolve core path under bot._cog_mgr.CORE_PATH (#5142)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-12-27 21:58:01 +01:00
Julien Mauroy
d9dd37b867 Remove multiple paths (#5859)
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-12-27 21:51:13 +01:00
Draper
1ab303bce7 Fix managed LL subprocess's stdout overflowing and deadlocking (#5903)
Signed-off-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-12-27 20:33:50 +01:00
Jakub Kuczys
43ab6e2ef5 Add missing empty line in error output of Trivia unit test (#5659)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-12-27 14:42:20 +01:00
Jakub Kuczys
14f142da2b Update installation URLs for Homebrew and Chocolatey (#5776)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-12-27 14:28:34 +01:00
Kowlin
f890f65c35 Updated excluded features (#5919)
Co-authored-by: Zephyrkul <23347632+Zephyrkul@users.noreply.github.com>
2022-12-27 11:29:05 +01:00
Predä
7af2ed13ec Update disable commands logic during cogs loading (#5550)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-12-26 19:29:54 -05:00
Jakub Kuczys
e88884edb6 Fix usage of file/folder names without suffix in Downloader (#5938) 2022-12-26 18:39:17 -05:00
sravan
f02491a092 Update intents screenshot (#5936) 2022-12-26 07:50:39 +01:00
Jakub Kuczys
e8c044a9bf Use different exit codes for critical errors vs configuration errors (#5674)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-12-25 16:27:07 -05:00
Kowlin
0e58897bfc Add SECURITY.md to the repo (#5929)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-12-25 14:40:35 +00:00
Flame442
9bfc3ecbce Fix tests badge in readme (#5934) 2022-12-25 15:25:40 +01:00
Kreusada
1c7178a10b Add automodule reference for the antispam module (#5641)
Co-authored-by: Jakub Kuczys <me@jacken.men>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-12-22 17:49:44 -05:00
Kowlin
3cb17116be Revert `mock and mockmsg` back to a guild_only state (#5926) 2022-12-22 17:41:52 -05:00
SnappyDragon64
eb613ea154 [Trivia] Who's that Pokemon? Generation VII and VIII trivia lists (#5890)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-12-19 00:44:01 -05:00
Dav
4dd496c67f [Modlog API] Stop modlog.get_case() from erroring if no modlog channel is set up (#5866)
Co-authored-by: Dav <dav@mail.stopdavabuse.de>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-12-18 19:23:57 -05:00
Lemon Rose
333e359bbb [Admin] add reasoning to addrole & removerole. (#5927)
Co-authored-by: Matt <psykzz@users.noreply.github.com>
2022-12-17 22:36:40 -05:00
MAX
fb3dc51fe2 [Docs] Update bot hosting list. (#5928) 2022-12-11 21:25:37 +01:00
Jakub Kuczys
f7c14b4321 Modernize packaging-related things in Red (#5924) 2022-12-09 18:50:37 +01:00
Kowlin
72172ff1cb Bump discord.py to version 2.1.0 (#5920) 2022-12-02 19:40:15 +01:00
AntonioNarra
b018a76b61 Core - #5891 Recovering Server Prefixes (#5918) 2022-12-01 18:58:11 -05:00
TrustyJAID
bbb15924b9 Allow send_interactive to upload a file containing all content (#5902)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-11-24 16:05:07 -05:00
Flame442
6c8b6eb71c [CustomCom] Fix [p]cc cooldown docstring & docs (#5914) 2022-11-23 01:37:20 +01:00
Kreusada
ed4f36a529 Add serverlock warning to [p]invite (#5898) 2022-11-17 18:11:56 -05:00
Ryan
1fbd6d854b [General] Fix [p]lmgtfy URL generation (#5909)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-11-17 17:22:44 -05:00
Jakub Kuczys
66f906c274 Update CODEOWNERS file with my new username (#5911) 2022-11-17 20:16:01 +01:00
Jakub Kuczys
4574f13ad5 Fix flaky CI caused by flake8's flakiness (GitHub migration) (#5910) 2022-11-17 19:58:24 +01:00
TrustyJAID
0580213cb6 Fix [p]helpset usemenus disable (#5907) 2022-11-15 23:56:56 -05:00
Jakub Kuczys
6023f9015c Restrict first/last character in instance name (#5680)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-11-13 22:50:02 +00:00
Visne
d5cdebcd76 Improve topography trivia (#5572)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-11-12 18:49:33 -05:00
Ankur Gupta
e864924acb Harrypotter questions (#5887)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
Co-authored-by: Lemon Rose <78662983+japandotorg@users.noreply.github.com>
2022-11-12 18:44:13 -05:00
Kowlin
86aed37769 Fix HTTPException in set api's send_modal (#5860)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-11-11 19:59:51 -05:00
Jakub Kuczys
51fa3f502e Remove bordered() utility function (#5692) 2022-11-11 15:37:49 +01:00
Jakub Kuczys
0f20f15c26 Stop using deprecated set-output GH Actions command (#5876) 2022-11-11 15:12:54 +01:00
Alex
3f749b840f fix usage/syntax info in command_audioset_autoplay_playlist docstring (#5592)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-11-01 12:33:21 -04:00
OofChair
6cda937ec2 [Modlog] Make modlogset cases docstring less vague (#5352)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2022-10-30 21:06:32 -07:00
Jakub Kuczys
0c35c9686b Add Lavalink version parsing (#5872) 2022-10-30 19:20:45 -07:00
Kreusada
236a10c464 [Docs] Audio Cog Guide (#5871)
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-10-30 18:43:19 -07:00
aikaterna
236d30f335 [Audio] Adjust docstrings (#5895) 2022-10-30 21:00:32 -04:00
AA
115083b18b Case-Insensitive SelfRole (#3865)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-10-30 18:00:21 -04:00
Kreusada
85288c1d06 [Docs] Dev Cog Guide (#5869)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-10-25 18:57:32 -04:00
Kreusada
cc5c31999d Document new [p]set usebuttons command (#5885) 2022-10-23 00:36:41 +02:00
Mark Heath
16465c8d83 Fix typo in league of legends trivia list (#5888) 2022-10-22 18:00:46 +02:00
Kreusada
86aff952f0 Update [p]helpset usemenus documentation with converter changes (#5886)
Co-authored-by: Kowlin <10947836+Kowlin@users.noreply.github.com>
2022-10-21 21:03:56 +02:00
Vexed
3be22b683c [Mod] Account for roles in mention spam (#5388)
Co-authored-by: Kowlin <10947836+Kowlin@users.noreply.github.com>
2022-10-20 18:56:40 +02:00
Kreusada Lavranocoyaskalas
a90974d659 Exclude files_from_attatch member from Tunnel automodule (#5778) 2022-10-16 21:13:11 +02:00
Jakub Kuczys
86c6f199b3 Get rid of localized guild feature list in serverinfo (#5830) 2022-10-13 14:04:57 +02:00
Jakub Kuczys
a3de616e4d Properly handle missing schemas/tables in PostgreSQL driver (#5855) 2022-10-13 13:38:43 +02:00
Kreusada Lavranocoyaskalas
a82c08c9d3 Add core/_debuginfo.py to labeler configuration (#5797) 2022-10-13 13:36:42 +02:00
Leet
fcbe37b956 [Docs] Use gender neutral language in remaining places where it isn't (#5873) 2022-10-13 13:34:14 +02:00
keqking
1cb5836db4 [cleanup] fix error in [p]cleanup spam command (#5879) 2022-10-13 11:57:41 +02:00
Leet
64e6044aba [Cleanup] Pass reason for bulk message deletion to audit log (#5863)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-10-12 23:02:37 +02:00
Kowlin
501c2b97dd Fix a lack of permission checks on usebuttons (#5878) 2022-10-12 20:40:49 +00:00
TrustyJAID
b0a3f00f41 Add global buttons to base menus (#5683)
Co-authored-by: Kowlin <10947836+Kowlin@users.noreply.github.com>
2022-10-12 22:13:33 +02:00
TrustyJAID
aaeb1b5daa Add buttons to help (#5634)
Co-authored-by: Zephyrkul <23347632+Zephyrkul@users.noreply.github.com>
Co-authored-by: Kowlin <10947836+Kowlin@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2022-10-12 16:29:10 +02:00
Kreusada Lavranocoyaskalas
4158244117 Use bot embed colour in [p]dm command (#5868) 2022-10-11 23:01:47 +02:00
Flame442
76c0ee243e [Mod] Hide config migration commands (#5870) 2022-10-11 22:57:18 +02:00
TrustyJAID
f8b0cc6c6a Add support for Hybrid commands in Red (#5681)
Co-authored-by: Kowlin <10947836+Kowlin@users.noreply.github.com>
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: Candy <28566705+mina9999@users.noreply.github.com>
Co-authored-by: Matt Chandra <55866950+matcha19@users.noreply.github.com>
Co-authored-by: Lemon Rose <78662983+japandotorg@users.noreply.github.com>
Co-authored-by: Honkertonken <94032937+Honkertonken@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
Co-authored-by: River <18037011+RheingoldRiver@users.noreply.github.com>
Co-authored-by: AAA3A <89632044+AAA3A-AAA3A@users.noreply.github.com>
Co-authored-by: Lemon Rose <japandotorg@users.noreply.github.com>
Co-authored-by: Julien Mauroy <pro.julien.mauroy@gmail.com>
Co-authored-by: TheThomanski <15034759+TheThomanski@users.noreply.github.com>
2022-10-11 22:52:43 +02:00
Honkertonken
7ff89302b2 [Trivia] Various typo fixes. (#5867) 2022-10-07 11:32:58 -04:00
Jakub Kuczys
1241ea165c Fix unintended moving *between* VCs when channel muting (#5854) 2022-10-03 18:11:37 +02:00
Jakub Kuczys
f02528378f discord.py 2.0 update (3d914e08->2.0.1) (#5709) 2022-10-03 16:07:15 +02:00
AlexRatman
d7d6ab46f4 Add missing period which caused ignore list to fail (#5850) 2022-09-17 20:23:50 +02:00
Jakub Kuczys
9d820234bb Fix Tunnel.message_forwarder's handling of >2000 strings (#5844) 2022-09-12 19:34:34 -04:00
Kreusada Tagiazala
cadcffbae5 [Dev] Fix __repr__() errors in REPL when referencing an instance of a class & catch Exception (#5794)
* initial fix (test)

* Replace instances of bare excepts by catching Exception
2022-08-22 20:32:02 -04:00
TheThomanski
6f04698013 Renamed the country of Turkey to Türkiye (#5795)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-08-22 19:31:30 -04:00
Julien Mauroy
d07eb0f7b2 fix: use correct typehint in Config.user's docstring (#5791)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-08-22 22:59:29 +00:00
Jakub Kuczys
008fb0f042 Red 3.4.18 - Changelog (#5829) 2022-08-15 12:55:08 +02:00
Jakub Kuczys
a32f10d758 Use the new ready line from LL dev build 1352+ (#5775)
* Revert "Wait for two 'Started Launcher' lines before connecting to managed LL (#5751)"

This reverts commit cf85a6470f.

* Use the new ready line from LL dev build 1352+
2022-08-14 12:03:48 -07:00
Jakub Kuczys
4daf81aa5b Bump Lavalink.jar version and update the default application.yml (#5823)
* Bump Lavalink.jar version

* Update the default Lavalink YAML file

* Let's add schema migration too...

* Fix migration (but still actually untested)
2022-08-14 19:57:15 +02:00
Jakub Kuczys
87a9c10369 Remove Temurin version pin on Windows (#5815) 2022-08-10 02:26:09 +02:00
Lemon Rose
4d1381d7c9 [General] show stage channels in [p]serverinfo 1 (#5785)
* [General] show stage channels in `[p]serverinfo 1`

* [General] Formatted with black

* fix black

* [General] Newline `\n` to match the current formatting.

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

Co-authored-by: Lemon Rose <japandotorg@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-08-08 19:55:43 -04:00
Kreusada Tagiazala
fb5f9b6498 Fix [p]set api docstring (#5807) 2022-07-26 20:54:09 +02:00
AAA3A
6ced7ba945 [Core] Add --unload-cogs cli flag. (#5802)
* [Core] Add `--unload-cogs` cli.

* Fixed error + Reformat.

* At @Jack1142's request, the `packages` local variable is no longer a list, but a dictionary with `None` values, to avoid duplication.

* Update redbot/core/bot.py

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

* Update redbot/core/bot.py

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

* Update bot.py

* Update bot.py

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-07-19 17:10:45 +02:00
Jakub Kuczys
7429b4ff89 Add remaining RHEL 9 derivatives EOL dates (#5803)
Rocky Linux 9 released today so it is time.
2022-07-14 23:34:51 +02:00
River
a0f72ed7dd Update documentation about messages intent (#5798)
* Update documentation about messages intents

* Remove note

* Update screenshot
2022-07-10 22:42:36 +02:00
Kreusada Tanfala
ae80e62a13 Prevent / being used in bot or server prefixes (#5693)
* Update `[p]set prefix`/`[p]set serverprefix`

* Update cli

* style

* update __main__

* style

* improve checks

* Raise in Red.set_prefixes, update responses

* uniform responses

* Fixes

* Keep generator variable names consistent across files
2022-06-28 19:19:20 -04:00
Flame442
febc503df1 Update workflow versions (#5789)
* Update auto_labeler_issues.yml

* Update auto_labeler_pr.yml

* Update codeql-analysis.yml

* Update crowdin_upload_strings.yml

* Update lint_python.yaml

* Update prepare_release.yml

* Update publish_release.yml

* Update tests.yml

* Update for breaking change in actions/github-script@v5

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-06-27 17:16:11 +02:00
Kreusada Tanfala
ccec53eef3 Exclude get_embed_color member from Bot framework (#5782) 2022-06-24 18:33:39 +02:00
Lemon Rose
9455ccabfa New Music Trivia List (#5687)
* new trivia category - music

* fix

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

* ty aika

* fixed

"Mr. Custer" would be more appropriate than "please mister custer" in respect of the original title of the song.

* Out of context for a trivia list

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>

* Made changes as per Aika's change requests

* duplicate removed

* add alternative answers/remove duplicates

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2022-06-23 09:19:13 -07:00
Jakub Kuczys
0cc964b87c Drop openSUSE Leap 15.2, add openSUSE Leap 15.4 (#5777)
* Add openSUSE Leap 15.4 to list in version guarantees

* Drop openSUSE Leap 15.2
2022-06-16 18:41:07 +02:00
Honkertonken
cc4ccd8414 Update Clash Royale Info in trivia. (#5771)
typo + changes
2022-06-13 16:55:30 -04:00
Jack Reusayda
68557336da Geography Trivia: Update most populous city in Africa (Kinshasa) (#5743)
Kinshasa -> Lagos
2022-06-11 23:50:02 -04:00
Lemon Rose
7a41becbde fixed outdated flags (#5684)
* fixed outdated flags

* made changes as per suggested
2022-06-11 20:02:13 -04:00
Jakub Kuczys
c00f8b3aab Red 3.4.17 - Changelog (#5763) 2022-06-07 04:44:33 +02:00
Kreusada
9c11e85bb4 Include commit hash for each cog inside [p]cog listpinned (#5563)
* Initial commit

* Necessary amendments/changes

* style changes (i knew id have to do this...)

* Use inline()

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-05 19:27:36 +02:00
Matt Chandra
5522f909bd Allow sending the file in follow-up message in ACL upload commands (#5685)
Added follow up message when uploading acl file in permissions cog.
2022-06-05 17:51:02 +02:00
Kreusada
1fd9324171 Prepend emojis to better differentiate between [p]canrun responses (#5711)
* Add emojis to better differentiate between canrun responses

* Apply `success()`

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

* Apply `error()`

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

* add imports

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-05 17:42:11 +02:00
Kowlin
4580a13e98 Minor bugfixes resolving around modlog UI (#5615)
Multiple bugfixes
 * Fixed unbound channel_value
 * Fixed lack of new lines for listcases
 * Fixed response text for case. It can only be used in the current server.
2022-06-05 17:38:46 +02:00
Candy
485e6837ca [Modlog] Check if guild is unavailable (#5647)
fix for  AttributeError: 'NoneType' object has no attribute 'guild_permissions'
2022-06-05 17:16:33 +02:00
Kreusada
cc3c1a6a95 Add use_spoilers property to TRIVIA_LIST_SCHEMA schema (#5566)
* Add `use_spoilers` to schema

* Update session.py

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-05 17:07:41 +02:00
Kreusada
9d50a851eb Escape Discord's formatting in [p]servers command (#5744)
* Escape formatting in `[p]servers` command

* style...
2022-06-05 16:19:52 +02:00
Jakub Kuczys
ee69f6e17f Add RHEL 9 (+ derivatives) install guide (#5721)
* rhel->rhel8 rename of the include file for install guides

* Add RHEL 9

* Add Alma, Oracle, and Rocky Linux 9 pre-emptively

* Add Alma Linux 9 EOL date
2022-06-05 04:11:16 +02:00
Jakub Kuczys
22ede49462 Update Visual Studio Build Tools to 2022 (#5702) 2022-06-05 04:06:17 +02:00
Jakub Kuczys
e93057093e Add Ubuntu 22.04 install guide (#5720)
* Add Ubuntu 22.04 install guide

* Add Ubuntu 22.04 to End-user guarantees

* Add missing information about supported arches in install guide
2022-06-05 03:08:02 +02:00
Jakub Kuczys
cf85a6470f Wait for two 'Started Launcher' lines before connecting to managed LL (#5751) 2022-06-05 02:46:17 +02:00
Jakub Kuczys
9cdcf07773 Add Fedora 36 and RHEL 8.6 to list in version guarantees (#5701)
* Add Fedora 36 to list in version guarantees

* Add RHEL 8.6

* Drop Fedora Linux 34
2022-06-04 17:32:23 +02:00
Jakub Kuczys
6bb11ad227 Use Temurin 11 instead of discontinued AdoptOpenJDK on macOS (#5718) 2022-06-04 15:24:30 +02:00
Jakub Kuczys
3f1d02598e Replace removed git224 package with git236 in CentOS 7 guide (#5700) 2022-06-02 12:59:02 +02:00
Jakub Kuczys
53bf387f01 Pin Temurin version on Windows until fixed version exists (#5717) 2022-06-02 12:55:02 +02:00
aikaterna
1e8f4fc2a2 [Audio] Update Lavalink.jar build (#5712) 2022-06-01 01:05:52 +02:00
Jakub Kuczys
e36d1bccbf Use latest d.py docs rather than removed master docs (#5713) 2022-06-01 01:00:13 +02:00
aikaterna
d13d02ebfc Fix for using redbot name --edit for changing data location (#5541)
* Update __main__.py

* style
2022-05-31 18:40:35 -04:00
aikaterna
1cf497b128 Fix changing instance name with redbot --edit (#5540) 2022-05-31 18:36:07 -04:00
Kowlin
acdc1df084 Add support for set api Modals (#5637)
* Add support for set api Modals

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>

* Blaacckkkk!

* Swap locations of interaction and button.

* Clarified template tokens

* Update docs and some string

* More docs

* Rework the client

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>

* Goddamned black!

* Missed a few arguments

* Black... Again

* Update redbot/core/utils/views.py

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>

* Update redbot/core/core_commands.py

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>
2022-05-20 13:58:18 -06:00
Jakub Kuczys
ec55622418 Update Downloader's git tests to work with Git 2.36+ (#5690)
There's no need to update RepoManager's code as:
- regex for parsing output about ambiguous refs properly treats the date
  as part of description regardless of ref type
- code for checking if module exists doesn't use the contents of the error message;
  the test only really checks for it to make sure that it triggers the error case
  we're actually testing for. We could instead just remove it too.
2022-04-30 23:28:17 +02:00
MAX
23023da09c [General] update [p]serverinfo 1 guild features. (#5655) 2022-04-18 23:47:30 +02:00
Kowlin
60b495091a Prevent an IndexError from occuring (#5430)
* Prevent an IndexError from occuring

If an page value is negative it doesn't properly loop around to the end.

* Update menus.py

* I'm smart 👍
2022-04-16 17:05:57 -04:00
Kreusada
22df591db2 Add FIFA World Cup Trivia List (#5639)
* Create fifa world cup trivia

* fix formatting

* add source

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

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

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

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

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

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

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

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

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

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

* Netherlands change

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

* Add Estadio Nacional Julio Martínez Prádanos

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

* Add various rasunda alternatives

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

* Add Republic of South Africa

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

* Add various alternative names for Soccer City

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

* Add alternatives for Luzhniki Stadium

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

* Add Estádio Jornalista Mário Filho and Maracana alternatives

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

* Add alternatives for Stade de Colombes

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

* Add various match-ups for 2 year combos

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

* Add Empire Stadium alias to Wembley

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

* Add Estádio Jornalista Mário Filho to Maracana

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

* Add alternatives for International Stadium

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

* Add alternatives for Monumental de Núñez

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

* Treat double year as literal string

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-04-16 17:00:05 -04:00
Jakub Kuczys
27bed5010f Make controls in menu() optional (#5678)
* Make `controls` in `menu()` optional

You might wonder, shouldn't we pass `None` to functions from controls?
No, we shouldn't because when `None` is passed, only DEFAULT_CONTROLS
can be used and that means that the length of pages list won't change.

* Update usage in core and core cogs

* Add missing docstrings to `redbot.core.utils.menus` module
2022-04-16 13:29:12 -06:00
Kreusada
955b40ac6d Various updates to geography trivia (#5638)
* Various updates to geography trivia

* Remove discriminator from AUTHOR key
2022-04-12 16:36:07 -04:00
jack1142
96e8d8cdf5 Make DEFAULT_CONTROLS and ReactionPredicate.*_EMOJIS immutable (#5666)
* Make ReactionPredicate.*_EMOJIS immutable

* Make menus.DEFAULT_CONTROLS immutable

* Actually convert NUMBER_EMOJIS to tuple
2022-04-09 21:35:11 +02:00
jack1142
6cb2378e2e Stop suppressing exceptions by early-exiting in finally (#5673)
* Stop suppressing exceptions in entrypoints due to sys.exit in finally

* Remove returns in finally in Modlog API as well...
2022-04-09 20:49:45 +02:00
jack1142
02c0328002 Add info about supported arches to guides and version guarantees (#5677)
* Update version guarantees document with supported arches

* Add note about supported architecture to each install guide
2022-04-09 20:47:31 +02:00
jack1142
61c73f2f1f Add CentOS Stream 9 docs (#5537) 2022-04-09 20:17:10 +02:00
jack1142
841b922e9c Use absolute path to which to avoid aliases (#5547) 2022-04-09 20:16:31 +02:00
jack1142
56c9241de4 Allow passing channel to [p]streamalert and show platform in streamalert list (#5160)
* Streamalert list shows each platform the channels were added on

* Added argument to specify the discord channel where stream alerts appear

* Fixed styling

* Changed discord_channel type to discord.TextChannel

* Changed join to humanize_list to display the streams list, split the message concatenation into two lines for better readability

* Allow specifying discord channel for picarto and hitbox, fix style for youtube and twitch

* Since token_name from streamtypes can be None on Picarto and Hitbox, I added an attribute to the Stream class to hold the platform name

* Message now tells the user that the stream alert was disabled only for the specified channel.

* Address review

* fix style

* Consistency! Sort of...

Co-authored-by: douglas-cpp <douglasc.dev@gmail.com>
Co-authored-by: Douglas <douglas.carvalho@edu.unipar.br>
2022-04-09 20:08:41 +02:00
jack1142
c9f1a45854 Make --debuginfo more like [p]debuginfo (#5662) 2022-04-09 19:34:12 +02:00
jack1142
bc9f34c04b Fix invalid version error with _get_version()-provided version (#5670)
* Make sure that the repository we check is in the location we expect

* Merge `redbot._version` into `redbot`

* Generate VersionInfo in _get_version()

This way, if VersionInfo.from_str() generates exception due to invalid
version, we catch it.
2022-04-05 16:48:03 -06:00
jack1142
88d2cb3976 Suppress stderr in _get_version() (#5667) 2022-04-05 22:33:43 +02:00
Kreusada
0b8dec77c3 Remove caching and safety utilities (#5653)
* Remove caching

* Remove safety

* Remove unused private usage
2022-04-03 04:31:53 +02:00
TrustyJAID
2995a457f6 Fix AttributeError in new decorators added to requires (#5665) 2022-04-03 04:27:24 +02:00
jack1142
35f1681dc1 Include tag distance and commit hash in dev versions when possible (#5664)
* Include tag distance and commit hash in dev versions when possible

* Fix test
2022-04-02 19:51:34 -06:00
jack1142
febca8ccbb Migration to discord.py 2.0 (#5600)
* Temporarily set d.py to use latest git revision

* Remove `bot` param to Client.start

* Switch to aware datetimes

A lot of this is removing `.replace(...)` which while not technically
needed, simplifies the code base. There's only a few changes that are
actually necessary here.

* Update to work with new Asset design

* [threads] Update core ModLog API to support threads

- Added proper support for passing `Thread` to `channel`
  when creating/editing case
- Added `parent_channel_id` attribute to Modlog API's Case
    - Added `parent_channel` property that tries to get parent channel
- Updated case's content to show both thread and parent information

* [threads] Disallow usage of threads in some of the commands

- announceset channel
- filter channel clear
- filter channel add
- filter channel remove
- GlobalUniqueObjectFinder converter
    - permissions addglobalrule
    - permissions removeglobalrule
    - permissions removeserverrule
    - Permissions cog does not perform any validation for IDs
      when setting through YAML so that has not been touched
- streamalert twitch/youtube/picarto
- embedset channel
- set ownernotifications adddestination

* [threads] Handle threads in Red's permissions system (Requires)

- Made permissions system apply rules of (only) parent in threads

* [threads] Update embed_requested to support threads

- Threads don't have their own embed settings and inherit from parent

* [threads] Update Red.message_eligible_as_command to support threads

* [threads] Properly handle invocation of [p](un)mutechannel in threads

Usage of a (un)mutechannel will mute/unmute user in the parent channel
if it's invoked in a thread.

* [threads] Update Filter cog to properly handle threads

- `[p]filter channel list` in a threads sends list for parent channel
- Checking for filter hits for a message in a thread checks its parent
  channel's word list. There's no separate word list for threads.

* [threads] Support threads in Audio cog

- Handle threads being notify channels
- Update type hint for `is_query_allowed()`

* [threads] Update type hints and documentation to reflect thread support

- Documented that `{channel}` in CCs might be a thread
- Allowed (documented) usage of threads with `Config.channel()`
    - Separate thread scope is still in the picture though
      if it were to be done, it's going to be in separate in PR
- GuildContext.channel might be Thread

* Use less costy channel check in customcom's on_message_without_command

This isn't needed for d.py 2.0 but whatever...

* Update for in-place edits

* Embed's bool changed behavior, I'm hoping it doesn't affect us

* Address User.permissions_in() removal

* Swap VerificationLevel.extreme with VerificationLevel.highest

* Change to keyword-only parameters

* Change of `Guild.vanity_invite()` return type

* avatar -> display_avatar

* Fix metaclass shenanigans with Converter

* Update Red.add_cog() to be inline with `dpy_commands.Bot.add_cog()`

This means adding `override` keyword-only parameter and causing
small breakage by swapping RuntimeError with discord.ClientException.

* Address all DEP-WARNs

* Remove Context.clean_prefix and use upstream implementation instead

* Remove commands.Literal and use upstream implementation instead

Honestly, this was a rather bad implementation anyway...

Breaking but actually not really - it was provisional.

* Update Command.callback's setter

Support for functools.partial is now built into d.py

* Add new perms in HUMANIZED_PERM mapping (some from d.py 1.7 it seems)

BTW, that should really be in core instead of what we have now...

* Remove the part of do_conversion that has not worked for a long while

* Stop wrapping BadArgument in ConversionFailure

This is breaking but it's best to resolve it like this.

The functionality of ConversionFailure can be replicated with
Context.current_parameter and Context.current_argument.

* Add custom errors for int and float converters

* Remove Command.__call__ as it's now implemented in d.py

* Get rid of _dpy_reimplements

These were reimplemented for the purpose of typing
so it is no longer needed now that d.py is type hinted.

* Add return to Red.remove_cog

* Ensure we don't delete messages that differ only by used sticker

* discord.InvalidArgument->ValueError

* Move from raw <t:...> syntax to discord.utils.format_dt()

* Address AsyncIter removal

* Swap to pos-only for params that are pos-only in upstream

* Update for changes to Command.params

* [threads] Support threads in ignore checks and allow ignoring them

- Updated `[p](un)ignore channel` to accept threads
- Updated `[p]ignore list` to list ignored threads
- Updated logic in `Red.ignored_channel_or_guild()`

Ignores for guild channels now work as follows (only changes for threads):
- if channel is not a thread:
    - check if user has manage channels perm in channel
      and allow command usage if so
    - check if channel is ignored and disallow command usage if so
    - allow command usage if none of the conditions above happened
- if channel is a thread:
    - check if user has manage channels perm in parent channel
      and allow command usage if so
    - check if parent channel is ignored and disallow command usage
      if so
    - check if user has manage thread perm in parent channel
      and allow command usage if so
    - check if thread is ignored and disallow command usage if so
    - allow command usage if none of the conditions above happened

* [partial] Raise TypeError when channel is of PartialMessageable type

- Red.embed_requested
- Red.ignored_channel_or_guild

* [partial] Discard command messages when channel is PartialMessageable

* [threads] Add utilities for checking appropriate perms in both channels & threads

* [threads] Update code to use can_react_in() and @bot_can_react()

* [threads] Update code to use can_send_messages_in

* [threads] Add send_messages_in_threads perm to mute role and overrides

* [threads] Update code to use (bot/user)_can_manage_channel

* [threads] Update [p]diagnoseissues to work with threads

* Type hint fix

* [threads] Patch vendored discord.ext.menus to check proper perms in threads

I guess we've reached time when we have to patch the lib we vendor...

* Make docs generation work with non-final d.py releases

* Update discord.utils.oauth_url() usage

* Swap usage of discord.Embed.Empty/discord.embeds.EmptyEmbed to None

* Update usage of Guild.member_count to work with `None`

* Switch from Guild.vanity_invite() to Guild.vanity_url

* Update startup process to work with d.py's new asynchronous startup

* Use setup_hook() for pre-connect actions

* Update core's add_cog, remove_cog, and load_extension methods

* Update all setup functions to async and add awaits to bot.add_cog calls

* Modernize cogs by using async cog_load and cog_unload

* Address StoreChannel removal

* [partial] Disallow passing PartialMessageable to Case.channel

* [partial] Update cogs and utils to work better with PartialMessageable

- Ignore messages with PartialMessageable channel in CustomCommands cog
- In Filter cog, don't pass channel to modlog.create_case()
  if it's PartialMessageable
- In Trivia cog, only compare channel IDs
- Make `.utils.menus.menu()` work for messages
  with PartialMessageable channel
- Make checks in `.utils.tunnel.Tunnel.communicate()` more rigid

* Add few missing DEP-WARNs
2022-04-03 03:21:20 +02:00
Kreusada
c9a0971945 Reference how to reply in the [p]contact command with embed settings (#5529) 2022-04-02 02:57:06 +02:00
Draper
78e64ec559 add timestamps to all audio embeds (#5632) 2022-04-02 02:37:44 +02:00
jack1142
d932abad16 Use Guild.fetch_ban() over Guild.bans() (#5656) 2022-04-02 01:44:30 +02:00
jack1142
67e43eb00b Ignore d.py's |coro| substitution in Sphinx (#5648) 2022-03-31 15:12:31 +02:00
Draper
d8e20afa1d Fix an incorrect comparison in audio (#5643)
Signed-off-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2022-03-31 12:40:29 +02:00
Draper
511de5163f Update Audio to use RLL 0.11.0rc0 (#5631)
* Replace player.manager to player.node

* Try using bot.is_closed instead of get_voice_ws.

* Use Shard.is_closed instead of bot.is_closed.

* Use RLL PR as dep.

* Update audio to use add dep to https://github.com/Cog-Creators/Red-Lavalink/pull/122

* few thing missing

* Missing `player.manager.node` -> `player.node` change

* Update setup.cfg

Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-03-31 11:44:09 +02:00
Draper
9ec85d4819 Audio changes (#5593)
* Squash tested commits

* remove the code jack is concerned about

* Apply suggestions from code review

* more log lines

* more log lines

* format

* formatting

* style(Rename Xms and Xmx mentions): Rename Xms and Xmx to more use friendly names

- Change Xms to "Initial Heapsize"
- Change Xmx to "Max Heapsize"

Signed-off-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2022-03-28 08:23:30 -07:00
TrustyJAID
5a5b22003f Fix embed requested in DMs (#5635)
* Fix embed requested in DM's

* Add documentation

* black

* Address comments

* Unnecessary added line

* Use correct channel on context

* use correct var name

* More review stuff
2022-03-22 21:04:45 +01:00
jack1142
c69e8d31fd Reformat with Black 22.1.0 2022-03-22 18:37:17 +01:00
jack1142
f6d9632c8f Bump Black version to 22.1.0 2022-03-22 18:37:17 +01:00
jack1142
d87199779e Prefer home directory even for system users if it exists (#5022) 2022-03-21 10:43:52 -06:00
jack1142
ed4f2cf466 Switch from low-level loop.create_task and asyncio.ensure_future (#5626)
* Switch from low-level loop.create_task and asyncio.ensure_future

* Patch vendored discord.ext.menus to use modern APIs as well

That ext is no longer maintained by Danny anyway so...

* black
2022-03-21 10:24:46 -06:00
jack1142
7a5ada2d92 Make decorator combining in Requires more consistent (#5625)
* Allow combining bot_has_permissions() decos

* Improve consistency for Requires.user_perms
2022-03-21 10:23:23 -06:00
jack1142
aa55b08a0a Set Red._color before login rather than in on_ready (#5627) 2022-03-21 10:23:09 -06:00
jack1142
0f299ae195 Support all Messageables in bot.embed_requested() (#5576)
* Support all Messageables in bot.embed_requested

* Update usage in core

* Simplify [p]contact

This couldn't be done before this change.

I have also simplified getting embed color.

* Make `True` the new default for `check_permissions` kwarg
2022-03-21 10:22:55 -06:00
Draper
f763d29fd4 Add and use Red-Commons library (#5624)
* update RC dep

* welp 100% tested

* fix import

* 120% tested

* Call _early_init even earlier

Not really in scope of this PR but the original was merged
before I could share any feedback.

* explicitly import getLogger

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-03-18 23:41:42 +01:00
Leothelion
335988c916 Update Kazakh Capital City Answer (#5599) 2022-03-18 17:52:25 -04:00
TrustyJAID
c8ff3c4cce Catch overflow errors for mutes time conversion (#5605) 2022-03-18 17:48:32 -04:00
Kuro
193cb3b035 [Downloader] Add argument to immediately reload or not (#5623)
* Add argument to immediately reload or not

* Style

* More detailed (and clear) description

* Better desc (ig)

* plurality

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-03-18 15:47:41 -04:00
Draper
2d9548ec0e Audio cleanup (#5618)
* add different logging level callbacks for task exception logging

* Add callback to tasks which didn't have them

* The boring stuff - (apply .trace() and .verbose() to audio, stop using debug_exc_log, delete audio_logging.py)

* Unsured import cleanup

* use new lavalink method

* return so it doesn't log this twice.

* improve logging on main event handler
2022-03-16 09:42:17 -07:00
Draper
593eeb5362 Add a custom Logger class with both verbose and trace levels. (#5613)
* rearrange commits

* Update redbot/setup.py

* change rich log level colours
2022-03-15 16:20:37 -04:00
GhOsT
7d716a2d67 Fix formatting breaking with nested formatting utils in help (#5601)
* Fix formatting breaking with nested formatters.

* Remove useless f-strings

* Revert formatting to the one before PR #5435

* One more small formatting revert

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-03-06 17:48:48 +01:00
jack1142
02f1ad919d Ask if changes were tested in PR template (#5580) 2022-02-28 18:08:16 +01:00
TrustyJAID
58d8cb4d1f Fix grammar in uptime command (#5596) 2022-02-28 15:57:59 +00:00
aikaterna
2ee64618af Fix spelling error (#5588) 2022-02-23 02:48:37 +00:00
jack1142
a6590b0380 Update redgettext to version 3.4.2 (#5584) 2022-02-21 15:21:59 +00:00
jack1142
50f3168b14 Update redgettext to version 3.4.1 (#5583) 2022-02-21 15:10:58 +00:00
jack1142
299a537f84 Update redgettext to version 3.4 (#5582) 2022-02-21 15:56:33 +01:00
jack1142
eeffbf8231 Avoid potential memory leak in Filter cog (#5578) 2022-02-20 22:52:58 +01:00
jack1142
0338e8e0a8 Avoid 'editing' message with no changes when case is created (#5577) 2022-02-20 16:42:56 -05:00
jack1142
78dc1d4cd8 Update discord-ext-menus vendor to latest commit (#5579)
Vendor `discord.ext.menus` from commit `fbb8803779373357e274e1540b368365fd9d8074` at Rapptz/discord-ext-menus
2022-02-20 22:01:40 +01:00
crayyy_zee
8d46568180 Add typechecking to config from_id methods (#5564)
* [config] Add typechecking for parameters

* change instance check

* Knew it, shouldnt have added these

* black
2022-02-20 15:50:07 -05:00
jack1142
b0ab6186ef Ensure that registered Config defaults are serializable to JSON (#5557) 2022-02-20 15:49:39 -05:00
jack1142
9baf9ba546 Fix number of cogs in Getting started doc after Bank cog removal (#5516) 2022-02-20 15:48:59 -05:00
jack1142
669f3e3073 Emphasize lines with things to replace in autostart guides (#5548)
* Emphasize lines with things to replace in autostart guides

* Use 'default' pygments style instead
2022-02-16 12:47:22 -05:00
Dav
c6517d5087 [Core/Core Cogs] Prevent translation errors and use formatting utils (#5435)
* Use proper syntax for inline formatting in core_commands

* use proper formating utils in core and core cogs wherever reasonable

* tests are awesome

* ensure "(continued)" is translated in help.py

* add colons to translatable strings for easier context comprehension by translators

* Thx flame :)

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

* good point

Co-authored-by: Dav <dav@mail.stopdavabuse.de>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-02-15 20:25:21 -05:00
Vexed
9ab307c1ef Remove specific number of steps in update docs (#5556)
* change 4 to a few bc 4 is a lie

* wait linux exists

* 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>
2022-01-29 18:30:15 +01:00
jack1142
e33985f969 Disallow crawling of versioned documentation in robots.txt (#5549) 2022-01-29 17:16:44 +01:00
Flame442
b05933274a [Audio] Fix UnboundLocalError in edge case (#5394)
* Fix UnboundLocalError in edge case

* Fix typehint for fetch

* Style
2022-01-12 09:20:22 -08:00
untir_l
05cd11b657 Fix typo in Audio seek command description (#5530) 2022-01-11 08:35:50 -08:00
jack1142
de53d15cf8 Update copyright (#5526) 2022-01-10 17:52:36 +01:00
jack1142
cfa8f15faa Update "copyright notice" for Dev cog (#5527) 2022-01-10 17:52:20 +01:00
aikaterna
6ff844e605 Fix formatting in error message about already installed cog (#5531) 2022-01-05 01:52:15 +01:00
jack1142
fbe378657c Red 3.4.16 - Changelog (#5520)
* Red 3.4.16 - Changelog

* Add contribs!
2021-12-31 19:08:06 +01:00
jack1142
a4ba249e27 Red 3.4.15 - Changelog (#5504)
* Red 3.4.15 - Changelog

* Use stronger words

* Add jar stuff

* Add 5499

* Minor grammar stuff

* add 5472

* Add 5452

* Add 5448

* Add date and contributors

* Update docs/changelog_3_4_0.rst

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

* the other thing

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2021-12-31 03:13:00 +01:00
jack1142
1ecbe6cebb Only check for permissions when check_permissions is True (#5510) 2021-12-31 02:51:06 +01:00
Just-Jojo
a787033e1d [Events] Rename guild remove listener (#5498)
* [Events] on_guild_leave => on_guild_remove

* [Events] on_guild_leave => on_guild_remove
2021-12-31 02:22:29 +01:00
jack1142
8cc004f70f Add non-interactive mode to redbot-setup (#5448)
* Simplify `redbot-setup backup` thanks to Click 8.0

* Add some of the missing type hints

* Fix unnecessary new lines in `redbot-setup` and `redbot-setup delete`

* Add default value for storage backend

* Add non-interactive mode to `redbot-setup`
2021-12-31 02:08:18 +01:00
jack1142
ff7c146b62 Make embeds in help output consistent (#5452)
* Add `check_permissions` kwarg to `bot.embed_requested()`

* Make embeds in help consistent regardless of why it's being sent
2021-12-31 02:01:23 +01:00
Kowlin
faab711ec8 Ensure Nitro users can't make CCs that are too long (#5499)
* Ensure Nitro users can't make CCs that are too long

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>

* Tox formatting

* Update to account for edits and better handling of randoms

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>
2021-12-31 01:39:39 +01:00
aikaterna
c49d0ec9d3 Update Lavalink.jar, Red-Lavalink and make changes to support it (#5474)
* Lavalink error handling update

* comment typo

* address review

* Update redbot/cogs/audio/core/events/lavalink.py

* Bump jar version

* Bump RLL version

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-31 01:16:28 +01:00
GhOsT
337f58f9fb Fix short help in docstrings for core cogs and commands (#5502)
* fix part of command description not appearing in the help command.

* Add more

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-30 22:31:01 +01:00
Flame442
dce2378806 Prevent unexpected timedelta matches (#5393)
* Prevent unexpected matches by asserting whitespace or eof at the end of matches

* Use a positive lookahead instead of a capturing group to support 1d6h syntax

* Use fullmatch instead of modifying regex strings
2021-12-30 00:46:36 +01:00
jack1142
9c05db1104 Allow mocking attachment-only msg, fix docstring, small refactor (#5446)
* Use the logic from `[p]mock` in `[p]mockmsg`, fix docstring

* Let people mock attachment-only messages

* Use empty string, not None
2021-12-26 22:04:36 +01:00
jack1142
90406be9ea Remove old note about updating Red in Unix install guides (#5439)
This was removed long ago from the Windows guide (#4119) but it seems like we never got around to removing it from Unix install guides as well.
This note is rather inaccurate and the source of truth for updating Red is available in the Updating Red document.
2021-12-26 21:50:54 +01:00
jack1142
d1df27bc14 Update supported OSes (add Alma Linux, RPi OS 11, drop EOL OSes) (#5440)
* Drop Fedora 33

By the time we release, it's going to reach EOL.

* Drop Raspberry Pi OS 10, add support for 11

* Bring RPi OS 10 back

* Add Alma Linux 8

* Fix-up RHEL EOL dates

* Add '(Legacy)' to Raspberry Pi OS 10

* Drop CentOS 8
2021-12-26 21:50:22 +01:00
jack1142
e5b8fc4585 Bump Python version in install guides to 3.9.9 (#5447) 2021-12-26 21:45:56 +01:00
jack1142
db0f4ce44d Add jack1142 as code owner of install/update guides (#5493) 2021-12-26 21:12:23 +01:00
Parnassius
5a047bf979 Make emptydisconnect disconnect when all vc members are bots (#5421)
* [Audio] Disconnect from voice chat when every connected user is a bot

* Update condition according to code review

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-26 19:09:37 +01:00
Stonedestroyer
6297bfcab6 Make invite URL part of public API (#5424)
* Make invite URL public API

* Add doc and RPC

* Lint

* Update redbot/core/core_commands.py

Co-authored-by: Matt <psykzz@users.noreply.github.com>

* Update redbot/core/bot.py

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

* RPC handling,

* Fix appinfo

* Change docs

* Fix docs

* Change docs

* Update redbot/core/core_commands.py

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

* Docstring changes

* nit

Co-authored-by: Matt <psykzz@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 22:08:32 +01:00
Vexed
d27dbded8a Fix RPC cog load and unload by returning dicts (#5453)
* use dicts for CoreLogic package management returns

* address review

* failed_packages->notloaded_packages in _unload

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 21:11:48 +01:00
Alex
a228a0d0b3 Show role payday amounts in economyset showsettings (#5457)
* [V3/develop] show RolePaydayAmounts in showsettings command

* Update economy.py

* Switch to using a list (nitpicky optimizations)

https://docs.python.org/3/faq/programming.html#what-is-the-most-efficient-way-to-concatenate-many-strings-together

* Mark the text as translatable

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 18:08:13 +01:00
Jan
7db3339aba isolate direction of username within modlog (#5422)
* isolate direction of username within modlog

* Add link to Unicode's usage

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 17:34:02 +01:00
MAX
b091f13df5 [Core] Changed prefix length to 40. (#5476)
* Update core_commands.py

* Docs yes facebook's metaverse

*jokes on me*

* meta

* forgot here

* Update core_commands.py

* Forgot here

* And forgot here
2021-12-25 04:14:16 +01:00
Toby Harradine
e878483318 [Config] Add type-hints to _ValueContextManager methods (#5344)
Without these type-hints, I've found that PyCharm misidentifies the returned type, causing a number of false positives in static type checking.
2021-12-25 03:19:18 +01:00
MAX
551e6d9f55 Update host list with new locations for Hetzner and Contabo (#5475) 2021-12-25 03:12:03 +01:00
Vexed
cef55459c6 Fix issues with loading config.json when it doesn't exist (#5416)
* catch and handle FileNotFoundError when using --no-instance when config.json does not already exist

* move load_existing_config to data_manager.py

* use load_existing_config in create_temp_config

* Fix import in redbot-launcher

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 03:02:44 +01:00
aleclol
5e527cb27d Add necessary None checks to Core's usage of Requires.privilege_level (#5477)
* Check if it has a privilege level

* Let's fix this in warnings too

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 02:04:33 +01:00
Ryan
bae85c35c1 [Docs] Correct set api examples to be consistent for Spotify (#5444)
* consistant usage

* switch audiodb to youtube

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 01:05:23 +01:00
PredaaA
4e469ce15e Remove voice region field in [p]serverinfo (#5449)
* [General] Remove guild region on serverinfo

* Remove in string too.
2021-12-25 01:02:37 +01:00
Kreus Amredes
e068294cc8 Restrict [p]cleanupset notify to guild only (#5466) 2021-12-25 00:54:37 +01:00
krak3n
2c51182e8e Add plural forms to the responses of [p]leave command (#5391)
* Improve the response of `[p]leave` command

* Update core_commands.py

* Update core_commands.py

* style?

* fix maybe

* black

* fixed typo in docstring

* aaa

* style

* Few more changes

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 00:51:17 +01:00
sravan
442cad7917 [Mod] Typo in unban command (#5470) 2021-12-23 02:51:55 +01:00
Leet
e993e749ee Update links to installation guides in README (#5426)
* Update links to installation guides

* Update Windows link

This one redirects correctly but updated it anyways

* Update all red-discordbot.readthedocs.io links to docs.discord.red
2021-12-23 02:48:05 +01:00
Kreus Amredes
bf0fab8575 Remove Bank cog from labeler configuration (#5464) 2021-12-11 15:57:05 +01:00
Kowlin
0158dbab1d Reorganize [p]set command group (#5432)
* Reorganised Set command group

* Moved custominfo

* Tox styling

* Make `set locale&regionalformat` groups work same as server subcommands

* Use consistent method names for commands in `[p]set` group

* Update command names in docstrings

* Remove some weird rst formatting that bugs out my syntax highlighting

* Add checks to some command groups

* Update docs

* oops

* Minor fixes

* Move `[p]set api` group and its subcommands to other command groups

* Move `[p]set ownernotifications` group to other command groups

* black reformat

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-01 21:35:30 +01:00
palmtree5
6acdcdeae9 Move modlogset/bankset commands to core (#4486)
* Move bankset and modlogset to core commands

* Move prune over too

* Finish moving prune

* Move [p]economyset registeramount to [p]bankset registeramount

* style fix

* Fix circular import issue with another breaking change

* Apparently I missed a conflict and git still let me commit...

* Really git?

* Rename RawUserIds -> RawUserIdConverter, improve documentation

* Improve documentation of `is_owner_if_bank_global()`

* MENTION_REGEX -> USER_MENTION_REGEX

* Add 'bank.' prefix

* Fix command examples in docstrings

* Missing docstring change from `bankset prune`

* Missing changes for commands in modlogset

* Update docs

* Remove duplicated info in `economyset showsettings`

* Fix toctree in index.rst

* Add command group prefixes to names of functions for bankset/modlogset

* Remaining string updates due to command name changes

* Ensure that the bank folder is actually gone

Co-authored-by: palmtree5 <palmtree5+3577255@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-11-25 10:06:30 +01:00
jack1142
fc560db72d Stop fetching the messages when getting the cases in Modlog (#4977)
* Use PartialMessage when Case is fetched from Config

* Update docstring
2021-11-05 12:18:23 +01:00
jack1142
4ec0d2bb01 Add guarantees for supported OS versions (#5437) 2021-11-03 18:11:46 +01:00
jack1142
78c92cc766 Address common issues with load path configuration in docs (#5356)
* Add instructions on how to add pyenv to load path

* Support zsh in pyenv load path instructions

* Make instructions for Mac work when shell-specific profile file exists

* Includes are weird...

* .

* Fix my misunderstanding of what files zsh sources

* Operator precedence, or something like that
2021-11-02 12:38:06 -07:00
Kowlin
6c4e5af5ee Check to avoid an IndexError (#5429) 2021-11-02 11:53:42 -07:00
jack1142
3f4842603b Remove currently deprecated functionality (#5433) 2021-11-02 13:04:45 +01:00
jack1142
f071ec09e2 Try to fix base branch in Publish Release workflow *again* (#5340) 2021-11-02 13:02:01 +01:00
Predeactor
483ef36d1b Modernize syntax in chat formatting module and add success() (#5427)
* Downloader's plurial & Fix

* Don't forget pipinstall

* Fix syntax issue

* This f****** fix that took me too much of my time for nothing.

* Black

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Fix Jack's syntax, remove numbers & fix bad calculated cogs

* Black ofc

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Update redbot/cogs/downloader/downloader.py

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

* Address my review comment

* Simplify

* this is kinda a lot but shh

* Change format to f-string

* Add success function to char_formatting

* Revert "Merge branch 'V3/develop' of github.com:Predeactor/Red-DiscordBot into master/chat-formatting-enhancement"

This reverts commit c338da7b66, reversing
changes made to f2422ad782.

* For once I would have appreciated if style checks were failing...

Co-authored-by: Predeactor <ubuntu@vps-35e65bf5.vps.ovh.net>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-10-27 14:34:20 +02:00
Rasmus Wriedt Larsen
42293afd43 Fix CodeQL workflow (#5412)
The new pip 21.3 (released 2021-10-11) uses in-tree builds when `pip install .` is used (see [release notes](https://pip.pypa.io/en/stable/news/#v21-3) and [implementation PR](https://github.com/pypa/pip/pull/10495)). This means CodeQL will see all files twice (once in the real location that is part of this repository, and one in the copy in the `build/` dir), which trips up the analysis.

When an editable install is used instead with `pip install -e .`, there is no `build/` dir, so the analysis will work again.
2021-10-20 16:50:01 +02:00
jack1142
7abc9bdcf1 Pre-fetch app owners and fail early on no owners (#4926)
* Pre-fetch app owners and fail early on no owners

* Improve command mention in error message

* Further change the order of startup actions
2021-10-20 12:13:07 +02:00
jack1142
6db5c866af Rename RedBase to Red, remove the old Red (#5159)
* Rename RedBase to Red, remove the old Red

* Update docs references

* add noindex directives
2021-10-20 12:12:55 +02:00
Crossedfall
a70f0b7872 [Docs] Removes LXC as an unsupported hosting platform (#5351) 2021-10-20 12:10:13 +02:00
Ryan
4348318fd1 Update JDK URL and add Python version upper-bound in Windows guide (#5403)
* Update Java URL

* Update choco package as well

* Use Windows-specific URL for Python downloads

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-10-20 11:41:43 +02:00
Kreus Amredes
b64ece3ee9 [Admin] Add [p]selfroleset clear command (#5387) 2021-10-17 18:51:04 +02:00
Flame442
d56f31a708 [Mutes] Fix vars not getting formatted due to previous PR (#5404)
* Fix vars not getting formatted due to #5364

* Only format a second time if needed

* Format only on string literals
2021-10-17 02:56:26 +02:00
Kowlin
67bcd72d9c Update the timestamping we forgot to Discord compatible timestamping (#5395) 2021-10-16 21:38:52 +02:00
Dav
1d34e9e47b [Downloader] Show repo name in findcog (#5383)
* show repo name in findcog

* how did i manage to overcomplicate this?

* for Kreusada

* I wanted to do that... but forgot
2021-10-16 02:10:57 +02:00
WreckRox
9aee8ce28f Fix descriptions for examples of ID-based command invocations in Mod (#5372)
* Fix wording in redbot/cogs/mod/kickban.py to match with the command example

* Made changes as requested in PR Review #770078179

* Added changes to docs/cog_guides/mod.rst as requested in PR Review #70784066

* Fixed kick wording

* Fix kick wording
2021-10-16 01:29:15 +02:00
krak3n
17dc9e0c47 [Mod] Indicate successful run in [p]voicekick (#5367) 2021-10-16 00:50:58 +02:00
MAX
b8535ee53e Add a tick on traceback command when it's sent to DMs (#5353)
* add a `tick` when sent to dm.

* confused ™️

* did i learn now? :P

* i'm not confused anymore :3
2021-10-16 00:47:13 +02:00
jack1142
4b70acb989 Do not include expected wait_for responses in translated strings (#5364)
* Do not include 'I agree' prompt in translation string

* Add more stuff

* Address review comment

* Address review comments
2021-10-16 00:02:35 +02:00
jack1142
334cd4fa2a Add optional message to send when bot can't react in ctx.tick() and ctx.react_quietly() (#4092)
* Update context.py

* Pre-emptive check to avoid hitting the API
2021-10-15 18:44:12 +02:00
Kreus Amredes
a8f35f762c Improve helpset showaliases docstring (#5376) 2021-10-07 12:22:35 -07:00
aikaterna
6eb922e7d9 [Audio] Remove extra whitespace (#5366) 2021-10-03 21:10:32 +02:00
Fixator10
b4037a80d8 fix possible issue when joined_at is None (#5361) 2021-10-02 11:08:17 -04:00
El Laggron
cb18a66336 Initialize driver before starting the backup (#5315) 2021-09-23 22:38:50 +02:00
jack1142
cddd99eba7 Red 3.4.14 - Changelog (#5335)
* Red 3.4.14 - Changelog

* Add contributor list

* proofreading 1

* Fix plural form
2021-09-23 21:08:47 +02:00
River
92cabd134d Update some link texts in docs for accessibility (#5310)
* Update some link texts for accessibility

* Fix stuff nearby while we're here

* Reword links to DigitalOcean

* Use better link text for `[p]triviaset custom`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-23 18:41:51 +00:00
jack1142
2c8c97490b Maybe fix the base branch used in dev bump automation (#5307) 2021-09-23 17:56:33 +02:00
Leet
2ce8e65527 Only initialize and teardown driver if actually needed (#5313)
* Fix #5312

* Update setup.py

* put db actions under one if statement

* check backend type and improve displayed message

* accept format fix

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

* fix whitespace

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

* separate datapath delete from data delete

* Fix indentation

* Call `driver_cls.initialize()` outside try-finally

* Backup requires db server to run too + some simplifications

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-23 17:34:38 +02:00
MAX
d69326b1fe Use discord native timestamp in [p]uptime (#5323)
* support for discord's timestamp on uptime

* woops not supposed to remove `_`.

* ups

* ups x2

* Apply suggested change.

* hehe
2021-09-23 16:22:16 +02:00
jack1142
cbbb9d9b9b Split documents per OS, fix few things, drop and add few OSes (#5328)
* Exclude include files from being built

* Split install guides into multiple documents (one per OS/version combo)

* Update references

* Unify anchor names

* Update pyenv requirements in CentOS 7 guide

* Update install guides for RHEL derivatives to not use pyenv

* Add guide for Rocky Linux 8

* 8.4+ -> 8.4-8.x

* Add 'the'
2021-09-22 20:13:58 -07:00
aikaterna
b2e9b38a03 [Audio] Update Lavalink.jar build (#5329) 2021-09-23 02:32:11 +02:00
Kowlin
89e3a78ead Fix Case's modified_at attr and its format in message content (#5317)
* Fix modified_at field to properly format.

* let's just fix the type hints

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-14 02:42:20 +02:00
jack1142
eeed082542 Red 3.4.13 - Changelog (#5302)
* Add 3.4.13 section

* PR 5156 (issue 4997)

* PR 5178 (issue 5177)

* PR 5185, 5187

* PR 5184

* PR 5186

* PR 5165

* PR 5188

* PR 5225

* PR 5180

* PR 5181 (issue 4868)

* PR 5221 (issue 5216)

* PR 4659 (issue 4571)

* PR 5173

* PR 5155, 5241

* PR 5199

* PR 5205 (issue 4074)

* PR 5238 (issue 5237)

* PR 5169

* PR 5214

* PR 4981 (issue 4841)

* PR 4837 (issue 4836)

* PR 5218 (issue 4732)

* PR 5233

* PR 5211 (issue 5187)

* PR 5108

* PR 5223 (issue 5195)

* PR 5234

* PR 5243 (issue 4717)

* PR 5000 (issue 4140)

* PR 5206 (issue 5171)

* PR 5121 (issue 4655)

* PR 5217 (issue 5213)

* PR 5037

* PR 5109, 5163, 5172, 5191

* PR 4968

* PR 5048, 5092, 5149, 5207, 5209, 5215, 5219, 5220

* Fill 'Read before updating' section

* Add contributor list

* few fixes

* Apply suggestions from code review

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2021-09-09 23:48:51 +02:00
PhenoM4n4n
e5b236fb1c Add CommandConverter and CogConverter + add usage in Core (#5037)
* add commands, cog converter

* properly use type_checking

* make core commands use command converter

* update commands to use cogconverter

* fix undefined variable name, style

* Update redbot/core/commands/converter.py

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

* Update redbot/core/commands/converter.py

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

* Update redbot/core/core_commands.py

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

* Update redbot/core/core_commands.py

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

* Update redbot/core/core_commands.py

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

* Update redbot/core/core_commands.py

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

* Update redbot/core/core_commands.py

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

* update cog argument names

* update documentation arg names

* update more docs

* This new Sphinx is annoying about this...

* I'm questioning my skills

* Fix name error in `[p]embedset showsettings` when command is not given

* Do not use the new cog converter in `[p]command enablecog`

This is needed so that a cog that isn't loaded but was disabled
can be enabled back.

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-07 23:43:29 +02:00
Kreus Amredes
63fd7cc95f [Docs] Update Cleanup docs with new cleanupset command group (#5245)
* Add cleanupset commands to cleanup docs

* fix spacing

* shown -> sent

* update command docstring

* Fix trailing whitespace and use same style for docs

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-07 21:12:46 +00:00
Ryan
33dddaf5b4 Add Debian 11 to install guide and clarify "Buster" as Debian 10 (#5217)
* Clarify Debian 10 as "Buster"

* Add Debian 11 Install

* This typo would of bugged my OCD...

* Clarify Debian 10 as "Buster"

* Add Debian 11 Install

* This typo would of bugged my OCD...

* Add apt upgrade line to doc

* Removing dupe for Debian 11
I'm not sure how that happened, but oh well...
2021-09-06 23:33:34 +02:00
palmtree5
3254698c78 Update deps, allow Python 3.9, drop Fedora 32 (#5121)
* Update deps + allow Python 3.9

* Add in updates from Jack's branch

* Fix multiple target for cross-reference warnings

* Update a few more Python 3.8 occurrences

* Bump further

* Don't install tox in CodeQL environment

* Bump Python version in docs to 3.9.7

* more bumps

* Add missing pin

* Stop using the deprecated distro.linux_distribution()

* Suppress deprecation warning

* Fix OpenSUSE Leap instructions

* Drop Fedora 32

* Add Python 3.10-dev to CI

* meh

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-06 18:43:29 +02:00
Just-Jojo
0dded8aa47 [Core] Add more APIs for allowlists and blocklists (#5206)
* [Core] Blacklist api

* [Core] Use to_add, remove star from other method calls

* various touch ups

* style

* fix doc style

* [Core] Remove iterable import

* [Core] Update commands to use the blacklist/whitelist api

* Change signatures to not use `*args`

* Update all usage of private cache to the new public APIs

* Update the docstrings

* Update the usage in diagnoser

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-06 18:38:07 +02:00
Zoë F
ed9bb77eec Add RelativedeltaConverter and parse_relativedelta (#5000)
* Added years and months to parse_timedelta

* Added new parse_datetimedelta along with classes for relative dates

* Switched datetime as dt to just datetime for clarity

* Changed to returning relativedelta instead of datetime

* Fixed single char typo

* After some digging, removed min and max from relative delta b/c of https://github.com/dateutil/dateutil/issues/350

* Add dateutil to intersphinx mapping

* Change uppercase D in RelativeDeltaConverter to a lowercase D

* Fix cross-references in docstrings

* Add new class and methods to __all__

* Remove get_relativedelta_converter()

* style

* Fix name of parse_relativedelta test

* more style

* Re-export new class and function in `redbot.core.commands`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-06 02:50:21 +02:00
jack1142
86649e897f Add [p]diagnoseissues command (#5243)
* Split `Requires._transition_state` into reusable methods for Diagnoser

* (style) Fix line length

* Add missing .format()

* Add handling for user permissions, privilege level, Permissions rules

* Add missing awaits, use correct method in user perms check, add 'the'

* Fix .format() fields

* Add comment

* Add new file to labeler's configuration

* Add the command to the documentation

* All the work from DiagnoserCog

You can find the commit history of it here:
https://github.com/jack1142/DiagnoserCog

* Fix circular import

* Make channel argument optional

* Add a tip about channels from different servers
2021-09-05 19:01:46 +02:00
jack1142
d84c8efa34 Update Mac OS instructions to work properly on Apple Silicon (#5234) 2021-09-04 10:56:43 -07:00
jack1142
a0a433b13d Improve and add more usage of discord timestamps (#5241)
* Improve and add more usage of discord timestamps

* How did that whitespace get there?
2021-09-04 09:14:05 +02:00
PredaaA
4366af6f6c [Cleanup] Handle NotFound error of prompt in check_100_plus (#5191)
* [Cleanup] Handle HTTPException of prompt in check_100_plus

* Update redbot/cogs/cleanup/cleanup.py

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-04 00:38:03 +02:00
PredaaA
42edb12b2e [Trivia] Handle potential Discord errors in session (#5172)
* [Trivia] Handle potential Discord errors in session.

* Hm why did I put HTTPException in there

* Revert "Hm why did I put HTTPException in there"

This reverts commit dc5cb990cb.

* Revert "[Trivia] Handle potential Discord errors in session."

This reverts commit d90e45f9e0.

* Handle Discord errors in _error_handler.
2021-09-04 00:36:48 +02:00
Lui
36ea867dcf [Streams] Check non-existent streams more than once (#5223)
* [Streams] Check non-existent streams more than once

- For YouTube streams, it seems like the RSS feed may sometimes return
  an HTTP 404 for a channel, even though the channel exists.
- If this happens more than a few times, then we should declare the
  stream as non-existent, and purge it from the list of streams we
  check.

* [Streams] Move retry_count reset for YouTubeStream

- Reset after the RSS check, since that is the only place where we raise
  StreamNotFound in that function.

* [Streams] Increase retry to 20

* [Streams] Reduce retry count to 10
2021-09-03 16:25:01 +02:00
Samuel
cad7f400f9 Add commands for editing aliases (#5108)
* [Alias] Added alias edit and alias global edit

* Comment and whitespace only changes

* Docstring fix

* Remove more whitespace

* Add `the` before some English purists make a PR for this...

Co-authored-by: npc203 <npc203@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-03 01:50:08 +00:00
jack1142
6d40de8da3 Invalidate cache in filter clear commands 2021-09-03 03:37:25 +02:00
Enul
8880251749 [Mod] Add user hierarchy check to [p]rename (#5211)
* added hierarchy check for rename

added hierarchy check for rename from utils

* format and self check

changed formats and added statement if me != member

* black format

apply black formatting and fix typo

* tox style 

tox i guess

* tox again 

:<

* Update redbot/cogs/mod/names.py

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

* Fix styling

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-03 01:08:46 +00:00
aikaterna
17d24b28f1 [Audio] Update Lavalink.jar build (#5233) 2021-09-03 02:30:04 +02:00
Jamie
c4f8f65d4d Add toggleable notification of deleted messages count in Cleanup (#5218)
* Addition of cleanup notification.

* black

* subtract invoking message from count

* Update redbot/cogs/cleanup/cleanup.py

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

* be explicity about kwarg

* address review

* style

* Fix type hints

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-03 01:12:28 +02:00
Kreus Amredes
4e2e4bfe6a [Mod] Send ban reason on Temp Bans (#4837)
* [Mod] Send ban reason on Temp Bans

* If none

* Locale friendly

* Fixes for black style

* Use double line break to distinguish between reason header

* Check settings

* Black

* Reduce the number of config calls

* remove additional config call

* fixes

* style

* We're already in `if reason` so this is always True

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-02 19:07:07 +02:00
Kreus Amredes
f628093208 [Filter] Add filter clear commands (#4981)
* [Filter] Add filter clear commands

* define messagepredicate

* actually send msg, lol

* deco fixes

* black

* [Docs] Update filter documentation

* fixes

* style

* Add missing whitespace

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-02 17:55:58 +02:00
jack1142
6f0a8b11d7 Add test for presence of upper and lower bound on Python version (#5198)
* Add test for presence of upper and lower bound on Python version

* [part 1/3] Test that this works, DO NOT MERGE

* [part 2/3] Test that this works, DO NOT MERGE

* [part 3/3] Revert unwanted changes, NOW YOU CAN MERGE!
2021-09-02 01:52:27 +02:00
jack1142
f6cf0d5670 Allow dots in the middle of repo names (#5214)
* Allow dots in the middle of repo names

* Screw you, Black
2021-09-02 01:45:25 +02:00
PredaaA
8eac787f7b [Streams] Improve config calls in stream alerts (#4968)
* [Streams] Improve config calls in stream alerts.

* config->guild_data, style changes

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-02 01:40:15 +02:00
jack1142
88abe469b6 Accept mentions in [p]cleanup user (#5169)
* Accept mentions in `[p]cleanup user`

* Updated spacing & formatting on info logging

* Whoops...

Co-authored-by: Kowlin <boxedpp@gmail.com>
2021-09-02 01:08:13 +02:00
Kreus Amredes
b0f93a3ce1 [Admin] Allow selfroleset command to consume multiple roles (#5238)
* Initial commit

* update docs

* remove usage kwargs

* style

* Type hint with SelfRole and not discord.Role

* fix docstring

* Various improvements, fixes

* i need to wake up

* more improvements

* AAAA

* add back check

* Improve converter error

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-01 22:37:45 +00:00
Vexed
f8664a4e8a [Help] Let owners set menu reaction timeout (#5205)
* initial help reaction timeout with min 15, max 300

* slight wording change

* docs!

* aaa

* Suggestions from code review, thank Jack!

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-01 18:35:11 +02:00
Kreus Amredes
6a8968e34d [Docs] Fix changelog entry from being under the wrong section (#5236) 2021-09-01 03:10:50 +02:00
Kreus Amredes
dbd25e92a1 Document parameters in remaining chat_formatting functions (#5215) 2021-09-01 02:51:59 +02:00
GhOsT
c57ef4828e [Core] add ctx.tick() to [p]invite (#5199) 2021-08-31 23:27:11 +02:00
Kreus Amredes
6bf85a42f8 [Downloader] Fix various formatting issues in cog update notices (#5185)
* again :P

* some more

* fix
2021-08-31 23:20:29 +02:00
Kreus Amredes
d15011e2c5 [Downloader] Suppress NotFound errors in [p]cog update command (#5109)
* [Downloader] Suppress NotFound errors when cog update message is deleted

* occurance 2
2021-08-31 23:19:15 +02:00
Kowlin
f05debc923 Initial support for Discord timestamping (#5155)
* Initial support for Discord timestamping

* Fix timezones

* Fix userinfo for users with member.joined_at equal to None

* Simplify

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-08-31 19:55:33 +00:00
PredaaA
b586c2f990 [Mod] Check if guild is unavailable in tempban expirations (#5173)
* [Mod] Check if guild.me is None else continue in tempban expirations.

* Check for guild.unavailable instead of guild.me being None.
2021-08-31 20:48:21 +02:00
Kreus Amredes
c34f1e2f01 [Mutes] Fix NotFound error when trying to delete message (#5163)
* [Mutes] Fix NotFound error when trying to delete message

* other occurances
2021-08-31 20:47:32 +02:00
Kreus Amredes
299d6c57d9 [Alias] Fix double plural grammar in alias docstring (#5092) 2021-08-31 20:46:12 +02:00
Grant LeBlanc
173127e015 [Trivia] Validate custom trivia file upload using schema (#4659)
* Add custom trivia list schema validation and test

* Address review

* Improve error formatting in trivia list test

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-08-31 20:44:25 +02:00
Twentysix
91ecd6560a [Docs] Add intents / public bots guide (#5221)
* [Docs] Add intents / public bots guide

* [Docs] Intent guide: update on d.py
2021-08-30 17:41:41 -04:00
Vexed
7413e3c350 [Logging] Make Rich more copy-/paste-able (#5181)
* commit work, mostly untested

* v minor refactor

* force new renderer

* Code style changes

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-08-30 22:15:26 +02:00
Kreus Amredes
d13d6477c5 [Docs] Update alias userdoc to reflect updated help menu layout (#5048) 2021-08-29 15:36:14 +02:00
Kreus Amredes
ee0627f41f [Docs] Getting started guide: fix incorrect information / typos (#5180) 2021-08-29 15:26:13 +02:00
Kreus Amredes
ec5428f1e9 [Docs] Fix argument formatting in Admin cog guide 2021-08-29 14:36:10 +02:00
Vexed
37c52d6066 [Docs] Add Oracle Cloud $300 credits to hosting guide 2021-08-29 14:33:00 +02:00
Kreus Amredes
48fa10343c [Docs] Fix warning block in Mod cog guide (#5220) 2021-08-29 14:31:13 +02:00
aikaterna
43071e3fa2 [Audio] Add a wait time before auto disconnect (#5188)
* Update lavalink.py

* Add comment

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-08-13 18:01:31 +02:00
jack1142
80e7a70f9e Fix base branch used for PyPI release? (#5212) 2021-08-13 04:08:39 +02:00
Kreus Amredes
11913806a4 fix typo (#5207) 2021-08-13 02:36:57 +02:00
fredster33
f42d675ac0 Update DO link (#5209) 2021-08-13 02:36:15 +02:00
Kowlin
e154a630df Add a per guild max volume setting (#5165)
* Oh great... someone touched Audio again.

* How did that get in there?

* Style? Style.
2021-07-16 14:45:54 -07:00
MAX
2b67b9d06d [Audio] UX improvements to [p]summon command (#5186) 2021-07-13 19:52:46 +02:00
Vexed
2ab46fbe41 use rich console print for red colour (#5184) 2021-07-07 04:46:47 +02:00
Kreusada
49cc9374d4 [Downloader] Fix formatting for red version requirement notices (#5183) 2021-07-06 18:50:10 +02:00
Just-Jojo
ad6b8662b2 [Warnings] Allow for 0 point warnings (#5178) 2021-07-03 23:52:59 +00:00
jack1142
9d35df2048 Add cherry_picker configuration (#5168) 2021-07-02 21:05:12 +02:00
jack1142
ec26687e9e Improve release correctness and safety by using GH Environments (#5167)
* Improve release safety by using GH Environments

* Exit early when just returning version
2021-06-30 17:24:18 +02:00
Kowlin
3b7f9e24b4 Refined debuginfo (#5156)
* Oh my gosh Kowlin is finishing work!?

* fix style

* use f-strings

* moar f-strings actually

* Fix style...

* I did a poor job of find-replacing things

* Improve code readability per previous Kowlin's style

* And reformat it in such a way that get jack through the day

* Okay maybe some whitespace

* Update core_commands.py

* Update core_commands.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-06-27 03:54:27 +02:00
Dav
0fb7c8bdba Raise on an uncompliant message in Context.maybe_send_embed() (#4465)
* Raise on uncompliant message

* just wait for me to be done flame! (grammar+testing)

* i liked this better
2021-06-24 08:22:58 +02:00
Draper
34b912bc7c Allow menu() to listen to both adding and removing reactions (#4517) 2021-06-23 18:48:06 +00:00
jack1142
a9dc93cf81 Version bump to 3.5.0.dev1 (#5154) 2021-06-23 20:33:02 +02:00
jack1142
52f96e043b Add simple PR template (#5150) 2021-06-18 18:34:42 -04:00
jack1142
5b58cdb449 Add missing changelog entries to Red 3.4.12 changelog (#5148)
* Add missing changelog entries to Red 3.4.12 changelog

* Update contribs list

* .

* Apply suggestions from code review

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2021-06-18 18:09:40 -04:00
Kreusada
8a6aa41d86 [CustomCommands/Docs] Fix argument name in [p]cc show command docstring (#5149)
* [CustomCom] Fix argument name in ``[p]cc show`` command docstring

* update docs
2021-06-18 17:48:46 -04:00
github-actions[bot]
e52fb2c086 Version bump to 3.4.13.dev1 (#5147)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-17 20:42:58 +02:00
1454 changed files with 272164 additions and 153175 deletions

5
.cherry_picker.toml Normal file
View File

@@ -0,0 +1,5 @@
team = "Cog-Creators"
repo = "Red-DiscordBot"
check_sha = "6251c585e4ec0a53813a9993ede3ab5309024579"
fix_commit_msg = false
default_branch = "V3/develop"

40
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,40 @@
# Since version 2.23 (released in August 2019), git-blame has a feature
# to ignore or bypass certain commits.
#
# This file contains a list of commits that are not likely what you
# are looking for in a blame, such as mass reformatting or renaming.
# You can set this file as a default ignore file for blame by running
# the following command.
#
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs
# [V3] Update code standards (black code format pass) (#1650)
b88b5a2601f56bda985729352d24842f087a8ade
# Black tests and setup.py (#1657)
e01cdbb0912387749d9459e1d934f9ed393a9b51
# Black formatting for generate_strings.py and docs/conf.py (#1658)
1ecaf6f8d5f2af731bec3eb6ad3a9721ab7a2812
# [V3 Travis] Update travis to not skip pipfile lock... (#1678)
# additional black formatting pass to conform to black 18.5b
d3f406a34a5cae6ea63664e76e8e74be43f9949f
# [V3] Update black version and reformat (#1745)
14cc701b25cea385fd0d537cdb6475d341c017c5
# [V3] Clean up some ugly auto-formatted strings (#1753)
622382f42588ac1d8a52bd3e39bf171c89ff0224
# [CI] Improve automated checks (#2702)
16443c8cc0c24cbc5b3dc7de858edb71b9ca6cd3
# Bump black to 20.8b1 (and reformat) (#4371)
85afe19455f91af21a0f603705eeb5d9599b45cc
# Reformat with Black 22.1.0 (#5633)
c69e8d31fdadbe10230ec0ea2ef35402e5c4cf43
# Reformat with Black 2023 formatting changes
226d8d734de43e1d5ea96a528a8e480641604db1

2
.git_archive_info.txt Normal file
View File

@@ -0,0 +1,2 @@
$Format:%h$
$Format:%(describe:tags=true)$

7
.gitattributes vendored
View File

@@ -2,3 +2,10 @@
# binary file excludsions
*.png binary
# include commit/tag information in `.git_archive_info.txt` when packing with git-archive
.git_archive_info.txt export-subst
# hide diffs for .po files by default
# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github
*.po linguist-generated

15
.github/CODEOWNERS vendored
View File

@@ -1,18 +1,25 @@
# Cogs
/redbot/cogs/audio/** @aikaterna @PredaaA
/redbot/cogs/downloader/* @jack1142
/redbot/cogs/downloader/* @Jackenmen
/redbot/cogs/streams/* @palmtree5
/redbot/cogs/mutes/* @TrustyJAID
# Docs - Install and update guides
/docs/install_guides/** @Jackenmen
/docs/update_red.rst @Jackenmen
# Docs - Version guarantees
/docs/version_guarantees.rst @Jackenmen
# Trivia Lists
/redbot/cogs/trivia/data/lists/whosthatpokemon*.yaml @aikaterna
# Tests
/redbot/pytest/downloader* @jack1142
/tests/cogs/downloader/* @jack1142
/redbot/pytest/downloader* @Jackenmen
/tests/cogs/downloader/* @Jackenmen
# Schemas
/schema/* @jack1142
/schema/* @Jackenmen
# CI
/.travis.yml @Kowlin

17
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,17 @@
### Description of the changes
### Have the changes in this PR been tested?
<!--
Choose one (remove the line that doesn't apply):
-->
Yes
No
<!--
If the question doesn't apply (for example, it's not a code change), choose Yes.
Please respond to this question truthfully. We do not delay nor reject PRs
based on the answer to this question but it allows to better review this PR.
-->

363
.github/labeler.yml vendored
View File

@@ -1,185 +1,332 @@
"Category: Admin":
"Category: CI":
- .github/workflows/**/*
"Category: Cogs - Admin":
# Source
- redbot/cogs/admin/*
# Docs
- docs/cog_guides/admin.rst
"Category: Alias":
- docs/.resources/admin/**/*
"Category: Cogs - Alias":
# Source
- redbot/cogs/alias/*
# Docs
- docs/cog_guides/alias.rst
"Category: Audio Cog":
# Tests
- redbot/pytest/alias.py
- tests/cogs/test_alias.py
- docs/.resources/alias/**/*
"Category: Cogs - Audio":
# Source
- any:
- redbot/cogs/audio/**/*
all:
- "!redbot/cogs/audio/**/locales/*"
"Category: Bank API":
# Source
- redbot/core/bank.py
# Docs
- docs/framework_bank.rst
"Category: Bank Cog":
# Source
- redbot/cogs/bank/*
# Docs
- docs/cog_guides/bank.rst
"Category: Bot Core":
# Source
- redbot/*
- redbot/core/__init__.py
- redbot/core/_sharedlibdeprecation.py
- redbot/core/bot.py
- redbot/core/checks.py
- redbot/core/cli.py
- redbot/core/cog_manager.py
- redbot/core/core_commands.py
- redbot/core/data_manager.py
- redbot/core/errors.py
- redbot/core/events.py
- redbot/core/global_checks.py
- redbot/core/settings_caches.py
# Docs
- docs/framework_apikeys.rst
- docs/framework_bot.rst
- docs/framework_cogmanager.rst
- docs/framework_datamanager.rst
- docs/framework_events.rst
- docs/cog_guides/cog_manager_ui.rst
- docs/cog_guides/core.rst
"Category: CI":
- .github/workflows/*
"Category: Cleanup Cog":
- docs/cog_guides/audio.rst
# Tests
- tests/cogs/audio/**/*
"Category: Cogs - Bank": [] # historical label for a removed cog
"Category: Cogs - Cleanup":
# Source
- redbot/cogs/cleanup/*
# Docs
- docs/cog_guides/cleanup.rst
"Category: Command Module":
# Source
- any:
# Source
- redbot/core/commands/*
# Docs
- docs/framework_checks.rst
- docs/framework_commands.rst
all:
- "!redbot/core/commands/help.py"
"Category: Config":
# Source
- redbot/core/drivers/*
- redbot/core/config.py
# Docs
- docs/framework_config.rst
"Category: CustomCom":
"Category: Cogs - CustomCommands":
# Source
- redbot/cogs/customcom/*
# Docs
- docs/cog_customcom.rst
- docs/cog_guides/customcommands.rst
"Category: Dev Cog":
"Category: Cogs - Dev":
# Source
- redbot/core/dev_commands.py
"Category: Docs":
- docs/**/*
"Category: Downloader":
# Docs
- docs/cog_guides/dev.rst
# Tests
- tests/core/test_dev_commands.py
"Category: Cogs - Downloader":
# Source
- redbot/cogs/downloader/*
# Docs
- docs/cog_guides/downloader.rst
"Category: Economy Cog":
# Tests
- redbot/pytest/downloader.py
- redbot/pytest/downloader_testrepo.*
- tests/cogs/downloader/**/*
"Category: Cogs - Economy":
# Source
- redbot/cogs/economy/*
# Docs
- docs/cog_guides/economy.rst
"Category: Filter":
# Tests
- redbot/pytest/economy.py
- tests/cogs/test_economy.py
"Category: Cogs - Filter":
# Source
- redbot/cogs/filter/*
# Docs
- docs/cog_guides/filter.rst
"Category: General Cog":
"Category: Cogs - General":
# Source
- redbot/cogs/general/*
# Docs
- docs/cog_guides/general.rst
"Category: Help":
- redbot/core/commands/help.py
"Category: i18n":
# Source
- redbot/core/i18n.py
# Locale files
- redbot/**/locales/*
# Docs
- docs/framework_i18n.rst
"Category: Image":
"Category: Cogs - Image":
# Source
- redbot/cogs/image/*
# Docs
- docs/cog_guides/image.rst
"Category: Meta":
- ./*
- .github/*
- .github/ISSUE_TEMPLATE/*
- .github/PULL_REQUEST_TEMPLATE/*
- schema/*
- tools/*
"Category: Mod Cog":
"Category: Cogs - Mod":
# Source
- redbot/cogs/mod/*
# Docs
- docs/cog_guides/mod.rst
"Category: Modlog API":
# Source
- redbot/core/generic_casetypes.py
- redbot/core/modlog.py
# Docs
- docs/framework_modlog.rst
"Category: Modlog Cog":
# Tests
- redbot/pytest/mod.py
- tests/cogs/test_mod.py
"Category: Cogs - Modlog":
# Source
- redbot/cogs/modlog/*
# Docs
- docs/cog_guides/modlog.rst
"Category: Mutes Cog":
"Category: Cogs - Mutes":
# Source
- redbot/cogs/mutes/*
# Docs
- docs/cog_guides/mutes.rst
"Category: Permissions":
"Category: Cogs - Permissions":
# Source
- redbot/cogs/permissions/*
# Docs
- docs/cog_guides/permissions.rst
- docs/cog_permissions.rst
"Category: Reports Cog":
# Tests
- redbot/pytest/permissions.py
- tests/cogs/test_permissions.py
"Category: Cogs - Reports":
# Source
- redbot/cogs/reports/*
# Docs
- docs/cog_guides/reports.rst
"Category: RPC/ZMQ API":
# Source
- redbot/core/rpc.py
# Docs
- docs/framework_rpc.rst
"Category: Streams":
"Category: Cogs - Streams":
# Source
- redbot/cogs/streams/*
# Docs
- docs/cog_guides/streams.rst
"Category: Tests":
- redbot/pytest/*
- tests/**/*
"Category: Trivia Cog":
"Category: Cogs - Trivia":
# Source
- redbot/cogs/trivia/*
# Docs
- docs/cog_guides/trivia.rst
- docs/guide_trivia_list_creation.rst
"Category: Trivia Lists":
- docs/.resources/trivia/**/*
# Tests
- tests/cogs/test_trivia.py
"Category: Cogs - Trivia - Lists":
- redbot/cogs/trivia/data/lists/*
"Category: Utility Functions":
# Source
- redbot/core/utils/*
# Docs
- docs/framework_utils.rst
"Category: Warnings":
"Category: Cogs - Warnings":
# Source
- redbot/cogs/warnings/*
# Docs
- docs/cog_guides/warnings.rst
"Category: Core - API - Audio": [] # potential future feature
"Category: Core - API - Bank":
# Source
- redbot/core/bank.py
# Docs
- docs/framework_bank.rst
"Category: Core - API - App Commands Package":
# Source
- redbot/core/app_commands/*
# Docs
- docs/framework_app_commands.rst
# Tests
- tests/core/test_app_commands.py
"Category: Core - API - Commands Package":
# Source
- any:
- redbot/core/commands/*
- "!redbot/core/commands/help.py"
# this isn't in commands package but it just re-exports things from it
- redbot/core/checks.py
# Docs
- docs/framework_checks.rst
- docs/framework_commands.rst
# Tests
- tests/core/test_commands.py
"Category: Core - API - Config":
# Source
- any:
- redbot/core/_drivers/**/*
- "!redbot/core/_drivers/**/locales/*"
- redbot/core/_config.py
- redbot/core/config.py
# Docs
- docs/framework_config.rst
# Tests
- tests/core/test_config.py
"Category: Core - API - Other":
# Source
- redbot/__init__.py
- redbot/core/__init__.py
- redbot/core/data_manager.py
- redbot/core/errors.py
- redbot/core/tree.py
# Docs
- docs/framework_datamanager.rst
- docs/framework_tree.rst
# Tests
- redbot/pytest/data_manager.py
- tests/core/test_cog_manager.py
- tests/core/test_data_manager.py
- tests/core/test_version.py
"Category: Core - API - Utils Package":
# Source
- any:
- redbot/core/utils/*
- "!redbot/core/utils/_internal_utils.py"
# Docs
- docs/framework_utils.rst
# Tests
- tests/core/test_utils.py
"Category: Core - Bot Class":
# Source
- redbot/core/bot.py
# Docs
- docs/framework_apikeys.rst
- docs/framework_bot.rst
"Category: Core - Bot Commands":
# Source
- redbot/core/core_commands.py
- redbot/core/_diagnoser.py
# Docs
- docs/.resources/cog_manager_ui/**/*
- docs/cog_guides/cog_manager_ui.rst
- docs/cog_guides/core.rst
"Category: Core - Command-line Interfaces":
- redbot/__main__.py
- redbot/logging.py
- redbot/core/_cli.py
- redbot/core/_debuginfo.py
- redbot/setup.py
"Category: Core - Help":
- redbot/core/commands/help.py
"Category: Core - i18n":
# Source
- redbot/core/_i18n.py
- redbot/core/i18n.py
# Locale files
- redbot/**/locales/*
# Docs
- docs/framework_i18n.rst
"Category: Core - Modlog":
# Source
- redbot/core/generic_casetypes.py
- redbot/core/modlog.py
# Docs
- docs/framework_modlog.rst
"Category: Core - Other Internals":
# Source
- redbot/core/_cog_manager.py
- redbot/core/_events.py
- redbot/core/_global_checks.py
- redbot/core/_settings_caches.py
- redbot/core/_sharedlibdeprecation.py
- redbot/core/utils/_internal_utils.py
# Tests
- redbot/pytest/__init__.py
- redbot/pytest/cog_manager.py
- redbot/pytest/core.py
- tests/core/test_installation.py
"Category: Core - RPC/ZMQ":
# Source
- redbot/core/_rpc.py
# Docs
- docs/framework_rpc.rst
# Tests
- redbot/pytest/rpc.py
- tests/core/test_rpc.py
- tests/rpc_test.html
"Category: Docker": [] # potential future feature
"Category: Docs - Changelogs":
- CHANGES.rst
- docs/changelog.rst
- docs/incompatible_changes/**/*
"Category: Docs - For Developers":
- docs/framework_events.rst
- docs/guide_cog_creation.rst
- docs/guide_cog_creators.rst
- docs/guide_migration.rst
- docs/guide_publish_cogs.rst
- docs/guide_slash_and_interactions.rst
"Category: Docs - Install Guides":
- docs/about_venv.rst
- docs/autostart_*.rst
- docs/.resources/bot-guide/**/*
- docs/bot_application_guide.rst
- docs/install_guides/**/*
- docs/update_red.rst
"Category: Docs - Other":
- docs/host-list.rst
- docs/index.rst
- docs/version_guarantees.rst
- README.md
"Category: Docs - User Guides":
- docs/getting_started.rst
- docs/intents.rst
- docs/red_core_data_statement.rst
# TODO: move these to `docs/.resources/getting_started` subfolder
- docs/.resources/red-console.png
- docs/.resources/code-grant.png
- docs/.resources/instances-ssh-button.png
- docs/.resources/ssh-output.png
"Category: Meta":
# top-level files
- any:
- '*'
- '!README.md'
- '!CHANGES.rst'
# .gitattributes files
- '**/.gitattributes'
# GitHub configuration files, with the exception of CI configuration
- .github/*
- .github/ISSUE_TEMPLATE/*
- .github/PULL_REQUEST_TEMPLATE/*
# documentation configuration, extensions, scripts, templates, etc.
- docs/conf.py
- docs/_ext/**/*
- docs/_html/**/*
- docs/make.bat
- docs/Makefile
- docs/prolog.txt
- docs/_templates/**/*
# empty file
- redbot/cogs/__init__.py
# py.typed file
- redbot/py.typed
# requirements files
- requirements/*
# schema files
- schema/*
# tests configuration, global fixtures, etc.
- tests/conftest.py
- tests/__init__.py
- tests/*/__init__.py
# repository tools
- tools/*
# "Category: RPC/ZMQ methods": [] # can't be matched by file patterns
"Category: Vendored Packages":
- redbot/vendored/**/*

View File

@@ -7,12 +7,11 @@ permissions:
issues: write
jobs:
build:
apply_triage_label_to_issues:
runs-on: ubuntu-latest
steps:
- name: Apply Triage Label
uses: actions/github-script@v3
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
@@ -21,7 +20,7 @@ jobs:
console.log('Issue already has Status label, skipping...');
return;
}
github.issues.addLabels({
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,

View File

@@ -1,16 +1,27 @@
name: Auto Labeler - PRs
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
permissions:
pull-requests: write
jobs:
build:
label_pull_requests:
runs-on: ubuntu-latest
steps:
- name: Apply Type Label
uses: actions/labeler@v3
uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: "" # this is a temporary workaround, see #4844
sync-labels: true
- name: Label documentation-only changes.
uses: Jackenmen/label-doconly-changes@v1
env:
LDC_LABELS: Docs-only

View File

@@ -0,0 +1,23 @@
name: Check label pattern exhaustiveness
on:
pull_request:
push:
jobs:
check_label_pattern_exhaustiveness:
name: Check label pattern exhaustiveness
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install script's pre-requirements
run: |
python -m pip install -U pip
python -m pip install -U pathspec pyyaml rich
- name: Check label pattern exhaustiveness
run: |
python .github/workflows/scripts/check_label_pattern_exhaustiveness.py

View File

@@ -17,31 +17,30 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -r ./tools/dev-requirements.txt
python -m pip install -U pip wheel
python -m pip install -e .[all]
# Set the `CODEQL-PYTHON` environment variable to the Python executable
# that includes the dependencies
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: 'python'
# Override the default behavior so that the action doesn't attempt
# to auto-install Python dependencies
# Learn more...
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#analyzing-python-dependencies
setup-python-dependencies: false
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -55,4 +54,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3

View File

@@ -9,9 +9,9 @@ jobs:
if: github.repository == 'Cog-Creators/Red-DiscordBot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
@@ -19,8 +19,8 @@ jobs:
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install -y crowdin
pip install redgettext==3.3
sudo apt-get install -y crowdin3
pip install redgettext==3.4.2
- name: Generate source files
run: |
make gettext
@@ -28,5 +28,5 @@ jobs:
run: |
make upload_translations
env:
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}

View File

@@ -14,13 +14,17 @@ jobs:
name: Lint Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ env.ref }}
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- run: "python -m pip install git+https://github.com/pycqa/pyflakes@1911c20#egg=pyflakes git+https://github.com/pycqa/pycodestyle@d219c68#egg=pycodestyle git+https://gitlab.com/pycqa/flake8@3.7.9#egg=flake8"
- run: >
python -m pip install
'pyflakes @ https://github.com/pycqa/pyflakes/tarball/1911c20'
'pycodestyle @ https://github.com/pycqa/pycodestyle/tarball/d219c68'
'flake8 @ https://github.com/pycqa/flake8/tarball/3.7.9'
name: Install Flake8
- run: "python -m flake8 . --count --select=E9,F7,F82 --show-source"
name: Flake8 Linting

View File

@@ -16,9 +16,9 @@ jobs:
needs: pr_stable_bump
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
@@ -26,8 +26,8 @@ jobs:
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install -y crowdin
pip install redgettext==3.3
sudo apt-get install -y crowdin3
pip install redgettext==3.4.2
- name: Generate source files
run: |
@@ -36,26 +36,26 @@ jobs:
run: |
make download_translations
env:
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}
- name: Create Pull Request
id: cpr_crowdin
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Automated Crowdin downstream
title: "[i18n] Automated Crowdin downstream"
title: "Automated Crowdin downstream"
body: |
This is an automated PR that is part of Prepare Release automated workflow (2 out of 2).
Please ensure that there are no errors or invalid files are in the PR.
labels: "Automated PR, Category: i18n, Changelog Entry: Skipped"
labels: "Automated PR, Changelog Entry: Skipped"
branch: "automated/i18n"
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
milestone: ${{ needs.pr_stable_bump.outputs.milestone_number }}
- name: Close and reopen the PR with different token to trigger CI
uses: actions/github-script@v3
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.cpr_crowdin.outputs.pull-request-number }}
PR_OPERATION: ${{ steps.cpr_crowdin.outputs.pull-request-operation }}
@@ -73,9 +73,9 @@ jobs:
milestone_number: ${{ steps.get_milestone_number.outputs.result }}
steps:
# Checkout repository and install Python
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
@@ -91,7 +91,7 @@ jobs:
# Get milestone number of the milestone for the new stable version
- name: Get milestone number
id: get_milestone_number
uses: actions/github-script@v3
uses: actions/github-script@v6
env:
MILESTONE_TITLE: ${{ steps.bump_version_stable.outputs.new_version }}
with:
@@ -103,7 +103,7 @@ jobs:
- name: Create Pull Request
id: cpr_bump_stable
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Version bump to ${{ steps.bump_version_stable.outputs.new_version }}
@@ -117,7 +117,7 @@ jobs:
milestone: ${{ steps.get_milestone_number.outputs.result }}
- name: Close and reopen the PR with different token to trigger CI
uses: actions/github-script@v3
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.cpr_bump_stable.outputs.pull-request-number }}
PR_OPERATION: ${{ steps.cpr_bump_stable.outputs.pull-request-operation }}

View File

@@ -2,42 +2,169 @@ name: Publish Release
on:
push:
tags:
- "*"
- "3.[0-9]+.[0-9]+"
jobs:
release_to_pypi:
release_information:
if: github.repository == 'Cog-Creators/Red-DiscordBot'
name: GO HERE BEFORE APPROVING
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: V3/develop
# Checkout repository and install Python
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
# Get version to release
- name: Get version to release
id: version_to_release
run: |
python .github/workflows/scripts/bump_version.py
env:
PYTHONPATH: ${{ github.workspace }}:${{ env.PYTHONPATH }}
JUST_RETURN_VERSION: '1'
# Print release information
- name: REVIEW OUTPUT OF THIS STEP BEFORE APPROVING
env:
TAG_BASE_BRANCH: ${{ github.event.base_ref }}
TAG_REF_NAME: ${{ github.ref }}
RELEASE_VERSION: ${{ steps.version_to_release.outputs.version }}
run: |
echo 'Release information:'
echo "- Branch the tag was based off: ${TAG_BASE_BRANCH#'refs/heads/'}"
echo "- Tag name: ${TAG_REF_NAME#'refs/tags/'}"
echo "- Release version: $RELEASE_VERSION"
echo "TAG_NAME=${TAG_REF_NAME#'refs/tags/'}" >> $GITHUB_ENV
- name: Ensure the tag name corresponds to the released version
env:
RELEASE_VERSION: ${{ steps.version_to_release.outputs.version }}
run: |
if [[ "$TAG_NAME" != "$RELEASE_VERSION" ]]; then
echo -n "The tag name ($TAG_NAME) is not the same as"
echo " the release version ($RELEASE_VERSION)!"
exit 1
else
echo "The tag name and the release version are the same ($TAG_NAME)."
echo 'Continuing...'
fi
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build and publish
python -m pip install --upgrade build twine
- name: Build
run: python -m build
- name: Check built distributions
run: python -m twine check dist/*
- name: Upload packaged distributions
uses: actions/upload-artifact@v4
with:
name: build-output
path: ./dist
generate_default_ll_server_config:
name: Generate default application.yml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install script's dependencies
run: python -m pip install PyYAML
- name: Generate default application.yml
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_token }}
APP_YML_FILE: "Red-DiscordBot-${{ github.ref_name }}-default-lavalink-application.yml"
run: |
python -m build
twine upload dist/*
mkdir -p release_assets
python .github/workflows/scripts/get_default_ll_server_config.py "release_assets/$APP_YML_FILE"
- name: Upload default application.yml
uses: actions/upload-artifact@v4
with:
name: ll-default-server-config
path: ./release_assets
release_to_pypi:
needs:
- release_information
- build
- generate_default_ll_server_config
environment: Release
name: Release to PyPI
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Download packaged distributions
uses: actions/download-artifact@v4
with:
name: build-output
path: dist/
- name: Download default application.yml
uses: actions/download-artifact@v4
with:
name: ll-default-server-config
path: release_assets/
- name: Upload dists to GitHub Release
env:
GITHUB_TOKEN: "${{ github.token }}"
run: |
gh release upload "$GITHUB_REF_NAME" dist/* release_assets/* --repo "$GITHUB_REPOSITORY"
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# This is already checked during the build.
verify-metadata: false
# Allow security-minded people to verify whether the files on PyPI
# were automatically uploaded by a CI script.
print-hash: true
pr_dev_bump:
permissions:
contents: write
pull-requests: write
needs: release_to_pypi
name: Update Red version number to dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get base branch
env:
TAG_BASE_BRANCH: ${{ github.event.base_ref }}
run: |
echo "BASE_BRANCH=${TAG_BASE_BRANCH#'refs/heads/'}" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
ref: ${{ env.BASE_BRANCH }}
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
@@ -53,7 +180,7 @@ jobs:
# Get milestone number of the milestone for the old version
- name: Get milestone number
id: get_milestone_number
uses: actions/github-script@v3
uses: actions/github-script@v6
env:
MILESTONE_TITLE: ${{ steps.bump_version_dev.outputs.old_version }}
with:
@@ -65,7 +192,7 @@ jobs:
- name: Create Pull Request
id: cpr_bump_dev
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Version bump to ${{ steps.bump_version_dev.outputs.new_version }}
@@ -77,10 +204,10 @@ jobs:
branch: "automated/pr_bumps/${{ steps.bump_version_dev.outputs.new_version }}"
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
milestone: ${{ steps.get_milestone_number.outputs.result }}
base: V3/develop
base: ${{ env.BASE_BRANCH }}
- name: Close and reopen the PR with different token to trigger CI
uses: actions/github-script@v3
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.cpr_bump_dev.outputs.pull-request-number }}
PR_OPERATION: ${{ steps.cpr_bump_dev.outputs.pull-request-operation }}

99
.github/workflows/run_pip_compile.yaml vendored Normal file
View File

@@ -0,0 +1,99 @@
name: Generate requirements files with pip-compile.
on:
workflow_dispatch:
jobs:
generate_requirements:
name: Generate requirements files for ${{ matrix.os }} platform.
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- name: Checkout the repository.
uses: actions/checkout@v4
- name: Set up Python 3.8.
uses: actions/setup-python@v4
with:
python-version: |
3.11
3.10
3.9
3.8
- name: Install dependencies on Linux/macOS
if: matrix.os != 'windows-latest'
run: |
python3.11 -m pip install -U pip pip-tools
python3.10 -m pip install -U pip pip-tools
python3.9 -m pip install -U pip pip-tools
python3.8 -m pip install -U pip pip-tools
- name: Install dependencies on Windows
if: matrix.os == 'windows-latest'
run: |
py -3.11 -m pip install -U pip pip-tools
py -3.10 -m pip install -U pip pip-tools
py -3.9 -m pip install -U pip pip-tools
py -3.8 -m pip install -U pip pip-tools
- name: Generate requirements files.
id: compile_requirements
run: |
python .github/workflows/scripts/compile_requirements.py
- name: Upload requirements files.
uses: actions/upload-artifact@v4
with:
name: ${{ steps.compile_requirements.outputs.sys_platform }}
path: requirements/${{ steps.compile_requirements.outputs.sys_platform }}-*.txt
merge_requirements:
name: Merge requirements files.
needs: generate_requirements
runs-on: ubuntu-latest
steps:
- name: Checkout the repository.
uses: actions/checkout@v4
- name: Set up Python 3.8.
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install -U "packaging>=22.0"
- name: Download Windows requirements.
uses: actions/download-artifact@v4
with:
name: win32
path: requirements
- name: Download Linux requirements.
uses: actions/download-artifact@v4
with:
name: linux
path: requirements
- name: Download macOS requirements.
uses: actions/download-artifact@v4
with:
name: darwin
path: requirements
- name: Merge requirements files.
run: |
python .github/workflows/scripts/merge_requirements.py
- name: Upload merged requirements files.
uses: actions/upload-artifact@v4
with:
name: merged
path: |
requirements/base.txt
requirements/extra-*.txt

View File

@@ -1,10 +1,22 @@
import os
import re
import sys
from typing import Match
from typing import Any, Match
import redbot
GITHUB_OUTPUT = os.environ["GITHUB_OUTPUT"]
def set_output(name: str, value: Any) -> None:
with open(GITHUB_OUTPUT, "a", encoding="utf-8") as fp:
fp.write(f"{name}={value}\n")
if int(os.environ.get("JUST_RETURN_VERSION", 0)):
set_output("version", redbot._VERSION)
sys.exit(0)
version_info = None
@@ -12,7 +24,7 @@ version_info = None
def repl(match: Match[str]) -> str:
global version_info
print(f"::set-output name=old_version::{match.group('version')}")
set_output("old_version", match.group("version"))
new_stable_version = os.environ.get("NEW_STABLE_VERSION", "auto")
if new_stable_version == "auto":
@@ -25,12 +37,12 @@ def repl(match: Match[str]) -> str:
version_info.micro += 1
version_info.dev_release = 1
return f'__version__ = "{version_info}"'
return f'_VERSION = "{version_info}"'
with open("redbot/__init__.py", encoding="utf-8") as fp:
new_contents, found = re.subn(
pattern=r'^__version__ = "(?P<version>[^"]*)"$',
pattern=r'^_VERSION = "(?P<version>[^"]*)"$',
repl=repl,
string=fp.read(),
count=1,
@@ -38,10 +50,10 @@ with open("redbot/__init__.py", encoding="utf-8") as fp:
)
if not found:
print("Couldn't find `__version__` line!")
print("Couldn't find `_VERSION` line!")
sys.exit(1)
with open("redbot/__init__.py", "w", encoding="utf-8", newline="\n") as fp:
fp.write(new_contents)
print(f"::set-output name=new_version::{version_info}")
set_output("new_version", version_info)

View File

@@ -0,0 +1,215 @@
import itertools
import operator
import os
import subprocess
from pathlib import Path
from typing import Any, Dict, Iterable, List, Optional
from typing_extensions import Self
import rich
import yaml
from rich.console import Console, ConsoleOptions, RenderResult
from rich.tree import Tree
from pathspec import PathSpec
from pathspec.patterns.gitwildmatch import GitWildMatchPattern
ROOT_PATH = Path(__file__).resolve().parents[3]
class Matcher:
def __init__(self, *, any: Iterable[str] = (), all: Iterable[str] = ()) -> None:
self.any_patterns = tuple(any)
self.any_specs = self._get_pathspecs(self.any_patterns)
self.all_patterns = tuple(all)
self.all_specs = self._get_pathspecs(self.all_patterns)
def __repr__(self) -> str:
return f"Matcher(any={self.any_patterns!r}, all={self.all_patterns!r})"
def __eq__(self, other: Any) -> bool:
if isinstance(other, self.__class__):
return (
self.any_patterns == other.any_patterns and self.all_patterns == other.all_patterns
)
return NotImplemented
def __hash__(self) -> int:
return hash((self.any_patterns, self.all_patterns))
@classmethod
def _get_pathspecs(cls, patterns: Iterable[str]) -> List[PathSpec]:
return tuple(
PathSpec.from_lines(GitWildMatchPattern, cls._get_pattern_lines(pattern))
for pattern in patterns
)
@staticmethod
def _get_pattern_lines(pattern: str) -> List[str]:
# an approximation of actions/labeler's minimatch globs
if pattern.startswith("!"):
pattern_lines = ["*", f"!/{pattern[1:]}"]
else:
pattern_lines = [f"/{pattern}"]
if pattern.endswith("*") and "**" not in pattern:
pattern_lines.append(f"!/{pattern}/")
return pattern_lines
@classmethod
def get_label_matchers(cls) -> Dict[str, List[Self]]:
with open(ROOT_PATH / ".github/labeler.yml", encoding="utf-8") as fp:
label_definitions = yaml.safe_load(fp)
label_matchers: Dict[str, List[Matcher]] = {}
for label_name, matcher_definitions in label_definitions.items():
matchers = label_matchers[label_name] = []
for idx, matcher_data in enumerate(matcher_definitions):
if isinstance(matcher_data, str):
matchers.append(cls(any=[matcher_data]))
elif isinstance(matcher_data, dict):
matchers.append(
cls(any=matcher_data.pop("any", []), all=matcher_data.pop("all", []))
)
if matcher_data:
raise RuntimeError(
f"Unexpected keys at index {idx} for label {label_name!r}: "
+ ", ".join(map(repr, matcher_data))
)
elif matcher_data is not None:
raise RuntimeError(f"Unexpected type at index {idx} for label {label_name!r}")
return label_matchers
class PathNode:
def __init__(self, parent_tree: Tree, path: Path, *, label: Optional[str] = None) -> None:
self.parent_tree = parent_tree
self.path = path
self.label = label
def __rich__(self) -> str:
if self.label is not None:
return self.label
return self.path.name
class DirectoryTree:
def __init__(self, label: str) -> None:
self.root = Tree(PathNode(Tree(""), Path(), label=label))
self._previous = self.root
def __bool__(self) -> bool:
return bool(self.root.children)
def __rich_console__(self, console: Console, options: ConsoleOptions) -> RenderResult:
yield from self.root.__rich_console__(console, options)
def add(self, file: Path) -> Tree:
common_path = Path(os.path.commonpath([file.parent, self._previous.label.path]))
parent_tree = self._previous
while parent_tree != self.root and parent_tree.label.path != common_path:
parent_tree = parent_tree.label.parent_tree
for part in file.relative_to(common_path).parts:
if parent_tree.label.path.name == "locales":
if not parent_tree.children:
parent_tree.add(PathNode(parent_tree, parent_tree.label.path / "*.po"))
continue
parent_tree = parent_tree.add(PathNode(parent_tree, parent_tree.label.path / part))
self._previous = parent_tree
return parent_tree
class App:
def __init__(self) -> None:
self.exit_code = 0
self.label_matchers = Matcher.get_label_matchers()
self.tracked_files = [
Path(filename)
for filename in subprocess.check_output(
("git", "ls-tree", "-r", "HEAD", "--name-only"), encoding="utf-8", cwd=ROOT_PATH
).splitlines()
]
self.matches_per_label = {label_name: set() for label_name in self.label_matchers}
self.matches_per_file = []
self.used_matchers = set()
def run(self) -> int:
old_cwd = os.getcwd()
try:
os.chdir(ROOT_PATH)
self._run()
finally:
os.chdir(old_cwd)
return self.exit_code
def _run(self) -> None:
self._collect_match_information()
self._show_matches_per_label()
self._show_files_without_labels()
self._show_files_with_multiple_labels()
self._show_unused_matchers()
def _collect_match_information(self) -> None:
tmp_matches_per_file = {file: [] for file in self.tracked_files}
for file in self.tracked_files:
for label_name, matchers in self.label_matchers.items():
matched = False
for matcher in matchers:
if all(
path_spec.match_file(file)
for path_spec in itertools.chain(matcher.all_specs, matcher.any_specs)
):
self.matches_per_label[label_name].add(file)
matched = True
self.used_matchers.add(matcher)
if matched:
tmp_matches_per_file[file].append(label_name)
self.matches_per_file = sorted(tmp_matches_per_file.items(), key=operator.itemgetter(0))
def _show_matches_per_label(self) -> None:
for label_name, files in self.matches_per_label.items():
top_tree = DirectoryTree(f"{label_name}:")
for file in sorted(files):
top_tree.add(file)
rich.print(top_tree)
print()
def _show_files_without_labels(self) -> None:
top_tree = DirectoryTree("\n--- Not matched ---")
for file, labels in self.matches_per_file:
if not labels:
top_tree.add(file)
if top_tree:
self.exit_code = 1
rich.print(top_tree)
else:
print("--- All files match at least one label's patterns ---")
def _show_files_with_multiple_labels(self) -> None:
top_tree = DirectoryTree("\n--- Matched by more than one label ---")
for file, labels in self.matches_per_file:
if len(labels) > 1:
tree = top_tree.add(file)
for label_name in labels:
tree.add(label_name)
if top_tree:
rich.print(top_tree)
else:
print("--- None of the files are matched by more than one label's patterns ---")
def _show_unused_matchers(self) -> None:
for label_name, matchers in self.label_matchers.items():
for idx, matcher in enumerate(matchers):
if matcher not in self.used_matchers:
print(
f"--- Matcher {idx} for label {label_name!r} does not match any files! ---"
)
self.exit_code = 1
if __name__ == "__main__":
raise SystemExit(App().run())

View File

@@ -13,7 +13,7 @@ module.exports = (async function ({github, context}) {
if (sleep_time)
await new Promise(r => setTimeout(r, sleep_time));
github.issues.update({
github.rest.issues.update({
issue_number: pr_number,
owner: context.repo.owner,
repo: context.repo.repo,

View File

@@ -0,0 +1,52 @@
import os
import re
import shutil
import subprocess
import sys
from pathlib import Path
EXCLUDE_STEM_RE = re.compile(r".*-3\.(?!8-)(\d+)-extra-(doc|style)")
GITHUB_OUTPUT = os.environ["GITHUB_OUTPUT"]
REQUIREMENTS_FOLDER = Path(__file__).parents[3].absolute() / "requirements"
os.chdir(REQUIREMENTS_FOLDER)
def pip_compile(version: str, name: str) -> None:
stem = f"{sys.platform}-{version}-{name}"
if EXCLUDE_STEM_RE.fullmatch(stem):
return
constraint_flags = [
arg
for file in REQUIREMENTS_FOLDER.glob(f"{sys.platform}-3.8-*.txt")
for arg in ("-c", file.name)
]
executable = ("py", f"-{version}") if sys.platform == "win32" else (f"python{version}",)
subprocess.check_call(
(
*executable,
"-m",
"piptools",
"compile",
"--upgrade",
"--resolver=backtracking",
"--verbose",
f"{name}.in",
"--output-file",
f"{stem}.txt",
*constraint_flags,
)
)
for minor in range(8, 11 + 1):
version = f"3.{minor}"
pip_compile(version, "base")
shutil.copyfile(f"{sys.platform}-{version}-base.txt", "base.txt")
for file in REQUIREMENTS_FOLDER.glob("extra-*.in"):
pip_compile(version, file.stem)
with open(GITHUB_OUTPUT, "a", encoding="utf-8") as fp:
fp.write(f"sys_platform={sys.platform}\n")

View File

@@ -0,0 +1,31 @@
import sys
from pathlib import Path
import yaml
ROOT_FOLDER = Path(__file__).parents[3].absolute()
AUDIO_FOLDER = ROOT_FOLDER / "redbot/cogs/audio"
# We want to import `redbot.cogs.audio.managed_node` package as if it were top-level package
# so we have to the `redbot/cogs/audio` directory to Python's path.
sys.path.insert(0, str(AUDIO_FOLDER))
def main() -> int:
try:
output_file = sys.argv[1]
except IndexError:
print("Usage:", sys.argv[0], "<output_file>", file=sys.stderr)
return 2
import managed_node
server_config = managed_node.get_default_server_config()
with open(output_file, "w", encoding="utf-8") as fp:
yaml.safe_dump(server_config, fp)
return 0
if __name__ == "__main__":
raise SystemExit(main())

View File

@@ -0,0 +1,207 @@
from __future__ import annotations
import os
from pathlib import Path
from typing import Dict, Iterable, List, TextIO, Tuple
from packaging.markers import Marker
from packaging.requirements import Requirement
REQUIREMENTS_FOLDER = Path(__file__).parents[3].absolute() / "requirements"
os.chdir(REQUIREMENTS_FOLDER)
class RequirementData:
def __init__(self, requirement_string: str) -> None:
self.req = Requirement(requirement_string)
self.comments = set()
def __hash__(self) -> int:
return hash(self.req)
def __eq__(self, other: RequirementData) -> bool:
return self.req == other.req
@property
def name(self) -> str:
return self.req.name
@property
def marker(self) -> Marker:
return self.req.marker
@marker.setter
def marker(self, value: Marker) -> None:
self.req.marker = value
def get_requirements(fp: TextIO) -> List[RequirementData]:
requirements = []
current = None
for line in fp.read().splitlines():
annotation_prefix = " # "
if line.startswith(annotation_prefix) and current is not None:
source = line[len(annotation_prefix) :].strip()
if source == "via":
continue
via_prefix = "via "
if source.startswith(via_prefix):
source = source[len(via_prefix) :]
if source.startswith("-c ") and source != "-c base.txt":
continue
current.comments.add(source)
elif line and not line.startswith(("#", " ")):
current = RequirementData(line)
requirements.append(current)
return requirements
def iter_envs(envs: Iterable[str]) -> Iterable[Tuple[str, str]]:
for env_name in envs:
platform, python_version = env_name.split("-", maxsplit=1)
yield (platform, python_version)
names = ["base"]
names.extend(file.stem for file in REQUIREMENTS_FOLDER.glob("extra-*.in"))
base_requirements: List[RequirementData] = []
for name in names:
# {req_data: {sys_platform: RequirementData}
input_data: Dict[RequirementData, Dict[str, RequirementData]] = {}
all_envs = set()
all_platforms = set()
all_python_versions = set()
for file in REQUIREMENTS_FOLDER.glob(f"*-{name}.txt"):
platform_name, python_version, _ = file.stem.split("-", maxsplit=2)
env_name = f"{platform_name}-{python_version}"
all_envs.add(env_name)
all_platforms.add(platform_name)
all_python_versions.add(python_version)
with file.open(encoding="utf-8") as fp:
requirements = get_requirements(fp)
for req in requirements:
envs = input_data.setdefault(req, {})
envs[env_name] = req
output = base_requirements if name == "base" else []
for req, envs in input_data.items():
# {platform: [python_versions...]}
python_versions_per_platform: Dict[str, List[str]] = {}
# {python_version: [platforms...]}
platforms_per_python_version: Dict[str, List[str]] = {}
platforms = python_versions_per_platform.keys()
python_versions = platforms_per_python_version.keys()
for env_name, other_req in envs.items():
platform_name, python_version = env_name.split("-", maxsplit=1)
python_versions_per_platform.setdefault(platform_name, []).append(python_version)
platforms_per_python_version.setdefault(python_version, []).append(platform_name)
req.comments.update(other_req.comments)
base_req = next(
(base_req for base_req in base_requirements if base_req.name == req.name), None
)
if base_req is not None:
old_base_marker = base_req.marker
old_req_marker = req.marker
req.marker = base_req.marker = None
if base_req.req != req.req:
raise RuntimeError(f"Incompatible requirements for {req.name}.")
base_req.marker = old_base_marker
req.marker = old_req_marker
if base_req.marker is None or base_req.marker == req.marker:
continue
if len(envs) == len(all_envs):
output.append(req)
continue
# At this point I'm wondering why I didn't just go for
# a more generic boolean algebra simplification (sympy.simplify_logic())...
if (
len(set(map(frozenset, python_versions_per_platform.values()))) == 1
or len(set(map(frozenset, platforms_per_python_version.values()))) == 1
):
# Either all platforms have the same Python version set
# or all Python versions have the same platform set.
# We can generate markers for platform (platform_marker) and Python
# (python_version_marker) version sets separately and then simply require
# that both markers are fulfilled at the same time (env_marker).
python_version_marker = (
# Requirement present on less Python versions than not.
" or ".join(
f"python_version == '{python_version}'"
for python_version in sorted(python_versions)
)
if len(python_versions) < len(all_python_versions - python_versions)
# Requirement present on more Python versions than not
# This may generate an empty string when Python version is irrelevant.
else " and ".join(
f"python_version != '{python_version}'"
for python_version in sorted(all_python_versions - python_versions)
)
)
platform_marker = (
# Requirement present on less platforms than not.
" or ".join(f"sys_platform == '{platform}'" for platform in sorted(platforms))
if len(platforms) < len(all_platforms - platforms)
# Requirement present on more platforms than not
# This may generate an empty string when platform is irrelevant.
else " and ".join(
f"sys_platform != '{platform}'"
for platform in sorted(all_platforms - platforms)
)
)
if python_version_marker and platform_marker:
env_marker = f"({python_version_marker}) and ({platform_marker})"
else:
env_marker = python_version_marker or platform_marker
else:
# Fallback to generic case.
env_marker = (
# Requirement present on less envs than not.
" or ".join(
f"(sys_platform == '{platform}' and python_version == '{python_version}')"
for platform, python_version in iter_envs(sorted(envs))
)
if len(envs) < len(all_envs - envs.keys())
else " and ".join(
f"(sys_platform != '{platform}' and python_version != '{python_version}')"
for platform, python_version in iter_envs(sorted(all_envs - envs.keys()))
)
)
new_marker = f"({req.marker}) and ({env_marker})" if req.marker is not None else env_marker
req.marker = Marker(new_marker)
if base_req is not None and base_req.marker == req.marker:
continue
output.append(req)
output.sort(key=lambda req: (req.marker is not None, req.name))
with open(f"{name}.txt", "w+", encoding="utf-8") as fp:
for req in output:
fp.write(str(req.req))
fp.write("\n")
comments = sorted(req.comments)
if len(comments) == 1:
source = comments[0]
fp.write(" # via ")
fp.write(source)
fp.write("\n")
else:
fp.write(" # via\n")
for source in comments:
fp.write(" # ")
fp.write(source)
fp.write("\n")

View File

@@ -17,12 +17,21 @@ jobs:
python_version:
- "3.8"
tox_env:
- py
- style
- docs
include:
- tox_env: py
friendly_name: Tests
- tox_env: py38
python_version: "3.8"
friendly_name: Python 3.8 - Tests
- tox_env: py39
python_version: "3.9"
friendly_name: Python 3.9 - Tests
- tox_env: py310
python_version: "3.10"
friendly_name: Python 3.10 - Tests
- tox_env: py311
python_version: "3.11"
friendly_name: Python 3.11 - Tests
- tox_env: style
friendly_name: Style
- tox_env: docs
@@ -30,11 +39,11 @@ jobs:
fail-fast: false
name: Tox - ${{ matrix.friendly_name }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ env.ref }}
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install tox
@@ -52,6 +61,9 @@ jobs:
matrix:
python_version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
fail-fast: false
name: Tox - Postgres
services:
@@ -64,11 +76,11 @@ jobs:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ env.ref }}
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install tox
@@ -83,3 +95,13 @@ jobs:
PGPASSWORD: postgres
PGPORT: 5432
run: tox
- name: Verify no errors in PostgreSQL logs.
run: |
logs="$(docker logs "${{ job.services.postgresql.id }}" 2>&1)"
echo "---- PostgreSQL logs ----"
echo "$logs"
echo "---- PostgreSQL logs ----"
error_count="$(echo "$logs" | { grep -c 'ERROR: ' || true; })"
if [[ $error_count -gt 0 ]]; then
exit 1
fi

View File

@@ -26,14 +26,6 @@ unsafe-load-any-extension=no
# run arbitrary code
extension-pkg-whitelist=
# Allow optimization of some AST trees. This will activate a peephole AST
# optimizer, which will apply various small optimizations. For instance, it can
# be used to obtain the result of joining multiple strings with the addition
# operator. Joining a lot of strings can lead to a maximum recursion error in
# Pylint and this flag can prevent that. It has one side effect, the resulting
# AST will be different than the one from reality.
optimize-ast=no
[MESSAGES CONTROL]
@@ -66,7 +58,6 @@ disable=C, # black is enforcing this for us already, incompatibly
[REPORTS]
output-format=parseable
files-output=no
reports=no

View File

@@ -1,12 +1,19 @@
version: 2
build:
image: latest
os: "ubuntu-22.04"
tools:
python: "3.8"
jobs:
install:
- pip install .[doc]
sphinx:
configuration: docs/conf.py
python:
version: 3.8
install:
- method: pip
path: .
extra_requirements:
- docs
- doc

4541
CHANGES.rst Normal file

File diff suppressed because it is too large Load Diff

12
LICENSE
View File

@@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Red - A fully customizable Discord bot
Copyright (C) 2017-2021 Cog Creators
Copyright (C) 2017-present Cog Creators
Copyright (C) 2015-2017 Twentysix
This program is free software: you can redistribute it and/or modify
@@ -653,7 +653,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Red-DiscordBot Copyright (C) 2017-2021 Cog Creators
Red-DiscordBot Copyright (C) 2017-present Cog Creators
Red-DiscordBot Copyright (C) 2015-2017 Twentysix
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
@@ -675,10 +675,10 @@ the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
The Red-DiscordBot project contains subcomponents in audio.py that have a
separate copyright notice and license terms. Your use of the source code for
these subcomponents is subject to the terms and conditions of the following
licenses.
The Red-DiscordBot project contains subcomponents in the Audio module that
have a separate copyright notice and license terms. Your use of the source
code for these subcomponents is subject to the terms and conditions of the
following licenses.
This product bundles methods from https://github.com/Just-Some-Bots/MusicBot/
blob/master/musicbot/spotify.py which are available under an MIT license.

View File

@@ -2,6 +2,12 @@
include LICENSE
recursive-include redbot *.LICENSE
# include requirements files
include requirements/base.in
include requirements/base.txt
include requirements/extra-*.in
include requirements/extra-*.txt
# include locale files
recursive-include redbot locales/*.po
@@ -15,7 +21,7 @@ recursive-include redbot *.export
recursive-include redbot py.typed
# include *.sql files from postgres driver
recursive-include redbot/core/drivers/postgres *.sql
recursive-include redbot/core/_drivers/postgres *.sql
# include tests
graft tests

View File

@@ -52,7 +52,7 @@ bumpdeps:
# Development environment
newenv:
$(PYTHON) -m venv --clear .venv
.venv/bin/pip install -U pip setuptools wheel
.venv/bin/pip install -U pip wheel
$(MAKE) syncenv
syncenv:
.venv/bin/pip install -Ur ./tools/dev-requirements.txt

View File

@@ -27,9 +27,9 @@
</p>
<p align="center">
<a href="https://github.com/Cog-Creators/Red-DiscordBot/actions">
<img src="https://img.shields.io/github/workflow/status/Cog-Creators/Red-Discordbot/Tests?label=tests" alt="GitHub Actions">
<img src="https://img.shields.io/github/actions/workflow/status/Cog-Creators/Red-Discordbot/tests.yml?label=tests" alt="GitHub Actions">
</a>
<a href="http://red-discordbot.readthedocs.io/en/stable/?badge=stable">
<a href="http://docs.discord.red/en/stable/?badge=stable">
<img src="https://readthedocs.org/projects/red-discordbot/badge/?version=stable" alt="Red on readthedocs.org">
</a>
<a href="https://github.com/psf/black">
@@ -48,7 +48,7 @@
<a href="#installation">Installation</a>
<a href="http://red-discordbot.readthedocs.io/en/stable/index.html">Documentation</a>
<a href="http://docs.discord.red/en/stable/index.html">Documentation</a>
<a href="#plugins">Plugins</a>
@@ -86,9 +86,9 @@ community of cog repositories.**
**The following platforms are officially supported:**
- [Windows](https://red-discordbot.readthedocs.io/en/stable/install_windows.html)
- [MacOS](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
- [Most major linux distributions](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
- [Windows](https://docs.discord.red/en/stable/install_guides/windows.html)
- [MacOS](https://docs.discord.red/en/stable/install_guides/mac.html)
- [Most major linux distributions](https://docs.discord.red/en/stable/install_guides/index.html)
If after reading the guide you are still experiencing issues, feel free to join the
[Official Discord Server](https://discord.gg/red) and ask in the **#support** channel for help.
@@ -115,7 +115,7 @@ available 3rd party cogs!
**Red** is in continuous development, and its supported by an active community which produces new
content (cogs/plugins) for everyone to enjoy. New features are constantly added. If you cant
[find](https://index.discord.red) the cog youre looking for,
consult our [guide](https://red-discordbot.readthedocs.io/en/stable/guide_cog_creation.html) on
consult our [guide](https://docs.discord.red/en/stable/guide_cog_creation.html) on
building your own cogs!
Join us on our [Official Discord Server](https://discord.gg/red)!

38
SECURITY.md Normal file
View File

@@ -0,0 +1,38 @@
# Security Policy
## Supported Versions
The table below explains the current state of our versions. Currently, only version
3.5 and higher are supported and receive security updates. Versions lower than 3.5
are considered End of Life and will not receive any security updates.
| Version | Branch | Security Updates | End of Life |
|---------------|------------|--------------------|--------------------|
| < 2.0 | master | :x: | :white_check_mark: |
| >= 2.0, < 3.0 | develop | :x: | :white_check_mark: |
| >= 3.0, < 3.5 | V3/develop | :x: | :white_check_mark: |
| >= 3.5 | V3/develop | :white_check_mark: | :x: |
## Reporting a Vulnerability
For reporting vulnerabilities within Red-DiscordBot we make use of GitHub's
private vulnerability reporting feature (More information can be found
[here](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)).
This ensures that all maintainers and key members have access to the reported
vulnerability.
### Opening a Vulnerability Report
To open a vulnerability report please fill out [this form](https://github.com/Cog-Creators/Red-DiscordBot/security/advisories/new)
You will be asked to provide a summary, details and proof of concept for your vulnerability report.
We ask that you fill out this form to the best of your ability, with as many details as possible.
Furthermore, you'll be asked to provide affected products and severity.
These fields are optional and will be filled appropriately by the maintainers if not provided.
### Timeline
We will try to answer your report within 7 days. If you haven't received an answer by then, we suggest you reach
out to us privately. This can best be done via our [Discord server](https://discord.gg/red), and contacting
a member who has the Staff role.

View File

@@ -1,5 +1,5 @@
api_key_env: CROWDIN_API_KEY
project_identifier_env: CROWDIN_PROJECT_ID
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
base_path: ./redbot/
preserve_hierarchy: true
files:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 77 KiB

6
docs/_html/robots.txt Normal file
View File

@@ -0,0 +1,6 @@
User-agent: *
Disallow: /
Allow: /en/stable
Allow: /en/latest
Sitemap: https://docs.discord.red/sitemap.xml

View File

@@ -5,7 +5,7 @@
<p class="first admonition-title">Warning</p>
<p class="last">
This document is for Red's development version, which can be significantly different from previous releases.
If you're a regular user, you should read the <a href="{{ dict(versions)['stable'] }}">Red documentation for the current stable release</a>.
If you're a regular user, you should read the <a href="/{{ rtd_language }}/stable/">Red documentation for the current stable release</a>.
</p>
</div>
{% endif %}

View File

@@ -20,11 +20,12 @@ Now run :code:`sudo nano /Library/LaunchDaemons/red.plist`
Paste the following and replace the following:
- all instances of :code:`username` with your Mac username
- :code:`username` (but not :code:`UserName`) with your Mac username
- :code:`path` with the path you copied earlier
- :code:`instance-name` with your instance name:
.. code-block:: none
:emphasize-lines: 9, 13, 28
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -56,6 +57,8 @@ Paste the following and replace the following:
<string>username</string>
<key>InitGroups</key>
<true/>
<key>ProcessType</key>
<string>Interactive</string>
</dict>
</plist>

View File

@@ -26,11 +26,7 @@ Next, your python :code:`path` can be fetched with the following commands:
# If redbot is installed in a venv
$ source ~/redenv/bin/activate
(redenv) $ which python
# If redbot is installed in a pyenv virtualenv
$ pyenv shell <virtualenv_name>
(redenv) $ pyenv which python
(redenv) $ /usr/bin/which python
Then create the new service file:
@@ -39,6 +35,7 @@ Then create the new service file:
Paste the following in the file, and replace all instances of :code:`username` with the Linux username you retrieved above, and :code:`path` with the python path you retrieved above.
.. code-block:: none
:emphasize-lines: 8-10
[Unit]
Description=%I redbot
@@ -51,9 +48,10 @@ Paste the following in the file, and replace all instances of :code:`username` w
User=username
Group=username
Type=idle
Restart=always
Restart=on-abnormal
RestartSec=15
RestartPreventExitStatus=0
RestartForceExitStatus=1
RestartForceExitStatus=26
TimeoutStopSec=10
[Install]

View File

@@ -0,0 +1,51 @@
.. _autostart-windows:
==============================================
Setting up auto-restart using batch on Windows
==============================================
.. note:: This guide assumes that you already have a working Red instance.
-----------------------
Creating the batch file
-----------------------
Create a new text document anywhere you want to. This file will be used to launch the bot, so you may want to put it somewhere convenient, like Documents or Desktop.
Open that document in Notepad, and paste the following text in it:
.. code-block:: batch
@ECHO OFF
:RED
CALL "%userprofile%\redenv\Scripts\activate.bat"
python -O -m redbot <your instance name>
IF %ERRORLEVEL% == 1 GOTO RESTART_RED
IF %ERRORLEVEL% == 26 GOTO RESTART_RED
EXIT /B %ERRORLEVEL%
:RESTART_RED
ECHO Restarting Red...
GOTO RED
Replace ``<your instance name>`` with the instance name of your bot.
If you created your VENV at a location other than the recommended one, replace ``%userprofile%\redenv\Scripts\activate.bat`` with the path to your VENV.
Click "File", "Save as". Change the dropdown "Save as type" to "All Files (*.*)". Set the filename to ``start_redbot.bat``, and click save.
There should now be a new file in the location you created the text document in. You can delete that text document as it is no longer needed.
You can now use the ``start_redbot.bat`` batch file to launch Red by double clicking it.
This script will automatically restart red when the ``[p]restart`` command is used or when the bot shuts down abnormally.
-------------------------
Launch the bot on startup
-------------------------
Create a shortcut of your ``start_redbot.bat`` file.
Open the "Run" dialogue box using Windows Key + R.
Enter ``shell:startup`` if you want the bot to launch only when the current user logs in, or ``shell:common startup`` if you want the bot to launch when any user logs in.
Drag the shortcut into the folder that is opened. The bot will now launch on startup.

View File

@@ -56,7 +56,7 @@ Continue to the next section to enable privileged intents.
Enabling Privileged Intents
-------------------------------
.. warning::
Due to Discord API changes, Red Bot requires all intents.
:ref:`Red Bot requires all intents. <intents>`
\This section is required.
1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
@@ -67,7 +67,7 @@ Enabling Privileged Intents
.. image:: /.resources/bot-guide/discord_bot_tab.png
:alt: The bot tab in the application page.
5. Scroll down to the "Privileged Gateway Intents" section, enable both privileged intents and save your changes.
5. Scroll down to the "Privileged Gateway Intents" section, enable all three privileged intents and save your changes.
.. image:: /.resources/bot-guide/discord_privileged_intents.png
:alt: The privileged gateway intents selector.
@@ -75,5 +75,6 @@ Enabling Privileged Intents
.. warning::
Red bots with over 100 servers require `bot verification <https://support.discord.com/hc/en-us/articles/360040720412>`_ which is not covered in this guide.
Remember that :ref:`we do not support public bots <intents>`. We encourage you to read that page before scaling up your bot.
*Parts of this guide have been adapted from* `discord.py intro <https://discordpy.readthedocs.io/en/stable/discord.html#discord-intro>`_ *and* `discord.py privileged intents <https://discordpy.readthedocs.io/en/stable/intents.html#privileged-intents>`_.

5
docs/changelog.rst Normal file
View File

@@ -0,0 +1,5 @@
=========
Changelog
=========
.. include:: ../CHANGES.rst

View File

@@ -1,232 +0,0 @@
.. v3.1.0 Changelog
####################
v3.1.0 Release Notes
####################
----------------------
Mongo Driver Migration
----------------------
Due to the required changes of the Mongo driver for Config, all existing Mongo users will need to
complete the below instructions to continue to use Mongo after updating to 3.1.
This includes **all** users, regardless of any prior migration attempt to a development version of
3.1.
#. Upgrade to 3.1
#. Convert all existing Mongo instances to JSON using the new converters
#. Start each bot instance while using JSON and load any and all cogs you have in order to successfully preserve data.
#. Turn each instance off and convert back to Mongo.
**NOTE:** No data is wiped from your Mongo database when converting to JSON.
You may want to use a *new* database name when converting back to Mongo in order to not have duplicate data.
-------------
Setup Utility
-------------
New commands were introduced to simplify the conversion/editing/removal process both on our end and the users end.
Please use ``redbot-setup --help`` to learn how to use the new features.
.. HINT::
Converting to JSON: ``redbot-setup convert <instance_name> json``
Converting to Mongo: ``redbot-setup convert <instance_name> mongo``
################
v3.1.0 Changelog
################
-----
Audio
-----
* Add Spotify support (`#2328`_)
* Play local folders via text command (`#2457`_)
* Change pause to a toggle (`#2461`_)
* Remove aliases (`#2462`_)
* Add track length restriction (`#2465`_)
* Seek command can now seek to position (`#2470`_)
* Add option for dc at queue end (`#2472`_)
* Emptydisconnect and status refactor (`#2473`_)
* Queue clean and queue clear addition (`#2476`_)
* Fix for audioset status (`#2481`_)
* Playlist download addition (`#2482`_)
* Add songs when search-queuing (`#2513`_)
* Match v2 behavior for channel change (`#2521`_)
* Bot will no longer complain about permissions when trying to connect to user-limited channel, if it has "Move Members" permission (`#2525`_)
* Fix issue on audiostats command when more than 20 servers to display (`#2533`_)
* Fix for prev command display (`#2556`_)
* Fix for localtrack playing (`#2557`_)
* Fix for playlist queue when not playing (`#2586`_)
* Track search and append fixes (`#2591`_)
* DJ role should ask for a role (`#2606`_)
----
Core
----
* Warn on usage of ``yaml.load`` (`#2326`_)
* New Event dispatch: ``on_message_without_command`` (`#2338`_)
* Improve output format of cooldown messages (`#2412`_)
* Delete cooldown messages when expired (`#2469`_)
* Fix local blacklist/whitelist management (`#2531`_)
* ``[p]set locale`` now only accepts actual locales (`#2553`_)
* ``[p]listlocales`` now displays ``en-US`` (`#2553`_)
* ``redbot --version`` will now give you current version of Red (`#2567`_)
* Redesign help and related formatter (`#2628`_)
* Default locale changed from ``en`` to ``en-US`` (`#2642`_)
* New command ``[p]datapath`` that prints the bot's datapath (`#2652`_)
------
Config
------
* Updated Mongo driver to support large guilds (`#2536`_)
* Introduced ``init_custom`` method on Config objects (`#2545`_)
* We now record custom group primary key lengths in the core config object (`#2550`_)
* Migrated internal UUIDs to maintain cross platform consistency (`#2604`_)
-------------
DataConverter
-------------
* It's dead jim (Removal) (`#2554`_)
----------
discord.py
----------
* No longer vendoring discord.py (`#2587`_)
* Upgraded discord.py dependency to version 1.0.1 (`#2587`_)
----------
Downloader
----------
* ``[p]cog install`` will now tell user that cog has to be loaded (`#2523`_)
* The message when libraries fail to install is now formatted (`#2576`_)
* Fixed bug, that caused Downloader to include submodules on cog list (`#2590`_)
* ``[p]cog uninstall`` allows to uninstall multiple cogs now (`#2592`_)
* ``[p]cog uninstall`` will now remove cog from installed cogs even if it can't find the cog in install path anymore (`#2595`_)
* ``[p]cog install`` will not allow to install cogs which aren't suitable for installed version of Red anymore (`#2605`_)
* Cog Developers now have to use ``min_bot_version`` in form of version string instead of ``bot_version`` in info.json and they can also use ``max_bot_version`` to specify maximum version of Red, more in :ref:`info-json-format`. (`#2605`_)
------
Filter
------
* Filter performs significantly better on large servers. (`#2509`_)
--------
Launcher
--------
* Fixed extras in the launcher (`#2588`_)
---
Mod
---
* Admins can now decide how many times message has to be repeated before ``deleterepeats`` removes it (`#2437`_)
* Fix: make ``[p]ban [days]`` optional as per the doc (`#2602`_)
* Added the command ``voicekick`` to kick members from a voice channel with optional mod case. (`#2639`_)
-----------
Permissions
-----------
* Removed: ``p`` alias for ``permissions`` command (`#2467`_)
-------------
Setup Scripts
-------------
* ``redbot-setup`` now uses the click CLI library (`#2579`_)
* ``redbot-setup convert`` now used to convert between libraries (`#2579`_)
* Backup support for Mongo is currently broken (`#2579`_)
-------
Streams
-------
* Add support for custom stream alert messages per guild (`#2600`_)
* Add ability to exclude rerun Twitch streams, and note rerun streams in embed status (`#2620`_)
-----
Tests
-----
* Test for ``trivia`` cog uses explicitly utf-8 encoding for checking yaml files (`#2565`_)
------
Trivia
------
* Fix of dead image link for Sao Tome and Principe in ``worldflags`` trivia (`#2540`_)
-----------------
Utility Functions
-----------------
* New: ``chat_formatting.humanize_timedelta`` (`#2412`_)
* ``Tunnel`` - Spelling correction of method name - changed ``files_from_attatch`` to ``files_from_attach`` (old name is left for backwards compatibility) (`#2496`_)
* ``Tunnel`` - fixed behavior of ``react_close()``, now when tunnel closes message will be sent to other end (`#2507`_)
* ``chat_formatting.humanize_list`` - Improved error handling of empty lists (`#2597`_)
.. _#2326: https://github.com/Cog-Creators/Red-DiscordBot/pull/2326
.. _#2328: https://github.com/Cog-Creators/Red-DiscordBot/pull/2328
.. _#2338: https://github.com/Cog-Creators/Red-DiscordBot/pull/2338
.. _#2412: https://github.com/Cog-Creators/Red-DiscordBot/pull/2412
.. _#2437: https://github.com/Cog-Creators/Red-DiscordBot/pull/2437
.. _#2457: https://github.com/Cog-Creators/Red-DiscordBot/pull/2457
.. _#2461: https://github.com/Cog-Creators/Red-DiscordBot/pull/2461
.. _#2462: https://github.com/Cog-Creators/Red-DiscordBot/pull/2462
.. _#2465: https://github.com/Cog-Creators/Red-DiscordBot/pull/2465
.. _#2467: https://github.com/Cog-Creators/Red-DiscordBot/pull/2467
.. _#2469: https://github.com/Cog-Creators/Red-DiscordBot/pull/2469
.. _#2470: https://github.com/Cog-Creators/Red-DiscordBot/pull/2470
.. _#2472: https://github.com/Cog-Creators/Red-DiscordBot/pull/2472
.. _#2473: https://github.com/Cog-Creators/Red-DiscordBot/pull/2473
.. _#2476: https://github.com/Cog-Creators/Red-DiscordBot/pull/2476
.. _#2481: https://github.com/Cog-Creators/Red-DiscordBot/pull/2481
.. _#2482: https://github.com/Cog-Creators/Red-DiscordBot/pull/2482
.. _#2496: https://github.com/Cog-Creators/Red-DiscordBot/pull/2496
.. _#2507: https://github.com/Cog-Creators/Red-DiscordBot/pull/2507
.. _#2509: https://github.com/Cog-Creators/Red-DiscordBot/pull/2509
.. _#2513: https://github.com/Cog-Creators/Red-DiscordBot/pull/2513
.. _#2521: https://github.com/Cog-Creators/Red-DiscordBot/pull/2521
.. _#2523: https://github.com/Cog-Creators/Red-DiscordBot/pull/2523
.. _#2525: https://github.com/Cog-Creators/Red-DiscordBot/pull/2525
.. _#2531: https://github.com/Cog-Creators/Red-DiscordBot/pull/2531
.. _#2533: https://github.com/Cog-Creators/Red-DiscordBot/pull/2533
.. _#2536: https://github.com/Cog-Creators/Red-DiscordBot/pull/2536
.. _#2540: https://github.com/Cog-Creators/Red-DiscordBot/pull/2540
.. _#2545: https://github.com/Cog-Creators/Red-DiscordBot/pull/2545
.. _#2550: https://github.com/Cog-Creators/Red-DiscordBot/pull/2550
.. _#2553: https://github.com/Cog-Creators/Red-DiscordBot/pull/2553
.. _#2554: https://github.com/Cog-Creators/Red-DiscordBot/pull/2554
.. _#2556: https://github.com/Cog-Creators/Red-DiscordBot/pull/2556
.. _#2557: https://github.com/Cog-Creators/Red-DiscordBot/pull/2557
.. _#2565: https://github.com/Cog-Creators/Red-DiscordBot/pull/2565
.. _#2567: https://github.com/Cog-Creators/Red-DiscordBot/pull/2567
.. _#2576: https://github.com/Cog-Creators/Red-DiscordBot/pull/2576
.. _#2579: https://github.com/Cog-Creators/Red-DiscordBot/pull/2579
.. _#2586: https://github.com/Cog-Creators/Red-DiscordBot/pull/2586
.. _#2587: https://github.com/Cog-Creators/Red-DiscordBot/pull/2587
.. _#2588: https://github.com/Cog-Creators/Red-DiscordBot/pull/2588
.. _#2590: https://github.com/Cog-Creators/Red-DiscordBot/pull/2590
.. _#2591: https://github.com/Cog-Creators/Red-DiscordBot/pull/2591
.. _#2592: https://github.com/Cog-Creators/Red-DiscordBot/pull/2592
.. _#2595: https://github.com/Cog-Creators/Red-DiscordBot/pull/2595
.. _#2597: https://github.com/Cog-Creators/Red-DiscordBot/pull/2597
.. _#2600: https://github.com/Cog-Creators/Red-DiscordBot/pull/2600
.. _#2602: https://github.com/Cog-Creators/Red-DiscordBot/pull/2602
.. _#2604: https://github.com/Cog-Creators/Red-DiscordBot/pull/2604
.. _#2605: https://github.com/Cog-Creators/Red-DiscordBot/pull/2605
.. _#2606: https://github.com/Cog-Creators/Red-DiscordBot/pull/2606
.. _#2620: https://github.com/Cog-Creators/Red-DiscordBot/pull/2620
.. _#2628: https://github.com/Cog-Creators/Red-DiscordBot/pull/2628
.. _#2639: https://github.com/Cog-Creators/Red-DiscordBot/pull/2639
.. _#2642: https://github.com/Cog-Creators/Red-DiscordBot/pull/2642
.. _#2652: https://github.com/Cog-Creators/Red-DiscordBot/pull/2652

View File

@@ -1,565 +0,0 @@
.. 3.2.x Changelogs
Redbot 3.2.3 (2020-01-17)
=========================
Core Bot Changes
----------------
- Further improvements have been made to bot startup and shutdown.
- Prefixes are now cached for performance.
- Added the means for cog creators to use a global preinvoke hook.
- The bot now ensures it has at least the bare neccessary permissions before running commands.
- Deleting instances works as intended again.
- Sinbad stopped fighting it and embraced the entrypoint madness.
Core Commands
-------------
- The servers command now also shows the ids.
Admin Cog
---------
- The selfrole command now has reasonable expectations about hierarchy.
Help Formatter
--------------
- ``[botname]`` is now replaced with the bot's display name in help text.
- New features added for cog creators to further customize help behavior.
- Check out our command reference for details on new ``format_help_for_context`` method.
- Embed settings are now consistent.
Downloader
----------
- Improved a few user facing messages.
- Added pagination of output on cog update.
- Added logging of failures.
Docs
----
There's more detail to the below changes, so go read the docs.
For some reason, documenting documentation changes is hard.
- Added instructions about git version.
- Clarified instructions for installation and update.
- Added more details to the API key reference.
- Fixed some typos and versioning mistakes.
Audio
-----
Draper did things.
- No seriously, Draper did things.
- Wait you wanted details? Ok, I guess we can share those.
- Audio properly disconnects with autodisconnect, even if notify is being used.
- Symbolic links now work as intended for local tracks.
- Bump play now shows the correct time till next track.
- Multiple user facing messages have been made more correct.
Redbot 3.2.2 (2020-01-10)
=========================
Hotfixes
--------
- Fix Help Pagination issue
Docs
----
- Correct venv docs
Redbot 3.2.1 (2020-01-10)
=========================
Hotfixes
--------
- Fix Mongo conversion from being incorrectly blocked
- Fix announcer not creating a message for success feedback
- Log an error with creating case types rather than crash
Redbot 3.2.0 (2020-01-09)
=========================
Core Bot Changes
----------------
Breaking Changes
~~~~~~~~~~~~~~~~
- Modlog casetypes no longer have an attribute for auditlog action type. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
- Removed ``redbot.core.modlog.get_next_case_number()``. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
- Removed ``bank.MAX_BALANCE``, use ``bank.get_max_balance()`` from now on. (`#2926 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2926>`_)
- The main bot config is no longer directly accessible to cogs. New methods have been added for use where this is concerned.
New methods for this include
- ``bot.get_shared_api_tokens``
- ``bot.set_shared_api_tokens``
- ``bot.get_embed_color``
- ``bot.get_embed_colour``
- ``bot.get_admin_roles``
- ``bot.get_admin_role_ids``
- ``bot.get_mod_roles``
- ``bot.get_mod_role_ids`` (`#2967 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2967>`_)
- Reserved some command names for internal Red use. These are available programatically as ``redbot.core.commands.RESERVED_COMMAND_NAMES``. (`#2973 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2973>`_)
- Removed ``bot._counter``, Made a few more attrs private (``cog_mgr``, ``main_dir``). (`#2976 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2976>`_)
- Extension's ``setup()`` function should no longer assume that we are, or even will be connected to Discord.
This also means that cog creators should no longer use ``bot.wait_until_ready()`` inside it. (`#3073 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3073>`_)
- Removed the mongo driver. (`#3099 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3099>`_)
Bug Fixes
~~~~~~~~~
- Help now properly hides disabled commands. (`#2863 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2863>`_)
- Fixed ``bot.remove_command`` throwing an error when trying to remove a non-existent command. (`#2888 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2888>`_)
- ``Command.can_see`` now works as intended for disabled commands. (`#2892 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2892>`_)
- Modlog entries now show up properly without the mod cog loaded. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
- Fixed an error in ``[p]reason`` when setting the reason for a case without a moderator. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
- Bank functions now check the recipient balance before transferring and stop the transfer if the recipient's balance will go above the maximum allowed balance. (`#2923 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2923>`_)
- Removed potential for additional bad API calls per ban/unban. (`#2945 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2945>`_)
- The ``[p]invite`` command no longer errors when a user has the bot blocked or DMs disabled in the server. (`#2948 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2948>`_)
- Stopped using the ``:`` character in backup's filename - Windows doesn't accept it. (`#2954 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2954>`_)
- ``redbot-setup delete`` no longer errors with "unexpected keyword argument". (`#2955 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2955>`_)
- ``redbot-setup delete`` no longer prompts about backup when the user passes the option ``--no-prompt``. (`#2956 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2956>`_)
- Cleaned up the ``[p]inviteset public`` and ``[p]inviteset perms`` help strings. (`#2963 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2963>`_)
- ```[p]embedset user`` now only affects DM's. (`#2966 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2966>`_)
- Fixed an unfriendly error when the provided instance name doesn't exist. (`#2968 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2968>`_)
- Fixed the help text and response of ``[p]set usebotcolor`` to accurately reflect what the command is doing. (`#2974 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2974>`_)
- Red no longer types infinitely when a command with a cooldown is called within the last second of a cooldown. (`#2985 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2985>`_)
- Removed f-string usage in the launcher to prevent our error handling from causing an error. (`#3002 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3002>`_)
- Fixed ``MessagePredicate.greater`` and ``MessagePredicate.less`` allowing any valid int instead of only valid ints/floats that are greater/less than the given value. (`#3004 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3004>`_)
- Fixed an error in ``[p]uptime`` when the uptime is under a second. (`#3009 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3009>`_)
- Added quotation marks to the response of ``[p]helpset tagline`` so that two consecutive full stops do not appear. (`#3010 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3010>`_)
- Fixed an issue with clearing rules in permissions. (`#3014 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3014>`_)
- Lavalink will now be restarted after an unexpected shutdown. (`#3033 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3033>`_)
- Added a 3rd-party lib folder to ``sys.path`` before loading cogs. This prevents issues with 3rd-party cogs failing to load when Downloader is not loaded to install requirements. (`#3036 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3036>`_)
- Escaped track descriptions so that they do not break markdown. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
- Red will now properly send a message when the invoked command is guild-only. (`#3057 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3057>`_)
- Arguments ``--co-owner`` and ``--load-cogs`` now properly require at least one argument to be passed. (`#3060 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3060>`_)
- Now always appends the 3rd-party lib folder to the end of ``sys.path`` to avoid shadowing Red's dependencies. (`#3062 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3062>`_)
- Fixed ``is_automod_immune``'s handling of the guild check and added support for checking webhooks. (`#3100 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3100>`_)
- Fixed the generation of the ``repos.json`` file in the backup process. (`#3114 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3114>`_)
- Fixed an issue where calling audio commands when not in a voice channel could result in a crash. (`#3120 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3120>`_)
- Added handling for invalid folder names in the data path gracefully in ``redbot-setup`` and ``redbot --edit``. (`#3171 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3171>`_)
- ``--owner`` and ``-p`` cli flags now work when added from launcher. (`#3174 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3174>`_)
- Red will now prevent users from locking themselves out with localblacklist. (`#3207 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3207>`_)
- Fixed help ending up a little too large for discord embed limits. (`#3208 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3208>`_)
- Fixed formatting issues in commands that list whitelisted/blacklisted users/roles when the list is empty. (`#3219 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3219>`_)
- Red will now prevent users from locking the guild owner out with localblacklist (unless the command caller is bot owner). (`#3221 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3221>`_)
- Guild owners are no longer affected by the local whitelist and blacklist. (`#3221 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3221>`_)
- Fixed an attribute error that can be raised in ``humanize_timedelta`` if ``seconds = 0``. (`#3231 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3231>`_)
- Fixed ``ctx.clean_prefix`` issues resulting from undocumented changes from discord. (`#3249 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3249>`_)
- ``redbot.core.bot.Bot.owner_id`` is now set in the post connection startup. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
- ``redbot.core.bot.Bot.send_to_owners()`` and ``redbot.core.bot.Bot.get_owner_notification_destinations()`` now wait until Red is done with post connection startup to ensure owner ID is available. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
Enhancements
~~~~~~~~~~~~
- Added the option to modify the RPC port with the ``--rpc-port`` flag. (`#2429 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2429>`_)
- Slots now has a 62.5% expected payout and will not inflate economy when spammed. (`#2875 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2875>`_)
- Allowed passing ``cls`` in the ``redbot.core.commands.group()`` decorator. (`#2881 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2881>`_)
- Red's Help Formatter is now considered to have a stable API. (`#2892 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2892>`_)
- Modlog no longer generates cases without being told to for actions the bot did. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
- Some generic modlog casetypes are now pre-registered for cog creator use. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
- ModLog is now much faster at creating cases, especially in large servers. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
- JSON config files are now stored without indentation, this is to reduce the file size and increase the performance of write operations. (`#2921 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2921>`_)
- ``--[no-]backup``, ``--[no-]drop-db`` and ``--[no-]remove-datapath`` in the ``redbot-setup delete`` command are now on/off flags. (`#2958 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2958>`_)
- The confirmation prompts in ``redbot-setup`` now have default values for user convenience. (`#2958 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2958>`_)
- ``redbot-setup delete`` now has the option to leave Red's data untouched on database backends. (`#2962 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2962>`_)
- Red now takes less time to fetch cases, unban members, and list warnings. (`#2964 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2964>`_)
- Red now handles more things prior to connecting to discord to reduce issues during the initial load. (`#3045 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3045>`_)
- ``bot.send_filtered`` now returns the message that is sent. (`#3052 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3052>`_)
- Red will now send a message when the invoked command is DM-only. (`#3057 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3057>`_)
- All ``y/n`` confirmations in cli commands are now unified. (`#3060 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3060>`_)
- Changed ``[p]info`` to say "This bot is an..." instead of "This is an..." for clarity. (`#3121 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3121>`_)
- ``redbot-setup`` will now use the instance name in default data paths to avoid creating a second instance with the same data path. (`#3171 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3171>`_)
- Instance names can now only include characters A-z, numbers, underscores, and hyphens. Old instances are unaffected by this change. (`#3171 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3171>`_)
- Clarified that ``[p]backup`` saves the **bot's** data in the help text. (`#3172 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3172>`_)
- Added ``redbot --debuginfo`` flag which shows useful information for debugging. (`#3183 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3183>`_)
- Added the Python executable field to ``[p]debuginfo``. (`#3184 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3184>`_)
- When Red prompts for a token, it will now print a link to the guide explaining how to obtain a token. (`#3204 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3204>`_)
- ``redbot-setup`` will no longer log to disk. (`#3269 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3269>`_)
- ``redbot.core.bot.Bot.send_to_owners()`` and ``redbot.core.bot.Bot.get_owner_notification_destinations()`` now log when they are not able to find the owner notification destination. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
- The lib folder is now cleared on minor Python version changes. ``[p]cog reinstallreqs`` in Downloader can be used to regenerate the lib folder for a new Python version. (`#3274 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3274>`_)
- If Red detects operating system or architecture change, it will now warn the owner about possible problems with the lib folder. (`#3274 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3274>`_)
- ``[p]playlist download`` will now compress playlists larger than the server attachment limit and attempt to send that. (`#3279 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3279>`_)
New Features
~~~~~~~~~~~~
- Added functions to acquire locks on Config groups and values. These locks are acquired by default when calling a value as a context manager. See ``Value.get_lock`` for details. (`#2654 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2654>`_)
- Added a config driver for PostgreSQL. (`#2723 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2723>`_)
- Added methods to Config for accessing things by id without mocked objects
- ``Config.guild_from_id``
- ``Config.user_from_id``
- ``Config.role_from_id``
- ``Config.channel_from_id``
- ``Config.member_from_ids``
- This one requires multiple ids, one for the guild, one for the user
- Consequence of discord's object model (`#2804 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2804>`_)
- New method ``humanize_number`` in ``redbot.core.utils.chat_formatting`` to convert numbers into text that respects the current locale. (`#2836 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2836>`_)
- Added new commands to Economy
- ``[p]bank prune user`` - This will delete a user's bank account.
- ``[p]bank prune local`` - This will prune the bank of accounts for users who are no longer in the server.
- ``[p]bank prune global`` - This will prune the global bank of accounts for users who do not share any servers with the bot. (`#2845 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2845>`_)
- Red now uses towncrier for changelog generation. (`#2872 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2872>`_)
- Added ``redbot.core.modlog.get_latest_case`` to fetch the case object for the most recent ModLog case. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
- Added ``[p]bankset maxbal`` to set the maximum bank balance. (`#2926 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2926>`_)
- Added a few methods and classes replacing direct config access (which is no longer supported)
- ``redbot.core.Red.allowed_by_whitelist_blacklist``
- ``redbot.core.Red.get_valid_prefixes``
- ``redbot.core.Red.clear_shared_api_tokens``
- ``redbot.core.commands.help.HelpSettings`` (`#2976 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2976>`_)
- Added the cli flag ``redbot --edit`` which is used to edit the instance name, token, owner, and datapath. (`#3060 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3060>`_)
- Added ``[p]licenseinfo``. (`#3090 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3090>`_)
- Ensured that people can migrate from MongoDB. (`#3108 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3108>`_)
- Added a command to list disabled commands globally or per guild. (`#3118 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3118>`_)
- New event ``on_red_api_tokens_update`` is now dispatched when shared api keys for a service are updated. (`#3134 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3134>`_)
- Added ``redbot-setup backup``. (`#3235 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3235>`_)
- Added the method ``redbot.core.bot.Bot.wait_until_red_ready()`` that waits until Red's post connection startup is done. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
Removals
~~~~~~~~
- ``[p]set owner`` and ``[p]set token`` have been removed in favor of managing server side. (`#2928 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2928>`_)
- Shared libraries are marked for removal in Red 3.4. (`#3106 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3106>`_)
- Removed ``[p]backup``. Use the cli command ``redbot-setup backup`` instead. (`#3235 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3235>`_)
- Removed the functions ``safe_delete``, ``fuzzy_command_search``, ``format_fuzzy_results`` and ``create_backup`` from ``redbot.core.utils``. (`#3240 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3240>`_)
- Removed a lot of the launcher's handled behavior. (`#3289 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3289>`_)
Miscellaneous changes
~~~~~~~~~~~~~~~~~~~~~
- `#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_, `#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_, `#2723 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2723>`_, `#2836 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2836>`_, `#2849 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2849>`_, `#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_, `#2885 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2885>`_, `#2890 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2890>`_, `#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_, `#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_, `#2924 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2924>`_, `#2939 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2939>`_, `#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_, `#2941 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2941>`_, `#2949 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2949>`_, `#2953 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2953>`_, `#2964 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2964>`_, `#2986 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2986>`_, `#2993 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2993>`_, `#2997 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2997>`_, `#3008 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3008>`_, `#3017 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3017>`_, `#3048 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3048>`_, `#3059 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3059>`_, `#3080 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3080>`_, `#3089 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3089>`_, `#3104 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3104>`_, `#3106 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3106>`_, `#3129 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3129>`_, `#3152 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3152>`_, `#3160 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3160>`_, `#3168 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3168>`_, `#3173 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3173>`_, `#3176 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3176>`_, `#3186 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3186>`_, `#3192 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3192>`_, `#3193 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3193>`_, `#3195 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3195>`_, `#3202 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3202>`_, `#3214 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3214>`_, `#3223 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3223>`_, `#3229 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3229>`_, `#3245 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3245>`_, `#3247 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3247>`_, `#3248 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3248>`_, `#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_, `#3254 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3254>`_, `#3255 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3255>`_, `#3256 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3256>`_, `#3258 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3258>`_, `#3261 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3261>`_, `#3275 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3275>`_, `#3276 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3276>`_, `#3293 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3293>`_, `#3278 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3278>`_, `#3285 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3285>`_, `#3296 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3296>`_,
Dependency changes
~~~~~~~~~~~~~~~~~~~~~~~
- Added ``pytest-mock`` requirement to ``tests`` extra. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
- Updated the python minimum requirement to 3.8.1, updated JRE to Java 11. (`#3245 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3245>`_)
- Bumped dependency versions. (`#3288 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3288>`_)
- Bumped red-lavalink version. (`#3290 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3290>`_)
Documentation Changes
~~~~~~~~~~~~~~~~~~~~~
- Started the user guides covering cogs and the user interface of the bot. This includes, for now, a "Getting started" guide. (`#1734 <https://github.com/Cog-Creators/Red-DiscordBot/issues/1734>`_)
- Added documentation for PM2 support. (`#2105 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2105>`_)
- Updated linux install docs, adding sections for Fedora Linux, Debian/Raspbian Buster, and openSUSE. (`#2558 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2558>`_)
- Created documentation covering what we consider a developer facing breaking change and the guarantees regarding them. (`#2882 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2882>`_)
- Fixed the user parameter being labeled as ``discord.TextChannel`` instead of ``discord.abc.User`` in ``redbot.core.utils.predicates``. (`#2914 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2914>`_)
- Updated towncrier info in the contribution guidelines to explain how to create a changelog for a standalone PR. (`#2915 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2915>`_)
- Reworded the virtual environment guide to make it sound less scary. (`#2920 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2920>`_)
- Driver docs no longer show twice. (`#2972 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2972>`_)
- Added more information about ``redbot.core.utils.humanize_timedelta`` into the docs. (`#2986 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2986>`_)
- Added a direct link to the "Installing Red" section in "Installing using powershell and chocolatey". (`#2995 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2995>`_)
- Updated Git PATH install (Windows), capitalized some words, stopped mentioning the launcher. (`#2998 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2998>`_)
- Added autostart documentation for Red users who installed Red inside of a virtual environment. (`#3005 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3005>`_)
- Updated the Cog Creation guide with a note regarding the Develop version as well as the folder layout for local cogs. (`#3021 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3021>`_)
- Added links to the getting started guide at the end of installation guides. (`#3025 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3025>`_)
- Added proper docstrings to enums that show in drivers docs. (`#3035 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3035>`_)
- Discord.py doc links will now always use the docs for the currently used version of discord.py. (`#3053 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3053>`_)
- Added ``|DPY_VERSION|`` substitution that will automatically get replaced by the current discord.py version. (`#3053 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3053>`_)
- Added missing descriptions for function returns. (`#3054 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3054>`_)
- Stopped overwriting the ``docs/prolog.txt`` file in ``conf.py``. (`#3082 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3082>`_)
- Fixed some typos and wording, added MS Azure to the host list. (`#3083 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3083>`_)
- Updated the docs footer copyright to 2019. (`#3105 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3105>`_)
- Added a deprecation note about shared libraries in the Downloader Framework docs. (`#3106 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3106>`_)
- Updated the apikey framework documentation. Changed ``bot.get_shared_api_keys()`` to ``bot.get_shared_api_tokens()``. (`#3110 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3110>`_)
- Added information about ``info.json``'s ``min_python_version`` key in Downloader Framework docs. (`#3124 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3124>`_)
- Added an event reference for the ``on_red_api_tokens_update`` event in the Shared API Keys docs. (`#3134 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3134>`_)
- Added notes explaining the best practices with config. (`#3149 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3149>`_)
- Documented additional attributes in Context. (`#3151 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3151>`_)
- Updated Windows docs with up to date dependency instructions. (`#3188 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3188>`_)
- Added a "Publishing cogs for V3" document explaining how to make user's cogs work with Downloader. (`#3234 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3234>`_)
- Fixed broken docs for ``redbot.core.commands.Context.react_quietly``. (`#3257 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3257>`_)
- Updated copyright notices on License and RTD config to 2020. (`#3259 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3259>`_)
- Added a line about setuptools and wheel. (`#3262 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3262>`_)
- Ensured development builds are not advertised to the wrong audience. (`#3292 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3292>`_)
- Clarified the usage intent of some of the chat formatting functions. (`#3292 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3292>`_)
Admin
-----
Breaking Changes
~~~~~~~~~~~~~~~~
- Changed ``[p]announce ignore`` and ``[p]announce channel`` to ``[p]announceset ignore`` and ``[p]announceset channel``. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
- Changed ``[p]selfrole <role>`` to ``[p]selfrole add <role>``, changed ``[p]selfrole add`` to ``[p]selfroleset add`` , and changed ``[p]selfrole delete`` to ``[p]selfroleset remove``. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
Bug Fixes
~~~~~~~~~
- Fixed ``[p]announce`` failing after encountering an error attempting to message the bot owner. (`#3166 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3166>`_)
- Improved the clarity of user facing messages when the user is not allowed to do something due to Discord hierarchy rules. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
- Fixed some role managing commands not properly checking if Red had ``manage_roles`` perms before attempting to manage roles. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
- Fixed ``[p]editrole`` commands not checking if roles to be edited are higher than Red's highest role before trying to edit them. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
- Fixed ``[p]announce ignore`` and ``[p]announce channel`` not being able to be used by guild owners and administrators. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
Enhancements
~~~~~~~~~~~~
- Added custom issue messages for adding and removing roles, this makes it easier to create translations. (`#3016 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3016>`_)
Audio
-----
Bug Fixes
~~~~~~~~~
- ``[p]playlist remove`` now removes the playlist url if the playlist was created through ``[p]playlist save``. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
- Users are no longer able to accidentally overwrite existing playlist if a new one with the same name is created/renamed. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
- ``[p]audioset settings`` no longer shows lavalink JAR version. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- Fixed a ``KeyError: loadType`` when trying to play tracks. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]audioset settings`` now uses ``ctx.is_owner()`` to check if the context author is the bot owner. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- Fixed track indexs being off by 1 in ``[p]search``. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
- Fixed an issue where updating your Spotify and YouTube Data API tokens did not refresh them. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
- Fixed an issue where the blacklist was not being applied correctly. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
- Fixed an issue in ``[p]audioset restrictions blacklist list`` where it would call the list a ``Whitelist``. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
- Red's status is now properly cleared on emptydisconnect. (`#3050 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3050>`_)
- Fixed a console spam caused sometimes when auto disconnect and auto pause are used. (`#3123 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3123>`_)
- Fixed an error that was thrown when running ``[p]audioset dj``. (`#3165 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3165>`_)
- Fixed a crash that could happen when the bot can't connect to the lavalink node. (`#3238 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3238>`_)
- Restricted the number of songs shown in the queue to first 500 to avoid heartbeats. (`#3279 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3279>`_)
- Added more cooldowns to playlist commands and restricted the queue and playlists to 10k songs to avoid bot errors. (`#3286 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3286>`_)
Enhancements
~~~~~~~~~~~~
- ``[p]playlist upload`` will now load playlists generated via ``[p]playlist download`` much faster if the playlist uses the new scheme. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
- ``[p]playlist`` commands now can be used by everyone regardless of DJ settings, however it will respect DJ settings when creating/modifying playlists in the server scope. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
- Spotify, Youtube Data, and Lavalink API calls can be cached to avoid repeated calls in the future, see ``[p]audioset cache``. (`#2890 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2890>`_)
- Playlists will now start playing as soon as first track is loaded. (`#2890 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2890>`_)
- ``[p]audioset localpath`` can set a path anywhere in your machine now. Note: This path needs to be visible by ``Lavalink.jar``. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]queue`` now works when there are no tracks in the queue, showing the track currently playing. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]audioset settings`` now reports Red Lavalink version. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- Adding and removing reactions in Audio is no longer a blocking action. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- When shuffle is on, queue now shows the correct play order. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]seek`` and ``[p]skip`` can be used by user if they are the song requester while DJ mode is enabled and votes are disabled. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- Adding a playlist and an album to a saved playlist skips tracks already in the playlist. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- DJ mode is now turned off if the DJ role is deleted. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- When playing a localtrack, ``[p]play`` and ``[p]bumpplay`` no longer require the use of the prefix "localtracks\\".
Before: ``[p]bumpplay localtracks\\ENM\\501 - Inside The Machine.mp3``
Now: ``[p]bumpplay ENM\\501 - Inside The Machine.mp3``
Now nested folders: ``[p]bumpplay Parent Folder\\Nested Folder\\track.mp3`` (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- Removed commas in explanations about how to set API keys. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
- Expanded local track support to all file formats (m3u, m4a, mp4, etc). (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
- Cooldowns are now reset upon failure of commands that have a cooldown timer. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
- Improved the explanation in the help string for ``[p]audioset emptydisconnect``. (`#3051 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3051>`_)
- Added a typing indicator to playlist dedupe. (`#3058 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3058>`_)
- Exposed clearer errors to users in the play commands. (`#3085 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3085>`_)
- Better error handling when the player is unable to play multiple tracks in the sequence. (`#3165 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3165>`_)
New Features
~~~~~~~~~~~~
- Added support for nested folders in the localtrack folder. (`#270 <https://github.com/Cog-Creators/Red-DiscordBot/issues/270>`_)
- Now auto pauses the queue when the voice channel is empty. (`#721 <https://github.com/Cog-Creators/Red-DiscordBot/issues/721>`_)
- All Playlist commands now accept optional arguments, use ``[p]help playlist <subcommand>`` for more details. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
- ``[p]playlist rename`` will now allow users to rename existing playlists. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
- ``[p]playlist update`` will now allow users to update non-custom Playlists to the latest available tracks. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
- There are now 3 different scopes of playlist. To define them, use the ``--scope`` argument.
``Global Playlist``
- These playlists will be available in all servers the bot is in.
- These can be managed by the Bot Owner only.
``Server Playlist``
- These playlists will only be available in the server they were created in.
- These can be managed by the Bot Owner, Guild Owner, Mods, Admins, DJs, and the Creator (if the DJ role is disabled).
``User Playlist``
- These playlists will be available in all servers both the bot and the creator are in.
- These can be managed by the Bot Owner and Creator only. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
- ``[p]audioset cache`` can be used to set the cache level. **It's off by default**. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]genre`` can be used to play spotify playlists. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]audioset cacheage`` can be used to set the maximum age of an entry in the cache. **Default is 365 days**. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]audioset autoplay`` can be used to enable auto play once the queue runs out. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- New events dispatched by Audio.
- ``on_red_audio_track_start(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
- ``on_red_audio_track_end(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
- ``on_red_audio_track_enqueue(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
- ``on_red_audio_track_auto_play(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
- ``on_red_audio_queue_end(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
- ``on_red_audio_audio_disconnect(guild: discord.Guild)``
- ``on_red_audio_skip_track(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)`` (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]queue shuffle`` can be used to shuffle the queue manually. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]queue clean self`` can be used to remove all songs you requested from the queue. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]audioset restrictions`` can be used to add or remove keywords which songs must have or are not allowed to have. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]playlist dedupe`` can be used to remove duplicated tracks from a playlist. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]autoplay`` can be used to play a random song. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
- ``[p]bumpplay`` can be used to add a song to the front of the queue. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
- ``[p]shuffle`` has an additional argument to tell the bot whether it should shuffle bumped tracks. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
- Added global whitelist/blacklist commands. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
- Added self-managed daily playlists in the GUILD scope, these are called "Daily playlist - YYYY-MM-DD" and auto delete after 7 days. (`#3199 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3199>`_)
CustomCom
---------
Enhancements
~~~~~~~~~~~~
- The group command ``[p]cc create`` can now be used to create simple CCs without specifying "simple". (`#1767 <https://github.com/Cog-Creators/Red-DiscordBot/issues/1767>`_)
- Added a query option for CC typehints for URL-based CCs. (`#3228 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3228>`_)
- Now uses the ``humanize_list`` utility for iterable parameter results, e.g. ``{#:Role.members}``. (`#3277 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3277>`_)
Downloader
----------
Bug Fixes
~~~~~~~~~
- Made the regex for repo names use raw strings to stop causing a ``DeprecationWarning`` for invalid escape sequences. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
- Downloader will no longer attempt to install cogs that are already installed. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
- Repo names can now only contain the characters listed in the help text (A-Z, 0-9, underscores, and hyphens). (`#2827 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2827>`_)
- ``[p]findcog`` no longer attempts to find a cog for commands without a cog. (`#2902 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2902>`_)
- Downloader will no longer attempt to install a cog with same name as another cog that is already installed. (`#2927 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2927>`_)
- Added error handling for when a remote repository or branch is deleted, now notifies the which repository failed and continues to update the others. (`#2936 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2936>`_)
- ``[p]cog install`` will no longer error if a cog has an empty install message. (`#3024 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3024>`_)
- Made ``redbot.cogs.downloader.repo_manager.Repo.clean_url`` work with relative urls. This property is ``str`` type now. (`#3141 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3141>`_)
- Fixed an error on repo add from empty string values for the ``install_msg`` info.json field. (`#3153 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3153>`_)
- Disabled all git auth prompts when adding/updating a repo with Downloader. (`#3159 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3159>`_)
- ``[p]findcog`` now properly works for cogs with less typical folder structure. (`#3177 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3177>`_)
- ``[p]cog uninstall`` now fully unloads cog - the bot will not try to load it on next startup. (`#3179 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3179>`_)
Enhancements
~~~~~~~~~~~~
- Downloader will now check if the Python and bot versions match requirements in ``info.json`` during update. (`#1866 <https://github.com/Cog-Creators/Red-DiscordBot/issues/1866>`_)
- ``[p]cog install`` now accepts multiple cog names. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
- When passing cogs to ``[p]cog update``, it will now only update those cogs, not all cogs from the repo those cogs are from. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
- Added error messages for failures when installing/reinstalling requirements and copying cogs and shared libraries. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
- ``[p]findcog`` now uses sanitized urls (without HTTP Basic Auth fragments). (`#3129 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3129>`_)
- ``[p]repo info`` will now show the repo's url, branch, and authors. (`#3225 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3225>`_)
- ``[p]cog info`` will now show cog authors. (`#3225 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3225>`_)
- ``[p]findcog`` will now show the repo's branch. (`#3225 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3225>`_)
New Features
~~~~~~~~~~~~
- Added ``[p]repo update [repos]`` which updates repos without updating the cogs from them. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
- Added ``[p]cog installversion <repo_name> <revision> <cogs>`` which installs cogs from a specified revision (commit, tag) of the given repo. When using this command, the cog will automatically be pinned. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
- Added ``[p]cog pin <cogs>`` and ``[p]cog unpin <cogs>`` for pinning cogs. Cogs that are pinned will not be updated when using update commands. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
- Added ``[p]cog checkforupdates`` that lists which cogs can be updated (including pinned cog) without updating them. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
- Added ``[p]cog updateallfromrepos <repos>`` that updates all cogs from the given repos. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
- Added ``[p]cog updatetoversion <repo_name> <revision> [cogs]`` that updates all cogs or ones of user's choosing to chosen revision of the given repo. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
- Added ``[p]cog reinstallreqs`` that reinstalls cog requirements and shared libraries for all installed cogs. (`#3167 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3167>`_)
Documentation Changes
~~~~~~~~~~~~~~~~~~~~~
- Added ``redbot.cogs.downloader.installable.InstalledModule`` to Downloader's framework docs. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
- Removed API References for Downloader. (`#3234 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3234>`_)
Image
-----
Enhancements
~~~~~~~~~~~~
- Updated the giphycreds command to match the formatting of the other API commands. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
- Removed commas from explanations about how to set API keys. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
Mod
---
Bug Fixes
~~~~~~~~~
- ``[p]userinfo`` no longer breaks when a user has an absurd numbers of roles. (`#2910 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2910>`_)
- Fixed Mod cog not recording username changes for ``[p]names`` and ``[p]userinfo`` commands. (`#2918 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2918>`_)
- Fixed ``[p]modset deletedelay`` deleting non-command messages. (`#2924 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2924>`_)
- Fixed an error when reloading Mod. (`#2932 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2932>`_)
Enhancements
~~~~~~~~~~~~
- Slowmode now accepts integer-only inputs as seconds. (`#2884 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2884>`_)
Permissions
-----------
Bug Fixes
~~~~~~~~~
- Defaults are now cleared properly when clearing all rules. (`#3037 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3037>`_)
Enhancements
~~~~~~~~~~~~
- Better explained the usage of commands with the ``<who_or_what>`` argument. (`#2991 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2991>`_)
Streams
-------
Bug Fixes
~~~~~~~~~
- Fixed a ``TypeError`` in the ``TwitchStream`` class when calling Twitch client_id from Red shared APIs tokens. (`#3042 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3042>`_)
- Changed the ``stream_alert`` function for Twitch alerts to make it work with how the ``TwitchStream`` class works now. (`#3042 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3042>`_)
Enhancements
~~~~~~~~~~~~
- Removed commas from explanations about how to set API keys. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
Trivia
------
Bug Fixes
~~~~~~~~~
- Fixed a typo in Ahsoka Tano's name in the Starwars trivia list. (`#2909 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2909>`_)
- Fixed a bug where ``[p]trivia leaderboard`` failed to run. (`#2911 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2911>`_)
- Fixed a typo in the Greek mythology trivia list regarding Hermes' staff. (`#2994 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2994>`_)
- Fixed a question in the Overwatch trivia list that accepted blank responses. (`#2996 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2996>`_)
- Fixed questions and answers that were incorrect in the Clash Royale trivia list. (`#3236 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3236>`_)
Enhancements
~~~~~~~~~~~~
- Added trivia lists for Prince and Michael Jackson lyrics. (`#12 <https://github.com/Cog-Creators/Red-DiscordBot/issues/12>`_)

View File

@@ -1,910 +0,0 @@
.. 3.3.x Changelogs
Redbot 3.3.12 (2020-08-18)
==========================
| Thanks to all these amazing people that contributed to this release:
| :ghuser:`Dav-Git`, :ghuser:`douglas-cpp`, :ghuser:`flaree`, :ghuser:`jack1142`, :ghuser:`Kowlin`, :ghuser:`MeatyChunks`, :ghuser:`PredaaA`, :ghuser:`Predeactor`, :ghuser:`thisisjvgrace`, :ghuser:`Vexed01`, :ghuser:`zephyrkul`
End-user changelog
------------------
Core Bot
********
- Red now logs clearer error if it can't find package to load in any cog path during bot startup (:issue:`4079`)
Mod
***
- ``[p]mute voice`` and ``[p]unmute voice`` now take action instantly if bot has Move Members permission (:issue:`4064`)
- Added typing to ``[p](un)mute guild`` to indicate that mute is being processed (:issue:`4066`, :issue:`4172`)
Streams
*******
- Improve error messages for invalid channel names/IDs (:issue:`4147`, :issue:`4148`)
Trivia Lists
************
- Added ``whosthatpokemon2`` trivia containing Pokémons from 2nd generation (:issue:`4102`)
- Added ``whosthatpokemon3`` trivia containing Pokémons from 3rd generation (:issue:`4141`)
Miscellaneous
-------------
- Updated features list in ``[p]serverinfo`` with the latest changes from Discord (:issue:`4116`)
- Simple version of ``[p]serverinfo`` now shows info about more detailed ``[p]serverinfo 1`` (:issue:`4121`)
Redbot 3.3.11 (2020-08-10)
==========================
| Thanks to all these amazing people that contributed to this release:
| :ghuser:`douglas-cpp`, :ghuser:`Drapersniper`, :ghuser:`Flame`, :ghuser:`jack1142`, :ghuser:`MeatyChunks`, :ghuser:`Vexed01`, :ghuser:`yamikaitou`
End-user changelog
------------------
Audio
*****
- Audio should now work again on all voice regions (:issue:`4162`, :issue:`4168`)
- Removed an edge case where an unfriendly error message was sent in Audio cog (:issue:`3879`)
Cleanup
*******
- Fixed a bug causing ``[p]cleanup`` commands to clear all messages within last 2 weeks when ``0`` is passed as the amount of messages to delete (:issue:`4114`, :issue:`4115`)
CustomCommands
**************
- ``[p]cc show`` now sends an error message when command with the provided name couldn't be found (:issue:`4108`)
Downloader
**********
- ``[p]findcog`` no longer fails for 3rd-party cogs without any author (:issue:`4032`, :issue:`4042`)
- Update commands no longer crash when a different repo is added under a repo name that was once used (:issue:`4086`)
Permissions
***********
- ``[p]permissions removeserverrule`` and ``[p]permissions removeglobalrule`` no longer error when trying to remove a rule that doesn't exist (:issue:`4028`, :issue:`4036`)
Warnings
********
- ``[p]warn`` now sends an error message (instead of no feedback) when an unregistered reason is used by someone who doesn't have Administrator permission (:issue:`3839`, :issue:`3840`)
Redbot 3.3.10 (2020-07-09)
==========================
| Thanks to all these amazing people that contributed to this release:
| :ghuser:`aikaterna`, :ghuser:`bobloy`, :ghuser:`Dav-Git`, :ghuser:`Drapersniper`, :ghuser:`Flame442`, :ghuser:`flaree`, :ghuser:`Injabie3`, :ghuser:`jack1142`, :ghuser:`mikeshardmind`, :ghuser:`MiniJennJenn`, :ghuser:`NeuroAssassin`, :ghuser:`thisisjvgrace`, :ghuser:`Vexed01`
End-user changelog
------------------
Audio
*****
- Added information about internally managed jar to ``[p]audioset info`` (:issue:`3915`)
- Updated to Lavaplayer 1.3.50
- Twitch playback and YouTube searching should be functioning again.
Core Bot
********
- Fixed delayed help when ``[p]set deletedelay`` is enabled (:issue:`3884`, :issue:`3883`)
- Bumped the Discord.py requirement from 1.3.3 to 1.3.4 (:issue:`4053`)
- Added settings view commands for nearly all cogs. (:issue:`4041`)
- Added more strings to be fully translatable by i18n. (:issue:`4044`)
Downloader
**********
- Added ``[p]cog listpinned`` subcommand to see currently pinned cogs (:issue:`3974`)
- Fixed unnecessary typing when running downloader commands (:issue:`3964`, :issue:`3948`)
- Added embed version of ``[p]findcog`` (:issue:`3965`, :issue:`3944`)
- Fixed ``[p]findcog`` not differentiating between core cogs and local cogs(:issue:`3969`, :issue:`3966`)
Filter
******
- Added ``[p]filter list`` to show filtered words, and removed DMs when no subcommand was passed (:issue:`3973`)
Image
*****
- Updated instructions for obtaining and setting the GIPHY API key (:issue:`3994`)
Mod
***
- Added option to delete messages within the passed amount of days with ``[p]tempban`` (:issue:`3958`)
- Added the ability to permanently ban a temporary banned user with ``[p]hackban`` (:issue:`4025`)
- Fixed the passed reason not being used when using ``[p]tempban`` (:issue:`3958`)
- Fixed invite being sent with ``[p]tempban`` even when no invite was set (:issue:`3991`)
- Prevented an issue whereby the author may lock him self out of using the bot via whitelists (:issue:`3903`)
- Reduced the number of API calls made to the storage APIs (:issue:`3910`)
Permissions
***********
- Uploaded YAML files now accept integer commands without quotes (:issue:`3987`, :issue:`3185`)
- Uploaded YAML files now accept command rules with empty dictionaries (:issue:`3987`, :issue:`3961`)
Streams
*******
- Fixed streams cog sending multiple owner notifications about twitch secret not set (:issue:`3901`, :issue:`3587`)
- Fixed old bearer tokens not being invalidated when the API key is updated (:issue:`3990`, :issue:`3917`)
Trivia Lists
************
- Fixed URLs in ``whosthatpokemon`` (:issue:`3975`, :issue:`3023`)
- Fixed trivia files ``leagueults`` and ``sports`` (:issue:`4026`)
- Updated ``greekmyth`` to include more answer variations (:issue:`3970`)
- Added new ``lotr`` trivia list (:issue:`3980`)
- Added new ``r6seige`` trivia list (:issue:`4026`)
Developer changelog
-------------------
- Added the utility functions ``map``, ``find``, and ``next`` to ``AsyncIter`` (:issue:`3921`, :issue:`3887`)
- Updated deprecation times for ``APIToken``, and loops being passed to various functions to the first minor release (represented by ``X`` in ``3.X.0``) after 2020-08-05 (:issue:`3608`)
- Updated deprecation warnings for shared libs to reflect that they have been moved for an undefined time (:issue:`3608`)
- Added new ``discord.com`` domain to ``INVITE_URL_RE`` common filter (:issue:`4012`)
- Fixed incorrect role mention regex in ``MessagePredicate`` (:issue:`4030`)
- Vendor the ``discord.ext.menus`` module (:issue:`4039`)
Miscellaneous
-------------
- Improved error responses for when Modlog and Autoban on mention spam were already disabled (:issue:`3951`, :issue:`3949`)
- Clarified that ``[p]embedset user`` only affects commands executed in DMs (:issue:`3972`, :issue:`3953`)
- Added link to Getting Started guide if the bot was not in any guilds (:issue:`3906`)
- Fixed exceptions being ignored or not sent to log files in special cases (:issue:`3895`)
- Added the option of using dots in the instance name when creating your instances (:issue:`3920`)
- Added a confirmation when using hyphens in instance names to discourage the use of them (:issue:`3920`)
- Fixed migration owner notifications being sent even when migration was not necessary (:issue:`3911`. :issue:`3909`)
- Fixed commands being translated where they should not be (:issue:`3938`, :issue:`3919`)
- Fixed grammar errors and added full stopts in ``core_commands.py`` (:issue:`4023`)
Redbot 3.3.9 (2020-06-12)
=========================
| Thanks to all these amazing people that contributed to this release:
| :ghuser:`aikaterna`, :ghuser:`Dav-Git`, :ghuser:`Drapersniper`, :ghuser:`Flame442`, :ghuser:`mikeshardmind`, :ghuser:`NeuroAssassin`, :ghuser:`Predeactor`, :ghuser:`Vexed01`
|
| **Read before updating**:
| 1. Bot owners can no longer restrict access to some commands in Permissions cog using global permissions rules. Look at `Permissions changelog <important-339-2>` for full details.
| 2. There's been a change in behavior of warning messages. Look at `Warnings changelog <important-339-1>` for full details.
End-user changelog
------------------
Security
********
**NOTE**: If you can't update immediately, we recommend disabling the affected command until you can.
- **Mod** - ``[p]tempban`` now properly respects Discord's hierarchy rules (:issue:`3957`)
Core Bot
********
- ``[p]info`` command can now be used when bot doesn't have Embed Links permission (:issue:`3907`, :issue:`3102`)
- Fixed ungraceful error that happened in ``[p]set custominfo`` when provided text was too long (:issue:`3923`)
- Red's start up message now shows storage type (:issue:`3935`)
Audio
*****
- Audio now properly ignores streams when max length is enabled (:issue:`3878`, :issue:`3877`)
- Commands that should work in DMs no longer error (:issue:`3880`)
Filter
******
- Fixed behavior of detecting quotes in commands for adding/removing filtered words (:issue:`3925`)
.. _important-339-2:
Permissions
***********
- **Both global and server rules** can no longer prevent guild owners from accessing commands for changing server rules. Bot owners can still use ``[p]command disable`` if they wish to completely disable any command in Permissions cog (:issue:`3955`, :issue:`3107`)
Full list of affected commands:
- ``[p]permissions acl getserver``
- ``[p]permissions acl setserver``
- ``[p]permissions acl updateserver``
- ``[p]permissions addserverrule``
- ``[p]permissions removeserverrule``
- ``[p]permissions setdefaultserverrule``
- ``[p]permissions clearserverrules``
- ``[p]permissions canrun``
- ``[p]permissions explain``
.. _important-339-1:
Warnings
********
- Warnings sent to users don't show the moderator who warned the user by default now. Newly added ``[p]warningset showmoderators`` command can be used to switch this behaviour (:issue:`3781`)
- Warn channel functionality has been fixed (:issue:`3781`)
Developer changelog
-------------------
Core Bot
********
- Added `bot.set_prefixes() <RedBase.set_prefixes()>` method that allows developers to set global/server prefixes (:issue:`3890`)
Documentation changes
---------------------
- Added Oracle Cloud to free hosting section in :ref:`host-list` (:issue:`3916`)
Miscellaneous
-------------
- Added missing help message for Downloader, Reports and Streams cogs (:issue:`3892`)
- **Core Bot** - cooldown in ``[p]contact`` no longer applies when it's used without any arguments (:issue:`3942`)
- **Core Bot** - improved instructions on obtaining user ID in help of ``[p]dm`` command (:issue:`3946`)
- **Alias** - ``[p]alias global`` group, ``[p]alias help``, and ``[p]alias show`` commands can now be used in DMs (:issue:`3941`, :issue:`3940`)
- **Audio** - Typo fix (:issue:`3889`, :issue:`3900`)
- **Audio** - Fixed ``[p]audioset autoplay`` being available in DMs (:issue:`3899`)
- **Bank** - ``[p]bankset`` now displays bank's scope (:issue:`3954`)
- **Mod** - Preemptive fix for d.py 1.4 (:issue:`3891`)
Redbot 3.3.8 (2020-05-29)
==================================
| Thanks to all these amazing people that contributed to this release:
| :ghuser:`aikaterna`, :ghuser:`Bakersbakebread`, :ghuser:`DariusStClair`, :ghuser:`Dav-Git`, :ghuser:`Drapersniper`, :ghuser:`Flame442`, :ghuser:`jack1142`, :ghuser:`mikeshardmind`, :ghuser:`NeuroAssassin`, :ghuser:`PredaaA`, :ghuser:`Predeactor`, :ghuser:`qaisjp`, :ghuser:`Tobotimus`
End-user changelog
------------------
Core Bot
********
- Important fixes to how PostgreSQL data backend saves data in bulks (:issue:`3829`)
- Fixed ``[p]localwhitelist`` and ``[p]localblacklist`` commands (:issue:`3857`)
- Red now includes information on how to update when sending information about being out of date (:issue:`3744`)
- Using backslashes in bot's username/nickname no longer causes issues (:issue:`3826`, :issue:`3825`)
Admin
*****
- Fixed server lock (:issue:`3815`, :issue:`3814`)
Alias
*****
- Added pagination to ``[p]alias list`` and ``[p]alias global list`` to avoid errors for users with a lot of aliases (:issue:`3844`, :issue:`3834`)
- ``[p]alias help`` should now work more reliably (:issue:`3864`)
Audio
*****
- Twitch playback is functional once again (:issue:`3873`)
- Recent errors with YouTube playback should be resolved (:issue:`3873`)
- Added new option (settable with ``[p]audioset lyrics``) that makes Audio cog prefer (prioritize) tracks with lyrics (:issue:`3519`)
- Added global daily (historical) queues (:issue:`3518`)
- Added ``[p]audioset countrycode`` that allows to set the country code for spotify searches (:issue:`3528`)
- Fixed ``[p]local search`` (:issue:`3528`, :issue:`3501`)
- Local folders with special characters should work properly now (:issue:`3528`, :issue:`3467`)
- Audio no longer fails to take the last spot in the voice channel with user limit (:issue:`3528`)
- ``[p]local play`` no longer enqueues tracks from nested folders (:issue:`3528`)
- Fixed ``[p]playlist dedupe`` not removing tracks (:issue:`3518`)
- ``[p]disconnect`` now allows to disconnect if both DJ mode and voteskip aren't enabled (:issue:`3502`, :issue:`3485`)
- Many UX improvements and fixes, including, among other things:
- Creating playlists without explicitly passing ``-scope`` no longer causes errors (:issue:`3500`)
- ``[p]playlist list`` now shows all accessible playlists if ``--scope`` flag isn't used (:issue:`3518`)
- ``[p]remove`` now also accepts a track URL in addition to queue index (:issue:`3201`)
- ``[p]playlist upload`` now accepts a playlist file uploaded in the message with a command (:issue:`3251`)
- Commands now send friendly error messages for common errors like lost Lavalink connection or bot not connected to voice channel (:issue:`3503`, :issue:`3528`, :issue:`3353`, :issue:`3712`)
CustomCommands
**************
- ``[p]customcom create`` no longer allows spaces in custom command names (:issue:`3816`)
Mod
***
- ``[p]userinfo`` now shows default avatar when no avatar is set (:issue:`3819`)
Modlog
******
- Fixed (again) ``AttributeError`` for cases whose moderator doesn't share the server with the bot (:issue:`3805`, :issue:`3784`, :issue:`3778`)
Permissions
***********
- Commands for settings ACL using yaml files now properly works on PostgreSQL data backend (:issue:`3829`, :issue:`3796`)
Warnings
********
- Warnings cog no longer allows to warn bot users (:issue:`3855`, :issue:`3854`)
Developer changelog
-------------------
| **Important:**
| If you're using RPC, please see the full annoucement about current state of RPC in main Red server
`by clicking here <https://discord.com/channels/133049272517001216/411381123101491200/714560168465137694>`_.
Core Bot
********
- Red now inherits from `discord.ext.commands.AutoShardedBot` for better compatibility with code expecting d.py bot (:issue:`3822`)
- Libraries using ``pkg_resources`` (like ``humanize`` or ``google-api-python-client``) that were installed through Downloader should now work properly (:issue:`3843`)
- All bot owner IDs can now be found under ``bot.owner_ids`` attribute (:issue:`3793`)
- Note: If you want to use this on bot startup (e.g. in cog's initialisation), you need to await ``bot.wait_until_red_ready()`` first
Documentation changes
---------------------
- Added information about provisional status of RPC (:issue:`3862`)
- Revised install instructions (:issue:`3847`)
- Improved navigation in `document about updating Red <update_red>` (:issue:`3856`, :issue:`3849`)
Miscellaneous
-------------
- Few clarifications and typo fixes in few command help docstrings (:issue:`3817`, :issue:`3823`, :issue:`3837`, :issue:`3851`, :issue:`3861`)
- **Downloader** - Downloader no longer removes the repo when it fails to load it (:issue:`3867`)
Redbot 3.3.7 (2020-04-28)
=========================
This is a hotfix release fixing issue with generating messages for new cases in Modlog.
Redbot 3.3.6 (2020-04-27)
=========================
| Thanks to all these amazing people that contributed to this release:
| :ghuser:`aikaterna`, :ghuser:`Drapersniper`, :ghuser:`jack1142`, :ghuser:`Kowlin`, :ghuser:`MiniJennJenn`, :ghuser:`NeuroAssassin`, :ghuser:`PredaaA`, :ghuser:`TrustyJAID`, :ghuser:`yamikaitou`
End-user changelog
------------------
Core Bot
********
- Converting from and to Postgres driver with ``redbot-setup convert`` have been fixed (:issue:`3714`, :issue:`3115`)
- Fixed big delays in commands that happened when the bot was owner-less (or if it only used co-owners feature) and command caller wasn't the owner (:issue:`3782`)
- Various optimizations
- Reduced calls to data backend when loading bot's commands (:issue:`3764`)
- Reduced calls to data backend when showing help for cogs/commands (:issue:`3766`)
- Improved performance for bots with big amount of guilds (:issue:`3767`)
- Mod cog no longer fetches guild's bans every 60 seconds when handling unbanning for tempbans (:issue:`3783`)
- Reduced the bot load for messages starting with a prefix when fuzzy search is disabled (:issue:`3718`)
- Aliases in Alias cog are now cached for better performance (:issue:`3788`)
Core Commands
*************
- ``[p]set avatar`` now supports setting avatar using attachment (:issue:`3747`)
- Added ``[p]set avatar remove`` subcommand for removing bot's avatar (:issue:`3757`)
- Fixed list of ignored channels that is shown in ``[p]ignore``/``[p]unignore`` (:issue:`3746`)
Audio
*****
- Age-restricted tracks, live streams, and mix playlists from YouTube should work in Audio again (:issue:`3791`)
- Soundcloud's sets and playlists with more than 50 tracks should work in Audio again (:issue:`3791`)
CustomCommands
**************
- Added ``[p]cc raw`` command that gives you the raw response of a custom command for ease of copy pasting (:issue:`3795`)
Modlog
******
- Fixed ``AttributeError`` for cases whose moderator doesn't share the server with the bot (:issue:`3784`, :issue:`3778`)
Streams
*******
- Fixed incorrect stream URLs for Twitch channels that have localised display name (:issue:`3773`, :issue:`3772`)
Trivia
******
- Fixed the error in ``[p]trivia stop`` that happened when there was no ongoing trivia session in the channel (:issue:`3774`)
Trivia Lists
************
- Updated ``leagueoflegends`` list with new changes to League of Legends (`b8ac70e <https://github.com/Cog-Creators/Red-DiscordBot/commit/b8ac70e59aa1328f246784f14f992d6ffe00d778>`_)
Developer changelog
-------------------
Utility Functions
*****************
- Added `redbot.core.utils.AsyncIter` utility class which allows you to wrap regular iterable into async iterator yielding items and sleeping for ``delay`` seconds every ``steps`` items (:issue:`3767`, :issue:`3776`)
- `bold()`, `italics()`, `strikethrough()`, and `underline()` now accept ``escape_formatting`` argument that can be used to disable escaping of markdown formatting in passed text (:issue:`3742`)
Documentation changes
---------------------
- Added `document about updating Red <update_red>` (:issue:`3790`)
- ``pyenv`` instructions will now update ``pyenv`` if it's already installed (:issue:`3740`)
- Updated Python version in ``pyenv`` instructions (:issue:`3740`)
- Updated install docs to include Ubuntu 20.04 (:issue:`3792`)
Miscellaneous
-------------
- **Config** - JSON driver will now properly have only one lock per cog name (:issue:`3780`)
- **Core Commands** - ``[p]debuginfo`` now shows used storage type (:issue:`3794`)
- **Trivia** - Corrected spelling of Compact Disc in ``games`` list (:issue:`3759`, :issue:`3758`)
Redbot 3.3.5 (2020-04-09)
=========================
| Thanks to all these amazing people that contributed to this release:
| :ghuser:`jack1142`, :ghuser:`Kowlin`
End-user changelog
------------------
Core Bot
********
- "Outdated" field no longer shows in ``[p]info`` when Red is up-to-date (:issue:`3730`)
Alias
*****
- Fixed regression in ``[p]alias add`` that caused it to reject commands containing arguments (:issue:`3734`)
Redbot 3.3.4 (2020-04-05)
=========================
| Thanks to all these amazing people that contributed to this release:
| :ghuser:`jack1142`, :ghuser:`kennnyshiwa`
End-user changelog
------------------
Core Bot
********
- Fixed checks related to bank's global state that were used in commands in Bank, Economy and Trivia cogs (:issue:`3707`)
Alias
*****
- ``[p]alias add`` now sends an error when command user tries to alias doesn't exist (:issue:`3710`, :issue:`3545`)
Developer changelog
-------------------
Core Bot
********
- Bump dependencies, including update to discord.py 1.3.3 (:issue:`3723`)
Utility Functions
*****************
- `redbot.core.utils.common_filters.filter_invites` now filters ``discord.io/discord.li`` invites links (:issue:`3717`)
- Fixed false-positives in `redbot.core.utils.common_filters.filter_invites` (:issue:`3717`)
Documentation changes
---------------------
- Versions of pre-requirements are now included in Windows install guide (:issue:`3708`)
Redbot 3.3.3 (2020-03-28)
=========================
| Thanks to all these amazing people that contributed to this release:
| :ghuser:`AnonGuy`, :ghuser:`Dav-Git`, :ghuser:`FancyJesse`, :ghuser:`Ianardo-DiCaprio`, :ghuser:`jack1142`, :ghuser:`kennnyshiwa`, :ghuser:`Kowlin`, :ghuser:`NeuroAssassin`, :ghuser:`PredaaA`, :ghuser:`Stonedestroyer`, :ghuser:`TrustyJAID`
End-user changelog
------------------
Core Bot
********
- Delete delay for command messages has been moved from Mod cog to Core (:issue:`3638`, :issue:`3636`)
- Fixed various bugs with blacklist and whitelist (:issue:`3643`, :issue:`3642`)
- Added ``[p]set regionalformat`` command that allows users to set regional formatting that is different from bot's locale (:issue:`3677`, :issue:`3588`)
- ``[p]set locale`` allows any valid locale now, not just locales for which Red has translations (:issue:`3676`, :issue:`3596`)
- Permissions for commands in Bank, Economy and Trivia cogs can now be overridden by Permissions cog (:issue:`3672`, :issue:`3233`)
- Outages of ``pypi.org`` no longer prevent the bot from starting (:issue:`3663`)
- Fixed formatting of help strings in fuzzy search results (:issue:`3673`, :issue:`3507`)
- Fixed few deprecation warnings related to menus and uvloop (:issue:`3644`, :issue:`3700`)
Core Commands
*************
- ``[p]set game`` no longer errors when trying to clear the status (:issue:`3630`, :issue:`3628`)
- All owner notifcations in Core now use proper prefixes in messages (:issue:`3632`)
- Added ``[p]set playing`` and ``[p]set streaming`` aliases for respectively ``[p]set game`` and ``[p]set stream`` (:issue:`3646`, :issue:`3590`)
ModLog
******
- Modlog's cases now keep last known username to prevent losing that information from case's message on edit (:issue:`3674`, :issue:`3443`)
CustomCom
*********
- Added ``[p]cc search`` command that allows users to search through created custom commands (:issue:`2573`)
Cleanup
*******
- Added ``[p]cleanup spam`` command that deletes duplicate messages from the last X messages and keeps only one copy (:issue:`3688`)
- Removed regex support in ``[p]cleanup self`` (:issue:`3704`)
Downloader
**********
- ``[p]cog checkforupdates`` now includes information about cogs that can't be installed due to Red/Python version requirements (:issue:`3678`, :issue:`3448`)
General
*******
- Added more detailed mode to ``[p]serverinfo`` command that can be accessed with ``[p]serverinfo 1`` (:issue:`2382`, :issue:`3659`)
Image
*****
- Users can now specify how many images should be returned in ``[p]imgur search`` and ``[p]imgur subreddit`` using ``[count]`` argument (:issue:`3667`, :issue:`3044`)
- ``[p]imgur search`` and ``[p]imgur subreddit`` now return one image by default (:issue:`3667`, :issue:`3044`)
Mod
***
- ``[p]userinfo`` now shows user's activities (:issue:`3669`)
- ``[p]userinfo`` now shows status icon near the username (:issue:`3669`)
- Muting no longer fails if user leaves while applying overwrite (:issue:`3627`)
- Fixed error that happened when Mod cog was loaded for the first time during bot startup (:issue:`3632`, :issue:`3626`)
Permissions
***********
- Commands for setting default rules now error when user tries to deny access to command designated as being always available (:issue:`3504`, :issue:`3465`)
Streams
*******
- Fixed an error that happened when no game was set on Twitch stream (:issue:`3631`)
- Preview picture for YouTube stream alerts is now bigger (:issue:`3689`, :issue:`3685`)
- YouTube channels with a livestream that doesn't have any current viewer are now properly showing as streaming (:issue:`3690`)
- Failures in Twitch API authentication are now logged (:issue:`3657`)
Trivia
******
- Added ``[p]triviaset custom upload/delete/list`` commands for managing custom trivia lists from Discord (:issue:`3420`, :issue:`3307`)
- Trivia sessions no longer error on payout when winner's balance would exceed max balance (:issue:`3666`, :issue:`3584`)
Warnings
********
- Sending warnings to warned user can now be disabled with ``[p]warnset toggledm`` command (:issue:`2929`, :issue:`2800`)
- Added ``[p]warnset warnchannel`` command that allows to set a channel where warnings should be sent to instead of the channel command was called in (:issue:`2929`, :issue:`2800`)
- Added ``[p]warnset togglechannel`` command that allows to disable sending warn message in guild channel (:issue:`2929`, :issue:`2800`)
- ``[p]warn`` now tells the moderator when bot wasn't able to send the warning to the user (:issue:`3653`, :issue:`3633`)
Developer changelog
-------------------
Core Bot
********
- Deprecation warnings issued by Red now use correct stack level so that the cog developers can find the cause of them (:issue:`3644`)
Dev Cog
*******
- Add ``__name__`` to environment's globals (:issue:`3649`, :issue:`3648`)
Documentation changes
---------------------
- Fixed install instructions for Mac in `install_linux_mac` (:issue:`3675`, :issue:`3436`)
- Windows install instructions now use ``choco upgrade`` commands instead of ``choco install`` to ensure up-to-date packages (:issue:`3684`)
Miscellaneous
-------------
- **Core Bot** - Command errors (i.e. command on cooldown, dm-only and guild-only commands, etc) can now be translated (:issue:`3665`, :issue:`2988`)
- **Core Bot** - ``redbot-setup`` now prints link to Getting started guide at the end of the setup (:issue:`3027`)
- **Core Bot** - Whitelist and blacklist commands now properly require passing at least one user (or role in case of local whitelist/blacklist) (:issue:`3652`, :issue:`3645`)
- **Downloader** - Fix misleading error appearing when repo name is already taken in ``[p]repo add`` (:issue:`3695`)
- **Downloader** - Improved error messages for unexpected errors in ``[p]repo add`` (:issue:`3656`)
- **Downloader** - Prevent encoding errors from crashing ``[p]cog update`` (:issue:`3639`, :issue:`3637`)
- **Trivia** - Non-finite numbers can no longer be passed to ``[p]triviaset timelimit``, ``[p]triviaset stopafter`` and ``[p]triviaset payout`` (:issue:`3668`, :issue:`3583`)
- **Utility Functions** - `redbot.core.utils.menus.menu()` now checks permissions *before* trying to clear reactions (:issue:`3589`, :issue:`3145`)
Redbot 3.3.2 (2020-02-28)
=========================
| Thanks to all these amazing people that contributed to this release:
| :ghuser:`aikaterna`, :ghuser:`chasehult`, :ghuser:`Dav-Git`, :ghuser:`DiscordLiz`, :ghuser:`Drapersniper`, :ghuser:`fixator10`, :ghuser:`Flame442`, :ghuser:`Hedlund01`, :ghuser:`jack1142`, :ghuser:`Kowlin`, :ghuser:`mikeshardmind`, :ghuser:`PredaaA`, :ghuser:`Stonedestroyer`, :ghuser:`trundleroo`, :ghuser:`TrustyJAID`, :ghuser:`zephyrkul`
End-user changelog
------------------
Core Bot
********
- Ignored guilds/channels and whitelist/blacklist are now cached for performance (:issue:`3472`)
- Ignored guilds/channels have been moved from Mod cog to Core (:issue:`3472`)
- ``[p]ignore channel`` command can now also ignore channel categories (:issue:`3472`)
Core Commands
*************
- Core cogs will now send bot mention prefix properly in places where discord doesn't render mentions (:issue:`3579`, :issue:`3591`, :issue:`3499`)
- Fix a bug with ``[p]blacklist add`` that made it impossible to blacklist users that bot doesn't share a server with (:issue:`3472`, :issue:`3220`)
- Improve user experience of ``[p]set game/listening/watching/`` commands (:issue:`3562`)
- Add ``[p]licenceinfo`` alias for ``[p]licenseinfo`` command to conform with non-American English (:issue:`3460`)
Admin
*****
- ``[p]announce`` will now only send error message if an actual errors occurs (:issue:`3514`, :issue:`3513`)
Alias
*****
- ``[p]alias help`` will now properly work in non-English locales (:issue:`3546`)
Audio
*****
- Users should be able to play age-restricted tracks from YouTube again (:issue:`3620`)
Economy
*******
- Next payday time will now be adjusted for users when payday time is changed (:issue:`3496`, :issue:`3438`)
Downloader
**********
- Downloader will no longer fail because of invalid ``info.json`` files (:issue:`3533`, :issue:`3456`)
- Add better logging of errors when Downloader fails to add a repo (:issue:`3558`)
Image
*****
- Fix load error for users that updated Red from version lower than 3.1 to version 3.2 or newer (:issue:`3617`)
Mod
***
- ``[p]hackban`` and ``[p]unban`` commands support user mentions now (:issue:`3524`)
- Ignored guilds/channels have been moved from Mod cog to Core (:issue:`3472`)
Streams
*******
- Fix stream alerts for Twitch (:issue:`3487`)
- Significantly reduce the quota usage for YouTube stream alerts (:issue:`3237`)
- Add ``[p]streamset timer`` command which can be used to control how often the cog checks for live streams (:issue:`3237`)
Trivia
******
- Add better handling for errors in trivia session (:issue:`3606`)
Trivia Lists
************
- Remove empty answers in trivia lists (:issue:`3581`)
Warnings
********
- Users can now pass a reason to ``[p]unwarn`` command (:issue:`3490`, :issue:`3093`)
Developer changelog
-------------------
Core Bot
********
- Updated all our dependencies - we're using discord.py 1.3.2 now (:issue:`3609`)
- Add traceback logging to task exception handling (:issue:`3517`)
- Developers can now create a command from an async function wrapped in `functools.partial` (:issue:`3542`)
- Bot will now show deprecation warnings in logs (:issue:`3527`, :issue:`3615`)
- Subcommands of command group with ``invoke_without_command=True`` will again inherit this group's checks (:issue:`3614`)
Config
******
- Fix Config's singletons (:issue:`3137`, :issue:`3136`)
Utility Functions
*****************
- Add clearer error when page is of a wrong type in `redbot.core.utils.menus.menu()` (:issue:`3571`)
Dev Cog
*******
- Allow for top-level `await`, `async for` and `async with` in ``[p]debug`` and ``[p]repl`` commands (:issue:`3508`)
Downloader
**********
- Downloader will now replace ``[p]`` with clean prefix same as it does in help command (:issue:`3592`)
- Add schema validation to ``info.json`` file processing - it should now be easier to notice any issues with those files (:issue:`3533`, :issue:`3442`)
Documentation changes
---------------------
- Add guidelines for Cog Creators in `guide_cog_creation` document (:issue:`3568`)
- Restructure virtual environment instructions to improve user experience (:issue:`3495`, :issue:`3411`, :issue:`3412`)
- Getting started guide now explain use of quotes for arguments with spaces (:issue:`3555`, :issue:`3111`)
- ``latest`` version of docs now displays a warning about possible differences from current stable release (:issue:`3570`)
- Make systemd guide clearer on obtaining username and python path (:issue:`3537`, :issue:`3462`)
- Indicate instructions for different venv types in systemd guide better (:issue:`3538`)
- Service file in `autostart_systemd` now also waits for network connection to be ready (:issue:`3549`)
- Hide alias of ``randomize_colour`` in docs (:issue:`3491`)
- Add separate headers for each event predicate class for better navigation (:issue:`3595`, :issue:`3164`)
- Improve wording of explanation for ``required_cogs`` key in `guide_publish_cogs` (:issue:`3520`)
Miscellaneous
-------------
- Use more reliant way of checking if command is bot owner only in ``[p]warnaction`` (Warnings cog) (:issue:`3516`, :issue:`3515`)
- Update PyPI domain in ``[p]info`` and update checker (:issue:`3607`)
- Stop using deprecated code in core (:issue:`3610`)
Redbot 3.3.1 (2020-02-05)
=========================
Core Bot
--------
- Add a cli flag for setting a max size of message cache
- Allow to edit prefix from command line using ``redbot --edit``.
- Some functions have been changed to no longer use deprecated asyncio functions
Core Commands
-------------
- The short help text for dm has been made more useful
- dm no longer allows owners to have the bot attempt to DM itself
Utils
-----
- Passing the event loop explicitly in utils is deprecated (Removal in 3.4)
Mod Cog
-------
- Hackban now works properly without being provided a number of days
Documentation Changes
---------------------
- Add ``-e`` flag to ``journalctl`` command in systemd guide so that it takes the user to the end of logs automatically.
- Added section to install docs for CentOS 8
- Improve usage of apt update in docs
Redbot 3.3.0 (2020-01-26)
=========================
Core Bot
--------
- The bot's description is now configurable.
- We now use discord.py 1.3.1, this comes with added teams support.
- The commands module has been slightly restructured to provide more useful data to developers.
- Help is now self consistent in the extra formatting used.
Core Commands
-------------
- Slowmode should no longer error on nonsensical time quantities.
- Embed use can be configured per channel as well.
Documentation
-------------
- We've made some small fixes to inaccurate instructions about installing with pyenv.
- Notes about deprecating in 3.3 have been altered to 3.4 to match the intended timeframe.
Admin
-----
- Gives feedback when adding or removing a role doesn't make sense.
Audio
-----
- Playlist finding is more intuitive.
- disconnect and repeat commands no longer interfere with eachother.
CustomCom
---------
- No longer errors when exiting an interactive menu.
Cleanup
-------
- A rare edge case involving messages which are deleted during cleanup and are the only message was fixed.
Downloader
----------
- Some user facing messages were improved.
- Downloader's initialization can no longer time out at startup.
General
-------
- Roll command will no longer attempt to roll obscenely large amounts.
Mod
---
- You can set a default amount of days to clean up when banning.
- Ban and hackban now use that default.
- Users can now optionally be DMed their ban reason.
Permissions
-----------
- Now has stronger enforcement of prioritizing botwide settings.

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,7 @@ Cooldowns
You can set cooldowns for your custom commands. If a command is on cooldown, it will not be triggered.
You can set cooldowns per member or per channel, or set a cooldown guild-wide. You can also set multiple types of cooldown on a single custom command. All cooldowns must pass before the command will trigger.
You can set cooldowns per member or per thread/channel, or set a cooldown guild-wide. You can also set multiple types of cooldown on a single custom command. All cooldowns must pass before the command will trigger.
------------------
Context Parameters
@@ -27,19 +27,19 @@ Context Parameters
You can enhance your custom command's response by leaving spaces for the bot to substitute.
+-----------+----------------------------------------+
| Argument | Substitute |
+===========+========================================+
| {message} | The message the bot is responding to. |
+-----------+----------------------------------------+
| {author} | The user who called the command. |
+-----------+----------------------------------------+
| {channel} | The channel the command was called in. |
+-----------+----------------------------------------+
| {server} | The server the command was called in. |
+-----------+----------------------------------------+
| {guild} | Same as with {server}. |
+-----------+----------------------------------------+
+-----------+--------------------------------------------------+
| Argument | Substitute |
+===========+==================================================+
| {message} | The message the bot is responding to. |
+-----------+--------------------------------------------------+
| {author} | The user who called the command. |
+-----------+--------------------------------------------------+
| {channel} | The channel or thread the command was called in. |
+-----------+--------------------------------------------------+
| {server} | The server the command was called in. |
+-----------+--------------------------------------------------+
| {guild} | Same as with {server}. |
+-----------+--------------------------------------------------+
You can further refine the response with dot notation. For example, {author.mention} will mention the user who called the command.
@@ -81,7 +81,7 @@ Showing your own avatar
.. code-block:: none
[p]customcom add simple avatar {author.avatar_url}
[p]customcom add simple avatar {author.display_avatar}
[p]avatar
https://cdn.discordapp.com/avatars/133801473317404673/be4c4a4fe47cb3e74c31a0504e7a295e.webp?size=1024

View File

@@ -150,7 +150,7 @@ selfroleset add
**Description**
Add a role to the list of selfroles.
Add a role, or a selection of roles, to the list of available selfroles.
.. warning:: Members will be able to assign themselves the role.
Make sure it doesn't give extra perms or anything that can break
@@ -160,6 +160,22 @@ Add a role to the list of selfroles.
* ``<role>``: The role to add to the list. |role-input|
.. _admin-command-selfroleset-clear:
"""""""""""""""""
selfroleset clear
"""""""""""""""""
**Syntax**
.. code-block:: none
[p]selfroleset clear
**Description**
Clear the list of available selfroles for this server.
.. _admin-command-selfroleset-remove:
""""""""""""""""""
@@ -174,7 +190,7 @@ selfroleset remove
**Description**
Removes a role from the list of selfroles.
Remove a role, or a selection of roles, from the list of available selfroles.
**Arguments**
@@ -232,7 +248,7 @@ as yourself, the command author.
* ``<role>``: The role to remove. |role-input-quotes|
* ``[user]``: The member to remove the role from. |member-input| Defaults
to the command author.
to the command author.
.. _admin-command-editrole:
@@ -373,7 +389,7 @@ announceset channel
.. code-block:: none
[p]announceset channel [channel]
[p]announceset channel <channel>
**Description**
@@ -381,8 +397,8 @@ Sets the channel where the bot owner announcements will be sent.
**Arguments**
* ``[channel]``: The channel that will be used for bot announcements.
|channel-input| Defaults to where you typed the command.
* ``<channel>``: The channel that will be used for bot announcements.
|channel-input|
.. _admin-command-announceset-clearchannel:

View File

@@ -68,7 +68,7 @@ be replaced by the first argument of your alias:
# this alias will execute the following command:
[p]ban Slime#3160 7 Spam bot.
For a more detailed explaination, read :ref:`this <alias-command-alias-add>`.
For a more detailed explanation, read :ref:`this <alias-command-alias-add>`.
.. _alias-commands:

3766
docs/cog_guides/audio.rst Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,186 +0,0 @@
.. _bank:
====
Bank
====
This is the cog guide for the bank cog. You will
find detailed docs about usage and commands.
``[p]`` is considered as your prefix.
.. note:: To use this cog, load it by typing this::
[p]load bank
.. _bank-usage:
-----
Usage
-----
This cog manages the bank. It won't be used often by
users but this is what makes any interaction with the
money possible.
You will be able to switch between a global and a server-
wide bank and choose the bank/currency name.
.. _bank-commands:
--------
Commands
--------
.. _bank-command-bankset:
^^^^^^^
bankset
^^^^^^^
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]bankset
**Description**
Base command for configuring bank settings.
.. _bank-command-bankset-toggleglobal:
""""""""""""""""""""
bankset toggleglobal
""""""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]bankset toggleglobal [confirm=False]
**Description**
Makes the bank global instead of server-wide. If it
is already global, the command will switch it back
to the server-wide bank.
.. warning:: Using this command will reset **all** accounts.
**Arguments**
* ``[confirm=False]``: Put ``yes`` to confirm.
.. _bank-command-bankset-creditsname:
"""""""""""""""""""
bankset creditsname
"""""""""""""""""""
.. note:: |owner-lock| However, if the bank is server-wide, the
server owner or an administrator can use this command.
**Syntax**
.. code-block:: none
[p]bankset creditsname <name>
**Description**
Change the credits name of the bank. It is ``credits`` by default.
For example, if you switch it to ``dollars``, the payday
command will show this:
.. TODO reference the payday command
.. code-block:: none
Here, take some dollars. Enjoy! (+120 dollars!)
You currently have 220 dollars.
**Arguments**
* ``<name>``: The new credits name.
.. _bank-command-bankset-bankname:
""""""""""""""""
bankset bankname
""""""""""""""""
.. note:: |owner-lock| However, if the bank is server-wide, the
server owner or an administrator can use this command.
**Syntax**
.. code-block:: none
[p]bankset bankname <name>
**Description**
Set bank's name.
**Arguments**
* ``<name>``: The new bank's name.
.. _bank-command-bankset-maxbal:
""""""""""""""
bankset maxbal
""""""""""""""
.. note:: |owner-lock| However, if the bank is server-wide, the
server owner or an administrator can use this command.
**Syntax**
.. code-block:: none
[p]bankset maxbal <amount>
**Description**
Defines the maximum amount of money a user can have with the bot.
If an user reaches this limit, he will be unable to gain more money.
**Arguments**
* ``<amount>``: The maximum amount of money for users.
.. _bank-command-bankset-showsettings:
""""""""""""""""""""
bankset showsettings
""""""""""""""""""""
.. note:: |owner-lock| However, if the bank is server-wide, the
server owner or an administrator can use this command.
**Syntax**
.. code-block:: none
[p]bankset showsettings
**Description**
Shows the current settings of your bank.
This will display the following information:
* Name of the bank
* Scope of the bank (global or per server)
* Currency name
* Default balance
* Maximum allowed balance

View File

@@ -294,3 +294,40 @@ Examples:
- ``<user>`` The user whose messages are to be cleaned up.
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
.. _cleanup-command-cleanupset:
^^^^^^^^^^
cleanupset
^^^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]cleanupset
**Description**
Manage the settings for the cleanup command.
.. _cleanup-command-cleanupset-notify:
"""""""""""""""""
cleanupset notify
"""""""""""""""""
**Syntax**
.. code-block:: none
[p]cleanupset notify
**Description**
Toggle clean up notification settings.
When enabled, a message will be sent per cleanup, showing how many messages were deleted.
This message will be deleted after 5 seconds.

View File

@@ -13,7 +13,7 @@ find detailed docs about usage and commands.
included in the cogs paths and it cannot be unloaded. It contains needed
commands for cog management.
.. _cogmanaerui-usage:
.. _cogmanagerui-usage:
-----
Usage
@@ -171,17 +171,17 @@ removepath
.. code-block:: none
[p]removepath <path_number>
[p]removepath <path_numbers...>
**Description**
Removes a path from the list of available paths. Its cogs won't be accessible
anymore.
Removes one or more paths from the list of available paths. Its cogs won't be
accessible anymore.
**Arguments**
* ``<path_number>``: The number of the path to remove. You can get it with
the :ref:`paths <cogmanagerui>` command.
* ``<path_numbers>``: The number of the path(s) to remove. You can get it with
the :ref:`paths <cogmanagerui-command-paths>` command.
.. _cogmanagerui-command-reorderpath:
@@ -193,7 +193,7 @@ reorderpath
.. code-block:: none
[p]reorderpath <from_> <to>
[p]reorderpath <from> <to>
**Description**
@@ -221,7 +221,7 @@ have to put the 3rd path higher than the 2nd path, let's swap them! Type
**Arguments**
* ``<from_>``: The index of the path you want to move.
* ``<from>``: The index of the path you want to move.
* ``<to>``: The location where you want to insert the path.
.. _cogmanagerui-command-installpath:
@@ -238,10 +238,12 @@ installpath
**Description**
Shows the install path, or sets a new one. If you want to set a new path, the
same rules as for :ref:`addpath <cogmanagerui-command-addpath>` applies.
Shows the install path, or sets a new one.
.. warning:: If you edit the install path, the cogs won't be transfered.
If you want to set a new path, the same rules as for
:ref:`addpath <cogmanagerui-command-addpath>` apply
.. warning:: If you edit the install path, the cogs won't be transferred.
**Arguments**

File diff suppressed because it is too large Load Diff

View File

@@ -68,7 +68,7 @@ customcom cooldown
Set, edit, or view the cooldown for a custom command.
You may set cooldowns per member, channel, or guild. Multiple
You may set cooldowns per member, thread/channel, or guild. Multiple
cooldowns may be set. All cooldowns must be cooled to call the
custom command.
@@ -80,8 +80,8 @@ Examples:
**Arguments:**
- ``<command>`` The custom command to check or set the cooldown.
- ``<cooldown>`` The number of seconds to wait before allowing the command to be invoked again. If omitted, will instead return the current cooldown settings.
- ``<per>`` The group to apply the cooldown on. Defaults to per member. Valid choices are server, guild, user, and member.
- ``[cooldown]`` The number of seconds to wait before allowing the command to be invoked again. If omitted, will instead return the current cooldown settings.
- ``[per]`` The group to apply the cooldown on. Defaults to per member. Valid choices are server / guild, user / member, and channel.
.. _customcommands-command-customcom-create:
@@ -267,7 +267,7 @@ customcom search
Searches through custom commands, according to the query.
Uses fuzzywuzzy searching to find close matches.
Uses fuzzy searching to find close matches.
**Arguments:**
@@ -291,4 +291,4 @@ Shows a custom command's responses and its settings.
**Arguments:**
- ``<command>`` The custom command to show.
- ``<command_name>`` The custom command to show.

254
docs/cog_guides/dev.rst Normal file
View File

@@ -0,0 +1,254 @@
.. _dev:
===
Dev
===
This is the cog guide for the dev cog. You will
find detailed docs about usage and commands.
``[p]`` is considered as your prefix.
.. note:: To use this cog, load it by typing this::
[p]load dev
.. _dev-usage:
-----
Usage
-----
Various development focused utilities. All commands in this cog are
restricted to the bot owners.
.. note::
Unlike other cogs, the Dev cog is only loaded if the bot is
started with the ``--dev`` flag.
.. warning::
It is not suggested that you run Dev in production. Many
of these cog's commands may cause down-the-line complications if
not used appropriately.
.. _dev-commands:
--------
Commands
--------
.. _dev-command-bypasscooldowns:
^^^^^^^^^^^^^^^
bypasscooldowns
^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]bypasscooldowns [toggle]
**Description**
Give bot owners the ability to bypass cooldowns. Note that this bypass
does not persist through restarts/shutdowns.
**Arguments**
* ``[toggle]``: |bool-input| Otherwise, defaults to the inverse of the current setting.
.. _dev-command-debug:
^^^^^
debug
^^^^^
**Syntax**
.. code-block:: none
[p]debug <code>
**Description**
Evaluate a statement of python code.
The bot will always respond with the return value of the code.
If the return value of the code is a coroutine, it will be awaited,
and the result of that will be the bot's response.
Note: Only one statement may be evaluated. Using certain restricted
keywords, e.g. yield, will result in a syntax error. For multiple
lines or asynchronous code, see [p]repl or [p]eval.
**Environment Variables**
* ``ctx``: Command invocation context
* ``bot``: The bot object
* ``channel``: The current channel object
* ``author``: The current author's member object
* ``guild``: The current guild object
* ``message``: The command's message object
* ``aiohttp``: The aiohttp library
* ``asyncio``: The asyncio library
* ``discord``: The discord.py library
* ``commands``: The redbot.core.commands module
* ``cf``: The redbot.core.utils.chat_formatting module
* ``_``: The result from the last dev command
**Arguments**
* ``<code>``: The statement to run.
.. _dev-command-eval:
^^^^
eval
^^^^
**Syntax**
.. code-block:: none
[p]eval <body>
**Description**
Execute asynchronous code.
This command wraps code into the body of an async function and then
calls and awaits it. The bot will respond with anything printed to
stdout, as well as the return value of the function.
The code can be within a codeblock, inline code or neither, as long
as they are not mixed and they are formatted correctly.
**Environment Variables**
* ``ctx``: Command invocation context
* ``bot``: The bot object
* ``channel``: The current channel object
* ``author``: The current author's member object
* ``guild``: The current guild object
* ``message``: The command's message object
* ``aiohttp``: The aiohttp library
* ``asyncio``: The asyncio library
* ``discord``: The discord.py library
* ``commands``: The redbot.core.commands module
* ``cf``: The redbot.core.utils.chat_formatting module
* ``_``: The result from the last dev command
**Arguments**
* ``<body>``: The code to evaluate.
.. _dev-command-mock:
^^^^
mock
^^^^
**Syntax**
.. code-block:: none
[p]mock <user> <command>
**Description**
Mock another user invoking a command. The prefix must not be entered.
**Arguments**
* ``<user>``: The user to mock. |user-input-quotes|
* ``<command>``: The command to invoke.
.. _dev-command-mockmsg:
^^^^^^^
mockmsg
^^^^^^^
**Syntax**
.. code-block:: none
[p]mockmsg <user> <content>
**Description**
Dispatch a message event as if it were sent by a different user.
Current message is used as a base (including attachments, embeds, etc.),
the content and author of the message are replaced with the given arguments.
**Arguments**
* ``<user>``: The member to mock. |user-input-quotes|
* ``<content>``: The content used for the message.
.. note::
If ``content`` isn't passed, the message needs to contain embeds, attachments,
or anything else that makes the message non-empty.
.. _dev-command-repl:
^^^^
repl
^^^^
**Syntax**
.. code-block:: none
[p]repl
**Description**
Open an interactive REPL.
The REPL will only recognise code as messages which start with a
backtick. This includes codeblocks, and as such multiple lines can be
evaluated.
Use ``exit()`` or ``quit`` to exit the REPL session, prefixed with
a backtick so they may be interpreted.
**Environment Variables**
* ``ctx``: Command invocation context
* ``bot``: The bot object
* ``channel``: The current channel object
* ``author``: The current author's member object
* ``guild``: The current guild object
* ``message``: The command's message object
* ``aiohttp``: The aiohttp library
* ``asyncio``: The asyncio library
* ``discord``: The discord.py library
* ``commands``: The redbot.core.commands module
* ``cf``: The redbot.core.utils.chat_formatting module
* ``_``: The result from the last dev command
.. _dev-command-repl-pause:
""""""""""
repl pause
""""""""""
**Syntax**
.. code-block:: none
[p]repl pause [toggle]
**Description**
Pauses/resumes the REPL running in the current channel.
**Arguments**
* ``[toggle]``: |bool-input| Otherwise, defaults to the inverse of the current setting.

View File

@@ -68,133 +68,6 @@ Example:
- ``<user>`` The user to check the balance of. If omitted, defaults to your own balance.
.. _economy-command-bank-prune:
""""""""""
bank prune
""""""""""
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]bank prune
**Description**
Base command for pruning bank accounts.
.. _economy-command-bank-prune-global:
"""""""""""""""""
bank prune global
"""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]bank prune global [confirmation=False]
**Description**
Prune bank accounts for users who no longer share a server with the bot.
Cannot be used without a global bank. See ``[p]bank prune server``.
Examples:
- ``[p]bank prune global`` - Did not confirm. Shows the help message.
- ``[p]bank prune global yes``
**Arguments**
- ``<confirmation>`` This will default to false unless specified.
.. _economy-command-bank-prune-server:
"""""""""""""""""
bank prune server
"""""""""""""""""
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]bank prune server [confirmation=False]
.. tip:: Aliases: ``bank prune guild``, ``bank prune local``
**Description**
Prune bank accounts for users no longer in the server.
Cannot be used with a global bank. See ``[p]bank prune global``.
Examples:
- ``[p]bank prune server`` - Did not confirm. Shows the help message.
- ``[p]bank prune server yes``
**Arguments**
- ``<confirmation>`` This will default to false unless specified.
.. _economy-command-bank-prune-user:
"""""""""""""""
bank prune user
"""""""""""""""
**Syntax**
.. code-block:: none
[p]bank prune user <user> [confirmation=False]
**Description**
Delete the bank account of a specified user.
Examples:
- ``[p]bank prune user @TwentySix`` - Did not confirm. Shows the help message.
- ``[p]bank prune user @TwentySix yes``
**Arguments**
- ``<user>`` The user to delete the bank of. Takes mentions, names, and user ids.
- ``<confirmation>`` This will default to false unless specified.
.. _economy-command-bank-reset:
""""""""""
bank reset
""""""""""
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]bank reset [confirmation=False]
**Description**
Delete all bank accounts.
Examples:
- ``[p]bank reset`` - Did not confirm. Shows the help message.
- ``[p]bank reset yes``
**Arguments**
- ``<confirmation>`` This will default to false unless specified.
.. _economy-command-bank-set:
""""""""
@@ -317,29 +190,6 @@ Examples:
- | ``<duration>`` The new duration to wait in between uses of payday. Default is 5 minutes.
| Accepts: seconds, minutes, hours, days, weeks (if no unit is specified, the duration is assumed to be given in seconds)
.. _economy-command-economyset-registeramount:
"""""""""""""""""""""""""
economyset registeramount
"""""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]economyset registeramount <creds>
**Description**
Set the initial balance for new bank accounts.
Example:
- ``[p]economyset registeramount 5000``
**Arguments**
- ``<creds>`` The new initial balance amount. Default is 0.
.. _economy-command-economyset-rolepaydayamount:
"""""""""""""""""""""""""""
@@ -354,7 +204,9 @@ economyset rolepaydayamount
**Description**
Set the amount earned each payday for a role. Setting to 0 will remove the custom payday for that role instead.
Set the amount earned each payday for a role.
Set to 0 will remove the custom payday for that role instead.
Only available when not using a global bank.

View File

@@ -115,13 +115,30 @@ Add words to the filter.
Use double quotes to add sentences.
Examples:
- ``[p]filter channel add word1 word2 word3``
- ``[p]filter channel add "This is a sentence"``
- ``[p]filter channel add #channel word1 word2 word3``
- ``[p]filter channel add #channel "This is a sentence"``
**Arguments:**
- ``<channel>`` The text, voice, stage, or forum channel to add filtered words to.
- ``[words...]`` The words or sentences to filter.
.. _filter-command-filter-channel-clear:
""""""""""""""""""""
filter channel clear
""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]filter channel clear
**Description**
Clears this channel's filter list.
.. _filter-command-filter-channel-list:
"""""""""""""""""""
@@ -148,7 +165,7 @@ filter channel remove
.. code-block:: none
[p]filter channel remove [words...]
[p]filter channel remove <channel> [words...]
**Description**
@@ -157,13 +174,30 @@ Remove words from the filter.
Use double quotes to remove sentences.
Examples:
- ``[p]filter channel remove word1 word2 word3``
- ``[p]filter channel remove "This is a sentence"``
- ``[p]filter channel remove #channel word1 word2 word3``
- ``[p]filter channel remove #channel "This is a sentence"``
**Arguments:**
- ``<channel>`` The text, voice, stage, or forum channel to add filtered words to.
- ``[words...]`` The words or sentences to no longer filter.
.. _filter-command-filter-clear:
""""""""""""
filter clear
""""""""""""
**Syntax**
.. code-block:: none
[p]filter clear
**Description**
Clears this server's filter list.
.. _filter-command-filter-delete:
"""""""""""""

View File

@@ -58,7 +58,7 @@ Ban a user from this server and optionally delete days of messages.
**Example Usage**
* ``[p]ban 428675506947227648 7 Continued to spam after told to stop.``
This will ban Twentysix and it will delete 7 days worth of messages.
This will ban the user with ID 428675506947227648 and it will delete 7 days worth of messages.
* ``[p]ban @Twentysix 7 Continued to spam after told to stop.``
This will ban Twentysix and it will delete 7 days worth of messages.
@@ -92,7 +92,7 @@ Kick a user.
**Example Usage**
* ``[p]kick 428675506947227648 wanted to be kicked.``
This will kick Twentysix from the server.
This will kick the user with ID 428675506947227648 from the server.
* ``[p]kick @Twentysix wanted to be kicked.``
This will kick Twentysix from the server.
@@ -215,11 +215,11 @@ modset deletenames
**Description**
Delete all stored usernames and nicknames.
Delete all stored usernames, global display names, and server nicknames.
**Arguments**
- ``<confirmation>``: Whether to delete all stored usernames and nicknames. |bool-input|
- ``<confirmation>``: Whether to delete all stored usernames, global display names, and server nicknames. |bool-input|
.. _mod-command-modset-deleterepeats:
@@ -266,6 +266,28 @@ and reason as to why they were kicked/banned.
* ``[enabled]``: Whether a message should be sent to a user when they are kicked/banned. |bool-input|
.. _mod-command-modset-requirereason:
""""""""""""""""""""
modset requirereason
""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset requirereason [enabled]
**Description**
Toggle whether a reason is required for mod actions.
If this is enabled, the bot will require a reason to be provided for all mod actions.
**Arguments**
* ``[enabled]``: Whether a reason should be required when performing mod actions. |bool-input|
.. _mod-command-modset-hierarchy:
""""""""""""""""
@@ -282,7 +304,7 @@ modset hierarchy
Toggle role hierarchy check for mods and admins.
..warning:: Disabling this setting will allow mods to take actions on users above them in the role hierarchy!
.. warning:: Disabling this setting will allow mods to take actions on users above them in the role hierarchy!
This is enabled by default.
@@ -469,7 +491,7 @@ modset tracknicknames
**Description**
Toggle whether nickname changes should be tracked.
Toggle whether server nickname changes should be tracked.
This setting will be overridden if trackallnames is disabled.
@@ -527,7 +549,7 @@ names
**Description**
Show previous names and nicknames of a member.
Show previous usernames, global display names, and server nicknames of a member.
**Arguments**
@@ -549,14 +571,14 @@ rename
**Description**
Change a member's nickname.
Change a member's server nickname.
Leaving the nickname empty will remove it.
Leaving the nickname argument empty will remove it.
**Arguments**
* ``<member>``: |member-input|
* ``[nickname]``: The new nickname for the member.
* ``[nickname]``: The new server nickname for the member.
.. _mod-command-slowmode:
@@ -574,14 +596,14 @@ slowmode
**Description**
Changes channel's slowmode setting.
Changes thread's or channel's slowmode setting.
Interval can be anything from 0 seconds to 6 hours.
Use without parameters to disable.
**Arguments**
* ``[interval=0:00:00]``: The time for the channel's slowmode settings.
* ``[interval=0:00:00]``: The time for the thread's/channel's slowmode settings.
.. note::
Interval can be anything from 0 seconds to 6 hours.
@@ -642,7 +664,7 @@ Temporarily ban a user from this server.
* ``[p]tempban @Twentysix 15m You need a timeout``
This will ban Twentysix for 15 minutes.
* ``[p]tempban 428675506947227648 1d2h15m 5 Evil person``
This will ban the user for 1 day 2 hours 15 minutes and will delete the last 5 days of their messages.
This will ban the user with ID 428675506947227648 for 1 day 2 hours 15 minutes and will delete the last 5 days of their messages.
.. _mod-command-unban:
@@ -684,9 +706,9 @@ userinfo
Show information about a user.
This includes fields for status, discord join date, server
join date, voice state and previous names/nicknames.
join date, voice state and previous usernames/global display names/nicknames.
If the user has no roles, previous names or previous nicknames,
If the user has no roles, previous usernames, global display names, or server nicknames,
these fields will be omitted.
**Arguments**

View File

@@ -19,7 +19,7 @@ find detailed docs about usage and commands.
Usage
-----
Manage log channels for moderation actions.
Browse and manage modlog cases. To manage modlog settings, use ``[p]modlogset``.
.. _modlog-commands:
@@ -88,82 +88,6 @@ List cases for the specified member.
* ``<member>``: The member to get cases for. |member-input|
.. _modlog-command-modlogset:
^^^^^^^^^
modlogset
^^^^^^^^^
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]modlogset
**Description**
Manage modlog settings.
.. _modlog-command-modlogset-cases:
"""""""""""""""
modlogset cases
"""""""""""""""
**Syntax**
.. code-block:: none
[p]modlogset cases [action]
**Description**
Enable or disable case creation for a mod action.
**Arguments**
* ``[action]``: The action to enable or disable case creation for.
.. _modlog-command-modlogset-modlog:
""""""""""""""""
modlogset modlog
""""""""""""""""
**Syntax**
.. code-block:: none
[p]modlogset modlog [channel]
.. tip:: Alias: ``modlogset channel``
**Description**
Set a channel as the modlog.
**Arguments**
* ``[channel]``: The channel to set as the modlog. If omitted, the modlog will be disabled.
.. _modlog-command-modlogset-resetcases:
""""""""""""""""""""
modlogset resetcases
""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modlogset resetcases
**Description**
Reset all modlog cases in this server.
.. _modlog-command-reason:
^^^^^^

View File

@@ -91,7 +91,7 @@ mutechannel
**Description**
Mute a user in the current text channel.
Mute a user in the current text channel (or in the parent of the current thread).
Examples:
@@ -145,28 +145,6 @@ If no time interval is provided this will be cleared.
* ``[time]``: The length of time for a default mute.
.. _mutes-command-muteset-forcerole:
"""""""""""""""""
muteset forcerole
"""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]muteset forcerole <true_or_false>
**Description**
Whether or not to force role only mutes on the bot.
**Arguments**
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
.. _mutes-command-muteset-makerole:
""""""""""""""""
@@ -238,8 +216,8 @@ muteset role
Sets the role to be applied when muting a user.
If no role is setup the bot will attempt to mute a user by setting
channel overwrites in all channels to prevent the user from sending messages.
If no role is setup the bot will attempt to mute a user
by utilizing server timeouts.
.. Note::
@@ -355,13 +333,41 @@ unmutechannel
**Description**
Unmute a user in this channel.
Unmute a user in this channel (or in the parent of this thread).
**Arguments**
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
* ``[reason]``: The reason for the unmute.
.. _mutes-command-timeout:
^^^^^^^
timeout
^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]timeout <users...> [time_and_reason]
**Description**
Timeout users.
Examples:
* ``[p]timeout @member1 @member2 spam 5 hours``
* ``[p]timeout @member1 3 days``
**Arguments**
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
* ``[time_and_reason]``: The time and reason. If no time is provided, the mute will use the default set time or give an error if this hasn't been configured.
.. _mutes-command-voicemute:
^^^^^^^^^
@@ -372,7 +378,7 @@ voicemute
.. code-block:: none
[p]voicemute <users...> [reason]
[p]voicemute <users...> [time_and_reason]
**Description**

View File

@@ -29,7 +29,7 @@ Global rules (set by the owner) are checked first, then rules set for servers. I
1. Rules about a user.
2. Rules about the voice channel a user is in.
3. Rules about the text channel a command was issued in.
3. Rules about the text channel or a parent of the thread a command was issued in.
4. Rules about a role the user has (The highest role they have with a rule will be used).
5. Rules about the server a user is in (Global rules only).

View File

@@ -73,7 +73,7 @@ report interact
Open a message tunnel.
This tunnel will forward things you say in this channel
This tunnel will forward things you say in this channel or thread
to the ticket opener's direct messages.
Tunnels do not persist across bot restarts.

View File

@@ -338,6 +338,22 @@ To set the Twitch API tokens, follow these steps:
.. attention:: These tokens are sensitive and should only be
used in a private channel or in DM with the bot.
.. _streams-command-streamset-usebuttons:
^^^^^^^^^^^^^^^^^^^^
streamset usebuttons
^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset usebuttons
**Description**
Toggle whether to use buttons for stream alerts.
.. _streams-command-picarto:
^^^^^^^

View File

@@ -334,6 +334,26 @@ will use all of the specified lists to select questions from.
- ``<categories...>`` The category to play. Can be multiple.
.. _trivia-command-trivia-info:
^^^^^^^^^^^
trivia info
^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]trivia info <category>
**Description**
Get information about a trivia category.
**Arguments**
* ``<category>``: The category to get the information for.
.. _trivia-command-trivia-leaderboard:
^^^^^^^^^^^^^^^^^^

View File

@@ -31,8 +31,8 @@ In terms of scope, global rules will be checked first, then server rules.
For each of those, the first rule pertaining to one of the following models will be used:
1. User
2. Voice channel
3. Text channel
2. Voice/stage channel a user is connected to
3. The channel command was issued in (parent channel in case of invocations in threads)
4. Channel category
5. Roles, highest to lowest
6. Server (can only be in global rules)

View File

@@ -19,6 +19,7 @@
#
import os
import sys
import time
sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath("_ext"))
@@ -61,7 +62,7 @@ master_doc = "index"
# General information about the project.
project = "Red - Discord Bot"
copyright = "2018-2021, Cog Creators"
copyright = f"2018-{time.strftime('%Y')}, Cog Creators"
author = "Cog Creators"
# The version info for the project you're documenting, acts as replacement for
@@ -69,7 +70,7 @@ author = "Cog Creators"
# built documents.
#
from redbot.core import __version__
from discord import __version__ as dpy_version
from discord import __version__ as dpy_version, version_info as dpy_version_info
# The short X.Y version.
version = __version__
@@ -81,15 +82,21 @@ release = __version__
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
# to ensure that include files (partial pages) aren't built, exclude them
"**/_includes/**",
]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
pygments_style = "default"
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
@@ -104,6 +111,9 @@ with open("prolog.txt", "r") as file:
# Adds d.py version to available substitutions in all files
rst_prolog += f"\n.. |DPY_VERSION| replace:: {dpy_version}"
# Add release highlight indicator to available substitutions in all files
rst_prolog += f"\n.. |cool| replace:: \N{HEAVY BLACK HEART}\N{VARIATION SELECTOR-16}"
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -111,6 +121,12 @@ rst_prolog += f"\n.. |DPY_VERSION| replace:: {dpy_version}"
#
html_theme = "sphinx_rtd_theme"
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#
html_extra_path = ["_html"]
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
@@ -122,7 +138,10 @@ html_context = {
"display_github": True,
"github_user": "Cog-Creators",
"github_repo": "Red-DiscordBot",
"github_version": "V3/develop/docs/",
"github_version": "V3/develop",
"version_slug": os.environ.get("READTHEDOCS_VERSION", ""),
"rtd_language": os.environ.get("READTHEDOCS_LANGUAGE", ""),
"READTHEDOCS": os.environ.get("READTHEDOCS", "") == "True",
}
# Add any paths that contain custom static files (such as style sheets) here,
@@ -212,21 +231,32 @@ linkcheck_retries = 3
# -- Options for extensions -----------------------------------------------
if dpy_version_info.releaselevel == "final":
# final release - versioned docs should be available
dpy_docs_url = f"https://discordpy.readthedocs.io/en/v{dpy_version}/"
else:
# alpha release - `latest` version of docs should be used
dpy_docs_url = "https://discordpy.readthedocs.io/en/latest/"
# Intersphinx
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"dpy": (f"https://discordpy.readthedocs.io/en/v{dpy_version}/", None),
"dpy": (dpy_docs_url, None),
"motor": ("https://motor.readthedocs.io/en/stable/", None),
"babel": ("http://babel.pocoo.org/en/stable/", None),
"dateutil": ("https://dateutil.readthedocs.io/en/stable/", None),
}
# Extlinks
# This allows to create links to d.py docs with
# :dpy_docs:`link text <site_name.html>`
extlinks = {
"dpy_docs": (f"https://discordpy.readthedocs.io/en/v{dpy_version}/%s", None),
"issue": ("https://github.com/Cog-Creators/Red-DiscordBot/issues/%s", "#"),
"ghuser": ("https://github.com/%s", "@"),
"dpy_docs": (f"{dpy_docs_url}%s", None),
"issue": ("https://github.com/Cog-Creators/Red-DiscordBot/issues/%s", "#%s"),
# below URL redirects to user page, if they don't have GH Sponsors set up,
# while allowing us to direct readers directly at a sponsorship opportunity,
# if they do
"ghuser": ("https://github.com/sponsors/%s", "@%s"),
}
# Doctest
@@ -237,3 +267,21 @@ doctest_test_doctest_blocks = ""
# Autodoc options
autodoc_default_options = {"show-inheritance": True}
autodoc_typehints = "none"
from docutils import nodes
from sphinx.transforms import SphinxTransform
# d.py's |coro| substitution leaks into our docs because we don't replace some of the docstrings
class IgnoreCoroSubstitution(SphinxTransform):
default_priority = 210
def apply(self, **kwargs) -> None:
for ref in self.document.traverse(nodes.substitution_reference):
if ref["refname"] == "coro":
ref.replace_self(nodes.Text(""))
def setup(app):
app.add_transform(IgnoreCoroSubstitution)

View File

@@ -69,9 +69,13 @@ Additional References
.. py:currentmodule:: redbot.core.bot
.. automethod:: Red.get_shared_api_tokens
:noindex:
.. automethod:: Red.set_shared_api_tokens
:noindex:
.. automethod:: Red.remove_shared_api_tokens
:noindex:
.. automethod:: Red.remove_shared_api_services
:noindex:

View File

@@ -0,0 +1,13 @@
.. red app_commands module documentation
====================
App Commands Package
====================
This package acts almost identically to :doc:`discord.ext.app_commands <dpy:interactions/api>`; i.e.
all of the attributes from discord.py's are also in ours.
Some of these attributes, however, have been slightly modified, while others have been added to
extend functionalities used throughout the bot, as outlined below.
.. autoclass:: redbot.core.app_commands.UserFeedbackCheckFailure
:members:

View File

@@ -21,9 +21,7 @@ Basic Usage
class MyCog(commands.Cog):
@commands.command()
async def balance(self, ctx, user: discord.Member = None):
if user is None:
user = ctx.author
async def balance(self, ctx, user: discord.Member = commands.Author):
bal = await bank.get_balance(user)
currency = await bank.get_currency_name(ctx.guild)
await ctx.send(

View File

@@ -6,18 +6,12 @@ Bot
.. automodule:: redbot.core.bot
RedBase
^^^^^^^
.. autoclass:: RedBase
:members:
:exclude-members: get_context
.. automethod:: register_rpc_handler
.. automethod:: unregister_rpc_handler
Red
^^^
.. autoclass:: Red
:members:
:exclude-members: get_context, get_embed_color
.. automethod:: register_rpc_handler
.. automethod:: unregister_rpc_handler

View File

@@ -8,4 +8,4 @@ The following are all decorators for commands, which add restrictions to where a
run.
.. automodule:: redbot.core.commands
:members: permissions_check, bot_has_permissions, bot_in_a_guild, has_permissions, has_guild_permissions, is_owner, guildowner, guildowner_or_permissions, admin, admin_or_permissions, mod, mod_or_permissions
:members: permissions_check, bot_has_permissions, bot_in_a_guild, bot_can_manage_channel, bot_can_react, has_permissions, can_manage_channel, has_guild_permissions, is_owner, guildowner, guildowner_or_can_manage_channel, guildowner_or_permissions, admin, admin_or_can_manage_channel, admin_or_permissions, mod, mod_or_can_manage_channel, mod_or_permissions

View File

@@ -1,8 +0,0 @@
.. cog manager docs
===========
Cog Manager
===========
.. automodule:: redbot.core.cog_manager
:members:

View File

@@ -11,8 +11,12 @@ extend functionalities used throughout the bot, as outlined below.
.. autofunction:: redbot.core.commands.command
.. autofunction:: redbot.core.commands.hybrid_command
.. autofunction:: redbot.core.commands.group
.. autofunction:: redbot.core.commands.hybrid_group
.. autoclass:: redbot.core.commands.Cog
.. automethod:: format_help_for_context
@@ -21,13 +25,21 @@ extend functionalities used throughout the bot, as outlined below.
.. automethod:: red_delete_data_for_user
.. autoclass:: redbot.core.commands.GroupCog
.. autoclass:: redbot.core.commands.Command
:members:
:inherited-members: format_help_for_context
.. autoclass:: redbot.core.commands.HybridCommand
:members:
.. autoclass:: redbot.core.commands.Group
:members:
.. autoclass:: redbot.core.commands.HybridGroup
:members:
.. autoclass:: redbot.core.commands.Context
:members:
@@ -35,6 +47,9 @@ extend functionalities used throughout the bot, as outlined below.
.. autoclass:: redbot.core.commands.DMContext
.. autoclass:: redbot.core.commands.UserFeedbackCheckFailure
:members:
.. automodule:: redbot.core.commands.requires
:members: PrivilegeLevel, PermState, Requires
@@ -54,7 +69,7 @@ Help Functionality
.. warning::
The content in this section is provisional and may change
The content in this section is `provisional <developer-guarantees-exclusions>` and may change
without prior notice or warning. Updates to this will be communicated
on `this issue <https://github.com/Cog-Creators/Red-DiscordBot/issues/4084>`_

View File

@@ -25,7 +25,7 @@ Basic Usage
class MyCog(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890)
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
self.config.register_global(
foo=True
@@ -55,15 +55,19 @@ Then, in the class's :code:`__init__` function, you need to get a config instanc
class MyCog(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890)
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
The ``identifier`` in :py:meth:`Config.get_conf` is used to keep your cog's data separate
from that of another cog, and thus should be unique to your cog. For example: if we
have two cogs named :code:`MyCog` and their identifier is different, each will have
its own data without overwriting the other's data. Note that it is also possible
to force registration of a data key before allowing you to get and set data for
that key by adding :code:`force_registration=True` after identifier (that defaults
to :code:`False` though)
its own data without overwriting the other's data.
Note that, as shown by most of the examples in this document, it is also possible to
force registration of a data key before allowing you to get and set data for that key
by adding :code:`force_registration=True` after identifier.
When this is set to :code:`False` (the default), the default value for any key that isn't registered
will be :code:`None`. When this is set to :code:`True` (as shown in this document), attempting
to read from or write to any key that isn't registered will raise an :exc:`AttributeError`.
After we've gotten that, we need to register default values:
@@ -71,7 +75,7 @@ After we've gotten that, we need to register default values:
class MyCog(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890)
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
default_global = {
"foobar": True,
"foo": {
@@ -98,13 +102,13 @@ in various ways:
.. code-block:: python
@commands.command()
@checks.admin_or_permissions(manage_guild=True)
@commands.admin_or_permissions(manage_guild=True)
async def setbaz(self, ctx, new_value):
await self.config.guild(ctx.guild).baz.set(new_value)
await ctx.send("Value of baz has been changed!")
@commands.command()
@checks.is_owner()
@commands.is_owner()
async def setfoobar(self, ctx, new_value):
await self.config.foobar.set(new_value)
@@ -128,7 +132,7 @@ Notice a few things in the above examples:
self.config.<insert scope here, or nothing if global>.variable_name.set(new_value)
It is also possible to use :code:`async with` syntax to get and set config
values. When entering the statement, the config value is retreived, and on exit,
values. When entering the statement, the config value is retrieved, and on exit,
it is saved. This puts a safeguard on any code within the :code:`async with`
block such that if it breaks from the block in any way (whether it be from
:code:`return`, :code:`break`, :code:`continue` or an exception), the value will
@@ -151,6 +155,22 @@ Here is an example of the :code:`async with` syntax:
blah.append(new_blah)
await ctx.send("The new blah value has been added!")
There is also a :py:meth:`Group.all` method. This will return all the stored data associated
with a specific config group as a :py:class:`dict`. By negating the need to excessively call config,
this method can be particularly useful when multiple values are to be retrieved from the same group.
Here is an example of :py:meth:`Group.all` usage:
.. code-block:: python
@commands.command()
async def getall(self, ctx):
all_global_data = await self.config.all()
await ctx.send("Foobar is {foobar}, foo baz is {foo_baz}".format(
foobar=str(all_global_data["foobar"]),
foo_baz=str(all_global_data["foo"]["baz"])
))
.. important::
@@ -161,7 +181,7 @@ Here is an example of the :code:`async with` syntax:
* :py:meth:`Config.member` which takes :py:class:`discord.Member`.
* :py:meth:`Config.user` which takes :py:class:`discord.User`.
* :py:meth:`Config.role` which takes :py:class:`discord.Role`.
* :py:meth:`Config.channel` which takes :py:class:`discord.TextChannel`.
* :py:meth:`Config.channel` which takes :py:class:`discord.abc.GuildChannel` or :py:class:`discord.Thread`.
If you need to wipe data from the config, you want to look at :py:meth:`Group.clear`, or :py:meth:`Config.clear_all`
and similar methods, such as :py:meth:`Config.clear_all_guilds`.
@@ -213,7 +233,7 @@ Tutorial example.
class MyCog(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890)
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
default_guild = {
"blah": [],
"baz": 1234567890
@@ -259,12 +279,12 @@ Now let's see an example that uses multiple identifiers:
.. code-block:: python
from redbot.core import Config, commands, checks
from redbot.core import Config, commands
class ChannelAccesss(commands.Cog):
class ChannelAccess(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890)
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
default_access = {
"allowed": False
}
@@ -273,7 +293,7 @@ Now let's see an example that uses multiple identifiers:
self.config.register_custom("ChannelAccess", **default_access)
@commands.command()
@checks.is_owner()
@commands.is_owner()
async def grantaccess(self, ctx, channel: discord.TextChannel, member: discord.Member):
await self.config.custom("ChannelAccess", channel.id, member.id).allowed.set(True)
await ctx.send("Member has been granted access to that channel")
@@ -304,7 +324,7 @@ the built-in Economy credits::
class Pets(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, 1234567890)
self.config = Config.get_conf(self, 1234567890, force_registration=True)
# Here we'll assign some default costs for the pets
self.config.register_global(
@@ -394,7 +414,7 @@ We're responsible pet owners here, so we've also got to have a way to feed our p
# We could accomplish the same thing a slightly different way
await self.config.user(ctx.author).pets.get_attr(pet_name).hunger.set(new_hunger)
await ctx.send("Your pet is now at {}/100 hunger!".format(new_hunger)
await ctx.send("Your pet is now at {}/100 hunger!".format(new_hunger))
Of course, if we're less than responsible pet owners, there are consequences::
@@ -467,7 +487,7 @@ much the same way they would in V2. The following examples will demonstrate how
async def setup(bot):
cog = ExampleCog()
await cog.load_data()
bot.add_cog(cog)
await bot.add_cog(cog)
************************************
Best practices and performance notes
@@ -477,7 +497,7 @@ Config prioritizes being a safe data store without developers needing to
know how end users have configured their bot.
This does come with some performance costs, so keep the following in mind when choosing to
develop using config
develop using config.
* Config use in events should be kept minimal and should only occur
after confirming the event needs to interact with config
@@ -509,7 +529,7 @@ API Reference
includes keys within a `dict` when one is being set, as well as keys in nested dictionaries
within that `dict`. For example::
>>> config = Config.get_conf(self, identifier=999)
>>> config = Config.get_conf(self, identifier=999, force_registration=True)
>>> config.register_global(foo={})
>>> await config.foo.set_raw(123, value=True)
>>> await config.foo()
@@ -540,30 +560,14 @@ Value
:members:
:special-members: __call__
IdentifierData
^^^^^^^^^^^^^^
****************
Driver Reference
****************
.. autofunction:: redbot.core.drivers.get_driver
.. autoclass:: redbot.core.drivers.BackendType
.. autoclass:: IdentifierData
:members:
.. autoclass:: redbot.core.drivers.ConfigCategory
:members:
ConfigCategory
^^^^^^^^^^^^^^
Base Driver
^^^^^^^^^^^
.. autoclass:: redbot.core.drivers.BaseDriver
:members:
JSON Driver
^^^^^^^^^^^
.. autoclass:: redbot.core.drivers.JsonDriver
:members:
Postgres Driver
^^^^^^^^^^^^^^^
.. autoclass:: redbot.core.drivers.PostgresDriver
.. autoclass:: ConfigCategory
:members:

View File

@@ -21,7 +21,7 @@ Basic Usage
class MyCog(commands.Cog):
@commands.command()
@checks.admin_or_permissions(ban_members=True)
@commands.admin_or_permissions(ban_members=True)
async def ban(self, ctx, user: discord.Member, reason: str = None):
await ctx.guild.ban(user)
case = await modlog.create_case(
@@ -35,8 +35,7 @@ Basic Usage
Registering Case types
**********************
To register case types, use an asynchronous ``initialize()`` method and call
it from your setup function:
To register case types, use a special ``cog_load()`` method which is called when you add a cog:
.. code-block:: python
@@ -46,7 +45,7 @@ it from your setup function:
class MyCog(commands.Cog):
async def initialize(self):
async def cog_load(self):
await self.register_casetypes()
@staticmethod
@@ -87,8 +86,7 @@ it from your setup function:
async def setup(bot):
cog = MyCog()
await cog.initialize()
bot.add_cog(cog)
await bot.add_cog(cog)
.. important::
Image should be the emoji you want to represent your case type with.

View File

@@ -6,7 +6,8 @@ RPC
.. important::
RPC support is included in Red on a provisional basis. Backwards incompatible changes (up to and including removal of the RPC) may occur if deemed necessary.
RPC support is included in Red on a `provisional <developer-guarantees-exclusions>` basis.
Backwards incompatible changes (up to and including removal of the RPC) may occur if deemed necessary.
V3 comes default with an internal RPC server that may be used to remotely control the bot in various ways.
Cogs must register functions to be exposed to RPC clients.
@@ -20,9 +21,9 @@ Examples
.. code-block:: Python
def setup(bot):
async def setup(bot):
c = Cog()
bot.add_cog(c)
await bot.add_cog(c)
bot.register_rpc_handler(c.rpc_method)
*******************************
@@ -64,4 +65,4 @@ All cog-based methods expect their parameter list to take one argument, a JSON o
API Reference
*************
Please see the :class:`redbot.core.bot.RedBase` class for details on the RPC handler register and unregister methods.
Please see the :class:`redbot.core.bot.Red` class for details on the RPC handler register and unregister methods.

21
docs/framework_tree.rst Normal file
View File

@@ -0,0 +1,21 @@
.. tree module docs
====
Tree
====
Red uses a subclass of discord.py's ``CommandTree`` object in order to allow Cog Creators to add application commands to their cogs without worrying about the command count limit and to support caching ``AppCommand`` objects. When an app command is added to the bot's tree, it will not show up in ``tree.get_commands`` or other similar methods unless the command is "enabled" with ``[p]slash enable`` (similar to "load"ing a cog) and ``tree.red_check_enabled`` has been run since the command was added to the tree.
.. note::
If you are adding app commands to the tree during load time, the loading process will call ``tree.red_check_enabled`` for your cog and its app commands. If you are adding app commands to the bot **outside of load time**, a call to ``tree.red_check_enabled`` after adding the commands is required to ensure the commands will appear properly.
If application commands from your cog show up in ``[p]slash list`` as enabled from an ``(unknown)`` cog and disabled from your cog at the same time, you did not follow the instructions above. You must manually call ``tree.red_check_enabled`` **after** adding the commands to the tree.
.. automodule:: redbot.core.tree
RedTree
^^^^^^^
.. autoclass:: RedTree
:members:

View File

@@ -8,7 +8,7 @@ General Utility
===============
.. automodule:: redbot.core.utils
:members: deduplicate_iterables, bounded_gather, bounded_gather_iter, get_end_user_data_statement, get_end_user_data_statement_or_raise
:members: deduplicate_iterables, bounded_gather, bounded_gather_iter, get_end_user_data_statement, get_end_user_data_statement_or_raise, can_user_send_messages_in, can_user_manage_channel, can_user_react_in
.. autoclass:: AsyncIter
:members:
@@ -27,6 +27,10 @@ Chat Formatting
.. automodule:: redbot.core.utils.chat_formatting
:members:
:exclude-members: pagify
.. autofunction:: pagify(text, delims=('\n',), *, priority=False, escape_mass_mentions=True, shorten_by=8, page_length=2000)
:for:
Embed Helpers
=============
@@ -35,8 +39,8 @@ Embed Helpers
:members:
:exclude-members: randomize_color
Reaction Menus
==============
Menus
=====
.. automodule:: redbot.core.utils.menus
:members:
@@ -67,9 +71,81 @@ Tunnel
.. automodule:: redbot.core.utils.tunnel
:members: Tunnel
:exclude-members: files_from_attatch
Common Filters
==============
.. automodule:: redbot.core.utils.common_filters
:members:
Utility UI
==========
.. automodule:: redbot.core.utils.views
:members:
:exclude-members: ConfirmView
.. autoclass:: ConfirmView
:members:
:exclude-members: confirm_button, dismiss_button
.. autoattribute:: confirm_button
:no-value:
A `discord.ui.Button` to confirm the message.
The button's callback will set `result` to ``True``, defer the response,
and call `on_timeout()` to clean up the view.
.. rubric:: Example
Changing the style and label of this `discord.ui.Button`::
view = ConfirmView(ctx.author)
view.confirm_button.style = discord.ButtonStyle.red
view.confirm_button.label = "Delete"
view.dismiss_button.label = "Cancel"
view.message = await ctx.send(
"Are you sure you want to remove #very-important-channel?", view=view
)
await view.wait()
if view.result:
await ctx.send("Channel #very-important-channel deleted.")
else:
await ctx.send("Canceled.")
:type: discord.ui.Button
.. autoattribute:: dismiss_button
:no-value:
A `discord.ui.Button` to dismiss the message.
The button's callback will set `result` to ``False``, defer the response,
and call `on_timeout()` to clean up the view.
.. rubric:: Example
Changing the style and label of this `discord.ui.Button`::
view = ConfirmView(ctx.author)
view.confirm_button.style = discord.ButtonStyle.red
view.confirm_button.label = "Delete"
view.dismiss_button.label = "Cancel"
view.message = await ctx.send(
"Are you sure you want to remove #very-important-channel?", view=view
)
await view.wait()
if view.result:
await ctx.send("Channel #very-important-channel deleted.")
else:
await ctx.send("Canceled.")
:type: discord.ui.Button
AntiSpam
========
.. automodule:: redbot.core.utils.antispam
:members:

View File

@@ -13,21 +13,21 @@ This is a quick start guide for a general usage.
.. note::
If you haven't installed Red, please do it by following
the :ref:`installation guides <main>`.
one of the `installation guides <install_guides/index>`.
Assuming you correctly installed Red, you should have a
window like this:
.. image:: .resources/red-console.png
.. _gettings-started-invite:
.. _getting-started-invite:
-------------------------
Invite Red to your server
-------------------------
When started, the console will show you ``Invite URL`` (here at
the bottom of the screenshot).
When started, the console will show you the ``Invite URL``
(visible at the bottom of the screenshot above).
Paste the link into your browser and select the server you want
to invite the bot in, like any other bot.
@@ -63,7 +63,7 @@ example, if your prefix is ``!``, you will execute your command like this:
The commands
~~~~~~~~~~~~
The command you're going to use the most is help. That command will
The command you're going to use the most is **help**. This command will
show you **all of the available commands** of the bot with a small description.
.. code-block:: none
@@ -106,8 +106,8 @@ parameters.
the syntax ``cleanup messages <number> [delete_pinned=False]``, which means
``delete_pinned`` default will be false, unless you specify it as true.
You can use help to show the **categories** too, generally called cogs.
Just do something like this (notice the capitalization):
You can use help to show the **categories** too, generally called cogs,
by doing the following (notice the capitalization):
.. code-block:: none
@@ -122,7 +122,7 @@ To get the description of a subcommand, type this:
When using subcommands, you also need to specify the command group.
As an example, ``cleanup`` has 6 subcommands. If you want
to use one, do it like this: ``[p]cleanup messages 10``
to use one of them, do: ``[p]cleanup messages 10``
.. _getting-started-cogs:
@@ -134,7 +134,7 @@ Red is built with cogs, a fancy term for plugins. They are
modules that add functionality to Red. They contain
commands to use.
Red comes with 19 cogs containing the basic features, such
Red comes with 18 cogs containing the basic features, such
as moderation, utility, music, streams...
You can see your loaded and unloaded cogs with the ``[p]cogs``
@@ -216,8 +216,8 @@ or system files.
Server owner
~~~~~~~~~~~~
The server owner can access all commands on his guild, except the global
ones or those who can interact with system files (available for the
The server owner can access all commands on their guild, except the global
ones or those that can interact with system files (available for the
bot owner).
~~~~~~~~~~~~~
@@ -225,7 +225,7 @@ Administrator
~~~~~~~~~~~~~
The administrator is defined by its roles. You can set multiple admin roles
with the ``[p]set addadminrole`` and ``[p]set removeadminrole`` commands.
with the ``[p]set roles addadminrole`` and ``[p]set roles removeadminrole`` commands.
For example, in the mod cog, an admin can use the ``[p]modset`` command
which defines the cog settings.
@@ -235,14 +235,15 @@ Moderator
~~~~~~~~~
A moderator is a step above the average users. You can set multiple moderator
roles with the ``[p]set addmodrole`` and ``[p]set removemodrole`` commands.
roles with the ``[p]set roles addmodrole`` and ``[p]set roles removemodrole`` commands.
For example, in the mod cog (again), a mod will be able to mute, kick and ban;
but he won't be able to modify the cog settings with the ``[p]modset`` command.
For example, in the filter cog, a mod will be able to use the various commands
under ``[p]filter`` (such as adding and removing filtered words), but they will
not be able to modify the cog settings with the ``[p]filterset`` command.
.. tip::
If you don't like the default permission settings for some commands or
if want to restrict a cog or a command to a channel/member, you can use
want to restrict a cog or a command to a channel/member, you can use
the permissions cog.
.. _getting-started-hosting:
@@ -265,14 +266,14 @@ If you want to do it, follow these steps.
basics of the Unix commands, such as navigating the system files or use
a terminal text editor.
You should follow `this guide
You should read `DigitalOcean's tutorial: An Introduction to Linux Basics
<https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-basics>`_
from DigitalOcean which will introduce you to the Linux basics.
if you have not used Linux before.
1. **Find a host**
You need to find a server to host Red. You can rent a VPS (it can be free)
on an online service. Please check :ref:`this page <host-list>` for
on an online service. Please check :ref:`this list of hosts <host-list>` for
more information.
You can also buy a Raspberry Pi (~$20), which is a micro-computer that will
@@ -281,7 +282,7 @@ If you want to do it, follow these steps.
2. **Install Linux**
Most of the VPS providers have tools for installing Linux automatically. If
you're a beginner, we recommend **Ubuntu 20.04 LTS**.
you're a beginner, we recommend **Ubuntu 24.04 LTS**.
For Raspberry Pi users, just install `Raspbian
<https://www.raspberrypi.org/software/>`_ on a micro-SD card.
@@ -306,8 +307,8 @@ If you want to do it, follow these steps.
3. **Install and set up Red**
Just follow one of the Linux installation guide. We provide guides for the
most used distributions. Check the :ref:`home page <main>` and search for
Follow one of the Linux installation guides. We provide guides for the
most used distributions. Check the `list of install guides <install_guides/index>` and search for
your distribution.
4. **Set up an auto-restart**
@@ -317,7 +318,7 @@ If you want to do it, follow these steps.
side task and handle fatal errors, so you can just leave your server running
and enjoy Red!
For that, just follow :ref:`this guide <systemd-service-guide>`.
For that, follow :ref:`the systemd service guide <systemd-service-guide>`.
.. _getting-started-userdocs:
@@ -343,9 +344,12 @@ The cog guides are formatted the same. They're divided into 3 sections:
A line that will show how the command must be invoked, with the arguments.
.. tip:: If the command show something like ``[lavalinkset|llset]``, that means
you can invoke the command with ``lavalinkset`` or with ``llset``, this is
called an alias.
* **Aliases**
Each command may have one or more aliases, which are alternative command names
you can use to invoke the same command. For example, ``[p]set colour`` can also
be invoked with ``[p]set color``. If there are aliases for a command, they will
appear just under the syntax.
* **Description**

View File

@@ -31,7 +31,7 @@ Open a terminal or command prompt and type one of the following
.. note::
To install the development version, replace ``Red-DiscordBot`` in the above commands with the
link below. **The development version of the bot contains experimental changes. It is not
value below. **The development version of the bot contains experimental changes. It is not
intended for normal users.** We will not support anyone using the development version in any
support channels. Using the development version may break third party cogs and not all core
commands may work. Downgrading to stable after installing the development version may cause
@@ -40,7 +40,7 @@ Open a terminal or command prompt and type one of the following
.. code-block:: none
git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot
Red-DiscordBot @ https://github.com/Cog-Creators/Red-DiscordBot/tarball/V3/develop
(Windows users may need to use :code:`py -3.8` or :code:`python` instead of :code:`python3.8`)
@@ -55,7 +55,7 @@ the purposes of this example, we'll call this :code:`mycog`).
In this folder, create three files: :code:`__init__.py`,
:code:`mycog.py`, and :code:`info.json`. Open the folder in
a text editor or IDE (examples include `Sublime Text 3 <https://www.sublimetext.com/>`_,
`Visual Studio Code <https://code.visualstudio.com/>`_, `Atom <https://atom.io/>`_, and
`Visual Studio Code <https://code.visualstudio.com/>`_, and
`PyCharm <http://www.jetbrains.com/pycharm/>`_).
.. attention::
@@ -102,8 +102,8 @@ Open :code:`__init__.py`. In that file, place the following:
from .mycog import MyCog
def setup(bot):
bot.add_cog(MyCog(bot))
async def setup(bot):
await bot.add_cog(MyCog(bot))
Make sure that both files are saved.
@@ -147,7 +147,7 @@ have successfully created a cog!
------ __init__.py
------ coolcog.py
You would then use :code:`[p]addpath D:\red-cogs` to add the path
You would then use :code:`[p]addpath D:\\red-cogs` to add the path
and then you can use :code:`[p]load mycog` or :code:`[p]load coolcog`
to load them

View File

@@ -41,17 +41,16 @@ Any Cog Creator that does not follow these requirements will have their repo rem
- Repo-wide ``info.json`` file with the keys
- ``author``
- ``name``
- ``short``
- ``description``
- Cog ``info.json`` files with the keys
- ``author``
- ``name``
- ``short``
- ``requirements`` (if applicable)
- ``description``
- ``min_python_version`` (if applicable)
See `info-json-format` for more information on how to set up ``info.json`` files.
@@ -73,7 +72,7 @@ Any Cog Creator that does not follow these requirements will have their repo rem
- Cogs that are more than what is able to be run in a simple eval.
- Cogs that are more than just a simple API access request.
- Cogs that properly use Red utilities, including Config, checks, and any other utility functions.
- Cogs that properly use Red utilities, for example Config, or any other utility functions.
- Cogs that use event listeners (bot.wait_for or cog-wide listeners) or custom tasks that are efficient and handle exceptions appropriately.
- Cogs that handle errors properly.
- Cogs that handle permissions properly.
@@ -84,7 +83,7 @@ Any Cog Creator that does not follow these requirements will have their repo rem
- The default locale must be English.
- The main cog class and every command must have a doc-string.
- No cog allows for escalation of permissions. (e.g., sending a mass ping through the bot without having permission to do so)
- Respect the role hierarchy. Dont let a lower role have a way to grant a higher role.
- Respect the role hierarchy. Don't let a lower role have a way to grant a higher role.
- If your cog install comes with any pre-packaged data, use `bundled_data_path()` to access it.
- If your cog install creates any non-config data, use `cog_data_path()` to store it.
- Unless the cog is intentionally designed to listen to certain input from bots, cogs should ignore input from bots.
@@ -94,8 +93,6 @@ Any Cog Creator that does not follow these requirements will have their repo rem
- If that's not possible, don't break anything in core or any other cog with your code.
- If you have to use private methods, lock the cog to specific Red versions you can guarantee it works on without breaking anything using the ``min_bot_version`` and ``max_bot_version`` keys in that cog's ``info.json`` file.
- Cog Creators must keep their cogs up-to-date with core Red or be delisted until cogs meet Red API changes. Repositories must be kept up to date with the latest version of Red within 3 months of its release.
.. _recommendations-for-cog-creators:
--------------------------------
@@ -138,14 +135,15 @@ While not required for approved Cog Creators, they are still recommended in orde
- ``ctx.embed_color``
- ``bot.is_automod_immune``
- Use checks to limit command use when the bot needs special permissions.
- Use decorators to limit command use, restrict usage, or define whether the bot needs special permissions.
You can find all of the permission and cooldown related decorators under the ``redbot.core.commands`` namespace.
- Check against user input before doing things. Common things to check:
- Resulting output is safe.
- Values provided make sense. (eg. no negative numbers for payday)
- Don't unsafely use user input for things like database input.
- Check events against `bot.cog_disabled_in_guild() <RedBase.cog_disabled_in_guild()>`\
- Check events against `bot.cog_disabled_in_guild() <Red.cog_disabled_in_guild()>`\
- Not all events need to be checked, only those that interact with a guild.
- Some discretion may apply, for example,
@@ -195,7 +193,12 @@ Other Details
- The reviewer of your application has the final word.
- Hidden cogs will not be explicitly reviewed, however they are not allowed to contain malicious or ToS breaking code.
- QA reserves the right to revoke these roles and all privileges if you are found to be in gross negligence, malicious intent, or reckless abandonment of your repository.
- If a Cog Creator's repository is not maintained and kept up to date, that repo will be removed from the approved repo listings until such issues are addressed.
- Cogs must be functionally working to the quality of an approved cog on the latest minor version of Red to be listed on the Red Index. Cogs that are not updated within 1 month of initial breakage will be delisted from the index until they are updated. Examples of potential breakage include, but are not limited to:
- A dependency without version constraints receiving a breaking update
- An API changing the schema of its endpoints
- Red itself releasing a new minor version
- Only 1 person is allowed to be the Cog Creator for a particular repo. Multiple people are allowed to maintain the repo, however the "main" owner (and the Cog Creator) is responsible for any code on the repo.
- The Cog Creator status for a repo can be transferred to another user if the Cog Creator requests it.
- An approved Cog Creator can ask QA to add additional repos they have created to the approved pool.

View File

@@ -7,7 +7,7 @@
Migrating cogs from Red V2
==========================
First, be sure to read :dpy_docs:`discord.py's migration guide <migrating.html>`
First, be sure to read :dpy_docs:`discord.py's migration guide <migrating_to_v1.html>`
as that covers all of the changes to discord.py that will affect the migration process
----------------

View File

@@ -47,7 +47,7 @@ Keys common to both repo and cog info.json (case sensitive)
is installed or a repo is added
.. tip:: You can use the ``[p]`` key in your string to use the prefix
used for installing.
used for installing, and ``[botname]`` to show the bot's username.
- ``short`` (string) - A short description of the cog or repo. For cogs, this info
is displayed when a user executes ``[p]cog list``

View File

@@ -0,0 +1,339 @@
.. Slash Commands and Interactions
.. role:: python(code)
:language: python
===============================
Slash Commands and Interactions
===============================
This guide is going to cover on how to write a simple slash command into a Red cog.
This guide will assume that you have a working basic cog.
If you do not have a basic cog, please refer to the :ref:`getting started <getting-started>` guide.
It is also adviced to make yourself familiar with `Application Commands <https://discord.com/developers/docs/interactions/application-commands>`__ from Discord's documentation.
---------------
Getting Started
---------------
To start off, we will have to import some additional modules to our cog file.
We will be using the ``redbot.core.app_commands`` module to create our slash commands.
Once we have imported the module, we can start creating our slash commands in our cog class.
For this example we will use a basic hello world command.
.. code-block:: python
import discord
from redbot.core import commands, app_commands
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@app_commands.command()
async def hello(self, interaction: discord.Interaction):
await interaction.response.send_message("Hello World!", ephemeral=True)
Go ahead and load your cog. Once it is loaded, we will have to enable and sync our slash commands.
We can do this by using the :ref:`[p]slash<core-command-slash>` command to manage our slash commands.
Once you have registered your slash commands, you can test them out by typing ``/hello`` in your server.
.. tip::
You may need to restart your Discord client with ``Ctrl + R`` (or your device's equivalent) to force
your client to see the new command after syncing.
----------------------------
Slash Commands and Arguments
----------------------------
There is a lot of flexibility when it comes to slash commands.
Below we will go over some of the different stuff you can do with slash commands.
Decorators
----------
Just like with text commands, we can use decorators to modify the behaviour of our slash commands.
For example, we can use the `app_commands.guild_only() <discord.app_commands.guild_only>` decorator to make our slash command only work in guilds.
.. code-block:: python
import discord
from redbot.core import commands, app_commands
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@app_commands.command()
@app_commands.guild_only()
async def hello(self, interaction: discord.Interaction):
await interaction.response.send_message("Hello World!", ephemeral=True)
One of the more useful decorators is the `app_commands.choices() <discord.app_commands.choices>` decorator.
This decorator allows us to specify a list of choices for a specific argument.
This is useful for arguments that have a limited number of options.
For example, we can use this to create a command that allows us to choose between two different colors.
.. code-block:: python
from redbot.core import commands, app_commands
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@app_commands.command()
@app_commands.describe(color="The color you want to choose")
@app_commands.choices(color=[
app_commands.Choice(name="Red", value="red"),
app_commands.Choice(name="Blue", value="blue"),
])
async def color(self, interaction: discord.Interaction, color: app_commands.Choice[str]):
await interaction.response.send_message(f"Your color is {color.value}", ephemeral=True)
The user will be shown the ``name`` of the choice, and the argument will be passed a
`app_commands.Choice <discord.app_commands.Choice>` object with the ``name`` and ``value`` associated with that choice.
This allows user-facing names to be prettier than what is actually processed by the command.
Alternatively, ``Literal`` can be used if the argument does not need a different
user-facing label. When done this way, the resulting parameter will be one of
the literal values listed.
.. code-block:: python
from redbot.core import commands, app_commands
from typing import Literal
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@app_commands.command()
@app_commands.describe(color="The color you want to choose")
async def color(self, interaction: discord.Interaction, color: Literal["Red", "Blue"]):
await interaction.response.send_message(f"Your color is {color}", ephemeral=True)
Finally, an `enum.Enum` subclass can be used to specify choices. When done this way, the
resulting parameter will be an instance of that enum, rather than `app_commands.Choice <discord.app_commands.Choice>`.
.. code-block:: python
from enum import Enum
from redbot.core import commands, app_commands
class Color(Enum):
Red = "red"
Blue = "blue"
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@app_commands.command()
@app_commands.describe(color="The color you want to choose")
async def color(self, interaction: discord.Interaction, color: Color):
await interaction.response.send_message(f"Your color is {color.value}", ephemeral=True)
Check out :dpy_docs:`the full reference of decorators at Discord.py's documentation <interactions/api.html#decorators>`.
Groups & Subcommands
--------------------
Slash commands can also be grouped together into groups and subcommands.
These can be used to create a more complex command structure.
.. note::
Unlike text command groups, top level slash command groups **cannot** be invoked.
.. code-block:: python
import discord
from redbot.core import commands, app_commands
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
zoo = app_commands.Group(name="zoo", description="Zoo related commands")
@zoo.command(name="add", description="Add an animal to the zoo")
@app_commands.describe(animal="The animal you want to add")
async def zoo_add(self, interaction: discord.Interaction, animal: str):
await interaction.response.send_message(f"Added {animal} to the zoo", ephemeral=True)
@zoo.command(name="remove", description="Remove an animal from the zoo")
@app_commands.describe(animal="The animal you want to remove")
async def zoo_remove(self, interaction: discord.Interaction, animal: str):
await interaction.response.send_message(f"Removed {animal} from the zoo", ephemeral=True)
Arguments
---------
As shown in some of the above examples, we can amplify our slash commands with arguments.
However with slash commands Discord allows us to do a few more things.
Such as specifically select a channel that we'd like to use in our commands,
we can do the same with roles and members.
Let's take a look at how we can do that.
.. code-block:: python
import discord
from redbot.core import commands, app_commands
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@app_commands.command()
@app_commands.describe(channel="The channel you want to mention")
async def mentionchannel(self, interaction: discord.Interaction, channel: discord.abc.GuildChannel):
await interaction.response.send_message(f"That channel is {channel.mention}", ephemeral=True)
@app_commands.command()
@app_commands.describe(role="The role you want to mention")
async def mentionrole(self, interaction: discord.Interaction, role: discord.Role):
await interaction.response.send_message(f"That role is {role.mention}", ephemeral=True)
@app_commands.command()
@app_commands.describe(member="The member you want to mention")
async def mentionmember(self, interaction: discord.Interaction, member: discord.Member):
await interaction.response.send_message(f"That member is {member.mention}", ephemeral=True)
If you try out the mentionchannel command, you will see that it currently accepts any type of channel,
however let's say we want to limit this to voice channels only.
We can do so by adjusting our type hint to :class:`discord.VoiceChannel` instead of :class:`discord.abc.GuildChannel`.
.. code-block:: python
import discord
from redbot.core import commands, app_commands
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@app_commands.command()
@app_commands.describe(channel="The channel you want to mention")
async def mentionchannel(self, interaction: discord.Interaction, channel: discord.VoiceChannel):
await interaction.response.send_message(f"That channel is {channel.mention}", ephemeral=True)
With integer and float arguments, we can also specify a minimum and maximum value.
This can also be done to strings to set a minimum and maximum length.
These limits will be reflected within Discord when the user is filling out the command.
.. code-block:: python
import discord
from redbot.core import commands, app_commands
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@app_commands.command()
@app_commands.describe(number="The number you want to say, max 10")
async def saynumber(self, interaction: discord.Interaction, number: app_commands.Range[int, None, 10]):
await interaction.response.send_message(f"Your number is {number}", ephemeral=True)
See the `Discord.py documentation <https://discordpy.readthedocs.io/en/stable/interactions/api.html#range>`__ for more information on this.
---------------
Hybrid Commands
---------------
Hybrid commands are a way to bridge the gap between text commands and slash commands.
These types of commands allow you to write a text and slash command simultaneously using the same function.
This is useful for commands that you want to be able to use in both text and slash commands.
.. note::
As with slash command groups, top level hybrid command groups **cannot** be invoked as a slash command. They can however be invoked as a text command.
.. code-block:: python
from redbot.core import commands
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.hybrid_command(name="cat")
async def cat(self, ctx: commands.Context):
await ctx.send("Meow")
@commands.hybrid_group(name="dog")
async def dog(self, ctx: commands.Context):
await ctx.send("Woof")
# As discussed above, top level hybrid command groups cannot be invoked as a slash command.
# Thus, this will not work as a slash command.
@dog.command(name="bark")
async def bark(self, ctx: commands.Context):
await ctx.send("Bark", ephemeral=True)
After syncing your cog via the :ref:`[p]slash<core-command-slash>` command, you'll be able to use the commands as both a slash and text command.
---------------------
Context Menu Commands
---------------------
Context menu commands are a way to provide a interaction via the context menu.
These are seen under ``Apps`` in the Discord client when you right click on a message or user.
Context menu commands are a great way to provide a quick way to interact with your bot.
These commands accept one arguement, the contextual ``user`` or ``message`` that was right clicked.
Setting up context commands is a bit more involved then setting up slash commands.
First lets setup our context commands in our cog.
.. code-block:: python
import discord
from redbot.core import commands, app_commands
# Important: we're building the commands outside of our cog class.
@app_commands.context_menu(name="Get message ID")
async def get_message_id(interaction: discord.Interaction, message: discord.Message):
await interaction.response.send_message(f"Message ID: {message.id}", ephemeral=True)
@app_commands.context_menu(name="Get user ID")
async def get_user_id(interaction: discord.Interaction, user: discord.User):
await interaction.response.send_message(f"User ID: {user.id}", ephemeral=True)
Once we've prepared our main cog file, we have to add a small bit of code to our ``__init__.py`` file.
.. code-block:: python
from .my_cog import get_message_id, get_user_id
async def setup(bot):
bot.tree.add_command(get_message_id)
bot.tree.add_command(get_user_id)
async def teardown(bot):
# We're removing the commands here to ensure they get unloaded properly when the cog is unloaded.
bot.tree.remove_command("Get message ID", type=discord.AppCommandType.message)
bot.tree.remove_command("Get user ID", type=discord.AppCommandType.user)
Now we're ready to sync our commands to Discord.
We can do this by using the :ref:`[p]slash<core-command-slash>` command.
Take note of the specific arguments you have to use to sync a context command.
---------------------------------
Closing Words and Further Reading
---------------------------------
If you're reading this, it means that you've made it to the end of this guide.
Congratulations! You are now prepared with the basics of slash commands for Red.
However there is a lot we didn't touch on in this guide.
Below this paragraph you'll find a list of resources that you can use to learn more about slash commands.
As always, if you have any questions, feel free to ask in the `Red support server <https://discord.gg/red>`__.
For more information on `Application Commands <https://discord.com/developers/docs/interactions/application-commands>`__ as a whole, please refer to the official Discord documentation.
Discord.py also offers documentation regarding everything discussed on this page.
You can find the documentation `here <https://discordpy.readthedocs.io/en/stable/interactions/api.html>`__.
And lastly, AbstractUmbra has a great write up of `examples <https://gist.github.com/AbstractUmbra/a9c188797ae194e592efe05fa129c57f>`__.

View File

@@ -41,12 +41,33 @@ If there are multiple authors, we can separate them with commas.
AUTHOR: Red, Rojo, Rouge
-----------------
Description Field
-----------------
We can also add an optional ``DESCRIPTION`` to our trivia list, which
will show from the output of ``[p]trivia info <category>``. The
description should indicate to the user what the trivia list is
about and what kind of questions they can expect to face.
For example, if you were writing a logo quiz trivia list, you could
create a description like this:
.. code-block:: yaml
AUTHOR: Kreusada
DESCRIPTION: >-
A quiz to test your logo knowledge to the limit. This trivia
will send image URLs and ask you to identify the company's name
from the logo that is sent.
---------------------
Questions and Answers
---------------------
Writing questions and answers is simple. Once you've finished your
``AUTHOR`` field, you can move on to your questions just below.
``AUTHOR`` field and ``DESCRIPTION`` field, you can move on to your questions
just below.
Questions should consist of at least one answer, with other
possible answers included if necessary. You must put a colon at the end
@@ -98,6 +119,7 @@ As you've added more questions, your file should look something like this:
.. code-block:: yaml
AUTHOR: Red
DESCRIPTION: A general quiz to test your knowledge.
How many days are there in a regular year?:
- 365
- three hundred and sixty five
@@ -111,15 +133,68 @@ As you've added more questions, your file should look something like this:
- Chelsea
- chelsea f.c.
How much money is a US Olympic gold medalist awarded?:
- $25,000
- 25,000
- 25k
- 25000
- $25000
- $37,500
- 37,500
- 37.5k
- 37500
- $37500
You can keep adding questions until you are satisfied, and then you can upload and
play your very own trivia! See :ref:`here <trivia-command-triviaset-custom>` for more details.
play your very own trivia! See :ref:`[p]triviaset custom <trivia-command-triviaset-custom>` for more information.
Still stuck? Take a look at
`the core trivia lists <https://github.com/Cog-Creators/Red-DiscordBot/tree/V3/develop/redbot/cogs/trivia/data/lists>`_
for reference.
--------------------------
Optional: Custom Overrides
--------------------------
Once you've got the hang of the question-answer format,
you might want to add some custom overrides with the CONFIG key - in a similar way to the AUTHOR key.
These will override the settings set with :ref:`[p]triviaset <trivia-command-triviaset>`.
For example, with a trivia list which has questions that are quick to answer you could decrease the time limit
and require a higher score to win.
Here are all the overrides available:
.. code-block:: yaml
CONFIG:
bot_plays: true or false # bot gains points if no one answers correctly
delay: positive number # answer time limit (seconds), must be greater than or equal to 4
timeout: positive number # timeout for no responses (seconds), must be greater than delay
max_score: positive integer # points required to win
reveal_answer: true or false # reveal answer on timeout
payout_multiplier: non-negative number # payout multiplier
use_spoilers: true or false # use spoilers in answers
So, your final file might look something like this:
.. code-block:: yaml
AUTHOR: Red
CONFIG:
bot_plays: false
use_spoilers: true
delay: 20
payout_multiplier: 0.5
max_score: 20
How many days are there in a regular year?:
- 365
- three hundred and sixty five
"Who is the #1 followed user on Twitter?":
- Barack Obama
- Obama
What is the only sea without any coasts?:
- Sargasso
- Sargasso Sea
Who won the Premier League in 2015?:
- Chelsea
- chelsea f.c.
How much money is a US Olympic gold medallist awarded?:
- $37,500
- 37,500
- 37.5k
- 37500
- $37500

View File

@@ -8,7 +8,7 @@ Hosting Information
.. note::
This doc is written for the :ref:`hosting section <getting-started-hosting>`
of the :ref:`getting started <getting-started>` guide. Please take a look
of the :ref:`getting started guide <getting-started>`. Please take a look
if you don't know how to host Red.
@@ -21,7 +21,7 @@ First, we would like to make something clear:
.. warning::
Due to their inability to handle Red's data structure and meet the
conditions of being a supported platform; platforms such as Heroku,
Pterodactyl, repl.it, Termux, LXC and alike are **NOT** officially supported.
Pterodactyl, repl.it, Termux and alike are **NOT** officially supported.
Docker support found in GitHub is also a work in progress and not ready
for daily use. Workarounds for getting Red running on those platforms
are imperfect due to Red's nature. You will not be able to receive
@@ -41,9 +41,9 @@ Hosting on a VPS or Dedicated Server
.. warning::
Please be aware that a Linux server is controlled through a command line.
If you don't know Unix basics, please take a look at `this guide
<https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-basics>`_
from DigitalOcean which will introduce you to the Linux basics.
If you don't know Unix basics, please take a look at
`DigitalOcean's tutorial: An Introduction to Linux Basics
<https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-basics>`_.
------------
@@ -103,10 +103,10 @@ Average Providers
with locations available worldwide.
| `Hetzner Online <https://www.hetzner.com/>`_ is a German VPS and dedicated server
provider with locations in Germany and Finland.
provider with locations in Germany, US and Finland.
| `Contabo <https://contabo.com/>`_ is also a German VPS and dedicated server provider
with locations in Germany and the United States.
with locations in Germany, Asia, Australia and the United States.
| `Ramnode <https://www.ramnode.com/>`_ is a US based VPS provider focused on
low to middle end VPS with locations in the US and Netherlands.
@@ -114,6 +114,9 @@ Average Providers
| `LowEndBox <http://lowendbox.com/>`_ is a website where hosting providers are
discussed and curated, often with lower costs and less known providers.
| `AlphaVps <https://alphavps.com>`_ is a Bulgaria VPS and dedicated server provider
with locations in Los Angeles, New York, England, Germany and Bulgaria.
--------------------
Higher End Providers
--------------------
@@ -145,6 +148,7 @@ Free Hosting
Oracle Cloud and Google Cloud offer always free tiers with limited resources.
| Additionally, new Google Cloud customers get a $300 credit which is valid for 3 months.
New Oracle Cloud customers also get $300 of free credit, but only valid for 30 days.
| Excluding the above, there is no recommended free VPS host. Persuasion of
another individual for hosting Red is an option, albeit low in success rate.

View File

@@ -0,0 +1,810 @@
.. _incompatible-changes-3.5:
========================================
Backward incompatible changes in Red 3.5
========================================
.. include:: _includes/preamble.rst
.. contents::
:depth: 4
:local:
For Users
*********
Removals
~~~~~~~~
redbot-launcher
^^^^^^^^^^^^^^^
.. deprecated:: 3.2.0
The vast majority of functionality provided by ``redbot-launcher`` can already be
achieved through other means.
In Red 3.2.0, ``redbot-launcher`` has been stripped most of its functionality
as it can already be done through other (better supported) means:
- Updating Red (a proper way to update Red is now documented in `../update_red`)
- Creating instances (as documented in install guides, it should be done through ``redbot-setup``)
- Removing instances (available under ``redbot-setup delete``)
- Removing all instances (no direct alternative, can be done through ``redbot-setup delete``)
- Debug information (available under ``redbot --debuginfo`` and ``[p]debuginfo`` bot command)
Currently, ``redbot-launcher`` only provides auto-restart functionality
which we now document how to do properly on each of the supported systems.
If you wish to continue using auto-restart functionality, we recommend following the instructions for setting up a service dedicated to your operating system:
- `../autostart_windows`
- `../autostart_mac`
- `../autostart_systemd`
Behavior changes
~~~~~~~~~~~~~~~~
x86-64 CPUs are now only supported if they support x86-64-v2 instruction set
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
On x86-64 systems, we now require that your CPU supports x86-64-v2 instruction set.
This roughly translates to us dropping support for Intel CPUs that have been released before 2009
and AMD CPUs that have been releasesd before 2012.
This has been mostly dictated by one of our dependencies but some Linux distributions
are already dropping support for it in their latest versions as well.
Thread-related changes
^^^^^^^^^^^^^^^^^^^^^^
While many of these aren't breaking, we thought it is important to make it clear
how Red approaches its features in regard to threads:
- Red's command permission system doesn't have dedicated rules for threads and instead uses
that thread's parent channel rules
- Channel embed settings (``[p]embedset``) cannot be set for threads and usage of embeds is based
on that thread's parent channel embed settings
- This also means that a forum channel can have its own embed settings
- Using channel mute/unmute commands (e.g. ``[p]mutechannel`` from Mutes cog) in a thread
will mute that user in the thread's parent channel
- Filter cog doesn't have a dedicated word list for threads and uses server's and parent channel's word lists
- This also means that a word list can now also be added for a forum channel
- CustomCom's ``{channel}`` substitution parameter will now be a thread when the command is used in a thread
- CustomCom's channel cooldowns are applied per thread
- When used in a thread, ``[p]slowmode`` command from Mod cog will apply the slowmode to that thread
- The logic for the ``[p]ignore``-related checks has changed for threads:
- ``[p]ignore channel`` accepts ignoring command in a specific thread
- When the command is sent in a thread, it first checks server-wide ignore settings and then runs if:
- the user has Manage Channel permission in the parent channel, or
- the parent channel is not ignored *and* the user has Manage Threads permission in the parent channel, or
- the thread channel and its parent aren't ignored
- This also means that a forum channel can now also be ignored
- The Mutes cog now denies Send Messages in Threads, Create Public Threads,
and Create Private Threads permissions
Commands for changing Bank and Modlog settings are now core commands
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
These commands allow users to change settings of core APIs that are always available
(similarly to ``[p]autoimmune``, ``[p]allowlist``, or ``[p]blocklist``)
so it makes sense to allow using them without having to load anything.
The following commands have been moved to Core:
- ``[p]modlogset``
- ``[p]bankset``
- ``[p]economyset registeramount`` (now named ``[p]bankset registeramount``)
- ``[p]bank reset`` (now named ``[p]bankset reset``)
- ``[p]bank prune`` (now named ``[p]bankset prune``)
This has also resulted in the removal of the ``bank`` cog
as it no longer contained any commands.
If you have any custom settings for this cog or these commands,
you may need to readd them with the new command names.
Commands in the ``[p]set`` group have been reorganized
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The list of commands in the ``[p]set`` group has gotten quite long over the years
so we decided to reorganize it.
The following changes have been made:
- Commands related to metadata about the bot have been moved to the ``[p]set bot`` subgroup:
- ``[p]set avatar`` is now ``[p]set bot avatar``
- ``[p]set custominfo`` is now ``[p]set bot custominfo``
- ``[p]set description`` is now ``[p]set bot description``
- ``[p]set nickname`` is now ``[p]set bot nickname``
- ``[p]set username`` is now ``[p]set bot username``
- Commands related to server's admin and mod roles have been moved to the ``[p]set roles`` subgroup:
- ``[p]set addadminrole`` is now ``[p]set roles addadminrole``
- ``[p]set removeadminrole`` is now ``[p]set roles removeadminrole``
- ``[p]set addmodrole`` is now ``[p]set roles addmodrole``
- ``[p]set removemodrole`` is now ``[p]set roles removemodrole``
- Commands related to bot user's activity and status have been moved to the ``[p]set status`` subgroup:
- ``[p]set status`` has been split into ``[p]set status online/idle/dnd/invisible`` subcommands
- ``[p]set competing`` is now ``[p]set status competing``
- ``[p]set listening`` is now ``[p]set status listening``
- ``[p]set playing`` is now ``[p]set status playing``
- ``[p]set streaming`` is now ``[p]set status streaming``
- ``[p]set watching`` is now ``[p]set status watching``
- ``[p]set globallocale`` has been renamed to ``[p]set locale global``
- ``[p]set locale`` is now also available under ``[p]set locale server``
- ``[p]set globalregionalformat`` has been renamed to ``[p]set regionalformat global``
- ``[p]set regionalformat`` is now also available under ``[p]set regionalformat server``
If you have any custom settings for these commands,
you may need to readd them with the new command names.
Red requires to have at least one owner
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There was never a reason to allow users to run the bot without having an owner set
and it had been a point of confusion for new users that are trying to set up Red
using a team application which, by default, doesn't have any owners set.
If your instance does not have any owner set, Red will print an error message on startup
and exit before connecting to Discord. This error message contains all
the needed information on how to set a bot owner and the security implications of it.
If, for some reason, you intentionally are running Red without any owner set,
please make a feature request with your use case on
`our issue tracker <https://github.com/Cog-Creators/Red-DiscordBot/issues/new/choose>`__.
For Developers
**************
Removals
~~~~~~~~
``Config.driver`` and ``redbot.core.drivers`` package
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
These are Red's internal implementation details and as such they have been privatized.
``redbot.core.data_manager.load_bundled_data()`` function
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. deprecated:: 3.0.0rc3
This function has been deprecated basically forever and we have somehow never removed it.
Use the `redbot.core.data_manager.bundled_data_path()` function directly instead.
``is_mod_or_superior()``, ``is_admin_or_superior()``, and ``check_permissions()`` functions in ``redbot.core.checks``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. deprecated:: 3.0.0rc1
These functions have been deprecated basically forever and we have somehow never removed them.
Use the `redbot.core.utils.mod.is_mod_or_superior()`, `redbot.core.utils.mod.is_admin_or_superior()`,
and `redbot.core.utils.mod.check_permissions()` functions instead.
``bordered()`` function
^^^^^^^^^^^^^^^^^^^^^^^
This function was primarily used in Red's command-line code and had very limited use
for 3rd-party cogs. Since we no longer use this function, it has been removed.
``commands.DM_PERMS`` constant
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This was mostly used by the internal implementation and it isn't anymore now. Since this constant
was a maintenance burden and hasn't really seen any usage in 3rd-party code, we decided to just
remove it.
``redbot.core.utils.caching`` and ``redbot.core.utils.safety`` modules
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
These modules contain utilities that were only really useful in Red's own code.
We no longer use them for anything and have not seen any 3rd-party usage
and as such we have removed these modules.
``guild_id`` parameter to ``Red.allowed_by_whitelist_blacklist()``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. deprecated:: 3.4.8
``guild_id`` parameter to `Red.allowed_by_whitelist_blacklist()` has been removed as
it is not possible to properly handle the local allowlist/blocklist logic with just
the guild ID. Part of the local allowlist/blocklist handling is to check
whether the provided user is a guild owner.
Use the ``guild`` parameter instead.
Example:
.. code:: python
if await bot.allowed_by_whitelist(who_id=user_id, guild_id=guild.id, role_ids=role_ids):
...
Becomes:
.. code:: python
if await bot.allowed_by_whitelist(who_id=user_id, guild=guild, role_ids=role_ids):
...
``redbot.core.commands.converter.GuildConverter``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. deprecated:: 3.4.8
This is now included in the upstream discord.py library.
Use `discord.Guild`/``redbot.core.commands.GuildConverter`` instead.
Example:
.. code:: python
from redbot.core import commands
from redbot.core.commands.converter import GuildConverter
class MyCog(commands.Cog):
@commands.command()
async def command(self, ctx, server: GuildConverter):
await ctx.send(f"You chose {server.name}!")
Becomes:
.. code:: python
import discord
from redbot.core import commands
class MyCog(commands.Cog):
@commands.command()
async def command(self, ctx, server: discord.Guild):
await ctx.send(f"You chose {server.name}!")
``redbot.core.utils.mod.is_allowed_by_hierarchy()``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. deprecated:: 3.4.1
This was an internal function that was never meant to be part of the public API.
It was also not really possible to use it in a supported way as it required
internal objects to be passed as parameters.
If you have a use case for this function, you should be able to achieve the same result
with this code:
.. code:: python
async def is_allowed_by_hierarchy(guild, moderator, member):
is_special = moderator == guild.owner or await self.bot.is_owner(moderator)
return moderator.top_role > member.top_role or is_special
Behavior changes
~~~~~~~~~~~~~~~~
Update to version guarantees and privatization of many APIs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
With this release, we're limiting what changes we will consider breaking.
`The new Developer Guarantees <developer-guarantees>` describe this in detail
but the gist of it is that we will now only consider names included in ``__all__``
of ``redbot`` and ``redbot.core`` modules and ``__all__`` of public submodules
of ``redbot.core`` to be part of the public API that shouldn't be broken without notice.
With this change, we introduced or updated ``__all__`` in all of those modules
and added ``_`` prefix to private modules to specify what is actually part of the public API.
This has resulted in the following being removed/privatized:
- ``create_temp_config()``, ``load_basic_configuration()``, and ``core_data_path()`` in the ``redbot.core.data_manager`` module
- ``set_locale()`` and ``reload_locales()`` in the ``redbot.core.i18n`` module
- ``MIN_PYTHON_VERSION`` in the ``redbot`` module
- ``redbot.core.cog_manager``, ``redbot.core.settings_caches``, ``redbot.core.global_checks``, ``redbot.core.events``, ``redbot.core.cli``, and ``redbot.core.rpc`` modules
``redbot.core.data_manager.storage_details()`` returns a deep copy of underlying dict now
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changing storage details during Red's runtime is not supported and as such,
this function now returns a deep copy of the underlying dictionary to prevent changes.
Changed the version order of final dev releases and dev pre-releases
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To be consistent with :pep:`440`, we've changed the order between final dev releases (e.g.
``3.5.0.dev1``) and dev pre-releases (e.g. ``3.5.0a1.dev1``, ``3.5.0b1.dev1``, ``3.5.0rc1.dev1``).
Here's an example of a list of versions sorted using the new order (oldest version first):
- 3.5.0.dev1
- 3.5.0.dev2
- 3.5.0a1.dev1
- 3.5.0a1
- 3.5.0a2.dev1
- 3.5.0b1.dev1
- 3.5.0
- 3.5.0.post1.dev1
- 3.5.0.post1
- 3.5.1
``Red.get_owner_notification_destinations()`` may now return instances of ``discord.Voice/StageChannel``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
With the introduction of Text in Voice feature, we added the ability to add a voice/stage channel
as an owner notifications destination. This means that `redbot.core.modlog.get_modlog_channel()`
may now return instances of `discord.VoiceChannel` and `discord.StageChannel`.
``modlog.get_modlog_channel()`` may now return instances of ``discord.Voice/StageChannel``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
With the introduction of Text in Voice feature, we added the ability to set a modlog
channel to a voice/stage channel. This means that `redbot.core.modlog.get_modlog_channel()`
may now return instances of `discord.VoiceChannel` and `discord.StageChannel`.
``menus.DEFAULT_CONTROLS`` and ``ReactionPredicate.*_EMOJIS`` use immutable types now
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The type of `redbot.core.utils.menus.DEFAULT_CONTROLS` has been changed from `dict`
to a `collections.abc.Mapping` while the type of `ReactionPredicate.ALPHABET_EMOJIS`
and `ReactionPredicate.NUMBER_EMOJIS` has been changed from `list` to a `tuple`.
This should prevent the developers from accidentally changing the provided constants
instead of making a copy and changing that copy.
This should be a transparent change in most cases but here is an example usage that is affected:
.. code:: python
import copy
from redbot.core.utils import menus
# somewhere in your code...
controls = copy.copy(menus.DEFAULT_CONTROLS)
controls["\N{SMILING FACE WITH OPEN MOUTH}"] = custom_function
await menu(ctx, ["page 1", "page 2"], controls)
To make this code work on Red 3.5 and higher, you can replace it with any of the following:
.. code:: python
from redbot.core.utils import menus
# example 1
controls = {
**menus.DEFAULT_CONTROLS,
"\N{SMILING FACE WITH OPEN MOUTH}": custom_function,
}
await menu(ctx, ["page 1", "page 2"], controls)
# example 2
controls = menus.DEFAULT_CONTROLS.copy()
controls["\N{SMILING FACE WITH OPEN MOUTH}"] = custom_function
await menu(ctx, ["page 1", "page 2"], controls)
# example 3
controls = dict(menus.DEFAULT_CONTROLS)
controls["\N{SMILING FACE WITH OPEN MOUTH}"] = custom_function
await menu(ctx, ["page 1", "page 2"], controls)
Similarly, if you copied lists before:
.. code:: python
emojis = ReactionPredicate.NUMBER_EMOJIS.copy()
emojis.insert(0, "\N{DOG}")
emojis.append("\N{CAT}")
You could use sequence unpacking instead:
.. code:: python
emojis = ["\N{DOG}", *ReactionPredicate.NUMBER_EMOJIS, "\N{CAT}"]
Permissions defined in ``@commands.*_permissions()`` decorators are always merged now
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is mostly a bugfix but it means that the permissions in stacked decorators are now
always merged instead of being *sometimes* overridden and *sometimes* merged.
For example, this code has only checked for ``embed_links`` permission on 3.4
but now checks for both ``add_reactions`` and ``embed_links`` permissions:
.. code:: python
from redbot.core import commands
class MyCog(commands.Cog):
@commands.command()
@commands.bot_has_permissions(embed_links=True)
@commands.bot_has_permissions(add_reactions=True)
async def example(self, ctx):
msg = await ctx.send(embed=discord.Embed(description="Hello!"))
await msg.add_reaction("\N{SMILING FACE WITH OPEN MOUTH}")
Note that stacking `@commands.has_permissions() <redbot.core.commands.has_permissions()>`
with ``@commands.*_or_permissions()`` decorators still behaves differently depending on
the decorator order.
Some of the primary dependencies have been removed or replaced
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
While this may not technically fall under `our version guarantees <../version_guarantees>`,
we recognize that this may affect some people.
As such, below we list the noteworthy dependency replacements and removals (package names
are PyPI distribution names):
- ``appdirs`` package has been replaced with ``platformdirs``
- ``chardet`` package has been replaced with ``charset-normalizer``
- ``fuzzywuzzy`` package has been replaced with ``rapidfuzz``
- Red no longers depends on ``aiosqlite``, ``PyNaCl``, and ``python-Levenshtein-wheels``
discord.py version has been updated to 2.2.3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To allow Red to continue operating *and* use the newer features (threads, text in voice/stage channels,
buttons, application commands, and AutoMod, to name a few), we've updated discord.py from version
1.7.3 to 2.2.3. Since this is a major upgrade, it will require you to update your code accordingly.
discord.py's documentation has :dpy_docs:`a migration guide <migrating.html>` that you can follow in order to
update your cogs.
Red itself has already been updated to support all of these changes that happened over the years.
In order to do so, we've also had to make a few breaking changes of our own. Those changes are
normal sections in the current document so be sure to follow it in full and you should be able to
perform all the necessary changes.
To help support some of the newer features, we've also added a few things:
- Utilities that allow to **properly** check whether a member can do something in threads (or channels)
for cases where it isn't as simple as checking permissions:
- Command check decorators: `bot_can_manage_channel()`, `bot_can_react()`
- Permission check decorators: `can_manage_channel()`, `guildowner_or_can_manage_channel()`,
`admin_or_can_manage_channel()`, `mod_or_can_manage_channel()`
- Functions: `can_user_send_messages_in()`, `can_user_manage_channel()`, `can_user_react_in()`
- New module (`redbot.core.utils.views`) with useful `discord.ui.View` subclasses
- `SetApiModal`, `SetApiView`, `SimpleMenu`
``Case.channel`` can now be a ``discord.Thread``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In order to properly support threads, `Case.channel` can now also be an instance of `discord.Thread`.
New `Case.parent_channel` attribute will be set to the thread's parent text or forum channel,
if the case's channel is a thread.
``commands.BadArgument`` is no longer wrapped in ``commands.ConversionFailure`` containing parameter and its value
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We used to wrap `commands.BadArgument <discord.ext.commands.BadArgument>` exceptions
in a ``commands.ConversionFailure`` containing, in addition to the actual exception,
the `inspect.Parameter` instance and the passed value for the argument
that failed the conversion.
With discord.py 2.x, these are now exposed through the
`commands.Context.current_parameter <discord.ext.commands.Context.current_parameter>`
and `commands.Context.current_argument <discord.ext.commands.Context.current_argument>`
making this wrapping no longer necessary.
Some of the method arguments in the bot class and ``commands`` package have been made positional-only
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following arguments have been positional-only to be consistent with the upstream discord.py package:
- ``name`` in `Red.get_command()`
- ``name`` in `Red.get_cog()`
- ``coro`` in `Red.before_invoke()`
- ``user`` in `Red.is_owner()`
- ``message`` in ``Red.get_context()``
- ``message`` in `Red.process_commands()`
- ``cogname`` in `Red.remove_cog()`
- ``cog`` in `Red.add_cog()`
- ``command`` in `Red.add_command()`
- ``command`` in `Red.remove_command()`
- ``ctx`` in `redbot.core.commands.Command.can_run()`
- ``ctx`` in ``redbot.core.commands.CogMixin.can_run()``
- ``ctx`` in ``redbot.core.commands.CogMixin.can_see()``
- ``error`` in `redbot.core.commands.Command.error()`
``bot.add_cog()`` will now raise ``discord.ClientException`` instead of ``RuntimeError`` when cog is already loaded
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To make Red's bot class more consistent with the discord.py implementation that it overrides,
the `discord.ClientException` is now being raised instead of `RuntimeError` when a cog
with the same name is already loaded.
Many functions and methods do not support ``discord.PartialMessageable`` objects
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This isn't technically breaking since they never did *but* since those objects may appear now,
we think it is important to mention that due to the limited information that `discord.PartialMessageable`
objects provide, they cannot be passed to the following methods directly:
- `Red.ignored_channel_or_guild()`
- `Red.embed_requested()`
- `redbot.core.modlog.create_case()`
- `redbot.core.modlog.Case.edit()`
Additionally, the `Red.message_eligible_as_command()` will return ``False``
if a `discord.PartialMessageable` object for a channel that isn't a DM is passed.
If you *have to* use these, you should try fetching the full messageable object first
or looking at the documentation to see whether there are any alternative solutions.
Cog package (extension) and cog loading / unloading is now asynchronous
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This follows the changes that discord.py 2.x has introduced - we now **require** for
the ``setup()`` and ``teardown()`` functions to be asynchronous and have made
the `Red.add_cog()` and `Red.remove_cog()` methods asynchronous as well.
``Red.embed_requested()``'s parameters and their default values have changed
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We have made a bunch of changes to the signature of `Red.embed_requested()`. This method now
accepts only a single **positional** argument called ``channel``, making the ``command``
keyword-only. The ``user`` argument has been removed as the ``channel`` argument now supports
the `discord.abc.User` objects directly, dropping the support for `discord.DMChannel`
in the process.
These changes together allowed us to support checking whether an embed should be sent in a DM
using only the `discord.abc.User` object - without the `discord.DMChannel` which is often
not present in the cache. Furthermore, it means that a `discord.abc.User` object no longer needs
to be passed unnecessarily when the method is used with a guild channel.
We've also changed the default value of ``check_permissions`` to ``True``
as it makes the typical usage of this method more ergonomic.
Example:
.. code:: python
import discord
from redbot.core import commands
class MyCog(commands.Cog):
@commands.guild_only()
@commands.command()
async def sayhello(self, ctx, recipient: discord.Member):
content = "Hello world!"
embed = discord.Embed(title="Message for you!", description=content)
try:
# try sending the message in DMs
if await ctx.bot.embed_requested(
await recipient.create_dm(), recipient, ctx.command, check_permissions=True
):
await recipient.send(embed=embed)
else:
await recipient.send(content)
except discord.Forbidden:
# DMs are closed, send a message in a moderator or current channel
channel = ctx.guild.public_updates_channel or ctx
if await ctx.bot.embed_requested(
channel, ctx.author, ctx.command, check_permissions=True
):
await channel.send(embed=embed)
else:
await channel.send(content)
After:
.. code:: python
import discord
from redbot.core import commands
class MyCog(commands.Cog):
@commands.guild_only()
@commands.command()
async def sayhello(self, ctx, recipient: discord.Member):
content = "Hello world!"
embed = discord.Embed(title="Message for you!", description=content)
try:
# try sending the message in DMs
if await ctx.bot.embed_requested(recipient, command=ctx.command):
await recipient.send(embed=embed)
else:
await recipient.send(content)
except discord.Forbidden:
# DMs are closed, send a message in a moderator or current channel
channel = ctx.guild.public_updates_channel or ctx
if await ctx.bot.embed_requested(channel, command=ctx.command):
await channel.send(embed=embed)
else:
await channel.send(content)
``modlog.create_case()`` now raises instead of silently returning on error
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To help avoid passing invalid arguments, `modlog.create_case()` now raises:
- `ValueError` when the ``action_type`` argument is not a valid action type
- `RuntimeError` when the ``user`` argument is passed with the bot's user object/ID
Proper usage of these methods is unlikely to be affected
and this should mostly just help detect bugs earlier.
.. _config-register-1:
``Config``'s register methods now only accept JSON-castable types
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. seealso:: `config-register-2`
This change has fixed the inconsistencies between what can be registered as a default value
and what can be set through `Value.set()`. It mostly resulted in confusion when it was not
possible to use the registered type in `Value.set()`.
If you need to use custom types, you'll have to manually construct them *after* getting the
"raw" value from `Config`.
.. _config-register-2:
``Config`` now always returns base JSON types, never subclasses
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. seealso:: `config-register-1`
It used to be possible to register an instance of a subclass of `dict` such as
`collections.Counter` and have the `redbot.core.config.Group` cast the returned value to that type
before returning it. With this change, `redbot.core.config.Group` will now always return an instance of
`dict` containing only base JSON types, without subclasses.
``Config.*_from_id/*_from_ids()`` methods now raise when ``int`` is not passed
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To help avoid setting values under non-integer keys, we now raise an error
when the passed argument is not an ``int``.
We're not expecting any **proper** usage of these methods to be affected
and this should only help detect bugs earlier.
``Case.message`` can now be ``discord.PartialMessage``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This change allowed to us to make enormous performance improvements (subsecond durations
compared to many minutes) to `modlog.get_all_cases()` and commands that use it
such as the commonly used ``[p]casesfor`` command.
With this change, we no longer fetch the whole `discord.Message` object for case's message
and instead only construct a `discord.PartialMessage` object for it. This object is rarely if ever needed so it is unlikely to affect a lot of code. Additionally, this change doesn't apply to `modlog.create_case()` which will still return a `Case` object with `message <Case.message>` attribute set to an instance of `discord.Message` or ``None``.
If you have a reason to use a full message object, you can use :meth:`discord.PartialMessage.fetch()`
to fetch it.
Example:
.. code:: python
from redbot.core import commands
class MyCog(commands.Cog):
@commands.guild_only()
@commands.command()
async def command(self, ctx, case_number: int):
case = await modlog.get_case(case_number, ctx.guild, ctx.bot)
if case.message is None:
await ctx.send("No message is available for this case.")
return
await ctx.send(
"People reacted to this modlog case with: "
+ ", ".join(case.message.reactions)
)
After:
.. code:: python
import discord
from redbot.core import commands
class MyCog(commands.Cog):
@commands.guild_only()
@commands.command()
async def command(self, ctx, case_number: int):
case = await modlog.get_case(case_number, ctx.guild, ctx.bot)
if case.message is None:
await ctx.send("No message is available for this case.")
return
try:
msg = await case.message.fetch()
except discord.NotFound:
await ctx.send("No message is available for this case.")
else:
await ctx.send(
"People reacted to this modlog case with: "
+ ", ".join(msg.reactions)
)
``redbot.core.bot.RedBase`` has been merged into ``redbot.core.bot.Red``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Historically, ``RedBase`` existed to allow using Red for self/user bots back when
it was not against Discord's Terms of Service. Since this is no longer a concern,
everything from ``RedBase`` have been moved directly to `Red` and ``RedBase`` class
has been removed.
If you were using ``RedBase`` for runtime type checking or type annotations,
you should now use `Red` instead. Since both of these classes resided in the same
module, it should be a matter of simple find&replace.
``Context.maybe_send_embed()`` requires content with length of 1-2000 characters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`Context.maybe_send_embed()` now requires the message's length to be
between 1 and 2000 characters.
Since the length limits for regular message content and embed's description are
different, it is easy to miss an issue with inappropriate handling of length limits
during development. This change should aid with early detection of such issue by
consistently rejecting messages with length that can't be used with
both embed and non-embed messages.
This change only affects code that is already not guaranteed to work.
You should make sure that your code properly handles message length limits.
``menu()`` listens to both reaction add and remove
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Listening only to reaction add results in bad user experience.
If the bot had Manage Messages permission, it removed the user's reaction
so that they don't have to click twice but this comes with a noticeable delay.
This issue is even more noticeable under load, when the bot ended up hitting
Discord-imposed rate limits.
If your calls to `menu()` are using the default controls (``redbot.core.utils.menus.DEFAULT_CONTROLS``),
you don't have to do anything.
Otherwise, you should ensure that your custom functions used for the menu controls
do not depend on this behavior in some way. In particular, you should make sure that
your functions do not automatically remove the author's reaction.
Here's an example code that needs to be updated:
.. code:: python
import contextlib
import discord
from redbot.core.utils.menus import close_menu, menu
CUSTOM_CONTROLS = {
"\N{CROSS MARK}": close_menu,
"\N{WAVING HAND SIGN}": custom_control,
}
async def custom_control(ctx, pages, controls, message, page, timeout, emoji):
perms = message.channel.permissions_for(ctx.me)
if perms.manage_messages: # Can manage messages, so remove react
with contextlib.suppress(discord.NotFound):
await message.remove_reaction(emoji, ctx.author)
await ctx.send("Hello world!")
return await menu(ctx, pages, controls, message=message, page=page, timeout=timeout)
async def show_menu(ctx):
await menu(ctx, ["Click :wave: to say hi!"], CUSTOM_CONTROLS)
To make this code work on Red 3.5 and higher, you need to update ``custom_control()`` function:
.. code:: python
async def custom_control(ctx, pages, controls, message, page, timeout, emoji):
await ctx.send("Hello world!")
return await menu(ctx, pages, controls, message=message, page=page, timeout=timeout)

View File

@@ -0,0 +1,3 @@
This page lists all functionalities that are currently deprecated, features that have been removed in past minor releases, and any other backward incompatible changes that are planned or have been removed in past minor releases. The objective is to give users a clear rationale why a certain change has been made, and what alternatives (if any) should be used instead.
These changes are sorted (in their respective sections) in a reverse chronological order.

View File

@@ -0,0 +1,42 @@
.. _deprecated-functionality:
===================================================
Future changes (currently deprecated functionality)
===================================================
.. include:: _includes/preamble.rst
.. contents::
:depth: 4
:local:
For Developers
**************
Removals
~~~~~~~~
``SimpleMenu.select_menu`` attribute
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. deprecated-removed:: 3.5.14 60
The `SimpleMenu.select_menu` attribute has been deprecated.
Any behaviour enabled by the usage of this attribute should no longer be depended on.
If you need this for something and cannot replace it with the other functionality,
create an issue on Red's issue tracker.
Downloader's shared libraries
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. deprecated:: 3.2.0
Shared libraries have been deprecated in favor of pip-installable libraries.
Shared libraries do not provide any functionality that can't already be achieved
with pip requirements *and* as such don't provide much value in return for
the added complexity.
Known issues, especially those related to hot-reload, were not handled automatically
for shared libraries, same as they are not handled for the libraries installed
through pip.

View File

@@ -0,0 +1,12 @@
.. Backward incompatible changes list
Backward incompatible changes
=============================
.. include:: _includes/preamble.rst
.. toctree::
:maxdepth: 4
future
3.5

View File

@@ -12,13 +12,13 @@ Welcome to Red - Discord Bot's documentation!
:maxdepth: 1
:caption: Installation Guides:
install_windows
install_linux_mac
install_guides/index
bot_application_guide
update_red
about_venv
autostart_systemd
autostart_windows
autostart_mac
autostart_systemd
.. toctree::
:maxdepth: 2
@@ -33,13 +33,15 @@ Welcome to Red - Discord Bot's documentation!
:caption: User guides:
getting_started
intents
cog_guides/admin
cog_guides/alias
cog_guides/bank
cog_guides/audio
cog_guides/cleanup
cog_guides/cog_manager_ui
cog_guides/core
cog_guides/customcommands
cog_guides/dev
cog_guides/downloader
cog_guides/economy
cog_guides/filter
@@ -61,37 +63,31 @@ Welcome to Red - Discord Bot's documentation!
guide_migration
guide_cog_creation
guide_slash_and_interactions
guide_publish_cogs
guide_cog_creators
framework_apikeys
framework_bank
framework_bot
framework_checks
framework_cogmanager
framework_commands
framework_app_commands
framework_config
framework_datamanager
framework_events
framework_i18n
framework_modlog
framework_rpc
framework_tree
framework_utils
version_guarantees
.. toctree::
:maxdepth: 2
:caption: Changelogs:
changelog_3_4_0
changelog_3_3_0
release_notes_3_2_0
changelog_3_2_0
changelog_3_1_0
.. toctree::
:maxdepth: 2
:caption: Others
changelog
incompatible_changes/index
host-list

View File

@@ -0,0 +1,23 @@
------------------------------
Creating a Virtual Environment
------------------------------
.. tip::
If you want to learn more about virtual environments, see page: `about-venvs`
We require installing Red into a virtual environment. Don't be scared, it's very
straightforward.
**************
Using ``venv``
**************
This is the quickest way to get your virtual environment up and running, as `venv` is shipped with
python.
First, choose a directory where you would like to create your virtual environment. It's a good idea
to keep it in a location which is easy to type out the path to. From now, we'll call it
``redenv`` and it will be located in your home directory.
Create your virtual environment with the following command:

View File

@@ -0,0 +1,10 @@
And activate it with the following command:
.. prompt:: bash
source ~/redenv/bin/activate
.. important::
You must activate the virtual environment with the above command every time you open a new
shell to run, install or update Red.

View File

@@ -0,0 +1,7 @@
.. include:: _includes/_create-env-with-venv-intro.rst
.. prompt:: bash
python3.10 -m venv ~/redenv
.. include:: _includes/_create-env-with-venv-outro.rst

View File

@@ -0,0 +1,7 @@
.. include:: _includes/_create-env-with-venv-intro.rst
.. prompt:: bash
python3.11 -m venv ~/redenv
.. include:: _includes/_create-env-with-venv-outro.rst

View File

@@ -0,0 +1,7 @@
.. include:: _includes/_create-env-with-venv-intro.rst
.. prompt:: bash
python3.9 -m venv ~/redenv
.. include:: _includes/_create-env-with-venv-outro.rst

View File

@@ -0,0 +1,52 @@
--------------
Installing Red
--------------
Choose one of the following commands to install Red.
To install without additional config backend support:
.. prompt:: bash
:prompts: (redenv) $
python -m pip install -U pip wheel
python -m pip install -U Red-DiscordBot
Or, to install with PostgreSQL support:
.. prompt:: bash
:prompts: (redenv) $
python -m pip install -U pip wheel
python -m pip install -U "Red-DiscordBot[postgres]"
--------------------------
Setting Up and Running Red
--------------------------
After installation, set up your instance with the following command:
.. prompt:: bash
:prompts: (redenv) $
redbot-setup
This will set the location where data will be stored, as well as your
storage backend and the name of the instance (which will be used for
running the bot).
Once done setting up the instance, run the following command to run Red:
.. prompt:: bash
:prompts: (redenv) $
redbot <your instance name>
It will walk through the initial setup, asking for your token and a prefix.
You can find out how to obtain a token with
`this guide <../bot_application_guide>`.
.. tip::
If it's the first time you're using Red, you should check our `getting-started` guide
that will walk you through all essential information on how to interact with Red.

View File

@@ -0,0 +1,28 @@
.. include:: _includes/supported-arch-x64+aarch64.rst
.. include:: _includes/linux-preamble.rst
-------------------------------
Installing the pre-requirements
-------------------------------
Red Hat Enterprise Linux (RHEL) 8.8-8.x and its derivatives have all required packages available in official repositories.
Install them with dnf:
.. prompt:: bash
sudo dnf -y update
sudo dnf -y group install development
sudo dnf -y install python3.11 python3.11-devel java-17-openjdk-headless nano git
Set ``java`` executable to point to Java 17:
.. prompt:: bash
sudo alternatives --set java "java-17-openjdk.$(uname -i)"
.. Include common instructions:
.. include:: _includes/create-env-with-venv3.11.rst
.. include:: _includes/install-and-setup-red-unix.rst

View File

@@ -0,0 +1,20 @@
.. include:: _includes/supported-arch-x64+aarch64.rst
.. include:: _includes/linux-preamble.rst
-------------------------------
Installing the pre-requirements
-------------------------------
Red Hat Enterprise Linux (RHEL) 9.2-9.x and its derivatives have all required packages available in official repositories.
Install them with dnf:
.. prompt:: bash
sudo dnf -y install python3.11 python3.11-devel git java-17-openjdk-headless @development nano
.. Include common instructions:
.. include:: _includes/create-env-with-venv3.11.rst
.. include:: _includes/install-and-setup-red-unix.rst

View File

@@ -0,0 +1,5 @@
.. warning::
For safety reasons, DO NOT install Red with a root user. If you are unsure how to create
a new user on Linux, see `DigitalOcean's tutorial: How To Create a New Sudo-enabled User
<https://www.digitalocean.com/community/tutorials/how-to-create-a-new-sudo-enabled-user-on-ubuntu-20-04-quickstart>`_.

View File

@@ -0,0 +1,2 @@
| We support hosting Red on computers running an **aarch64** or **armv7l** version of this system.
| You can read more about systems and processor architectures we support in our `end-user-guarantees`.

Some files were not shown because too many files have changed in this diff Show More