Compare commits

..

237 Commits

Author SHA1 Message Date
github-actions[bot]
b325e8360c [3.4] Version bump to 3.4.19 (#6087)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-20 04:03:36 +02:00
github-actions[bot]
9f4202bea3 [3.4] Automated Crowdin downstream (#6088)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-20 04:03:11 +02:00
Red-GitHubBot
455d2fdf7a [3.4] Red 3.4.19 - Changelog (#6082) (#6086)
Co-authored-by: Jakub Kuczys <me@jacken.men>
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-20 03:53:51 +02:00
Red-GitHubBot
5efbd19a3d [3.4] Add require_var_positional=True to [p]selfroleset add/remove (#6084) (#6085)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-20 01:44:19 +00:00
Red-GitHubBot
69f757758d [3.4] Disallow NaN and Infinity in Trivia CONFIG schema (#5949) (#6083)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-20 00:58:15 +00:00
Red-GitHubBot
5367246dc2 [3.4] Use the contributor list URL instead of the org in [p]info (#6079) (#6081)
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: Kowlin <git@wyvern.blue>
2023-04-20 00:36:19 +00:00
Red-GitHubBot
7cf1620b89 [3.4] Updated excluded features (#5919) (#6080)
Co-authored-by: Kowlin <10947836+Kowlin@users.noreply.github.com>
Co-authored-by: Zephyrkul <23347632+Zephyrkul@users.noreply.github.com>
2023-04-20 00:07:05 +00:00
Jakub Kuczys
6f4063e4a8 Fix line endings... 2023-04-20 01:10:09 +02:00
Jakub Kuczys
ce2093d0d1 [3.4] Improve changelog format (#5602) (#6078)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2023-04-19 23:09:03 +00:00
Red-GitHubBot
e14f7861a6 [3.4] Fix typos issues (#5977) (#6077)
Co-authored-by: Tom Marcot <113185315+BigPeep0doo@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-19 22:39:48 +00:00
Jakub Kuczys
47193b63b0 [3.4] [Modlog] Make modlogset cases docstring less vague (#5352) (#6076)
Co-authored-by: OofChair <oofchairr@gmail.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2023-04-19 22:37:12 +00:00
Jakub Kuczys
dd9cf4da6e [3.4] [Docs] Use gender neutral language in remaining places where it isn't (#5873) (#6075)
Co-authored-by: Leet <36166244+leetfin@users.noreply.github.com>
2023-04-19 22:36:05 +00:00
Jakub Kuczys
f6ecc80f7d [3.4] Improve topography trivia (#5572) (#6074)
Co-authored-by: Visne <39844191+Visne@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-19 22:35:14 +00:00
Jakub Kuczys
4a66c4910f [3.4] docs: fix typos (#5989) (#6073)
Co-authored-by: Lioness100 <jchickmm2@gmail.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-19 22:33:20 +00:00
Red-GitHubBot
eb3afe6164 [3.4] New Music Trivia List (#5687) (#6072)
Co-authored-by: Lemon Rose <78662983+japandotorg@users.noreply.github.com>
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2023-04-19 22:31:44 +00:00
Jakub Kuczys
a6009c7a3a [3.4] Add brew shellenv to shell profile in macOS install guide (#5993) (#6071) 2023-04-19 22:30:05 +00:00
Red-GitHubBot
d3363d560c [3.4] [Docs] Dev Cog Guide (#5869) (#6058)
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 22:19:47 +00:00
Red-GitHubBot
65946b688d [3.4] Add JSON Schema for Trivia Lists (#5565) (#6070)
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 22:16:26 +00:00
Red-GitHubBot
2364842dab [3.4] [Audio] Don't escape formatting on Playlist Enqueued message (#6025) (#6069)
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2023-04-19 22:15:21 +00:00
Red-GitHubBot
77847a2b8d [3.4] Fallback to asyncio's default exception handler when possible (#5813) (#6068)
Co-authored-by: Jakub Kuczys <me@jacken.men>
Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2023-04-19 22:13:39 +00:00
Red-GitHubBot
218140c7b0 [3.4] [Trivia] Handle FileNotFoundError when adding a custom trivia list (#5950) (#6067)
Co-authored-by: Leet <36166244+leetfin@users.noreply.github.com>
2023-04-19 22:12:40 +00:00
Red-GitHubBot
d252b71be7 [3.4] [Mod] Hide config migration commands (#5870) (#6066)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-19 22:11:43 +00:00
Red-GitHubBot
760db11589 [3.4] [Dev] Fix __repr__() errors in REPL when referencing an instance of a class & catch Exception (#5794) (#6065)
Co-authored-by: Kreusada Tagiazala <67752638+Kreusada@users.noreply.github.com>
2023-04-19 22:10:46 +00:00
Red-GitHubBot
05ca09c47c [3.4] [CustomCom] Fix [p]cc cooldown docstring & docs (#5914) (#6064)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-19 22:09:32 +00:00
Red-GitHubBot
e51953bc42 [3.4] Add serverlock warning to [p]invite (#5898) (#6063)
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2023-04-19 22:07:27 +00:00
Red-GitHubBot
1f285c6e7f [3.4] fix usage/syntax info in command_audioset_autoplay_playlist docstring (#5592) (#6062)
Co-authored-by: Alex <58824393+vertyco@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-19 22:06:29 +00:00
Red-GitHubBot
fcaa2e7d96 [3.4] Case-Insensitive SelfRole (#3865) (#6061)
Co-authored-by: AA <chasehult@gmail.com>
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-19 22:05:53 +00:00
Red-GitHubBot
37730110d9 [3.4] [General] Fix [p]lmgtfy URL generation (#5909) (#6060)
Co-authored-by: Ryan <50505980+ryan5453@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 22:04:55 +00:00
Red-GitHubBot
1afc19afc7 [3.4] Harrypotter questions (#5887) (#6059)
Co-authored-by: Ankur Gupta <52248401+Ankur391@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
Co-authored-by: Lemon Rose <78662983+japandotorg@users.noreply.github.com>
2023-04-19 22:03:07 +00:00
Red-GitHubBot
dbb59af4ad [3.4] Fix typo in league of legends trivia list (#5888) (#6057)
Co-authored-by: Mark Heath <MHLoppy@users.noreply.github.com>
2023-04-19 21:59:59 +00:00
Red-GitHubBot
25094c6076 [3.4] [Mod] Account for roles in mention spam (#5388) (#6056)
Co-authored-by: Vexed <vex@vexcodes.com>
Co-authored-by: Kowlin <10947836+Kowlin@users.noreply.github.com>
2023-04-19 21:58:40 +00:00
Red-GitHubBot
135d7c6d6d [3.4] Get rid of localized guild feature list in serverinfo (#5830) (#6055)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 21:58:00 +00:00
Red-GitHubBot
b4c2d9ffa1 [3.4] Use bot embed colour in [p]dm command (#5868) (#6054)
Co-authored-by: Kreusada Lavranocoyaskalas <67752638+Kreusada@users.noreply.github.com>
2023-04-19 21:56:11 +00:00
Red-GitHubBot
77f8cf39e7 [3.4] [Trivia] Various typo fixes. (#5867) (#6053)
Co-authored-by: Honkertonken <94032937+Honkertonken@users.noreply.github.com>
2023-04-19 21:55:16 +00:00
Red-GitHubBot
9b17f30f94 [3.4] Fix Tunnel.message_forwarder's handling of >2000 strings (#5844) (#6052)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 21:54:24 +00:00
Red-GitHubBot
0b7d2fd74f [3.4] Renamed the country of Turkey to Türkiye (#5795) (#6051)
Co-authored-by: TheThomanski <15034759+TheThomanski@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-19 21:53:27 +00:00
Red-GitHubBot
e71674dc4d [3.4] [Docs] Update bot hosting list. (#5928) (#6050)
Co-authored-by: MAX <63972751+ltzmax@users.noreply.github.com>
2023-04-19 23:53:00 +02:00
Red-GitHubBot
be843581dc [3.4] [Admin] add reasoning to addrole & removerole. (#5927) (#6049)
Co-authored-by: Lemon Rose <78662983+japandotorg@users.noreply.github.com>
Co-authored-by: Matt <psykzz@users.noreply.github.com>
2023-04-19 23:52:38 +02:00
Red-GitHubBot
36b75f8600 [3.4] [Trivia] Who's that Pokemon? Generation VII and VIII trivia lists (#5890) (#6048)
Co-authored-by: SnappyDragon64 <pg61151@gmail.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 23:51:50 +02:00
Red-GitHubBot
097de597fb [3.4] [Docs] Windows batch autostart docs (#5996) (#6047)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2023-04-19 23:17:09 +02:00
Jakub Kuczys
ad5395fee0 [3.4] Improve validation in trivia (#5947) (#6046)
Co-authored-by: Vexed <vex@vexcodes.com>
2023-04-19 23:13:40 +02:00
Red-GitHubBot
44f67d792f [3.4] Update intents screenshot (#5936) (#6042)
Co-authored-by: sravan <miniclip1956@gmail.com>
2023-04-19 23:12:55 +02:00
Red-GitHubBot
b9ff4e9b96 [3.4] Update installation URLs for Homebrew and Chocolatey (#5776) (#6041)
Co-authored-by: Jakub Kuczys <me@jacken.men>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2023-04-19 23:04:51 +02:00
Red-GitHubBot
20dfe8ad7d [3.4] Properly handle missing schemas/tables in PostgreSQL driver (#5855) (#6045)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 23:02:51 +02:00
Red-GitHubBot
ce5417602f [3.4] Use usage attr to remove appended underscore for from_ parameter in [p]reorderpath (#5946) (#6044)
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2023-04-19 23:01:41 +02:00
Red-GitHubBot
6f75c0f13f [3.4] Fix usage of file/folder names without suffix in Downloader (#5938) (#6043)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 23:01:28 +02:00
Red-GitHubBot
c2376e6851 [3.4] Update enqueued track message to distinguish album from playlist (#5569) (#6040)
Co-authored-by: Ryan <50505980+ryan5453@users.noreply.github.com>
Co-authored-by: aleclol <50505980+aleclol@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 23:00:41 +02:00
Red-GitHubBot
230044eb8f [3.4] Document setting overrides in Trivia list format (#5390) (#6039)
Co-authored-by: Vexed <gh.vexed@gmail.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 22:59:53 +02:00
Red-GitHubBot
7d6fdd954a [3.4] Change/Update casing in findcog command. (#5772) (#6038)
Co-authored-by: Honkertonken <94032937+Honkertonken@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 22:59:33 +02:00
Red-GitHubBot
08e9a5a587 [3.4] Fix unintended moving *between* VCs when channel muting (#5854) (#6037)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 20:47:59 +00:00
Red-GitHubBot
fd30c9739a [3.4] [Audio] Update Lavalink.jar build (#6033) (#6036)
Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 22:33:31 +02:00
Jakub Kuczys
fff509caa5 [3.4] Add Lavalink version parsing (#5872) (#6032) 2023-04-19 21:25:09 +02:00
Jakub Kuczys
c755a214d0 Nuke labeler workflow from the backport branch 2023-04-19 04:26:03 +02:00
Red-GitHubBot
0d44b0cd9d [3.4] Switch the Publish Release workflow to use OpenID Connect (#6012) (#6031)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-19 01:37:57 +00:00
Jakub Kuczys
4a91f77410 [3.4] Update Python versions in install instructions (#5960) 2023-01-06 04:19:42 +01:00
Red-GitHubBot
df64e7f170 [3.4] Fix flaky CI caused by flake8's flakiness (GitHub migration) (#5910) (#5957)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-01-06 03:23:27 +01:00
Jakub Kuczys
102130c47d [3.4] Pin tox to <4 (#5959) 2023-01-06 02:20:35 +00:00
Red-GitHubBot
5a9881f672 [3.4] Update workflow versions (#5789) (#5958)
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2023-01-06 03:15:08 +01:00
github-actions[bot]
5f6ecf4ea1 [3.4] Version bump to 3.4.19.dev1 (#5834)
Version bump to 3.4.19.dev1

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-08-15 11:59:54 +00:00
github-actions[bot]
1fa76bf43f [3.4] Version bump to 3.4.18 (#5832)
Version bump to 3.4.18

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-08-15 13:14:30 +02:00
github-actions[bot]
0476102851 [3.4] [i18n] Automated Crowdin downstream (#5833)
Automated Crowdin downstream

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-08-15 13:13:52 +02:00
Red-GitHubBot
1180d8b6bc [3.4] Red 3.4.18 - Changelog (#5829) (#5831)
(cherry picked from commit 008fb0f042)

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

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-08-15 10:56:57 +00:00
Jakub Kuczys
d5b27f71b6 [3.4] Bump Red-Lavalink version to 0.9.4 (#5828) 2022-08-15 11:57:33 +02:00
Jakub Kuczys
af0da1b380 [3.4] Use the new ready line from LL dev build 1352+ (#5775) (#5826)
* 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+
(cherry picked from commit a32f10d758)

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-08-14 21:12:16 +02:00
Jakub Kuczys
ab767dbee5 [3.4] Drop openSUSE Leap 15.2, add openSUSE Leap 15.4 (#5777) (#5825)
* Add openSUSE Leap 15.4 to list in version guarantees

* Drop openSUSE Leap 15.2
(cherry picked from commit 0cc964b87c)

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-08-14 20:50:42 +02:00
Red-GitHubBot
357808dea9 [3.4] Update documentation about messages intent (#5798) (#5800)
* Update documentation about messages intents

* Remove note

* Update screenshot
(cherry picked from commit a0f72ed7dd)

Co-authored-by: River <18037011+RheingoldRiver@users.noreply.github.com>

Co-authored-by: River <18037011+RheingoldRiver@users.noreply.github.com>
2022-08-14 18:38:45 +02:00
aikaterna
752bb5c955 [3.4] [Audio] Update application.yml for new Lavalink.jar (#5821)
Update application.yml
2022-08-13 21:29:43 +02:00
aikaterna
1c7b990dcc [3.4] [Audio] Update Lavalink.jar build (#5822)
Update manager.py for the new build number
2022-08-13 20:58:50 +02:00
Red-GitHubBot
33ad3d2166 [3.4] Remove Temurin version pin on Windows (#5815) (#5816)
(cherry picked from commit 87a9c10369)

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

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-08-10 03:32:13 +02:00
github-actions[bot]
6f287ec2f3 [3.4] Version bump to 3.4.18.dev1 (#5770)
Version bump to 3.4.18.dev1

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-07 06:34:07 +02:00
github-actions[bot]
cad381cc78 [3.4] Version bump to 3.4.17 (#5767)
Version bump to 3.4.17

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-07 05:43:23 +02:00
Red-GitHubBot
d7e7a39a96 [3.4] Red 3.4.17 - Changelog (#5763) (#5764)
(cherry picked from commit c00f8b3aab)

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

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-07 05:43:01 +02:00
github-actions[bot]
4be15c9832 [3.4] [i18n] Automated Crowdin downstream (#5768)
Automated Crowdin downstream

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-07 05:42:35 +02:00
Red-GitHubBot
e9a9b22d0f [3.4] Include commit hash for each cog inside [p]cog listpinned (#5563) (#5761)
* [3.4] 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()

(cherry picked from commit 9c11e85bb4)

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

* Don't use _() inside f-strings in 3.4 as it uses older redgettext

* style

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-05 19:38:55 +02:00
Red-GitHubBot
f9b6f05415 [3.4] Allow sending the file in follow-up message in ACL upload commands (#5685) (#5760)
Added follow up message when uploading acl file in permissions cog.
(cherry picked from commit 5522f909bd)

Co-authored-by: Matt Chandra <55866950+matcha19@users.noreply.github.com>

Co-authored-by: Matt Chandra <55866950+matcha19@users.noreply.github.com>
2022-06-05 15:53:41 +00:00
Jakub Kuczys
b4af4f650c [3.4] Prepend emojis to better differentiate between [p]canrun responses (#5711) (#5759)
* 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

(cherry picked from commit 1fd9324171)

Co-authored-by: Kreusada <67752638+Kreusada@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>
2022-06-05 15:45:53 +00:00
Jakub Kuczys
c4637aa02b [3.4] [Modlog] Check if guild is unavailable (#5647) (#5758)
fix for  AttributeError: 'NoneType' object has no attribute 'guild_permissions'
(cherry picked from commit 485e6837ca)

Co-authored-by: Candy <28566705+mina9999@users.noreply.github.com>

Co-authored-by: Candy <28566705+mina9999@users.noreply.github.com>
2022-06-05 15:23:38 +00:00
Red-GitHubBot
c7ba118e7c [3.4] Add use_spoilers property to TRIVIA_LIST_SCHEMA schema (#5566) (#5757)
* Add `use_spoilers` to schema

* Update session.py

(cherry picked from commit cc3c1a6a95)

Co-authored-by: Kreusada <67752638+Kreusada@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: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-05 15:09:47 +00:00
Red-GitHubBot
be8df25ecf [3.4] Escape Discord's formatting in [p]servers command (#5744) (#5756)
* Escape formatting in `[p]servers` command

* style...
(cherry picked from commit 9d50a851eb)

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2022-06-05 14:22:02 +00:00
Red-GitHubBot
f1d359f816 [3.4] Use Guild.fetch_ban() over Guild.bans() (#5656) (#5748)
(cherry picked from commit d932abad16)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-06-05 16:02:32 +02:00
Jakub Kuczys
25019d562b [3.4] Add RHEL 9 (+ derivatives) install guide (#5721) (#5755)
* 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.
(cherry picked from commit ee69f6e17f)

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-05 04:16:45 +02:00
Jakub Kuczys
1e95063859 [3.4] Update Visual Studio Build Tools to 2022 (#5702). (#5754)
(cherry picked from commit 22ede49462)

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-05 02:10:26 +00:00
Jakub Kuczys
a34bab9881 [3.4] Add Ubuntu 22.04 install guide (#5720) (#5753)
* Add Ubuntu 22.04 install guide

* Add Ubuntu 22.04 to End-user guarantees

* Add missing information about supported arches in install guide.
(cherry picked from commit e93057093e)

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-05 01:11:25 +00:00
Jakub Kuczys
842096171e [3.4] Wait for two 'Started Launcher' lines before connecting to managed LL (#5751) (#5752)
[3.4] Wait for two 'Started Launcher' lines before connecting to managed LL (#5751).
(cherry picked from commit cf85a6470f)

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-05 02:51:56 +02:00
Jakub Kuczys
f436998625 [3.4] Bump minimum Fedora version to 35 (#5701) (#5750)
[3.4] 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.
(cherry picked from commit 9cdcf07773)

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-04 15:37:56 +00:00
Red-GitHubBot
6f58ddd520 [3.4] Use Temurin 11 instead of discontinued AdoptOpenJDK on macOS (#5718) (#5749)
(cherry picked from commit 6bb11ad227)

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

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-04 13:26:27 +00:00
Red-GitHubBot
33f6193bcb [3.4] [General] update [p]serverinfo 1 guild features. (#5655) (#5747)
(cherry picked from commit 23023da09c)

Co-authored-by: MAX <63972751+ltzmax@users.noreply.github.com>

Co-authored-by: MAX <63972751+ltzmax@users.noreply.github.com>
2022-06-04 01:15:24 +00:00
Red-GitHubBot
032fe6906b [3.4] Add FIFA World Cup Trivia List (#5639) (#5746)
* 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>

(cherry picked from commit 22df591db2)

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

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-06-04 01:14:32 +00:00
Red-GitHubBot
95fe193871 [3.4] Various updates to geography trivia (#5638) (#5745)
* Various updates to geography trivia

* Remove discriminator from AUTHOR key
(cherry picked from commit 955b40ac6d)

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2022-06-04 01:13:23 +00:00
Red-GitHubBot
9ff2085b94 [3.4] Avoid potential memory leak in Filter cog (#5578) (#5735)
(cherry picked from commit eeffbf8231)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-06-04 03:05:44 +02:00
Red-GitHubBot
d8bbf1c4c7 [3.4] Catch overflow errors for mutes time conversion (#5605) (#5739)
(cherry picked from commit c8ff3c4cce)

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

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>
2022-06-04 03:04:13 +02:00
Red-GitHubBot
d88bdba092 [3.4] Update discord-ext-menus vendor to latest commit (#5579) (#5736)
Vendor `discord.ext.menus` from commit `fbb8803779373357e274e1540b368365fd9d8074` at Rapptz/discord-ext-menus
(cherry picked from commit 78dc1d4cd8)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-06-04 03:03:25 +02:00
Red-GitHubBot
e92a25a1b5 [3.4] Fix spelling error (#5588) (#5737)
(cherry picked from commit 2ee64618af)

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2022-06-04 03:03:00 +02:00
Red-GitHubBot
bc9404e9b2 [3.4] Fix grammar in uptime command (#5596) (#5738)
(cherry picked from commit 58d8cb4d1f)

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

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>
2022-06-04 03:02:52 +02:00
Red-GitHubBot
9d81cdf4ea [3.4] Update Kazakh Capital City Answer (#5599) (#5740)
(cherry picked from commit 335988c916)

Co-authored-by: Leothelion <zkogdxdkur@p.monash.edu>

Co-authored-by: Leothelion <zkogdxdkur@p.monash.edu>
2022-06-04 03:02:25 +02:00
Red-GitHubBot
17f7bd15bf [3.4] Reference how to reply in the [p]contact command with embed settings (#5529) (#5733)
(cherry picked from commit c9a0971945)

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2022-06-04 03:02:04 +02:00
Red-GitHubBot
3fbf426003 [3.4] add timestamps to all audio embeds (#5632) (#5741)
(cherry picked from commit 78e64ec559)

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2022-06-04 03:01:37 +02:00
Red-GitHubBot
aa2214f13f [3.4] Fix typo in Audio seek command description (#5530) (#5734)
(cherry picked from commit 05cd11b657)

Co-authored-by: untir_l <87096069+untir-l@users.noreply.github.com>

Co-authored-by: untir_l <87096069+untir-l@users.noreply.github.com>
2022-06-04 03:00:59 +02:00
Red-GitHubBot
432de5cca8 [3.4] [Audio] Fix UnboundLocalError in edge case (#5394) (#5732)
* Fix UnboundLocalError in edge case

* Fix typehint for fetch

* Style
(cherry picked from commit b05933274a)

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2022-06-04 03:00:51 +02:00
Red-GitHubBot
bbd71cf6e3 [3.4] [Audio] Update Lavalink.jar build (#5712) (#5714)
(cherry picked from commit 1e8f4fc2a2)

Co-authored-by: aikaterna <20862007+aikaterna@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>
2022-06-04 03:00:29 +02:00
Red-GitHubBot
e09f9a4914 [3.4] Replace removed git224 package with git236 in CentOS 7 guide (#5700) (#5731)
(cherry picked from commit 3f1d02598e)

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

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-02 11:01:52 +00:00
Red-GitHubBot
aee9961dba [3.4] Pin Temurin version on Windows until fixed version exists (#5717) (#5730)
(cherry picked from commit 53bf387f01)

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

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-06-02 10:57:34 +00:00
Jakub Kuczys
ff21429f2b [3.4] Add CentOS Stream 9 docs (#5537) (#5729)
(cherry picked from commit 61c73f2f1f)

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-06-02 12:48:10 +02:00
Jakub Kuczys
afaa1e2846 [3.4] Bump Python version in install guides to 3.9.13 (#5719)
Bump Python version in install guides to 3.9.13
2022-06-02 12:47:54 +02:00
Red-GitHubBot
e71415c7cd [3.4] Remove specific number of steps in update docs (#5556) (#5727)
* 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>

(cherry picked from commit 9ab307c1ef)

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

Co-authored-by: Vexed <vex@vexcodes.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-06-02 12:46:47 +02:00
Red-GitHubBot
65779cf70b [3.4] Emphasize lines with things to replace in autostart guides (#5548) (#5726)
* Emphasize lines with things to replace in autostart guides

* Use 'default' pygments style instead
(cherry picked from commit 669f3e3073)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-06-02 12:46:34 +02:00
Red-GitHubBot
a3a6e5cbaf [3.4] Disallow crawling of versioned documentation in robots.txt (#5549) (#5725)
(cherry picked from commit e33985f969)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-06-02 12:46:15 +02:00
Red-GitHubBot
dce0b713fe [3.4] Use absolute path to which to avoid aliases (#5547) (#5724)
(cherry picked from commit 841b922e9c)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2022-06-02 12:45:48 +02:00
Red-GitHubBot
07d165aeb7 [3.4] Fix for using redbot name --edit for changing data location (#5541) (#5723)
* Update __main__.py

* style
(cherry picked from commit d13d02ebfc)

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2022-06-02 12:44:10 +02:00
Red-GitHubBot
1ffdefc922 [3.4] Fix changing instance name with redbot --edit (#5540) (#5722)
(cherry picked from commit 1cf497b128)

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2022-06-02 12:44:02 +02:00
Jakub Kuczys
ef43cc53bc [3.4] Bump Red-Lavalink to version 0.9.3 (#5716) 2022-06-02 12:38:58 +02:00
Red-GitHubBot
95583f03ee [3.4] Update Downloader's git tests to work with Git 2.36+ (#5690) (#5715)
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.
(cherry picked from commit ec55622418)

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

Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
2022-05-31 23:11:01 +00:00
github-actions[bot]
35e54b8e82 [3.4] Version bump to 3.4.17.dev1 (#5524)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-31 19:32:40 +01:00
github-actions[bot]
2a25d7e7c1 [3.4] Version bump to 3.4.16 (#5522)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-31 19:17:29 +01:00
github-actions[bot]
e8245d5075 [3.4] [i18n] Automated Crowdin downstream (#5523)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-31 18:16:56 +00:00
Red-GitHubBot
9982ec93be [3.4] Red 3.4.16 - Changelog (#5520) (#5521)
* Red 3.4.16 - Changelog

* Add contribs!
(cherry picked from commit fbe378657c)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-31 19:10:13 +01:00
jack1142
b1159555e1 [3.4] Temporarily update Arch instructions (#5518) 2021-12-31 18:53:48 +01:00
jack1142
eba691f234 [3.4] Fix 'Red._app_info' attribute error (#5517) 2021-12-31 18:53:30 +01:00
github-actions[bot]
7f7ab1ccc7 [3.4] Version bump to 3.4.16.dev1 (#5515)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-31 02:48:47 +00:00
github-actions[bot]
7e9e596141 [3.4] Version bump to 3.4.15 (#5513)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-31 03:31:11 +01:00
github-actions[bot]
23b3144c84 [3.4] [i18n] Automated Crowdin downstream (#5514)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-31 03:30:33 +01:00
Red-GitHubBot
3e8b51e117 [3.4] Red 3.4.15 - Changelog (#5504) (#5512)
* [3.4] 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

(cherry picked from commit a4ba249e27)

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

* Red->RedBase

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2021-12-31 03:21:39 +01:00
Red-GitHubBot
7245c778e4 [3.4] Only check for permissions when check_permissions is True (#5510) (#5511)
(cherry picked from commit 1ecbe6cebb)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-31 03:03:11 +01:00
Red-GitHubBot
3045989a5f [3.4] [Events] Rename guild remove listener (#5498) (#5509)
* [Events] on_guild_leave => on_guild_remove

* [Events] on_guild_leave => on_guild_remove
(cherry picked from commit a787033e1d)

Co-authored-by: Just-Jojo <62262765+Just-Jojo@users.noreply.github.com>

Co-authored-by: Just-Jojo <62262765+Just-Jojo@users.noreply.github.com>
2021-12-31 01:24:06 +00:00
Red-GitHubBot
f500062979 [3.4] Add non-interactive mode to redbot-setup (#5448) (#5508)
* 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`
(cherry picked from commit 8cc004f70f)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-31 02:11:11 +01:00
Red-GitHubBot
1027d95092 [3.4] Make embeds in help output consistent (#5452) (#5507)
* Add `check_permissions` kwarg to `bot.embed_requested()`

* Make embeds in help consistent regardless of why it's being sent
(cherry picked from commit ff7c146b62)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-31 01:03:11 +00:00
jack1142
fb08cd0520 [3.4] Fix error in tempban for guilds with unused vanity feature (#5472) 2021-12-31 01:45:55 +01:00
Red-GitHubBot
11cb5e3414 [3.4] Ensure Nitro users can't make CCs that are too long (#5499) (#5506)
* 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

(cherry picked from commit faab711ec8)

Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>

Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>
2021-12-31 00:41:19 +00:00
Red-GitHubBot
bbfe0d24ad [3.4] Update Lavalink.jar, Red-Lavalink and make changes to support it (#5474) (#5505)
* Lavalink error handling update

* comment typo

* address review

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

* Bump jar version

* Bump RLL version

(cherry picked from commit c49d0ec9d3)

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-31 00:18:03 +00:00
Red-GitHubBot
730c650bb4 [3.4] Fix short help in docstrings for core cogs and commands (#5502) (#5503)
* fix part of command description not appearing in the help command.

* Add more

(cherry picked from commit 337f58f9fb)

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

Co-authored-by: GhOsT <79806064+Arman0334@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-30 21:32:59 +00:00
Red-GitHubBot
cb4058ef10 [3.4] Allow mocking attachment-only msg, fix docstring, small refactor (#5446) (#5497)
* Use the logic from `[p]mock` in `[p]mockmsg`, fix docstring

* Let people mock attachment-only messages

* Use empty string, not None
(cherry picked from commit 9c05db1104)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-26 21:15:40 +00:00
Red-GitHubBot
09f19b0cf7 [3.4] Remove old note about updating Red in Unix install guides (#5439) (#5495)
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.
(cherry picked from commit 90406be9ea)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-26 21:01:56 +00:00
jack1142
93d47c1192 [3.4] Update supported OSes (add Alma Linux, RPi OS 11, drop EOL OSes) (#5440) (#5496)
* 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.
(cherry picked from commit d1df27bc14)

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-26 20:59:07 +00:00
Red-GitHubBot
44f4cb70de [3.4] Bump Python version in install guides to 3.9.9 (#5447) (#5494)
(cherry picked from commit e5b8fc4585)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-26 20:50:39 +00:00
Red-GitHubBot
19c710e63c [3.4] Make emptydisconnect disconnect when all vc members are bots (#5421) (#5492)
* [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>

(cherry picked from commit 5a047bf979)

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

Co-authored-by: Parnassius <Parnassius@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-26 18:15:57 +00:00
Red-GitHubBot
2a23da302e [3.4] Make invite URL part of public API (#5424) (#5491)
* [3.4] 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

(cherry picked from commit 6297bfcab6)

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

* Red->RedBase

Co-authored-by: Stonedestroyer <1307729+Stonedestroyer@users.noreply.github.com>
Co-authored-by: Matt <psykzz@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-26 02:18:16 +00:00
Red-GitHubBot
5dfd4cf998 [3.4] Fix RPC cog load and unload by returning dicts (#5453) (#5490)
* use dicts for CoreLogic package management returns

* address review

* failed_packages->notloaded_packages in _unload

(cherry picked from commit d27dbded8a)

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

Co-authored-by: Vexed <vex@vexcodes.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 20:13:30 +00:00
Red-GitHubBot
5356cca6ec [3.4] Show role payday amounts in economyset showsettings (#5457) (#5489)
* [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

(cherry picked from commit a228a0d0b3)

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

Co-authored-by: Alex <58824393+vertyco@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 17:09:52 +00:00
Red-GitHubBot
c26a603c8d [3.4] isolate direction of username within modlog (#5422) (#5488)
* isolate direction of username within modlog

* Add link to Unicode's usage

(cherry picked from commit 7db3339aba)

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

Co-authored-by: Jan <sentrycraft123@gmail.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 16:35:41 +00:00
jack1142
a52356c031 [3.4] [Core] Changed prefix length to 40. (#5476) (#5487)
* Update core_commands.py

* Docs yes facebook's metaverse

*jokes on me*

* meta

* forgot here

* Update core_commands.py

* Forgot here

* And forgot here
(cherry picked from commit b091f13df5)

Co-authored-by: MAX <63972751+ltzmax@users.noreply.github.com>

Co-authored-by: MAX <63972751+ltzmax@users.noreply.github.com>
2021-12-25 04:17:20 +01:00
Red-GitHubBot
09adae5213 [3.4] [Config] Add type-hints to _ValueContextManager methods (#5344) (#5486)
Without these type-hints, I've found that PyCharm misidentifies the returned type, causing a number of false positives in static type checking.
(cherry picked from commit e878483318)

Co-authored-by: Toby Harradine <Tobotimus@users.noreply.github.com>

Co-authored-by: Toby Harradine <Tobotimus@users.noreply.github.com>
2021-12-25 02:21:45 +00:00
Red-GitHubBot
f59b7fce37 [3.4] Update host list with new locations for Hetzner and Contabo (#5475) (#5485)
(cherry picked from commit 551e6d9f55)

Co-authored-by: MAX <63972751+ltzmax@users.noreply.github.com>

Co-authored-by: MAX <63972751+ltzmax@users.noreply.github.com>
2021-12-25 02:13:54 +00:00
Red-GitHubBot
ee513731be [3.4] Fix issues with loading config.json when it doesn't exist (#5416) (#5484)
* 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

(cherry picked from commit cef55459c6)

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

Co-authored-by: Vexed <vex@vexcodes.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 02:04:41 +00:00
Red-GitHubBot
5dd0c3b579 [3.4] Add necessary None checks to Core's usage of Requires.privilege_level (#5477) (#5483)
* Check if it has a privilege level

* Let's fix this in warnings too

(cherry picked from commit 5e527cb27d)

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

Co-authored-by: aleclol <50505980+aleclol@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-25 01:06:08 +00:00
jack1142
4afa4f77e0 [3.4] [Docs] Correct set api examples to be consistent for Spotify (#5444) (#5482)
* consistant usage

* switch audiodb to youtube

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>.
(cherry picked from commit bae85c35c1)

Co-authored-by: Ryan <yamikaitou@gmail.com>

Co-authored-by: Ryan <yamikaitou@gmail.com>
2021-12-25 00:21:25 +00:00
Red-GitHubBot
8c2d589c17 [3.4] Remove voice region field in [p]serverinfo (#5449) (#5481)
* [General] Remove guild region on serverinfo

* Remove in string too.
(cherry picked from commit 4e469ce15e)

Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>

Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>
2021-12-25 00:05:23 +00:00
Red-GitHubBot
c7a4a0feaf [3.4] Restrict [p]cleanupset notify to guild only (#5466) (#5480)
(cherry picked from commit e068294cc8)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-12-24 23:56:46 +00:00
Red-GitHubBot
cb5eafb9e3 [3.4] Add plural forms to the responses of [p]leave command (#5391) (#5479)
* 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

(cherry picked from commit 2c51182e8e)

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

Co-authored-by: krak3n <84792368+the-krak3n@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-12-24 23:52:46 +00:00
Red-GitHubBot
de3ec3f26a [3.4] [Mod] Typo in unban command (#5470) (#5478)
(cherry picked from commit 442cad7917)

Co-authored-by: sravan <miniclip1956@gmail.com>

Co-authored-by: sravan <miniclip1956@gmail.com>
2021-12-23 01:53:31 +00:00
Red-GitHubBot
5987f9aabc [3.4] Address common issues with load path configuration in docs (#5356) (#5436)
* 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
(cherry picked from commit 78c92cc766)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-11-02 20:42:05 +01:00
Red-GitHubBot
ea6eeedadf [3.4] Try to fix base branch in Publish Release workflow *again* (#5340) (#5434)
(cherry picked from commit f071ec09e2)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-11-02 12:03:53 +00:00
Red-GitHubBot
9f359dda26 [3.4] Modernize syntax in chat formatting module and add success() (#5427) (#5428)
* 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...

(cherry picked from commit 483ef36d1b)

Co-authored-by: Predeactor <61093863+Predeactor@users.noreply.github.com>
Co-authored-by: Predeactor <ubuntu@vps-35e65bf5.vps.ovh.net>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: Predeactor <61093863+Predeactor@users.noreply.github.com>
Co-authored-by: Predeactor <ubuntu@vps-35e65bf5.vps.ovh.net>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-10-27 14:36:25 +02:00
Red-GitHubBot
1040883913 [3.4] Fix CodeQL workflow (#5412) (#5414)
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.
(cherry picked from commit 42293afd43)

Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>

Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2021-10-20 14:53:53 +00:00
Red-GitHubBot
7268a8e774 [3.4] [Docs] Removes LXC as an unsupported hosting platform (#5351) (#5411)
(cherry picked from commit a70f0b7872)

Co-authored-by: Crossedfall <ping@crossedfall.io>

Co-authored-by: Crossedfall <ping@crossedfall.io>
2021-10-20 10:12:49 +00:00
Red-GitHubBot
86edf0de53 [3.4] Update JDK URL and add Python version upper-bound in Windows guide (#5403) (#5410)
* Update Java URL

* Update choco package as well

* Use Windows-specific URL for Python downloads

(cherry picked from commit 4348318fd1)

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

Co-authored-by: Ryan <git@yamikaitou.dev>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-10-20 09:43:18 +00:00
Red-GitHubBot
59c92041fc [3.4] [Admin] Add [p]selfroleset clear command (#5387) (#5409)
(cherry picked from commit b64ece3ee9)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-10-19 12:28:10 +02:00
Red-GitHubBot
3cf0d5ebe9 [3.4] [Mutes] Fix vars not getting formatted due to previous PR (#5404) (#5405)
* Fix vars not getting formatted due to #5364

* Only format a second time if needed

* Format only on string literals
(cherry picked from commit d56f31a708)

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2021-10-17 02:58:40 +02:00
Red-GitHubBot
65344378f6 [3.4] Update the timestamping we forgot to Discord compatible timestamping (#5395) (#5401)
(cherry picked from commit 67bcd72d9c)

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

Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
2021-10-16 19:40:14 +00:00
Red-GitHubBot
bd010fdae5 [3.4] [Downloader] Show repo name in findcog (#5383) (#5400)
* show repo name in findcog

* how did i manage to overcomplicate this?

* for Kreusada

* I wanted to do that... but forgot
(cherry picked from commit 1d34e9e47b)

Co-authored-by: Dav <dav@mail.stopdavabuse.de>

Co-authored-by: Dav <dav@mail.stopdavabuse.de>
2021-10-16 00:12:37 +00:00
Red-GitHubBot
33ed1085ab [3.4] Fix descriptions for examples of ID-based command invocations in Mod (#5372) (#5399)
* 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
(cherry picked from commit 9aee8ce28f)

Co-authored-by: WreckRox <24494367+WreckRox@users.noreply.github.com>

Co-authored-by: WreckRox <24494367+WreckRox@users.noreply.github.com>
2021-10-15 23:30:44 +00:00
Red-GitHubBot
41fa3f0310 [3.4] [Mod] Indicate successful run in [p]voicekick (#5367) (#5398)
(cherry picked from commit 17dc9e0c47)

Co-authored-by: krak3n <84792368+the-krak3n@users.noreply.github.com>

Co-authored-by: krak3n <84792368+the-krak3n@users.noreply.github.com>
2021-10-15 22:52:21 +00:00
Red-GitHubBot
542a7b3cb2 [3.4] Add a tick on traceback command when it's sent to DMs (#5353) (#5397)
* add a `tick` when sent to dm.

* confused ™️

* did i learn now? :P

* i'm not confused anymore :3
(cherry picked from commit b8535ee53e)

Co-authored-by: MAX <63972751+maxbooiii@users.noreply.github.com>

Co-authored-by: MAX <63972751+maxbooiii@users.noreply.github.com>
2021-10-15 22:48:49 +00:00
Red-GitHubBot
b8cf464355 [3.4] Do not include expected wait_for responses in translated strings (#5364) (#5396)
* Do not include 'I agree' prompt in translation string

* Add more stuff

* Address review comment

* Address review comments
(cherry picked from commit 4b70acb989)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-10-15 22:04:21 +00:00
Red-GitHubBot
4dc509c18f [3.4] Add optional message to send when bot can't react in ctx.tick() and ctx.react_quietly() (#4092) (#5392)
* Update context.py

* Pre-emptive check to avoid hitting the API
(cherry picked from commit 334cd4fa2a)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-10-15 16:46:05 +00:00
Red-GitHubBot
cda70a0c6a [3.4] Improve helpset showaliases docstring (#5376) (#5377)
(cherry picked from commit a8f35f762c)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-10-07 19:48:47 +00:00
Red-GitHubBot
9ca977ba81 [3.4] [Audio] Remove extra whitespace (#5366) (#5370)
(cherry picked from commit 6eb922e7d9)

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2021-10-03 19:12:11 +00:00
Red-GitHubBot
4331004dc1 [3.4] fix possible issue when joined_at is None (#5361) (#5365)
(cherry picked from commit b4037a80d8)

Co-authored-by: Fixator10 <github@fixator10.ru>

Co-authored-by: Fixator10 <github@fixator10.ru>
2021-10-02 17:13:25 +00:00
Red-GitHubBot
042731a7ed [3.4] Initialize driver before starting the backup (#5315) (#5342)
(cherry picked from commit cb18a66336)

Co-authored-by: El Laggron <laggron42@gmail.com>

Co-authored-by: El Laggron <laggron42@gmail.com>
2021-09-23 20:41:16 +00:00
jack1142
bf5e2a4424 [3.4] Version bump to 3.4.15.dev1 (#5341) 2021-09-23 20:37:51 +00:00
github-actions[bot]
029a7fffcb [3.4] Version bump to 3.4.14 (#5338)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-23 21:24:19 +02:00
github-actions[bot]
0096f874a4 [3.4] [i18n] Automated Crowdin downstream (#5339)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-23 21:24:11 +02:00
Red-GitHubBot
07e7594308 [3.4] Red 3.4.14 - Changelog (#5335) (#5337)
* Red 3.4.14 - Changelog

* Add contributor list

* proofreading 1

* Fix plural form
(cherry picked from commit cddd99eba7)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-23 19:10:37 +00:00
Red-GitHubBot
6a4a0b4bb3 [3.4] Update some link texts in docs for accessibility (#5310) (#5336)
* 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`

(cherry picked from commit 92cabd134d)

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

Co-authored-by: River <18037011+RheingoldRiver@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-23 18:43:48 +00:00
Red-GitHubBot
dca082f20e [3.4] Maybe fix the base branch used in dev bump automation (#5307) (#5334)
(cherry picked from commit 2c8c97490b)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-23 15:58:10 +00:00
Red-GitHubBot
dfe03b9cad [3.4] Only initialize and teardown driver if actually needed (#5313) (#5333)
* 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

(cherry picked from commit 2ce8e65527)

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

Co-authored-by: Leet <36166244+L33Tech@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-23 15:36:39 +00:00
Red-GitHubBot
3865449d3b [3.4] Use discord native timestamp in [p]uptime (#5323) (#5332)
* support for discord's timestamp on uptime

* woops not supposed to remove `_`.

* ups

* ups x2

* Apply suggested change.

* hehe
(cherry picked from commit d69326b1fe)

Co-authored-by: MAX <63972751+maxbooiii@users.noreply.github.com>

Co-authored-by: MAX <63972751+maxbooiii@users.noreply.github.com>
2021-09-23 14:29:01 +00:00
Red-GitHubBot
39169703a7 [3.4] Split documents per OS, fix few things, drop and add few OSes (#5328) (#5331)
* 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'
(cherry picked from commit cbbb9d9b9b)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-23 03:28:59 +00:00
Red-GitHubBot
55d748147d [3.4] [Audio] Update Lavalink.jar build (#5329) (#5330)
(cherry picked from commit b2e9b38a03)

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2021-09-23 02:35:43 +02:00
Red-GitHubBot
7bf8bd5a93 [3.4] Fix Case's modified_at attr and its format in message content (#5317) (#5319)
* Fix modified_at field to properly format.

* let's just fix the type hints

(cherry picked from commit 89e3a78ead)

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

Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-14 00:44:10 +00:00
jack1142
931eb312b2 [3.4] Version bump to 3.4.14.dev1 (#5308) 2021-09-10 01:10:38 +02:00
github-actions[bot]
1eaa51e013 [3.4] Version bump to 3.4.13 (#5304)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-09 23:58:22 +02:00
github-actions[bot]
539e0b2c14 [3.4] [i18n] Automated Crowdin downstream (#5305)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-09 21:57:53 +00:00
Red-GitHubBot
addc633425 [3.4] Red 3.4.13 - Changelog (#5302) (#5303)
* 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>

(cherry picked from commit eeed082542)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2021-09-09 21:50:38 +00:00
Red-GitHubBot
00adb15be0 [3.4] Add RelativedeltaConverter and parse_relativedelta (#5000) (#5300)
* 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`

(cherry picked from commit ed9bb77eec)

Co-authored-by: Zoë F <zoe@dataleek.io>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: Zoë F <zoe@dataleek.io>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 23:04:05 +02:00
Red-GitHubBot
ad5a5017b6 [3.4] Add CommandConverter and CogConverter + add usage in Core (#5037) (#5299)
* 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.

(cherry picked from commit e5b236fb1c)

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

Co-authored-by: PhenoM4n4n <61065078+phenom4n4n@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:56:20 +02:00
Red-GitHubBot
9482f0c60c [3.4] [Docs] Update Cleanup docs with new cleanupset command group (#5245) (#5298)
* Add cleanupset commands to cleanup docs

* fix spacing

* shown -> sent

* update command docstring

* Fix trailing whitespace and use same style for docs

(cherry picked from commit 63fd7cc95f)

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

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:52:14 +02:00
Red-GitHubBot
0b8747c49b [3.4] Add Debian 11 to install guide and clarify "Buster" as Debian 10 (#5217) (#5297)
* 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...
(cherry picked from commit 33dddaf5b4)

Co-authored-by: Ryan <twinshadow@shadowhime.net>

Co-authored-by: Ryan <twinshadow@shadowhime.net>
2021-09-08 22:49:56 +02:00
Red-GitHubBot
3c34af5e82 [3.4] Update deps, allow Python 3.9, drop Fedora 32 (#5121) (#5296)
* 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

(cherry picked from commit 3254698c78)

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

Co-authored-by: palmtree5 <3577255+palmtree5@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:46:59 +02:00
Red-GitHubBot
c739500a13 [3.4] [Core] Add more APIs for allowlists and blocklists (#5206) (#5295)
* [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

(cherry picked from commit 0dded8aa47)

Co-authored-by: Just-Jojo <62262765+Just-Jojo@users.noreply.github.com>
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>

Co-authored-by: Just-Jojo <62262765+Just-Jojo@users.noreply.github.com>
Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:43:45 +02:00
Red-GitHubBot
373c04de11 [3.4] Add [p]diagnoseissues command (#5243) (#5294)
* 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
(cherry picked from commit 86649e897f)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:40:25 +02:00
Red-GitHubBot
2ae54c837f [3.4] Update Mac OS instructions to work properly on Apple Silicon (#5234) (#5293)
(cherry picked from commit d84c8efa34)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:37:38 +02:00
Red-GitHubBot
df19bfe679 [3.4] Improve and add more usage of discord timestamps (#5241) (#5292)
* Improve and add more usage of discord timestamps

* How did that whitespace get there?
(cherry picked from commit a0a433b13d)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:35:27 +02:00
Red-GitHubBot
ded19fe4fe [3.4] [Cleanup] Handle NotFound error of prompt in check_100_plus (#5191) (#5291)
* [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>

(cherry picked from commit 4366af6f6c)

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

Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:32:11 +02:00
Red-GitHubBot
ca3b314b5b [3.4] [Trivia] Handle potential Discord errors in session (#5172) (#5290)
* [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.
(cherry picked from commit 42edb12b2e)

Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>

Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>
2021-09-08 22:28:31 +02:00
Red-GitHubBot
b03e582e21 [3.4] [Streams] Check non-existent streams more than once (#5223) (#5289)
* [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
(cherry picked from commit 36ea867dcf)

Co-authored-by: Lui <injabie3@gmail.com>

Co-authored-by: Lui <injabie3@gmail.com>
2021-09-08 22:26:24 +02:00
Red-GitHubBot
147c032788 [3.4] Add commands for editing aliases (#5108) (#5288)
* [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...

(cherry picked from commit cad7f400f9)

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

Co-authored-by: Samuel <50765275+npc203@users.noreply.github.com>
Co-authored-by: npc203 <npc203@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:24:17 +02:00
jack1142
74af8f006e Invalidate cache in filter clear commands
(cherry picked from commit 6d40de8da3)
2021-09-08 22:21:53 +02:00
Red-GitHubBot
05582c8636 [3.4] [Mod] Add user hierarchy check to [p]rename (#5211) (#5287)
* 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

(cherry picked from commit 8880251749)

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

Co-authored-by: Enul <xchedeiklo@gmail.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:19:56 +02:00
Red-GitHubBot
58158ff024 [3.4] [Audio] Update Lavalink.jar build (#5233) (#5286)
(cherry picked from commit 17d24b28f1)

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2021-09-08 22:18:20 +02:00
Red-GitHubBot
dcee2077c0 [3.4] Add toggleable notification of deleted messages count in Cleanup (#5218) (#5285)
* 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

(cherry picked from commit c4f8f65d4d)

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

Co-authored-by: Jamie <31554168+flaree@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:16:37 +02:00
Red-GitHubBot
2d0d5b5be1 [3.4] [Mod] Send ban reason on Temp Bans (#4837) (#5284)
* [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

(cherry picked from commit 4e2e4bfe6a)

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

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:14:58 +02:00
Red-GitHubBot
119550739e [3.4] [Filter] Add filter clear commands (#4981) (#5283)
* [Filter] Add filter clear commands

* define messagepredicate

* actually send msg, lol

* deco fixes

* black

* [Docs] Update filter documentation

* fixes

* style

* Add missing whitespace

(cherry picked from commit f628093208)

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

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:11:47 +02:00
Red-GitHubBot
2f8f121bb0 [3.4] Add test for presence of upper and lower bound on Python version (#5198) (#5282)
* 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!
(cherry picked from commit 6f0a8b11d7)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:09:55 +02:00
Red-GitHubBot
96421a6dfa [3.4] Allow dots in the middle of repo names (#5214) (#5281)
* Allow dots in the middle of repo names

* Screw you, Black
(cherry picked from commit f6cf0d5670)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:07:43 +02:00
Red-GitHubBot
c8992a4281 [3.4] [Streams] Improve config calls in stream alerts (#4968) (#5280)
* [Streams] Improve config calls in stream alerts.

* config->guild_data, style changes

(cherry picked from commit 8eac787f7b)

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

Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 22:05:11 +02:00
Red-GitHubBot
3c325bb4cb [3.4] Accept mentions in [p]cleanup user (#5169) (#5279)
* Accept mentions in `[p]cleanup user`

* Updated spacing & formatting on info logging

* Whoops...

(cherry picked from commit 88abe469b6)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Kowlin <boxedpp@gmail.com>
2021-09-08 22:02:33 +02:00
Red-GitHubBot
497cb50716 [3.4] [Admin] Allow selfroleset command to consume multiple roles (#5238) (#5278)
* 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

(cherry picked from commit b0f93a3ce1)

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

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 21:56:41 +02:00
Red-GitHubBot
dbe50bc6fe [3.4] [Help] Let owners set menu reaction timeout (#5205) (#5277)
* 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>

(cherry picked from commit f8664a4e8a)

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

Co-authored-by: Vexed <vex@vexcodes.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 21:55:03 +02:00
Red-GitHubBot
55712f1ed0 [3.4] [Docs] Fix changelog entry from being under the wrong section (#5236) (#5276)
(cherry picked from commit 6a8968e34d)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-09-08 21:53:41 +02:00
Red-GitHubBot
8f6f2804db [3.4] Document parameters in remaining chat_formatting functions (#5215) (#5275)
(cherry picked from commit dbd25e92a1)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-09-08 21:51:58 +02:00
Red-GitHubBot
fe147f277f [3.4] [Core] add ctx.tick() to [p]invite (#5199) (#5274)
(cherry picked from commit c57ef4828e)

Co-authored-by: GhOsT <79806064+Arman0334@users.noreply.github.com>

Co-authored-by: GhOsT <79806064+Arman0334@users.noreply.github.com>
2021-09-08 21:50:13 +02:00
Red-GitHubBot
80a1088061 [3.4] [Downloader] Fix various formatting issues in cog update notices (#5185) (#5273)
* again :P

* some more

* fix
(cherry picked from commit 6bf85a42f8)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-09-08 21:48:28 +02:00
Red-GitHubBot
b9d9ae3103 [3.4] [Downloader] Suppress NotFound errors in [p]cog update command (#5109) (#5272)
* [Downloader] Suppress NotFound errors when cog update message is deleted

* occurance 2
(cherry picked from commit d15011e2c5)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-09-08 21:46:55 +02:00
Red-GitHubBot
a95d65c316 [3.4] Initial support for Discord timestamping (#5155) (#5271)
* Initial support for Discord timestamping

* Fix timezones

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

* Simplify

(cherry picked from commit f05debc923)

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

Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 21:45:10 +02:00
Red-GitHubBot
a6b9f785ac [3.4] [Mod] Check if guild is unavailable in tempban expirations (#5173) (#5270)
* [Mod] Check if guild.me is None else continue in tempban expirations.

* Check for guild.unavailable instead of guild.me being None.
(cherry picked from commit b586c2f990)

Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>

Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>
2021-09-08 21:43:04 +02:00
Red-GitHubBot
267720bbba [3.4] [Mutes] Fix NotFound error when trying to delete message (#5163) (#5269)
* [Mutes] Fix NotFound error when trying to delete message

* other occurances
(cherry picked from commit c34f1e2f01)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-09-08 21:41:28 +02:00
Red-GitHubBot
339cc6b3dc [3.4] [Alias] Fix double plural grammar in alias docstring (#5092) (#5268)
(cherry picked from commit 299d6c57d9)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-09-08 21:39:48 +02:00
Red-GitHubBot
2c38a7c4f2 [3.4] [Trivia] Validate custom trivia file upload using schema (#4659) (#5267)
* Add custom trivia list schema validation and test

* Address review

* Improve error formatting in trivia list test

(cherry picked from commit 173127e015)

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

Co-authored-by: Grant LeBlanc <37914048+leblancg@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 21:37:59 +02:00
Red-GitHubBot
1736502893 [3.4] [Docs] Add intents / public bots guide (#5221) (#5266)
* [Docs] Add intents / public bots guide

* [Docs] Intent guide: update on d.py
(cherry picked from commit 91ecd6560a)

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

Co-authored-by: Twentysix <Twentysix26@users.noreply.github.com>
2021-09-08 21:35:12 +02:00
Red-GitHubBot
2d3b0e513f [3.4] [Logging] Make Rich more copy-/paste-able (#5181) (#5265)
* commit work, mostly untested

* v minor refactor

* force new renderer

* Code style changes

(cherry picked from commit 7413e3c350)

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

Co-authored-by: Vexed <vex@vexcodes.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 21:33:34 +02:00
Red-GitHubBot
53484abff8 [3.4] [Docs] Update alias userdoc to reflect updated help menu layout (#5048) (#5264)
(cherry picked from commit d13d6477c5)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-09-08 21:31:35 +02:00
Red-GitHubBot
3a2b965b4b [3.4] [Docs] Getting started guide: fix incorrect information / typos (#5180) (#5263)
(cherry picked from commit ee0627f41f)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-09-08 21:30:10 +02:00
Red-GitHubBot
2635300b44 [3.4] [Docs] Fix argument formatting in Admin cog guide (#5219) (#5262)
(cherry picked from commit ec5428f1e9)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-09-08 21:28:27 +02:00
Red-GitHubBot
917ff14156 [3.4] [Docs] Add Oracle Cloud $300 credits to hosting guide (#5225) (#5261)
(cherry picked from commit 37c52d6066)

Co-authored-by: Vexed <vex@vexcodes.com>

Co-authored-by: Vexed <vex@vexcodes.com>
2021-09-08 21:26:13 +02:00
Red-GitHubBot
e3e8ab784b [3.4] [Docs] Fix warning block in Mod cog guide (#5220) (#5260)
(cherry picked from commit 48fa10343c)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-09-08 21:23:18 +02:00
Red-GitHubBot
08bbf8f6db [3.4] [Audio] Add a wait time before auto disconnect (#5188) (#5259)
* Update lavalink.py

* Add comment

(cherry picked from commit 43071e3fa2)

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

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 21:21:44 +02:00
Red-GitHubBot
cbb5ffe252 [3.4] Fix base branch used for PyPI release? (#5212) (#5258)
(cherry picked from commit 80e7a70f9e)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 20:30:05 +02:00
Red-GitHubBot
620f462f4b [3.4] fix typo (#5207) (#5257)
(cherry picked from commit 11913806a4)

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
2021-09-08 20:26:40 +02:00
Red-GitHubBot
bf1286775f [3.4] Update DO link (#5209) (#5256)
(cherry picked from commit f42d675ac0)

Co-authored-by: fredster33 <64927044+fredster33@users.noreply.github.com>

Co-authored-by: fredster33 <64927044+fredster33@users.noreply.github.com>
2021-09-08 20:24:14 +02:00
Red-GitHubBot
eff496cbb7 [3.4] Add a per guild max volume setting (#5165) (#5255)
* Oh great... someone touched Audio again.

* How did that get in there?

* Style? Style.
(cherry picked from commit e154a630df)

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

Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
2021-09-08 20:22:21 +02:00
Red-GitHubBot
1a4c6bb84f [3.4] [Audio] UX improvements to [p]summon command (#5186) (#5254)
(cherry picked from commit 2b67b9d06d)

Co-authored-by: MAX <63972751+maxbooiii@users.noreply.github.com>

Co-authored-by: MAX <63972751+maxbooiii@users.noreply.github.com>
2021-09-08 20:20:14 +02:00
Red-GitHubBot
85ab61b17d [3.4] use rich console print for red colour (#5184) (#5253)
(cherry picked from commit 2ab46fbe41)

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

Co-authored-by: Vexed <gh.vexed@gmail.com>
2021-09-08 20:18:17 +02:00
Red-GitHubBot
7197952795 [3.4] [Downloader] Fix formatting for red version requirement notices (#5183) (#5252)
(cherry picked from commit 49cc9374d4)

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
2021-09-08 20:16:42 +02:00
Red-GitHubBot
05a25b1f03 [3.4] [Warnings] Allow for 0 point warnings (#5178) (#5251)
(cherry picked from commit ad6b8662b2)

Co-authored-by: Just-Jojo <62262765+Just-Jojo@users.noreply.github.com>

Co-authored-by: Just-Jojo <62262765+Just-Jojo@users.noreply.github.com>
2021-09-08 20:13:24 +02:00
Red-GitHubBot
e8ece55501 [3.4] Add cherry_picker configuration (#5168) (#5250)
(cherry picked from commit 9d35df2048)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 20:11:21 +02:00
Red-GitHubBot
e08909dba6 [3.4] Improve release correctness and safety by using GH Environments (#5167) (#5249)
* Improve release safety by using GH Environments

* Exit early when just returning version
(cherry picked from commit ec26687e9e)

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 20:11:13 +02:00
Red-GitHubBot
a3f61fed7c [3.4] Refined debuginfo (#5156) (#5248)
* 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

(cherry picked from commit 3b7f9e24b4)

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

Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-08 20:09:09 +02:00
1504 changed files with 157694 additions and 166574 deletions

View File

@@ -1,40 +0,0 @@
# 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

View File

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

7
.gitattributes vendored
View File

@@ -2,10 +2,3 @@
# 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,25 +1,18 @@
# Cogs
/redbot/cogs/audio/** @aikaterna @PredaaA
/redbot/cogs/downloader/* @Jackenmen
/redbot/cogs/downloader/* @jack1142
/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* @Jackenmen
/tests/cogs/downloader/* @Jackenmen
/redbot/pytest/downloader* @jack1142
/tests/cogs/downloader/* @jack1142
# Schemas
/schema/* @Jackenmen
/schema/* @jack1142
# CI
/.travis.yml @Kowlin

View File

@@ -1,17 +1 @@
### 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.
-->

407
.github/labeler.yml vendored
View File

@@ -1,332 +1,189 @@
"Category: CI":
- .github/workflows/**/*
"Category: Cogs - Admin":
"Category: Admin":
# Source
- redbot/cogs/admin/*
# Docs
- docs/cog_guides/admin.rst
- docs/.resources/admin/**/*
"Category: Cogs - Alias":
"Category: Alias":
# Source
- redbot/cogs/alias/*
# Docs
- docs/cog_guides/alias.rst
# Tests
- redbot/pytest/alias.py
- tests/cogs/test_alias.py
- docs/.resources/alias/**/*
"Category: Cogs - Audio":
# Source
"Category: Audio Cog":
- any:
- redbot/cogs/audio/**/*
all:
- "!redbot/cogs/audio/**/locales/*"
"Category: Bank API":
# Source
- redbot/core/bank.py
# Docs
- docs/cog_guides/audio.rst
# Tests
- tests/cogs/audio/**/*
"Category: Cogs - Bank": [] # historical label for a removed cog
"Category: Cogs - Cleanup":
- 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/_diagnoser.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":
# Source
- redbot/cogs/cleanup/*
# Docs
- docs/cog_guides/cleanup.rst
"Category: Cogs - CustomCommands":
"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":
# Source
- redbot/cogs/customcom/*
# Docs
- docs/cog_customcom.rst
- docs/cog_guides/customcommands.rst
"Category: Cogs - Dev":
"Category: Dev Cog":
# Source
- redbot/core/dev_commands.py
# Docs
- docs/cog_guides/dev.rst
# Tests
- tests/core/test_dev_commands.py
"Category: Cogs - Downloader":
"Category: Docs":
- docs/**/*
"Category: Downloader":
# Source
- redbot/cogs/downloader/*
# Docs
- docs/cog_guides/downloader.rst
# Tests
- redbot/pytest/downloader.py
- redbot/pytest/downloader_testrepo.*
- tests/cogs/downloader/**/*
"Category: Cogs - Economy":
"Category: Economy Cog":
# Source
- redbot/cogs/economy/*
# Docs
- docs/cog_guides/economy.rst
# Tests
- redbot/pytest/economy.py
- tests/cogs/test_economy.py
"Category: Cogs - Filter":
"Category: Filter":
# Source
- redbot/cogs/filter/*
# Docs
- docs/cog_guides/filter.rst
"Category: Cogs - General":
"Category: General Cog":
# Source
- redbot/cogs/general/*
# Docs
- docs/cog_guides/general.rst
"Category: Cogs - Image":
# Source
- redbot/cogs/image/*
# Docs
- docs/cog_guides/image.rst
"Category: Cogs - Mod":
# Source
- redbot/cogs/mod/*
# Docs
- docs/cog_guides/mod.rst
# Tests
- redbot/pytest/mod.py
- tests/cogs/test_mod.py
"Category: Cogs - Modlog":
# Source
- redbot/cogs/modlog/*
# Docs
- docs/cog_guides/modlog.rst
"Category: Cogs - Mutes":
# Source
- redbot/cogs/mutes/*
# Docs
- docs/cog_guides/mutes.rst
"Category: Cogs - Permissions":
# Source
- redbot/cogs/permissions/*
# Docs
- docs/cog_guides/permissions.rst
- docs/cog_permissions.rst
# Tests
- redbot/pytest/permissions.py
- tests/cogs/test_permissions.py
"Category: Cogs - Reports":
# Source
- redbot/cogs/reports/*
# Docs
- docs/cog_guides/reports.rst
"Category: Cogs - Streams":
# Source
- redbot/cogs/streams/*
# Docs
- docs/cog_guides/streams.rst
"Category: Cogs - Trivia":
# Source
- redbot/cogs/trivia/*
# Docs
- docs/cog_guides/trivia.rst
- docs/guide_trivia_list_creation.rst
- docs/.resources/trivia/**/*
# Tests
- tests/cogs/test_trivia.py
"Category: Cogs - Trivia - Lists":
- redbot/cogs/trivia/data/lists/*
"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":
"Category: Help":
- redbot/core/commands/help.py
"Category: Core - i18n":
"Category: i18n":
# Source
- redbot/core/_i18n.py
- redbot/core/i18n.py
# Locale files
- redbot/**/locales/*
# Docs
- docs/framework_i18n.rst
"Category: Core - Modlog":
"Category: 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":
# 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: Core - Other Internals":
"Category: Modlog Cog":
# 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":
- redbot/cogs/modlog/*
# Docs
- docs/cog_guides/modlog.rst
"Category: Mutes Cog":
# Source
- redbot/core/_rpc.py
- redbot/cogs/mutes/*
# Docs
- docs/cog_guides/mutes.rst
"Category: Permissions":
# Source
- redbot/cogs/permissions/*
# Docs
- docs/cog_guides/permissions.rst
- docs/cog_permissions.rst
"Category: Reports Cog":
# Source
- redbot/cogs/reports/*
# Docs
- docs/cog_guides/reports.rst
"Category: RPC/ZMQ API":
# 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/**/*
"Category: Streams":
# Source
- redbot/cogs/streams/*
# Docs
- docs/cog_guides/streams.rst
"Category: Tests":
- redbot/pytest/*
- tests/**/*
"Category: Trivia Cog":
# Source
- redbot/cogs/trivia/*
# Docs
- docs/cog_guides/trivia.rst
- docs/guide_trivia_list_creation.rst
"Category: Trivia Lists":
- redbot/cogs/trivia/data/lists/*
"Category: Utility Functions":
# Source
- redbot/core/utils/*
# Docs
- docs/framework_utils.rst
"Category: Warnings":
# Source
- redbot/cogs/warnings/*
# Docs
- docs/cog_guides/warnings.rst

View File

@@ -7,7 +7,8 @@ permissions:
issues: write
jobs:
apply_triage_label_to_issues:
build:
runs-on: ubuntu-latest
steps:
- name: Apply Triage Label

View File

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

View File

@@ -1,23 +0,0 @@
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,7 +17,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
@@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U pip wheel
python -m pip install -U pip setuptools wheel
python -m pip install -e .[all]
# Set the `CODEQL-PYTHON` environment variable to the Python executable
# that includes the dependencies
@@ -34,13 +34,14 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v2
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
@@ -54,4 +55,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v2

View File

@@ -9,7 +9,7 @@ jobs:
if: github.repository == 'Cog-Creators/Red-DiscordBot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
@@ -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 crowdin3
pip install redgettext==3.4.2
sudo apt-get install -y crowdin
pip install redgettext==3.3
- name: Generate source files
run: |
make gettext
@@ -28,5 +28,5 @@ jobs:
run: |
make upload_translations
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}

View File

@@ -14,17 +14,13 @@ jobs:
name: Lint Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
ref: ${{ env.ref }}
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- 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'
- 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://github.com/pycqa/flake8@3.7.9#egg=flake8"
name: Install Flake8
- run: "python -m flake8 . --count --select=E9,F7,F82 --show-source"
name: Flake8 Linting

View File

@@ -16,7 +16,7 @@ jobs:
needs: pr_stable_bump
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
@@ -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 crowdin3
pip install redgettext==3.4.2
sudo apt-get install -y crowdin
pip install redgettext==3.3
- name: Generate source files
run: |
@@ -36,8 +36,8 @@ jobs:
run: |
make download_translations
env:
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
- name: Create Pull Request
id: cpr_crowdin
@@ -45,11 +45,11 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Automated Crowdin downstream
title: "Automated Crowdin downstream"
title: "[i18n] 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, Changelog Entry: Skipped"
labels: "Automated PR, Category: i18n, 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 }}
@@ -73,7 +73,7 @@ jobs:
milestone_number: ${{ steps.get_milestone_number.outputs.result }}
steps:
# Checkout repository and install Python
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:

View File

@@ -2,7 +2,7 @@ name: Publish Release
on:
push:
tags:
- "3.[0-9]+.[0-9]+"
- "*"
jobs:
release_information:
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout repository and install Python
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
@@ -57,7 +57,7 @@ jobs:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
@@ -75,68 +75,27 @@ jobs:
run: python -m twine check dist/*
- name: Upload packaged distributions
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
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:
APP_YML_FILE: "Red-DiscordBot-${{ github.ref_name }}-default-lavalink-application.yml"
run: |
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
uses: actions/download-artifact@v3
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:
@@ -160,7 +119,7 @@ jobs:
run: |
echo "BASE_BRANCH=${TAG_BASE_BRANCH#'refs/heads/'}" >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
ref: ${{ env.BASE_BRANCH }}
- name: Set up Python

View File

@@ -1,99 +0,0 @@
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,20 +1,13 @@
import os
import re
import sys
from typing import Any, Match
from typing import 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)
print(f"::set-output name=version::{redbot.__version__}")
sys.exit(0)
@@ -24,7 +17,7 @@ version_info = None
def repl(match: Match[str]) -> str:
global version_info
set_output("old_version", match.group("version"))
print(f"::set-output name=old_version::{match.group('version')}")
new_stable_version = os.environ.get("NEW_STABLE_VERSION", "auto")
if new_stable_version == "auto":
@@ -37,12 +30,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,
@@ -50,10 +43,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)
set_output("new_version", version_info)
print(f"::set-output name=new_version::{version_info}")

View File

@@ -1,215 +0,0 @@
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

@@ -1,52 +0,0 @@
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

@@ -1,31 +0,0 @@
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

@@ -1,205 +0,0 @@
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 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 all_python_versions - python_versions
)
)
platform_marker = (
# Requirement present on less platforms than not.
" or ".join(f"sys_platform == '{platform}'" for platform in 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 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(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(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

@@ -27,11 +27,8 @@ jobs:
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
python_version: "3.10-dev"
friendly_name: Python 3.10-dev - Tests
- tox_env: style
friendly_name: Style
- tox_env: docs
@@ -39,7 +36,7 @@ jobs:
fail-fast: false
name: Tox - ${{ matrix.friendly_name }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
ref: ${{ env.ref }}
- name: Set up Python
@@ -49,7 +46,7 @@ jobs:
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
pip install "tox<4"
- name: Tox test
env:
TOXENV: ${{ matrix.tox_env }}
@@ -62,8 +59,7 @@ jobs:
python_version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.10-dev"
fail-fast: false
name: Tox - Postgres
services:
@@ -76,7 +72,7 @@ jobs:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
ref: ${{ env.ref }}
- name: Set up Python
@@ -86,7 +82,7 @@ jobs:
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
pip install "tox<4"
- name: Tox test
env:
TOXENV: postgres

View File

@@ -26,6 +26,14 @@ 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]
@@ -58,6 +66,7 @@ disable=C, # black is enforcing this for us already, incompatibly
[REPORTS]
output-format=parseable
files-output=no
reports=no

View File

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

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-present Cog Creators
Copyright (C) 2017-2021 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-present Cog Creators
Red-DiscordBot Copyright (C) 2017-2021 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 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.
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.
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,12 +2,6 @@
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
@@ -21,7 +15,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 wheel
.venv/bin/pip install -U pip setuptools 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/actions/workflow/status/Cog-Creators/Red-Discordbot/tests.yml?label=tests" alt="GitHub Actions">
<img src="https://img.shields.io/github/workflow/status/Cog-Creators/Red-Discordbot/Tests?label=tests" alt="GitHub Actions">
</a>
<a href="http://docs.discord.red/en/stable/?badge=stable">
<a href="http://red-discordbot.readthedocs.io/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://docs.discord.red/en/stable/index.html">Documentation</a>
<a href="http://red-discordbot.readthedocs.io/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://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)
- [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)
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://docs.discord.red/en/stable/guide_cog_creation.html) on
consult our [guide](https://red-discordbot.readthedocs.io/en/stable/guide_cog_creation.html) on
building your own cogs!
Join us on our [Official Discord Server](https://discord.gg/red)!

View File

@@ -1,38 +0,0 @@
# 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 @@
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
api_key_env: CROWDIN_API_KEY
project_identifier_env: CROWDIN_PROJECT_ID
base_path: ./redbot/
preserve_hierarchy: true
files:

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="/{{ rtd_language }}/stable/">Red documentation for the current stable release</a>.
If you're a regular user, you should read the <a href="{{ dict(versions)['stable'] }}">Red documentation for the current stable release</a>.
</p>
</div>
{% endif %}

View File

@@ -57,8 +57,6 @@ Paste the following and replace the following:
<string>username</string>
<key>InitGroups</key>
<true/>
<key>ProcessType</key>
<string>Interactive</string>
</dict>
</plist>

View File

@@ -28,6 +28,10 @@ Next, your python :code:`path` can be fetched with the following commands:
$ source ~/redenv/bin/activate
(redenv) $ /usr/bin/which python
# If redbot is installed in a pyenv virtualenv
$ pyenv shell <virtualenv_name>
(redenv) $ pyenv which python
Then create the new service file:
:code:`sudo nano /etc/systemd/system/red@.service`
@@ -48,10 +52,9 @@ Paste the following in the file, and replace all instances of :code:`username` w
User=username
Group=username
Type=idle
Restart=on-abnormal
Restart=always
RestartSec=15
RestartForceExitStatus=1
RestartForceExitStatus=26
RestartPreventExitStatus=0
TimeoutStopSec=10
[Install]

View File

@@ -21,13 +21,10 @@ Open that document in Notepad, and paste the following text in it:
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
IF %ERRORLEVEL% NEQ 0 (
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.
@@ -48,4 +45,4 @@ 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.
Drag the shortcut into the folder that is opened. The bot will now launch on startup.

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 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.
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.
------------------
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 or thread 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 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.display_avatar}
[p]customcom add simple avatar {author.avatar_url}
[p]avatar
https://cdn.discordapp.com/avatars/133801473317404673/be4c4a4fe47cb3e74c31a0504e7a295e.webp?size=1024

View File

@@ -389,7 +389,7 @@ announceset channel
.. code-block:: none
[p]announceset channel <channel>
[p]announceset channel [channel]
**Description**
@@ -397,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|
* ``[channel]``: The channel that will be used for bot announcements.
|channel-input| Defaults to where you typed the command.
.. _admin-command-announceset-clearchannel:

File diff suppressed because it is too large Load Diff

186
docs/cog_guides/bank.rst Normal file
View File

@@ -0,0 +1,186 @@
.. _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 a user reaches this limit, they 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

@@ -171,17 +171,17 @@ removepath
.. code-block:: none
[p]removepath <path_numbers...>
[p]removepath <path_number>
**Description**
Removes one or more paths from the list of available paths. Its cogs won't be
accessible anymore.
Removes a path from the list of available paths. Its cogs won't be accessible
anymore.
**Arguments**
* ``<path_numbers>``: The number of the path(s) to remove. You can get it with
the :ref:`paths <cogmanagerui-command-paths>` command.
* ``<path_number>``: The number of the path to remove. You can get it with
the :ref:`paths <cogmanagerui>` command.
.. _cogmanagerui-command-reorderpath:

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, thread/channel, or guild. Multiple
You may set cooldowns per member, channel, or guild. Multiple
cooldowns may be set. All cooldowns must be cooled to call the
custom command.
@@ -267,7 +267,7 @@ customcom search
Searches through custom commands, according to the query.
Uses fuzzy searching to find close matches.
Uses fuzzywuzzy searching to find close matches.
**Arguments:**

View File

@@ -68,6 +68,133 @@ 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:
""""""""
@@ -190,6 +317,29 @@ 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:
"""""""""""""""""""""""""""

View File

@@ -115,12 +115,11 @@ Add words to the filter.
Use double quotes to add sentences.
Examples:
- ``[p]filter channel add #channel word1 word2 word3``
- ``[p]filter channel add #channel "This is a sentence"``
- ``[p]filter channel add word1 word2 word3``
- ``[p]filter channel add "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:
@@ -165,7 +164,7 @@ filter channel remove
.. code-block:: none
[p]filter channel remove <channel> [words...]
[p]filter channel remove [words...]
**Description**
@@ -174,12 +173,11 @@ Remove words from the filter.
Use double quotes to remove sentences.
Examples:
- ``[p]filter channel remove #channel word1 word2 word3``
- ``[p]filter channel remove #channel "This is a sentence"``
- ``[p]filter channel remove word1 word2 word3``
- ``[p]filter channel remove "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:

View File

@@ -215,11 +215,11 @@ modset deletenames
**Description**
Delete all stored usernames, global display names, and server nicknames.
Delete all stored usernames and nicknames.
**Arguments**
- ``<confirmation>``: Whether to delete all stored usernames, global display names, and server nicknames. |bool-input|
- ``<confirmation>``: Whether to delete all stored usernames and nicknames. |bool-input|
.. _mod-command-modset-deleterepeats:
@@ -266,28 +266,6 @@ 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:
""""""""""""""""
@@ -491,7 +469,7 @@ modset tracknicknames
**Description**
Toggle whether server nickname changes should be tracked.
Toggle whether nickname changes should be tracked.
This setting will be overridden if trackallnames is disabled.
@@ -549,7 +527,7 @@ names
**Description**
Show previous usernames, global display names, and server nicknames of a member.
Show previous names and nicknames of a member.
**Arguments**
@@ -571,14 +549,14 @@ rename
**Description**
Change a member's server nickname.
Change a member's nickname.
Leaving the nickname argument empty will remove it.
Leaving the nickname empty will remove it.
**Arguments**
* ``<member>``: |member-input|
* ``[nickname]``: The new server nickname for the member.
* ``[nickname]``: The new nickname for the member.
.. _mod-command-slowmode:
@@ -596,14 +574,14 @@ slowmode
**Description**
Changes thread's or channel's slowmode setting.
Changes 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 thread's/channel's slowmode settings.
* ``[interval=0:00:00]``: The time for the channel's slowmode settings.
.. note::
Interval can be anything from 0 seconds to 6 hours.
@@ -706,9 +684,9 @@ userinfo
Show information about a user.
This includes fields for status, discord join date, server
join date, voice state and previous usernames/global display names/nicknames.
join date, voice state and previous names/nicknames.
If the user has no roles, previous usernames, global display names, or server nicknames,
If the user has no roles, previous names or previous nicknames,
these fields will be omitted.
**Arguments**

View File

@@ -19,7 +19,7 @@ find detailed docs about usage and commands.
Usage
-----
Browse and manage modlog cases. To manage modlog settings, use ``[p]modlogset``.
Manage log channels for moderation actions.
.. _modlog-commands:
@@ -88,6 +88,85 @@ 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, like disabling warnings, enabling bans, etc.
**Examples:**
- ``[p]modlogset cases kick`` - Enables/disables modlog messages for kicks.
- ``[p]modlogset cases ban`` - Enables/disables modlog messages for bans.
**Arguments:**
- ``[action]`` - The type of mod action to be enabled/disabled for case creation.
.. _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 (or in the parent of the current thread).
Mute a user in the current text channel.
Examples:
@@ -145,6 +145,28 @@ 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:
""""""""""""""""
@@ -216,8 +238,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 utilizing server timeouts.
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.
.. Note::
@@ -333,41 +355,13 @@ unmutechannel
**Description**
Unmute a user in this channel (or in the parent of this thread).
Unmute a user in this channel.
**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:
^^^^^^^^^
@@ -378,7 +372,7 @@ voicemute
.. code-block:: none
[p]voicemute <users...> [time_and_reason]
[p]voicemute <users...> [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 or a parent of the thread a command was issued in.
3. Rules about the text channel 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 or thread
This tunnel will forward things you say in this channel
to the ticket opener's direct messages.
Tunnels do not persist across bot restarts.

View File

@@ -338,22 +338,6 @@ 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,26 +334,6 @@ 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/stage channel a user is connected to
3. The channel command was issued in (parent channel in case of invocations in threads)
2. Voice channel
3. Text channel
4. Channel category
5. Roles, highest to lowest
6. Server (can only be in global rules)

View File

@@ -19,7 +19,6 @@
#
import os
import sys
import time
sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath("_ext"))
@@ -62,7 +61,7 @@ master_doc = "index"
# General information about the project.
project = "Red - Discord Bot"
copyright = f"2018-{time.strftime('%Y')}, Cog Creators"
copyright = "2018-2021, Cog Creators"
author = "Cog Creators"
# The version info for the project you're documenting, acts as replacement for
@@ -70,7 +69,7 @@ author = "Cog Creators"
# built documents.
#
from redbot.core import __version__
from discord import __version__ as dpy_version, version_info as dpy_version_info
from discord import __version__ as dpy_version
# The short X.Y version.
version = __version__
@@ -82,7 +81,7 @@ 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 = "en"
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
@@ -138,10 +137,7 @@ html_context = {
"display_github": True,
"github_user": "Cog-Creators",
"github_repo": "Red-DiscordBot",
"github_version": "V3/develop",
"version_slug": os.environ.get("READTHEDOCS_VERSION", ""),
"rtd_language": os.environ.get("READTHEDOCS_LANGUAGE", ""),
"READTHEDOCS": os.environ.get("READTHEDOCS", "") == "True",
"github_version": "V3/develop/docs/",
}
# Add any paths that contain custom static files (such as style sheets) here,
@@ -231,17 +227,10 @@ 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": (dpy_docs_url, None),
"dpy": (f"https://discordpy.readthedocs.io/en/v{dpy_version}/", 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),
@@ -251,12 +240,9 @@ intersphinx_mapping = {
# This allows to create links to d.py docs with
# :dpy_docs:`link text <site_name.html>`
extlinks = {
"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"),
"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", "@"),
}
# Doctest
@@ -267,21 +253,3 @@ 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,13 +69,9 @@ 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

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

View File

@@ -6,12 +6,18 @@ 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, 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
: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

View File

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

View File

@@ -11,12 +11,8 @@ 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
@@ -25,21 +21,13 @@ 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:
@@ -47,9 +35,6 @@ 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
@@ -69,7 +54,7 @@ Help Functionality
.. warning::
The content in this section is `provisional <developer-guarantees-exclusions>` and may change
The content in this section is provisional 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, force_registration=True)
self.config = Config.get_conf(self, identifier=1234567890)
self.config.register_global(
foo=True
@@ -55,19 +55,15 @@ 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, force_registration=True)
self.config = Config.get_conf(self, identifier=1234567890)
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, 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`.
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)
After we've gotten that, we need to register default values:
@@ -75,7 +71,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, force_registration=True)
self.config = Config.get_conf(self, identifier=1234567890)
default_global = {
"foobar": True,
"foo": {
@@ -102,13 +98,13 @@ in various ways:
.. code-block:: python
@commands.command()
@commands.admin_or_permissions(manage_guild=True)
@checks.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()
@commands.is_owner()
@checks.is_owner()
async def setfoobar(self, ctx, new_value):
await self.config.foobar.set(new_value)
@@ -165,7 +161,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.abc.GuildChannel` or :py:class:`discord.Thread`.
* :py:meth:`Config.channel` which takes :py:class:`discord.TextChannel`.
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`.
@@ -217,7 +213,7 @@ Tutorial example.
class MyCog(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
self.config = Config.get_conf(self, identifier=1234567890)
default_guild = {
"blah": [],
"baz": 1234567890
@@ -263,12 +259,12 @@ Now let's see an example that uses multiple identifiers:
.. code-block:: python
from redbot.core import Config, commands
from redbot.core import Config, commands, checks
class ChannelAccess(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
self.config = Config.get_conf(self, identifier=1234567890)
default_access = {
"allowed": False
}
@@ -277,7 +273,7 @@ Now let's see an example that uses multiple identifiers:
self.config.register_custom("ChannelAccess", **default_access)
@commands.command()
@commands.is_owner()
@checks.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")
@@ -308,7 +304,7 @@ the built-in Economy credits::
class Pets(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, 1234567890, force_registration=True)
self.config = Config.get_conf(self, 1234567890)
# Here we'll assign some default costs for the pets
self.config.register_global(
@@ -471,7 +467,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()
await bot.add_cog(cog)
bot.add_cog(cog)
************************************
Best practices and performance notes
@@ -513,7 +509,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, force_registration=True)
>>> config = Config.get_conf(self, identifier=999)
>>> config.register_global(foo={})
>>> await config.foo.set_raw(123, value=True)
>>> await config.foo()
@@ -544,14 +540,30 @@ Value
:members:
:special-members: __call__
IdentifierData
^^^^^^^^^^^^^^
.. autoclass:: IdentifierData
****************
Driver Reference
****************
.. autofunction:: redbot.core.drivers.get_driver
.. autoclass:: redbot.core.drivers.BackendType
:members:
ConfigCategory
^^^^^^^^^^^^^^
.. autoclass:: ConfigCategory
.. autoclass:: redbot.core.drivers.ConfigCategory
:members:
Base Driver
^^^^^^^^^^^
.. autoclass:: redbot.core.drivers.BaseDriver
:members:
JSON Driver
^^^^^^^^^^^
.. autoclass:: redbot.core.drivers.JsonDriver
:members:
Postgres Driver
^^^^^^^^^^^^^^^
.. autoclass:: redbot.core.drivers.PostgresDriver
:members:

View File

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

View File

@@ -6,8 +6,7 @@ RPC
.. important::
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.
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.
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.
@@ -21,9 +20,9 @@ Examples
.. code-block:: Python
async def setup(bot):
def setup(bot):
c = Cog()
await bot.add_cog(c)
bot.add_cog(c)
bot.register_rpc_handler(c.rpc_method)
*******************************
@@ -65,4 +64,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.Red` class for details on the RPC handler register and unregister methods.
Please see the :class:`redbot.core.bot.RedBase` class for details on the RPC handler register and unregister methods.

View File

@@ -1,21 +0,0 @@
.. 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, can_user_send_messages_in, can_user_manage_channel, can_user_react_in
:members: deduplicate_iterables, bounded_gather, bounded_gather_iter, get_end_user_data_statement, get_end_user_data_statement_or_raise
.. autoclass:: AsyncIter
:members:
@@ -27,10 +27,6 @@ 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
=============
@@ -39,8 +35,8 @@ Embed Helpers
:members:
:exclude-members: randomize_color
Menus
=====
Reaction Menus
==============
.. automodule:: redbot.core.utils.menus
:members:
@@ -71,81 +67,9 @@ 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

@@ -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 18 cogs containing the basic features, such
Red comes with 19 cogs containing the basic features, such
as moderation, utility, music, streams...
You can see your loaded and unloaded cogs with the ``[p]cogs``
@@ -225,7 +225,7 @@ Administrator
~~~~~~~~~~~~~
The administrator is defined by its roles. You can set multiple admin roles
with the ``[p]set roles addadminrole`` and ``[p]set roles removeadminrole`` commands.
with the ``[p]set addadminrole`` and ``[p]set removeadminrole`` commands.
For example, in the mod cog, an admin can use the ``[p]modset`` command
which defines the cog settings.
@@ -235,7 +235,7 @@ Moderator
~~~~~~~~~
A moderator is a step above the average users. You can set multiple moderator
roles with the ``[p]set roles addmodrole`` and ``[p]set roles removemodrole`` commands.
roles with the ``[p]set addmodrole`` and ``[p]set removemodrole`` commands.
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
@@ -282,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 24.04 LTS**.
you're a beginner, we recommend **Ubuntu 22.04 LTS**.
For Raspberry Pi users, just install `Raspbian
<https://www.raspberrypi.org/software/>`_ on a micro-SD card.

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
value below. **The development version of the bot contains experimental changes. It is not
link 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
Red-DiscordBot @ https://github.com/Cog-Creators/Red-DiscordBot/tarball/V3/develop
git+https://github.com/Cog-Creators/Red-DiscordBot@V3/develop#egg=Red-DiscordBot
(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/>`_, and
`Visual Studio Code <https://code.visualstudio.com/>`_, `Atom <https://atom.io/>`_, 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
async def setup(bot):
await bot.add_cog(MyCog(bot))
def setup(bot):
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,16 +41,17 @@ 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.
@@ -72,7 +73,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, for example Config, or any other utility functions.
- Cogs that properly use Red utilities, including Config, checks, and 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.
@@ -83,7 +84,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. Don't let a lower role have a way to grant a higher role.
- Respect the role hierarchy. Dont 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.
@@ -93,6 +94,8 @@ 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:
--------------------------------
@@ -135,15 +138,14 @@ While not required for approved Cog Creators, they are still recommended in orde
- ``ctx.embed_color``
- ``bot.is_automod_immune``
- 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.
- Use checks to limit command use when the bot needs special permissions.
- 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() <Red.cog_disabled_in_guild()>`\
- Check events against `bot.cog_disabled_in_guild() <RedBase.cog_disabled_in_guild()>`\
- Not all events need to be checked, only those that interact with a guild.
- Some discretion may apply, for example,
@@ -193,12 +195,7 @@ 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.
- 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
- 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.
- 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_to_v1.html>`
First, be sure to read :dpy_docs:`discord.py's migration guide <migrating.html>`
as that covers all of the changes to discord.py that will affect the migration process
----------------

View File

@@ -1,339 +0,0 @@
.. 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,33 +41,12 @@ 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 and ``DESCRIPTION`` field, you can move on to your questions
just below.
``AUTHOR`` 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
@@ -119,7 +98,6 @@ 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

View File

@@ -1,810 +0,0 @@
.. _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

@@ -1,3 +0,0 @@
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

@@ -1,42 +0,0 @@
.. _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

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

View File

@@ -36,7 +36,7 @@ Welcome to Red - Discord Bot's documentation!
intents
cog_guides/admin
cog_guides/alias
cog_guides/audio
cog_guides/bank
cog_guides/cleanup
cog_guides/cog_manager_ui
cog_guides/core
@@ -63,22 +63,20 @@ 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
@@ -87,7 +85,6 @@ Welcome to Red - Discord Bot's documentation!
:caption: Others
changelog
incompatible_changes/index
host-list

View File

@@ -1,10 +0,0 @@
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,19 @@
To install/update pyenv, run the following command:
.. prompt:: bash
command -v pyenv && pyenv update || curl https://pyenv.run | bash
After this command, you will see a warning about 'pyenv' not being in the load path. To address this,
you should run these commands:
.. prompt:: bash
profile=$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))
rcfile=$([ -n "$ZSH_VERSION" ] && echo ~/.zshrc || echo ~/.bashrc)
printf '%s\n%s\n%s\n' 'export PYENV_ROOT="$HOME/.pyenv"' 'export PATH="$PYENV_ROOT/bin:$PATH"' "$([ -f "$profile" ] && cat "$profile")" > "$profile"
echo 'eval "$(pyenv init --path)"' >> "$profile"
echo 'eval "$(pyenv init -)"' >> "$rcfile"
echo 'eval "$(pyenv virtualenv-init -)"' >> "$rcfile"
Then **log out and log back in** and run the following command:

View File

@@ -0,0 +1,44 @@
------------------------------
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 ``pyenv virtualenv``
**************************
Using ``pyenv virtualenv`` saves you the headache of remembering where you installed your virtual
environments. This option is only available if you installed Python with pyenv.
First, ensure your pyenv interpreter is set to python 3.8.1 or greater with the following command:
.. prompt:: bash
pyenv version
Now, create a virtual environment with the following command:
.. prompt:: bash
pyenv virtualenv <name>
Replace ``<name>`` with whatever you like. If you ever forget what you named it,
you can always use the command ``pyenv versions`` to list all virtual environments.
Now activate your virtualenv with the following command:
.. prompt:: bash
pyenv shell <name>
.. important::
You must activate the virtual environment with the above command every time you open a new
shell to run, install or update Red. You can check out other commands like ``pyenv local`` and
``pyenv global`` if you wish to keep the virtualenv activated all the time.

View File

@@ -21,3 +21,18 @@ to keep it in a location which is easy to type out the path to. From now, we'll
``redenv`` and it will be located in your home directory.
Create your virtual environment with the following command:
.. prompt:: bash
python3.9 -m venv ~/redenv
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

@@ -1,7 +0,0 @@
.. 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

@@ -1,7 +0,0 @@
.. 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

@@ -1,7 +0,0 @@
.. 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

@@ -9,7 +9,7 @@ To install without additional config backend support:
.. prompt:: bash
:prompts: (redenv) $
python -m pip install -U pip wheel
python -m pip install -U pip setuptools wheel
python -m pip install -U Red-DiscordBot
Or, to install with PostgreSQL support:
@@ -17,7 +17,7 @@ Or, to install with PostgreSQL support:
.. prompt:: bash
:prompts: (redenv) $
python -m pip install -U pip wheel
python -m pip install -U pip setuptools wheel
python -m pip install -U "Red-DiscordBot[postgres]"

View File

@@ -1,28 +1,26 @@
.. 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.
Red Hat Enterprise Linux (RHEL) 8.4-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
sudo dnf -y install python39 python39-pip python39-devel java-11-openjdk-headless nano git
Set ``java`` executable to point to Java 17:
Set ``java`` executable to point to Java 11:
.. prompt:: bash
sudo alternatives --set java "java-17-openjdk.$(uname -i)"
sudo alternatives --set java "java-11-openjdk.$(uname -i)"
.. Include common instructions:
.. include:: _includes/create-env-with-venv3.11.rst
.. include:: _includes/create-env-with-venv.rst
.. include:: _includes/install-and-setup-red-unix.rst

View File

@@ -1,20 +1,18 @@
.. 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.
Red Hat Enterprise Linux (RHEL) 9 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
sudo dnf -y install python39 git java-11-openjdk-headless @development nano
.. Include common instructions:
.. include:: _includes/create-env-with-venv3.11.rst
.. include:: _includes/create-env-with-venv.rst
.. include:: _includes/install-and-setup-red-unix.rst

View File

@@ -0,0 +1,27 @@
----------------------------
Installing Python with pyenv
----------------------------
On distributions where Python 3.9 needs to be compiled from source, we recommend the use of pyenv.
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
virtual environment.
.. include:: _includes/_install-pyenv-and-setup-path.rst
.. prompt:: bash
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.9.16 -v
This may take a long time to complete, depending on your hardware. For some machines (such as
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
drastically reduce the install time. However, be aware that this will make Python run about 10%
slower.
After that is finished, run:
.. prompt:: bash
pyenv global 3.9.16
Pyenv is now installed and your system should be configured to run Python 3.9.

View File

@@ -0,0 +1,27 @@
----------------------------
Installing Python with pyenv
----------------------------
On distributions where Python 3.8 needs to be compiled from source, we recommend the use of pyenv.
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
virtual environment.
.. include:: _includes/_install-pyenv-and-setup-path.rst
.. prompt:: bash
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.8.16 -v
This may take a long time to complete, depending on your hardware. For some machines (such as
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
drastically reduce the install time. However, be aware that this will make Python run about 10%
slower.
After that is finished, run:
.. prompt:: bash
pyenv global 3.8.16
Pyenv is now installed and your system should be configured to run Python 3.8.

View File

@@ -1,2 +0,0 @@
| 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`.

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,7 +1,7 @@
.. _install-alma-linux-8:
====================================
Installing Red on Alma Linux 8.6-8.x
Installing Red on Alma Linux 8.4-8.x
====================================
.. include:: _includes/install-guide-rhel8-derivatives.rst

View File

@@ -1,26 +0,0 @@
.. _install-amazon-linux-2023:
===================================
Installing Red on Amazon Linux 2023
===================================
.. include:: _includes/supported-arch-x64+aarch64.rst
.. include:: _includes/linux-preamble.rst
-------------------------------
Installing the pre-requirements
-------------------------------
Amazon Linux 2023 has 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-amazon-corretto-headless @development nano
.. Include common instructions:
.. include:: _includes/create-env-with-venv3.11.rst
.. include:: _includes/install-and-setup-red-unix.rst

View File

@@ -4,8 +4,6 @@
Installing Red on Arch Linux
============================
.. include:: _includes/supported-arch-x64.rst
.. include:: _includes/linux-preamble.rst
-------------------------------
@@ -16,22 +14,22 @@ Install the pre-requirements with pacman:
.. prompt:: bash
sudo pacman -Syu git jre17-openjdk-headless base-devel nano
sudo pacman -Syu git jre11-openjdk-headless base-devel nano
On Arch Linux, Python 3.11 can be installed from the Arch User Repository (AUR) from the ``python311`` package.
On Arch Linux, Python 3.9 can be installed from the Arch User Repository (AUR) from the ``python39`` package.
The manual build process is the Arch-supported install method for AUR packages. You can install ``python311`` package with the following commands:
The manual build process is the Arch-supported install method for AUR packages. You can install ``python39`` package with the following commands:
.. prompt:: bash
git clone https://aur.archlinux.org/python311.git /tmp/python311
cd /tmp/python311
git clone https://aur.archlinux.org/python39.git /tmp/python39
cd /tmp/python39
makepkg -sicL
cd -
rm -rf /tmp/python311
rm -rf /tmp/python39
.. Include common instructions:
.. include:: _includes/create-env-with-venv3.11.rst
.. include:: _includes/create-env-with-venv.rst
.. include:: _includes/install-and-setup-red-unix.rst

View File

@@ -0,0 +1,42 @@
.. _install-centos-7:
==========================
Installing Red on CentOS 7
==========================
.. include:: _includes/linux-preamble.rst
-------------------------------
Installing the pre-requirements
-------------------------------
Install the pre-requirements with yum:
.. prompt:: bash
sudo yum -y groupinstall development
sudo yum -y install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel xz-devel java-11-openjdk-headless nano git
In order to install gcc 8, we'll use SCL repository:
.. prompt:: bash
sudo yum -y install centos-release-scl
sudo yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++
echo "source scl_source enable devtoolset-8" >> ~/.bashrc
source ~/.bashrc
In order to install Git 2.11 or greater, we recommend adding the IUS repository:
.. prompt:: bash
sudo yum -y install https://repo.ius.io/ius-release-el7.rpm
sudo yum -y swap git git236
.. Include common instructions:
.. include:: _includes/install-python-pyenv.rst
.. include:: _includes/create-env-with-pyenv-virtualenv.rst
.. include:: _includes/install-and-setup-red-unix.rst

View File

@@ -0,0 +1,7 @@
.. _install-centos-stream-8:
=================================
Installing Red on CentOS Stream 8
=================================
.. include:: _includes/install-guide-rhel8-derivatives.rst

View File

@@ -0,0 +1,28 @@
.. _install-debian-10:
==================================
Installing Red on Debian 10 Buster
==================================
.. include:: _includes/linux-preamble.rst
-------------------------------
Installing the pre-requirements
-------------------------------
We recommend installing pyenv as a method of installing non-native versions of Python on
Debian Buster. This guide will tell you how. First, run the following commands:
.. prompt:: bash
sudo apt update
sudo apt -y install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless nano
CXX=/usr/bin/g++
.. Include common instructions:
.. include:: _includes/install-python-pyenv.rst
.. include:: _includes/create-env-with-pyenv-virtualenv.rst
.. include:: _includes/install-and-setup-red-unix.rst

View File

@@ -1,27 +1,25 @@
.. _install-debian-12:
.. _install-debian-11:
====================================
Installing Red on Debian 12 Bookworm
Installing Red on Debian 11 Bullseye
====================================
.. include:: _includes/supported-arch-x64+aarch64+armv7l.rst
.. include:: _includes/linux-preamble.rst
-------------------------------
Installing the pre-requirements
-------------------------------
Debian 12 "Bookworm" has all required packages available in official repositories. Install them
Debian 11 "Bullseye" has all required packages available in official repositories. Install them
with apt:
.. prompt:: bash
sudo apt update
sudo apt -y install python3 python3-dev python3-venv git openjdk-17-jre-headless build-essential nano
sudo apt -y install python3 python3-dev python3-venv python3-pip git openjdk-11-jre-headless build-essential nano
.. Include common instructions:
.. include:: _includes/create-env-with-venv3.11.rst
.. include:: _includes/create-env-with-venv.rst
.. include:: _includes/install-and-setup-red-unix.rst

View File

@@ -4,23 +4,21 @@
Installing Red on Fedora Linux
==============================
.. include:: _includes/supported-arch-x64+aarch64.rst
.. include:: _includes/linux-preamble.rst
-------------------------------
Installing the pre-requirements
-------------------------------
Fedora Linux 40 and above has all required packages available in official repositories. Install
Fedora Linux 35 and above has 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-tools nano
sudo dnf -y install python39 git java-11-openjdk-headless @development-tools nano
.. Include common instructions:
.. include:: _includes/create-env-with-venv3.11.rst
.. include:: _includes/create-env-with-venv.rst
.. include:: _includes/install-and-setup-red-unix.rst

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