Compare commits

...

866 Commits
3.3.9 ... 3.4

Author SHA1 Message Date
Red-GitHubBot
49cf7eacfb [3.4] Stop manually adding category to automated PRs (#6089) (#6092)
Co-authored-by: Jakub Kuczys <me@jacken.men>
2023-04-20 13:45:38 +00:00
github-actions[bot]
abdf57c901 [3.4] Version bump to 3.4.20.dev1 (#6090)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-20 04:35:18 +02:00
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
jack1142
52f96e043b Add simple PR template (#5150) 2021-06-18 18:34:42 -04:00
jack1142
5b58cdb449 Add missing changelog entries to Red 3.4.12 changelog (#5148)
* Add missing changelog entries to Red 3.4.12 changelog

* Update contribs list

* .

* Apply suggestions from code review

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

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

* update docs
2021-06-18 17:48:46 -04:00
github-actions[bot]
e52fb2c086 Version bump to 3.4.13.dev1 (#5147)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-17 20:42:58 +02:00
github-actions[bot]
86c4d953a8 Version bump to 3.4.12 (#5145)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-17 19:53:56 +02:00
github-actions[bot]
539a475706 [i18n] Automated Crowdin downstream (#5146)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-17 19:53:18 +02:00
jack1142
36968a4bf0 Red 3.4.12 - Changelog (#5144)
* Red 3.4.12 - Changelog

* Add a comma...
2021-06-17 19:43:09 +02:00
jack1142
a99240f7c3 Remove support for Audio's Global API (#5143)
* Force-disable Audio's Global API functionality

* Remove owner message about global API

* Two more comments

* Update CODEOWNERS

* Bring back the owner notification, modified to not mention global DB

* Remove the global api group fully, remove the mentions of it
2021-06-17 19:27:56 +02:00
jack1142
be04ec1c86 Change default local cache level (#5140)
* Change default local cache level

* Update the owner message as well
2021-06-17 05:04:31 +02:00
Samuel
c3362f6eaa Update [p]addpath to use consume rest on the path argument (#5137)
Co-authored-by: npc203 <npc203@users.noreply.github.com>
2021-06-15 13:08:41 +02:00
Just-Jojo
b2db0674d5 [Warnings] (#5120) 2021-06-13 20:21:19 -04:00
Stonedestroyer
5ead38c284 Fix none issue (#5125) 2021-06-13 20:11:55 -04:00
aikaterna
8dffebbb34 [Audio] Change autoplay playlist url (#5135) 2021-06-13 14:44:49 +02:00
github-actions[bot]
5b03f04790 Version bump to 3.4.12.dev1 (#5133)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-12 19:04:24 +02:00
github-actions[bot]
8e6cf0be81 Version bump to 3.4.11 (#5131)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-12 18:53:40 +02:00
github-actions[bot]
5f0b4403bc [i18n] Automated Crowdin downstream (#5132)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-12 18:53:21 +02:00
jack1142
c23100eaca Red 3.4.11 - Changelog (#5130) 2021-06-12 18:46:34 +02:00
jack1142
1b6745549e Bump discord.py to 1.7.3 (#5129) 2021-06-12 18:31:38 +02:00
Kreusada
faf1ad4846 [Dev] Add ctx.tick() on successful debugs (#5107) 2021-06-12 17:52:06 +02:00
El Laggron
dafffd969f [Core] Limit server prefix length (#5117)
* Restrict prefix length

* Update docs
2021-06-12 17:41:29 +02:00
Onii-chan
a428e42f1f Update cogboard links (#5124)
* Update README.md

* Update guide_cog_creators.rst

* Update cog_manager_ui.rst

* Update README.md
2021-06-08 09:11:42 +00:00
Kreusada
ded5aff08c Move modlog guide to correct place in the labeler configuration (#5118) 2021-06-03 22:34:40 +02:00
jack1142
8f390147c1 Use rich.progress instead of tqdm (#5064)
* Use rich progress instead of tqdm

* Remove tqdm from deps
2021-06-03 21:37:53 +02:00
El Laggron
0ce2634bb3 [Core] Add toggle for the applications.commands invite scope (#5114)
* Add toggle for applications.commands invite scope

* Add support for i18n

* Fix formatting

Co-authored-by: Kowlin <boxedpp@gmail.com>
2021-06-03 17:36:28 +02:00
Draper
1ee4156ac6 Add Preda as code owner for audio files (#5095) 2021-05-31 14:52:18 +02:00
jack1142
1471ead0ce With each release we're getting one step closer... (#5090) 2021-05-28 20:44:58 +02:00
jack1142
d011b1f9af Version bump to 3.4.11.dev1 (#5089) 2021-05-28 20:40:15 +02:00
github-actions[bot]
fc4a995540 Version bump to 3.4.10 (#5086)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-28 20:17:54 +02:00
github-actions[bot]
ce4fd6cca8 [i18n] Automated Crowdin downstream (#5087)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-28 20:09:47 +02:00
jack1142
305161110e Red 3.4.10 - Changelog (#5077)
* Add 3.4.10 section

* PR 5082 (issue 4765)

* PR 5073 (issue 5008)

* PR 5071

* PR 5070

* PR 5066 (issue 5050)

* PR 5063

* PR 5066

* PR 5051

* PR 5041

* PR 5040 (issue 5039)

* PR 5035 (issue 5036)

* PR 5031 (issue 5032)

* PR 5028

* PR 5027 (issue 5026)

* PR 5025

* PR 5017

* PR 5004

* PR 4996

* PR 4987

* PR 4976

* PR 4971

* PR 5046

* PR 5044

* PR 5083

* PR 5030 (issue 4959)

* PR 5020

* PR 5018

* PR 5014

* PR 5012

* PR 4995

* PR 4994

* PR 4988

* PR 4980

* PR 4975

* PR 4970 (issue 4969)

* PR 4962

* PR 4960

* PR 4958 (issue 4956)

* PR 4954

* PR 4919

* PR 4886

* PR 4882

* PR 4875

* PR 4597

* PR 4082

* PR 4793, 4832, 4955, 4966, 5015, 5019, 5029, 5038, 5055, 5080, 5081

* PR 4979

* PR 5013

* PR 4991

* Reorder stuff

* Update date

* Add contributors list

* Mention the tracking issue for cog guides

* PR 4920 (issue 1734)

* PR 4985 (issue 1734)

* PR 5023 (issue 4595)

* PR 5085

* time to be explicit...

* Gotta include info about the new jar too...

* Apply suggestions from code review

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2021-05-28 19:56:30 +02:00
aikaterna
f0dab50097 [Audio] Update Lavalink.jar build (#5085) 2021-05-28 19:29:34 +02:00
Kreusada
b630e71d08 [Docs] Warnings Cog Guide (#4920)
* Initial commit

* labeler and index

* change parameter names and labeler

* fix typo

* docstrings, quotes and improved names

* merge conflict affect fixes

* remove aliases

* get from v3/develop

* update var names

* fixes

* improve grammar

* black
2021-05-28 19:06:52 +02:00
Kreusada
db86de3a7a [Docs] Permissions Cog Guide (#4985)
* Initial commit

* index and grammar

* Add permissions tag to permissions cog reference

* remove alias by default

* remove alias

* labeler

* updates
2021-05-28 19:06:42 +02:00
Kreusada
dd40f00279 [Docs] Trivia List Creation User Guide (#5023)
* Initial commit

* commits

* a few fixes

* caps formatting

* labeler

* a few formatting changes

* grammar for clarity

* grammar fixes
2021-05-28 19:06:32 +02:00
benno1237
177bd7f84e Update Dev's code block regex to support python language (#5083)
* Update dev_commands.py

* Update dev_commands.py

* Update redbot/core/dev_commands.py

regexes keep confusing me. thanks jack

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-05-27 17:44:22 +02:00
Vexed
210c07d5a7 [Downloader] Allow removal of multiple repos (#5082)
* add multi repo support + docstring

* update docs

* Update redbot/cogs/downloader/downloader.py

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

* style

* Update redbot/cogs/downloader/downloader.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-05-27 14:47:41 +02:00
Kreusada
23997d7a71 [Docs] Modlog Cog Guide (#4919)
* Initial commit

* Docstring changes and index

* Add modlog cog guide to labeler
2021-05-26 13:30:23 -04:00
Lifeismana
c0f17c2155 Unify docstring (#5081)
To be the same as L725 and L1555
631adc282f/redbot/cogs/downloader/downloader.py (L725)
631adc282f/redbot/cogs/downloader/downloader.py (L1555)
2021-05-26 11:32:37 -04:00
TrustyJAID
631adc282f [General] Fix usage in choose help (#5015)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2021-05-26 10:23:46 +01:00
jack1142
b8b8a38fbd Lower RTD build time (#5078) 2021-05-26 09:07:46 +01:00
Lifeismana
2d8dbad63b Docstring Fix (#5080)
* Missing word

* Make a little more sense
2021-05-25 17:58:10 +02:00
Draper
137713d9ca Update gitignore with more of Windows, Mac, Sublime, and PyCharm (#5079)
* Since i have these uncommitted locally sharing...

* clean up

* clean up

* noone can figure out how my pycharm got into this state .. but hey ho.

* aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

* We don't need this comment, we already include these in gitgnore anyway

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-05-25 17:40:08 +02:00
Draper
0f4c409e84 Fix resume for auto play which was broken in RLL 0.8.0 update. (#5051) 2021-05-25 17:05:40 +02:00
Draper
ac0c5cc4c8 Fix resume for auto play which was broken in RLL 0.8.0 update. (#5051) 2021-05-25 17:04:45 +02:00
Draper
ca373052c5 Fix resume for auto play which was broken in RLL 0.8.0 update. (#5051) 2021-05-25 17:04:24 +02:00
jack1142
f8ecc32dbc Fix the bug with Twitch display name being set as Twitch login (#5066) 2021-05-25 09:32:32 +01:00
Vexed
982feda858 [Admin] Add logging to serverlock (#5073)
Co-authored-by: Twentysix <Twentysix26@users.noreply.github.com>
2021-05-24 12:03:43 +01:00
jack1142
2f7376169e Stop reloading unrelated modules (#4958) 2021-05-24 11:17:45 +01:00
jack1142
7459af25ba Specify that cleanup commands remove messages from current channel (#5070) 2021-05-23 15:24:17 +01:00
aleclol
820b21dccb [Mutes] Don't send dms to bots (#5071) 2021-05-23 15:24:08 +01:00
jack1142
c4a9d97a4b Include status code in APIError and handle APIError in the loop (#4995) 2021-05-23 15:23:58 +01:00
jack1142
b89c43eb0f Ensure nothing initializes colorama when it isn't needed (#5063) 2021-05-20 10:31:27 +02:00
Ryujin
a6c438e486 Update pronouns used for the bot in documentation (#5053)
* Update admin.rst

* Update admin.rst

* Update admin.rst

* Update admin.rst

* Update getting_started.rst

* Update admin.rst

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-05-20 01:28:56 +02:00
Draper
994137426f check both connect and speak permissions before performing audio actions (#5012) 2021-05-19 21:29:40 +01:00
Draper
f3231682b0 Update application.yml + remove mixer support. (#5013) 2021-05-19 20:17:37 +01:00
jack1142
d5fbc0b01c Remove PM2 guide (#4991)
There's apparently no way to specify exit codes
for which the process should not be restarted.

This just shows how poor of a process manager PM2 is
so we really should not continue to recommend it in the documentation...

Ref:
https://stackoverflow.com/questions/43614017/how-to-only-restart-node-process-with-pm2-if-exit-code-0
2021-05-19 19:20:59 +02:00
jack1142
1c32186d0b Fix logging and handle NotFound exception in Case.edit() (#4975) 2021-05-19 18:10:15 +02:00
jack1142
8a7c4aa48c Bump discord.py to 1.7.2 (#5056) 2021-05-19 17:07:08 +01:00
Draper
3a9edd9434 Fix crash in [p]audiostats by using the new connected_at attr (#5046)
* This PR depends on Part 1 due to new `Player.guild` attribute and RLL bump to 0.8.1

- [player.store] notify_channel->channel
- [player.store] removed guild
- [player.store] removed connect
- changes in [p]audiostats

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

* another one

* Update redbot/cogs/audio/core/commands/miscellaneous.py

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

* style

Co-authored-by: alec <50505980+aleclol@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-05-19 17:56:53 +02:00
Kreusada
439033ea28 [Core] Improve regionalformat docstrings (#5055)
* [Docs] Update regionalformat docs

* [Core] Improve regionalformat docstrings
2021-05-19 14:47:29 +00:00
jack1142
e124ae3c11 Use ctx.send_interactive for SyntaxErrors in Dev cog
* Merge pull request #5041

* Use ctx.send_interactive for SyntaxErrors in Dev cog

* Paren in wrong place...
2021-05-19 15:36:18 +01:00
Kreusada
3ff2132570 [Core] Update [p]autoimmune remove docstring
* Merge pull request #5038

* update docstring

* update docs correspondingly
2021-05-19 15:10:31 +01:00
Draper
3f39a93e59 Stop shadowing variable in customcom's arg handling
* Merge pull request #5027

Stop shadowing variable in customcom's arg handling
2021-05-19 15:02:47 +01:00
jack1142
356922f4de Improve global exception handler log messages
* Merge pull request #4980

* Improve global exception handler log messages
2021-05-19 14:36:16 +01:00
jack1142
e2f0ac582b Add documentation for Case class in Modlog
* Merge pull request #4979

* Add documentation for Case class in Modlog
2021-05-19 14:10:19 +01:00
jack1142
9b66d19369 Fix KeyError for cached messages from deleted channels in Streams
* Merge pull request #5031

* Fix KeyError for cached messages from deleted channels in Streams
2021-05-19 14:03:28 +01:00
Kreusada
01f86091ab [Context] Fixup docstrings in react_quietly function
* Merge pull request #4955

* [Context] Add cross function, typo fixes in react_quietly()

* Remove cross function

* Remove cross variable
2021-05-19 13:35:36 +01:00
Danstr5544
56099d6b50 Attempt to DM users before applying a warn action.
* Merge pull request #5004
2021-05-19 13:06:51 +01:00
jack1142
fa4990f327 Fix --rich-traceback-extra-lines cli flag
* Merge pull request #5028
2021-05-19 13:00:31 +01:00
Kreusada
606c2f50ba [Help] Strip docstrings before shortening them (#4983)
* [Help] Strip docstrings before shortening them

* [Help] Use rstrip instead of full strip
2021-05-19 13:58:48 +02:00
jack1142
53276ea12a Update instructions to use Python 3.8.10
* Merge pull request #5025
2021-05-19 12:54:45 +01:00
Fixator10
c40efd479b [Mutes] Handle Forbidden in mute_channel
* Merge pull request #4994
2021-05-19 12:49:37 +01:00
Fixator10
a58ac7cd2e Change order of config calls in the Economy cog to only execute them when necessary.
* Merge pull request #5002
2021-05-19 12:40:12 +01:00
Vexed
31cb4c0604 Require read message hist perms for help menu (#5030)
[Help] Require read message history perms for reaction menu (#5030)
2021-05-19 12:28:13 +01:00
Kreusada
700802c303 Merge pull request #5014
* [General] Provide the urban command with embed color

* spelling consistency...
2021-05-19 12:25:54 +01:00
Draper
00d2d62f1b [Audio] Disallow all users from modifying Playlist 42069. (#5018) 2021-05-19 11:41:51 +01:00
Kreusada
c36665e755 [Modlog] Add confirmation prompt to [p]modlogset resetcases (#4976)
* [Modlog] Confirmation for resetting modlog cases

* We need to return there

* Update modlog.py

* style

* Update redbot/cogs/modlog/modlog.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-05-19 12:39:41 +02:00
bobloy
75ce67837a embedset - fix perm check for subcommands, add missing return (#4962) 2021-05-19 12:19:28 +02:00
Jamie
c83eae931b [Streams] Add guild only decorator to streams commands (#5035)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-05-19 11:58:50 +02:00
Draper
ea82119605 Ensure track is properly resumed in an edge case (#4996) 2021-05-19 10:25:19 +01:00
Draper
42101275d5 Fix crash in [p]audioset restart (#4987) 2021-05-19 11:21:50 +02:00
Draper
38da7370ec Bump RLL and improve logging (#5044)
* version bump

* - bump RLL
- logging changes
- player.channel.guild->player.guild
- small cleanup around logging changes

* missed one

* here this one too

* Apply suggestions from code review

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

* add one missing player log

* missed one

* Format with Black

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-05-19 00:56:10 +02:00
DeltaX
c9431f7d90 [Audio] Fix local track documentation. (#4832)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2021-05-18 23:09:32 +01:00
Fabian H
cb45ef6c42 Fixed grammatical mistakes in core_commands.py (#4966)
This fixes some issues from the recent commit 'Core Cog Guide'
2021-05-18 17:17:44 -04:00
Kreusada
410b2419dd [Docs] Mod Cog Guide (#4886)
* Initial commit

* Add some args

* bool prolog

* index

* Add more arguments

* more arguments, style fixes

* improve naming of arguments

* Fix up backlog

* Run black

* extra corrections from backlog

* Update tempban arg names

* backlog

* change prolog type

* Change kick argument prolog to member instead of user

* Update argument names

* missed a colon

* Update prolog to be friendly with non-positional args

* Edit through the decorator instead

* Add back docstring spacing

* black

* usage in decorator for name commands

* Fix command signature

* fixup docstring spacing

* style fixes

* Add spacing inside unban docstring

* Rename args instead of using usage

* black - simple

* Add labeler glob

* unify style

* rename variables instead of usage

* Update docstrings correspondingly

* run black

* update description in usage

* ehh this isn't necessary...

* fix up tags

* fix grammar and accuracy issues

* fix docstring too
2021-05-18 17:10:30 -04:00
Kreusada
5d905a93ac [Docs] Mutes Cog Guide (#4875)
* initial commit

* Update mutes.rst

* Add argument headers

* Change bool name for forcerole

* fixes

* Add mutes to toctree

* spacing adjustment

* Fix spacing between examples, use bullet points

* Add args header

* Add args header

* Add labeler glob

* unify style

* aaaaa wrong branch

* fix grammar and formatting errors
2021-05-18 17:06:50 -04:00
OofChair
99b29d0b8e Grammar fixes (#4793)
* Grammar fixes

I need manage roles permission ->> I need the manage roles permission

* Add quotes, capitalize "Manage Roles"

* Style
2021-05-18 16:39:21 -04:00
Philip
4bcfa8e486 Fix a typo in Track Stuck error (#5029) 2021-05-18 21:30:56 +01:00
PredaaA
48ed6c253e [Audio] Check if player.current is not None before resume (#4961) 2021-05-18 21:30:42 +01:00
PredaaA
9986cbe6b5 [Audio] Check required permissions in events (#4960) 2021-05-18 21:30:26 +01:00
PredaaA
e467833cee [Help] Add missing show_aliases value in help_settings.pretty (#4971)
* [Help] Add missing show_aliases value in help_settings.pretty

* Update redbot/core/commands/help.py

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-05-18 22:28:09 +02:00
Draper
1efcabada1 Cleanup [p]volume and fix infinite retrying in autoplay (#5045)
* This PR depends on Part 2 due to new store value

- cleanup of [p]volume
- a fix for infinite retrying

* update `[p]volume` help

* Update controller.py

* Update redbot/cogs/audio/core/commands/controller.py

meh still hardcoded in RLL .. will be removed in 0.9

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

* Update redbot/cogs/audio/core/commands/controller.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-05-17 09:38:30 +00:00
Jamie
54e5307307 [Streams] Smashcast removal. (#5040)
* Remove smashcast

* style

* remove smash from cog guides
2021-05-15 08:54:56 -08:00
fredster33
737e4cc399 Fix dead link in CONTRIBUTING.md (+ grammar fix) (#4921)
* Fix 404 link

* Grammar edits
2021-05-15 03:33:22 +02:00
benno1237
4bdc828670 Added owner check for audiostats (#5017)
* Added owner check for audiostats

* Update redbot/cogs/audio/core/commands/miscellaneous.py

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

* Update miscellaneous.py

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2021-05-12 17:24:07 -07:00
Obi-Wan3
c04c2efeff [Docs] updates to the Linux and Mac auto-restart docs (#5020)
* [Docs] add `sudo systemctl disable` to Linux auto-restart docs

* [Docs] fix typo in Linux auto-restart docs

* [Docs] update Mac auto-restart docs

* [Docs] implement suggestions for Linux auto-restart docs

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

* [Docs] update wording on Mac auto-restart docs

* [Docs] fix grammar in Linux auto-restart docs

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-05-12 10:59:54 -07:00
Kreusada
2374b4af59 [Downloader] Fix spacing in [p]cog install response (#5034) 2021-05-10 19:26:15 +00:00
Kreusada
d666c24bd4 [Docs] Reports Cog Guide (#4882)
* [Docs] Reports Cog Guide

* Add cog to toctree

* corrections for docs tox style

* Edit sig (#4881)

* fix typo

* Add labeler glob

* unify style

* decapitalize disable

* black
2021-05-07 20:51:15 -04:00
jack1142
1697d90c53 Stop shadowing variable in customcom's arg handling 2021-05-04 16:53:39 +02:00
Obi-Wan3
7f05841b96 [Downloader] Fix [p]cog uninstall examples (#5019)
* [Downloader] fix `[p]cog uninstall` examples

* [Docs] fix Downloader guide's `[p]cog uninstall` examples
2021-05-02 19:18:38 +02:00
jack1142
01561fbe07 Fix permissions for CodeQL workflow (#5009) 2021-04-22 20:00:24 +00:00
Kowlin
f89223bc74 [Templates] Remove unused fields (#5007)
* Remove unused fields

* Update order

* Revert "Update order"

This reverts commit ef77aeb08f.

* Fix my oopsie...
2021-04-22 21:34:31 +02:00
jack1142
336abcfbba Update workflows with needed permissions (#5003) 2021-04-20 18:43:18 +02:00
jack1142
925ae870ba Nuke PR template (#4999) 2021-04-19 19:39:41 +02:00
jack1142
0447b5648a Include bot as an argument to the cog class in the cog creation guide (#4988) 2021-04-17 16:37:59 -04:00
palmtree5
5de65a74b5 Mac autostart docs (#4082)
* Mac autostart

* Make requested changes to these instructions

* Add a note about how to view the logs
2021-04-15 17:58:22 -07:00
Kowlin
7434a7c8e2 Migrate issue templates over (#4982) 2021-04-13 23:23:23 +02:00
Kowlin
f21addb0f5 Goodbye sweet prince (#4973) 2021-04-09 01:10:38 +00:00
jack1142
39144ed7cd Update API url for Picarto.TV (#4970) 2021-04-08 21:20:34 +02:00
jack1142
aea0db4ef6 Include more files in distributions (#4964)
* Include LICENSE files in distributions

* Use pep517 isolated builds

* Update the GH Actions workflow
2021-04-08 02:35:47 +02:00
bobloy
0eaa0f494c [Docs] Core Cog Guide (#4597)
* Core guide initial commit

* Mydata docstrings

* Regenerated docs

* Lots more docstrings

* Add document link

* Up to load docstrings

* Black formatting

* docstring semantics

* "cog packages" for loads

* Refix line lengths

* Regenerate docs

* Remove link

* Regenerate docs with new code

* Some small docstrings

* Regenerate docs with new .. warning code

* More docstrings into the `set` command

* Bullet lists need blank lines.

* Regenerate docs

* Regenerate docs (fix bullet lists)

* set activity statuses docstrings

* Docstrings up to helpset pagecharlimit

* Regenerate docs

* Core guide initial commit

* Mydata docstrings

* Regenerated docs

* Lots more docstrings

* Add document link

* Up to load docstrings

* Black formatting

* docstring semantics

* "cog packages" for loads

* Refix line lengths

* Regenerate docs

* Remove link

* Regenerate docs with new code

* Some small docstrings

* Regenerate docs with new .. warning code

* More docstrings into the `set` command

* Bullet lists need blank lines.

* Regenerate docs

* Regenerate docs (fix bullet lists)

* set activity statuses docstrings

* Docstrings up to helpset pagecharlimit

* Regenerate docs

* Maxpages and delete delay docstrings

* spagetthi ctrl+v

* tagline and contact

* A little more contact

* Up to allowlist

* Up to command defaultdisablecog

* Regenerate docs

* Redo custominfo to not be terrible

* Up to default enabled cog

* More docs

* Up to command disabledmsg

* Disabled message stuff was missed

* Finish the rest of the docstrings

* Regenerate docs

* Longer description of the cog

* Regenerate Docs

* Fix some of the suggestions

* Apply additional suggests and some small rewording.

* Regenerate docs.

* Apply suggestions and make additional fixes

* Regenerate docs

* Clarifies it's only loaded.

* Regenerate docs.

* New formatting, more examples, some fixes

* Regenerate docs

* Adds consistant use of dashes to arguments

* More consistant punctuation

* Regenerate docs

* Add labeler detection

* Fix example and use clearing language for helpset verifyexists docstring

* Regenerate docs

* Add leave example and arguments

* Regenerate docs

* Regenerate docs

* Make embedset more readable

(933aefd3ee was the sphinx compatible update)

* Regenerate docs

* Black formatting

* Regenerate docs

* Adds docstring examples and arguments for multiple `embedset` subcommands

* Regenerate docs
2021-04-07 13:01:34 -04:00
Kreusada
19dcc52fb1 Update issue templates with new key name for description (#4957)
* Initial commit

* Use `description` instead of `about`
2021-04-06 22:04:21 +02:00
jack1142
1c7b1e0358 Fix dev bump in Publish Release workflow (#4952)
* Fix dev bump in Publish Release workflow

* I made a PR from the wrong branch...
2021-04-06 19:19:31 +02:00
Pred
82edaeeb81 [Downloader] Show repo's name (#4954)
* Add forgotten format

* leave me alone
2021-04-06 15:15:00 +00:00
jack1142
2f16d33971 Version bump to 3.4.10.dev1 (#4953) 2021-04-06 04:06:37 +02:00
jack1142
6a99becdb2 Update publish_release.yml 2021-04-06 03:57:06 +02:00
github-actions[bot]
062211d099 Version bump to 3.4.9 (#4951)
* Version bump to 3.4.9

* Update changelog_3_4_0.rst

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-04-06 03:50:53 +02:00
jack1142
84f1699b8f Red 3.4.9 - Changelog (#4950)
* Red 3.4.9 - Changelog

* Add info about d.py bump
2021-04-06 03:43:05 +02:00
jack1142
6cf54db308 Fix command error handlers (d.py micro bump) (#4949) 2021-04-06 03:35:55 +02:00
jack1142
fa25033be1 Fix dev bump in Publish Release workflow (#4948) 2021-04-06 03:22:01 +02:00
jack1142
36c9d9aaee Version bump to 3.4.9.dev1 (#4947) 2021-04-06 01:41:29 +02:00
github-actions[bot]
2c82a4ba2b Version bump to 3.4.8 (#4945)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-06 00:55:59 +02:00
github-actions[bot]
6cae1c0204 [i18n] Automated Crowdin downstream (#4946)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-06 00:55:36 +02:00
jack1142
1b6fc00039 Red 3.4.8 - Changelog (#4941)
* Add 3.4.8 section

* PR 3833 (issue 3699)

* PR 4801 (issue 4789)

* PR 4742 (issue 4731)

* PR 4898

* PR 4871 (issue 4766)

* PR 4878

* PR 4904 (issue 4900)

* PR 4897

* PR 4889 (issue 4888)

* PR 4877 (issue 4700)

* PR 4876

* PR 4869, 4870

* PR 4866

* PR 4865

* PR 4864

* PR 4942

* PR 4830

* PR 4821

* PR 4790

* PR 4746 (issue 4735)

* PR 4831 (issue 4720)

* PR 4049

* PR 4928

* PR 4914 (issue 4905)

* PR 4917 (issue 4916)

* PR 4940

* PR 4938

* PR 4004

* PR 4883 (issue 4808)

* PR 4933

* PR 2952

* PR 4910

* PR 4907

* PR 4908

* PR 4839

* PR 4906

* PR 4932

* PR 4565

* Add release date and contributor list

* Remove empty section

* Apply suggestions from code review

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2021-04-06 00:55:26 +02:00
jack1142
e2c0f2aca8 Revert "[Streams] Remove stream alert if stream not found (#4939)" (#4943)
This reverts commit 3c742e39d2.
2021-04-05 23:40:06 +02:00
jack1142
83deb7c563 Update instructions to use Python 3.8.9 (#4942) 2021-04-05 23:25:10 +02:00
jack1142
c574271cee Fix no dispatch on shared API token removal (#4917) 2021-04-05 14:28:23 -06:00
PredaaA
a6d15dc385 [Streams] Stop suppressing task cancelation in _stream_alerts() (#4940)
* Minimize the API calls

* Address Jack's review.

* [Streams] Actually cancel the _stream_alerts task.
2021-04-05 22:22:20 +02:00
jack1142
07099dd1dd allowed_by_whitelist_blacklist() - add guild param, deprecate guild_id (#4914)
* allowed_by_whitelist_blacklist() - add guild param, deprecate guild_id

* Add clarification to description of `guild`, `guild_id`, and `role_ids`

* style :|

* Update redbot/core/bot.py

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

Co-authored-by: TrustyJAID <TrustyJAID@gmail.com>
2021-04-05 14:20:21 -06:00
Kreusada
d1ed41c46b [Image] Improve explanations of arguments in docstrings and help (#4874)
* Initial commit

* Give arguments their descriptions

* Add usage

* fixes for black
2021-04-05 16:16:41 -04:00
PredaaA
3c742e39d2 [Streams] Remove stream alert if stream not found (#4939)
* Remove stream if not found

* Address Jack's review.
2021-04-05 20:13:00 +00:00
PredaaA
9a7c178db5 [Streams] Minimize Twitch API calls (#4938)
* Minimize the API calls

* Address Jack's review.

* Check for self.id first.

* *inhales*

* Update redbot/cogs/streams/streamtypes.py

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

* Apply suggestions from code review

* Update redbot/cogs/streams/streamtypes.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-04-05 22:10:41 +02:00
jack1142
67fa735555 Use partial messages in Streams cog to avoid potential leakage (#4742)
* Use partial messages in Streams cog to avoid leakage

* Stop trying to save bot object to Config...

* Put guild id as part of message data

* Fix AttributeError

* Pass bot object to stream classes in commands

* ugh

* Another place we use this class in

* more...
2021-04-05 21:39:33 +02:00
Twentysix
c25095ba2d [Core] Use menus for [p]servers, improve [p]leave (#4831)
* [Core] Use menus for [p]servers, improve [p]leave

* Apply suggestions from code review

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

* Few more changes

* Add empty line...

* style

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Samuel <50765275+npc203@users.noreply.github.com>
2021-04-05 19:37:23 +00:00
jack1142
adda30cbee Bump discord.py to 1.7.0 (#4928)
* Bump discord.py, but to the git version for now

* Import GuildConverter from d.py and deprecate our implementation

* Import PartialMessageConverter in our commands extension

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

* Update snowflake regex to use 20 as max length

See Rapptz/discord.py#6501

* Use new supported way for custom cooldown buckets

* Include group args in command signature

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

* Add StageChannelConverter and StoreChannelConverter

* Fix AttributeError in licenseinfo
2021-04-05 21:33:19 +02:00
jack1142
9008410fa4 Fix dropping db in redbot-setup delete (#3833)
* Fix dropping db in `redbot-setup delete`

* fix docstrings
2021-04-05 21:17:18 +02:00
Draper
b7d8b0552e I promise I'm not doing this on purpose (#4565)
* Prep for 0.7.2

* So What di i do here? I done Magic, magic only found in the tales of old.

* turns out formatting is something important

* fixes

* improved Error handling when Global API is enabled

* further improve resuming logic

* more of dat dark voodoo blood magic

* major tweaks to auto restore when auto play is enabled 👀

* fix duplicated "Auto play stated." message + Auto play restart :feelsgoodman:

* missed these

* fix the new duplicated fucking message bitch.

* Let discord handle player reconnects

* eh

* `Requires force install`, utilize new Exponential Backoff object on player and safer reconnect logic, emulating d.py and WL.

* hmmmmm gotta monitor

* mother fucking brackets

* Why didnt i consider this the first time?????????????

* new error code to handle?

* soooooooooooooooo these are import so why arent we ensuring they are set.

* improved logging

* improved logging

* aaaaaaaaaaaaaaa

* We need our own error and special handling to not conflict with dpy

* (Last Known Bug) Fix the infinite loop of 4006 that sometimes could happen as an edge case after a successful resume.

* This will require a force reinstall to install `RLL 0.8.0`, this properly fixes the bug mentioned on the previous commit.

* address "Localtrack names/paths need to be escaped." comment

* address Fixators crash mentioned in #AT

* style

* fix preda's crash mentioned in PR

* add a thing here add a thing there add a thing everywhere

* style

* fixes here, fixes there, and backbone for curated playlist.

* bypass aiohttp and githubs and cloudflare and yo mammas cache

* I propose the new style is no style.

* allow curated playlist to be updated it `[p]playlist update` and show the diff

* fix `[p]summon` not resuming playback until next track.

* Hopefully handle predas rate limits.

* what else did i break now

* Update Lavalink.jar build

* lets try this

* reset the queue

* Bring Edge commits over fix a bunch of shiz again

* Bring Edge commits over fix a bunch of shiz again

* Handle 4014 OPs, Change `skip_votes` key to be an int rather than guild object

* aaaaaaaaaaaaaaa im dumb

* ...

* Simplify some shiz + use a set instead of a list for votes.

Co-authored-by: aikaterna <20862007+aikaterna@users.noreply.github.com>
2021-04-05 21:02:24 +02:00
Pred
1199f160d0 Add plural forms to Downloader (#4004)
* 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

Co-authored-by: Predeactor <ubuntu@vps-35e65bf5.vps.ovh.net>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-04-05 16:37:36 +00:00
PredaaA
5ddc6d2ea8 [Streams] Handle Twitch ratelimits (#4883)
* [Streams] Handle Twitch ratelimits.

* Also handle possible API or client errors.

* Add Jack's changes request.

* Update redbot/cogs/streams/streamtypes.py

* Update redbot/cogs/streams/streamtypes.py

* Update redbot/cogs/streams/streamtypes.py

* Update redbot/cogs/streams/streamtypes.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-04-05 14:23:04 +00:00
aikaterna
6e764c7e04 [Audio] Update Lavalink.jar build (#4932) 2021-04-05 10:18:06 +02:00
Toby Harradine
18a23813c8 Better user feedback during slow backend migrations (#2952)
* Better user feedback during slow backend migrations

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

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

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

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

* Make `async_tqdm` support async-for loops

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

* Reformat

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

* Remove unused method

* Remove quotes for the return type annotation

* Few style improvements

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-04-05 09:41:31 +02:00
jack1142
560e1dfc3d Add per-command embed settings (embed_requested) (#4049)
* Add per-command embed settings

* Update `[p]embedset showsettings`

* Use command.qualified_name in `[p]embedset` commands

* Fix the call to subcommand and simplify it

* And I oversimplified this

* Update end user messages to use 'guild' rather than 'server'

* meh

* This should be a named field

* Add check for Embed Links perm to confuse users a bit less

* Wrap this string in _()

* Let's use a different exception then...

* Let's clear the setting when we can in whole `[p]embedset`

* Add the order of checking to help of `[p]embedset`

* Add note about full evaluation order to subcommands
2021-04-04 13:37:46 -06:00
Pred
03d72dd5fa [Cleanup] Pre-set the variable to None in [p]cleanup before (#4931)
* [Cleanup] Handle missing message_id and reply

* Fix a new situation where we could end up with unwanted `None`

* I suck at this (style fix)

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-04-04 09:34:11 +00:00
PredaaA
847444eab1 [Mutes] Fix data conversion to shema_version 1 and add a note about it (#4934)
* [Mutes] Add a note about conversion to schema_version 1

* Only start the conversion if all_channels

* Actually do what the previous commit said

* okay this time is the right time

* Update mutes.py

* Move conversion to its own method

* Update mutes.py
2021-04-03 18:43:36 -06:00
Jamie
6c338f175b [Audio] ctx.message.guild -> ctx.guild + store ids rather than whole guild in skip_votes (#4867)
* ctx.invoke -> bot.invoke
ctx.message.guild -> ctx.guild

* remove the invoke stuff

* remove invoke stuff

* use id attrib instead of entire guild

* change type hinting too

* change second typehint
2021-04-04 00:01:10 +02:00
PredaaA
363a2e8a17 [Mod] Only loop through guilds in config when checking tempbans (#4907)
* [Mod] No longer loop through all guilds on check_tempban_expirations.

* Address Jack's review.

* I don't think this comment actually served any purpose

* Split this into more methods

* Small optimization for cases where the guild tempbans weren't updated

* Blackify

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-04-03 23:59:41 +02:00
PredaaA
edbd31413b Handle NSFWChannelRequired in events. (#4933) 2021-04-03 23:23:53 +02:00
Vexed
4813c68185 Add note about updating cogs to update message and docs (#4910)
* Add update note to the docs

* And now the DM

* consistent wording

* Clarify the command should be ran in Discord

* apply docs suggestions

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

* apply events.py review

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-04-03 20:38:57 +02:00
jack1142
0becf70b05 Use sphinx-prompt extension (#4908)
* Use sphinx-prompt extension

* Update PM2 guide

* Use an actual proper way to run Red with PM2

* Fix pm2 docs

Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
2021-04-03 16:52:11 +00:00
jack1142
0144cbf88b Add deprecated-removed directive to Sphinx (#4912)
* Add `deprecated-removed` directive to Sphinx

* Add equivalent function to internal utils
2021-04-03 18:48:17 +02:00
Kreusada
76bb65912e [Core] Improve responses to [p]set (server)prefix commands (#4898) 2021-04-03 03:10:53 +02:00
Kreusada
01637a9798 [Docs] Use pascal casing for example cog in cog creation guide (#4930) 2021-04-03 02:56:10 +02:00
Flame442
7c853db9f4 [Alias] Strip extra whitespace from fake command messages (#4871) 2021-04-03 02:33:29 +02:00
OofChair
a919610588 Use embed_color for embeds in Warnings cog (#4878)
* add  color 

* add color on line 315, fix line 340

* Black style

* fix color on line 341

* thanks jojo >_>

* dont need i18n here

* Black style again :D
2021-04-03 02:30:26 +02:00
Kreusada
49da854eb7 Add user/role names to [p](local)allow/blocklist list (#4839)
* start

* Get user inside blocklist/allowlist lists

* Changes to cover unknown or deleted users

* Use square brackets for clarity

* Implement the above commit for all four versions

* Much improved UI, removed `[]` to fit new format

* updates to support roles in local version

* add /role to unknown str

* Improve variable names

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-04-03 01:28:06 +02:00
Obi-Wan3
c168e55be9 [Warnings] fix raw namedtuple output (#4904) 2021-04-02 23:09:18 +02:00
PredaaA
35dfb04066 [Mutes] Add guild ID to mutes data (#4906)
* [Mutes] Add guild ID to mutes data.

* Actually make the whole thing works.

* config version as integer, and init task no longer in setup

* oops

* Fix cog_disabled_in_guild check.

* Add Trusty's requested changes.
2021-04-01 19:01:43 -06:00
PhenoM4n4n
fb701d8c72 Allow Cleanup before/after to accept message replies (#4790)
* cleanup after

* style

* bring back cleanup before

* style

* docstring

* make message id optional
2021-03-29 14:39:31 +02:00
jack1142
24fadad4cf Remove unnecessary escape (#4901) 2021-03-29 14:07:53 +02:00
jack1142
f30772a7bd Raise StreamNotFound for 404 errors in YouTube RSS feed (#4746)
* Raise `StreamNotFound` for 404 errors in YouTube RSS feed

* Catch `StreamNotFound` exception in bg task and remove such streams
2021-03-29 14:05:42 +02:00
jack1142
b71d278ae5 Use explicit name of the python packages for openSUSE Tumbleweed, add warning for Arch instructions (#4866)
* [Docs] Use explicit name of the python packages for openSUSE Tumbleweed

* Add warning for Arch Linux instructions

Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
2021-03-29 13:59:19 +02:00
jack1142
be00a59ab3 Fix the tracking of nicks that were set just before nick reset (#4830) 2021-03-29 13:54:37 +02:00
❥sora
d45a02166d a small typo (#4915) 2021-03-26 19:13:00 +01:00
Sougata das
a4db7a1028 Add meaningful error messages for bad arguments in [p]bank set (#4801)
* bot will give meaning full message for bad argument

* reformated python code and updated warning message!

* warning message updated

* warning message updated

* warning message updated(1)

* warning message updated(2)

* warning message updated(3)

* Address the review

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-03-26 16:00:56 +01:00
jack1142
ef803072fa Update ambiguous oid parsing to detect candidates on Git 2.31+ (#4897)
* Update ambiguous oid parsing to detect candidates on Git 2.31+

* Update tests
2021-03-24 00:52:52 +01:00
jack1142
e5ffe86c4e Improve labeler configuration to include docs (#4902) 2021-03-21 01:25:47 +01:00
jack1142
d1bc4b4302 Small meta cleanups (#4893)
* Remove the unneeded pytest options from pyproject.toml

* Clean up setup.py from old readthedocs.org workaround

* Removes unused folder

* Simplify list of excluded files in black's configuration

* Fix returned exit codes in `make.ps1`

* Add Sublime's project files to `.gitignore`

* Update the link to Black in README and contributing guidelines
2021-03-16 19:51:48 +01:00
jack1142
6c903aacff Update Downloader tests to work with newer git versions (#4891) 2021-03-16 19:50:51 +01:00
Kreusada
1b3958515b [Reports] Improve usage in the report command's decorator (#4881)
* [Reports] Improve usage in the report decorator

* fix sig
2021-03-15 00:01:36 -04:00
Kreusada
fef56427ae [Docs] Add explanation for multiple arguments (#4889)
* [Docs] Add explanation for multiple arguments

* ordering fix

* Add example

* syntax
2021-03-14 23:47:53 -04:00
jack1142
18fea4e4a7 Remove duplicate questions in hockey trivia (#4887) 2021-03-14 04:49:24 +01:00
Pred
f82d613a11 how dare you... (#4885) 2021-03-13 18:18:55 -05:00
kingslayer268
0c3e772135 Added use spoilers functionality (#4877)
* Added use spoilers functionallity

* Update trivia.py

* Update session.py
2021-03-07 22:27:41 +01:00
kingslayer268
c78ee14617 Fix AttributeError in Context.delete_messages() (#4876)
delete_messages() isn't an attribute of DMChannels
2021-03-06 16:21:25 +01:00
TheDiscordHistorian
3782e9c1b9 fix a minor grammar issue (#4846)
The docstring says "cogs the folder" which should be "cogs folder"
2021-03-03 20:44:39 +01:00
kreusada
8d03fef566 [Docs] Image Cog Guide (#4821)
* [Docs] Images Cog Guide

* [Docs] Image Cog Guide

* Fixes for directory inside the index

* The cog is cakked IMAGE not IMAGES

* Potential fixes for failing checks

* Grammar fixes

* Some formatting updates

* Fix merge conflicts from 3.4.7

* Re-format for requested changes
2021-03-03 14:19:33 -05:00
OofChair
77896494c4 [Docs] Add nano package to Linux install guides (#4870)
* [Docs] Add installation instructions for nano

As some servers don't have nano preinstalled, I added the installation instructions here.

* Formatting fix

* Update autostart_systemd.rst

* Add nano to installation instructions

* Add nano to all OS installation instructions

* Remove nano from OSX installation

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

* Remove trailing whitspace

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

* Put nano at the end

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

* Put nano at the end

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

* Put nano at the end

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

* Put nano at the end

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

* Update install_linux_mac.rst

* Minimize diffs

Co-authored-by: kreusada <67752638+kreusada@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-03-03 17:14:15 +01:00
OofChair
aad34f2b08 sudo -e -> sudo nano (#4869)
I changed this as it was mentioned in #4082. (https://github.com/Cog-Creators/Red-DiscordBot/pull/4082#issuecomment-789291030)
2021-03-03 00:19:59 +01:00
jack1142
85dc6f4cc9 Use brew install --cask instead of brew cask install (#4865) 2021-03-01 09:25:55 -08:00
jack1142
7126482449 Drop support for EOL systems and update instructions to use Python 3.8.8 (#4864)
* Drop support for EOL systems (Fedora 31, openSUSE Leap 15.1)

* Bump Python in Windows and pyenv install guides to 3.8.8
2021-02-28 15:45:48 +01:00
jack1142
9bb61ba882 Make files - fallback to python(3.8) from PATH if .venv doesn't exist (#4863) 2021-02-28 15:39:28 +01:00
jack1142
1ff976b3d0 Add make.ps1 cmdlet + activateenv command for Windows make scripts (#4087)
* Add missing command to `make.bat`'s help

* Add `activateenv` and `deactivateenv` commands to `make.bat`

* Add help to `Makefile`

* Add `make.ps1` cmdlet
2021-02-27 12:23:32 +01:00
jack1142
53c069a636 Auto-put PRs from release workflows in the proper milestone + minor things (#4862)
* Make workflow name use TitleCase

* Indicate in the PR description that it's a multi-part workflow

* Auto-put PRs from Prepare Release workflow in the proper milestone

* Rename "Publish the release" workflow to "Publish Release"

* Auto-put PR from Publish Release workflow in the proper milestone
2021-02-27 11:22:54 +01:00
Fixator10
bb90444979 [Changelog] Fix argument name in 3.4.6 changelog (#4861) 2021-02-26 21:37:35 +00:00
jack1142
19fc5a090c Version bump to 3.4.8.dev1 (#4860) 2021-02-26 19:08:12 +00:00
kreusada
0d53b2ab73 [Changelog] Fix URL (#4859) 2021-02-26 19:05:22 +00:00
jack1142
d3b448d50c Fix publish_release workflow (#4858) 2021-02-26 19:04:36 +00:00
github-actions[bot]
02667ef65d Version bump to 3.4.7 (#4856)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-26 19:53:11 +01:00
github-actions[bot]
51b73fdd1a [i18n] Automated Crowdin downstream (#4857)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-26 19:51:59 +01:00
jack1142
f926fab431 Fix prepare_release workflow (#4855) 2021-02-26 18:43:00 +00:00
jack1142
dbbaa88e8e Red 3.4.7 - Changelog (#4852)
* wip

* wip 2

* wip 3

* Add contribs list!
2021-02-26 19:31:25 +01:00
Kowlin
df5926b51a [Core] Clarify that the owner is a team in [p]info (#4851)
* Clarify that the owner is a team.

* This should do.

* Style check... for a comma, in your dreams Tox...

* Annndddd for the insane people who don't use embeds
2021-02-26 18:48:22 +01:00
jack1142
7d42c4c6c3 Minor text fix in Mutes cog (#4853) 2021-02-26 18:32:11 +01:00
Ellie Saurich
dfe84f9936 [Mutes] Wrong error message when muting fails (#4850)
* [Mutes] Wrong error message when muting fails

* This applies to both mute and unmuting of members.

Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
2021-02-26 08:22:04 +00:00
Jamie
649b4ebb15 add checks to 2 muteset commands (#4849) 2021-02-26 03:14:56 +01:00
jack1142
f476b842d5 Work around actions/labeler's upstream issue with label sync setting (#4844)
* Work around `actions/labeler`'s upstream issue with label sync setting

* Add comment about this being a workaround
2021-02-23 14:57:34 +01:00
kreusada
92ea92b617 [Docs] General Cog Guide (#4797)
* [Docs] General Cog Guide

* Doc Style Fixes

* Requested Changes

* Additional grammar fix that was missed

Co-authored-by: kreusada <67752638+kreus7@users.noreply.github.com>
2021-02-22 13:56:43 -05:00
Jamie
ae2bae058c change domain to .app (#4840) 2021-02-20 23:50:40 +01:00
palmtree5
b20fc9f6af [Docs] Trivia user guide (#4566)
* Start on Trivia user guide

* Finish command coverage + add to toctree

* wip note on list creation section

* Apply suggestions from code review

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

* Update docs/cog_guides/trivia.rst

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

* Drop list creation guide for now + fix formatting

* Apply suggestions from code review

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

* permissions notes

Co-authored-by: bobloy <alboblexloy@gmail.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2021-02-20 14:38:18 -05:00
Kowlin
fc5eadd0cc [Meta] Issue template migration (#4809)
* Issue template migration

* Fixes pt. 1

* Fixes pt. 2

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-02-19 19:01:52 +01:00
jack1142
c5fbf5fb94 Change things up with Crowdin and release-related workflows (#4833)
* Alternative way of doing Crowdin...

* Limit the upload translations workflow to V3/develop

* Make the workflow close and reopen the PR automatically while I'm at it

* Add a workflow for preparing PRs for release

* Make the crowdin env vars local to the step requiring them

* Move dev bump to Publish Release workflow
2021-02-18 14:43:21 +01:00
jack1142
54bbdd61e1 Version bump to 3.4.7.dev1 (#4825)
* Version bump to 3.4.6

* Version bump to 3.4.7.dev1
2021-02-16 20:43:18 +01:00
jack1142
512ff7a4b5 Version bump to 3.4.6 (#4824) 2021-02-16 20:22:43 +01:00
jack1142
6881b20c20 Red 3.4.6 - Changelog (#4743)
* Fix some stuff from previous changelogs

* Add 3.4.6 section

* PR 4579

* PR 4710

* PR 4649 (issue 3931)

* PR 4714

* PR 4728

* PR 4740

* PR 4741

* PR 4738 (issue 4405)

* PR 4599

* PR 4733

* PR 4739 (issue 4676)

* PR 4742 (issue 4731)

* PR 3870

* PR 3833 (issue 3699)

* PR 4426

* PR 4715

* PR 4563 (issue 3752)

* PR 3040

* PR 4667

* PR 4726 (issue 4702)

* PR 4647

* PR 4709

* PR 4694 (issue 4693)

* PR 4745

* PR 4749

* PR 4768 (issue 4767)

* PR 4697

* PR 4770

* PR 4772 (issue 4771)

* PR 4758 (issue 4661)

* PR 4705, 4748, 4750, 4788, 4810

* PR 4572 (issue 3777)

* PR 4791

* PR 4754

* PR 4805

* PR 4778

* PR 4800

* PR 4801 (issue 4789)

* PR 4814

* PR 4815

* PR 4819 (issue 4818)

* PR 4822

* Revert entries for unmerged PRs (3833, 4742, 4801)

* PR 4785

* PR 4799

* Add list of contributors

* Add release date

* PR 4763, 4792

* Wew, I almost forgot!

* PR 4660

* Apply suggestions from code review

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

* Update docs/changelog_3_4_0.rst

* Update docs/changelog_3_4_0.rst

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

* Update docs/changelog_3_4_0.rst

* Add Wyn

* What do you think of that, Flame?

* PR 4827

* Jack is dumb

* Jack is dumb 2

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2021-02-16 20:22:22 +01:00
github-actions[bot]
e80a00ec1b [i18n] Automated Crowdin downstream (#4829)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-16 19:22:05 +00:00
Flame442
7b04c04551 [Mod] Add two new settings to disable name/nickname tracking (#4799)
* Add default settings for name tracking

* Add configuration command for name tracking

* Check the track names settings before tracking

* *grumble*

* Fix permissions levels

* Update settings.py

* Use clean_prefix in inline, and don't use f-strings in `_()`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-02-16 20:13:37 +01:00
PhenoM4n4n
62411bc2a5 Add a command for deleting usernames and nicknames to Mod cog (#4827)
* mod delete names

* sTyLe fOrMAttInG

* Remove `[p]deletemodkeys` and have `[p]deletenames` remove empty keys

* Rename `[p]deletenames` to `[p]modset deletenames`

* Fix wrong variable being used

* Add confirmation to avoid mistakes

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-02-16 19:58:00 +01:00
Wyn
bee022d1bb Make [p]selfrole without subcommand "toggle" the selfrole (#4826)
* Merge selfrole and remove into one command

replacement pr

* docs

add to the docs

* Update admin.py

remove register name

* Update admin.rst

* Fixes

* Fix the duplicated command decorators

* Minimize the diff

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-02-16 15:16:16 +01:00
Andy
1be7435fb5 fix grammar issues (#4763)
in line 28, it used to be "The message will be send to the user", I fixed it to "The message will be sent to the user".

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

* author(s)
2021-02-15 23:31:01 +01:00
jack1142
dc68bc5d37 Fix error handling for API calls to videos endpoint in YouTube alerts (#4745) 2021-02-15 12:25:30 -09:00
Andy
5b670c074f Update [p]economyset slottime&paydaytime to use TimedeltaConverter and not accept negative integers (#4807)
* add a time converter, as well as not allowing negative integers

* timedeltaconverter

* styling and unused imports

* update docstrings

* update param name to "duration" instead of seconds

* make timedelta default_unit seconds

* better descriptions & docstrings

* docs for updated paydaytime & slottime

* Fix style

* Few minor fixes

* Cast `total_seconds()` return type to `int`

* Fix one of my own issues

* Make the duration argument catch-rest for convenience

* One more fix for the docs

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-02-15 22:25:03 +01:00
aikaterna
1a9ce2040a [Audio] Update manager.py for new Lavalink build (#4823) 2021-02-15 22:16:47 +01:00
Slave In Utero
4fa8a51ea1 gen-6-pokemon-trivia (#4785) 2021-02-14 23:23:37 -05:00
aleclol
acec5c6efe [Mod] Add default bot color to kick & ban DM (#4822) 2021-02-15 01:34:05 +01:00
aikaterna
d64944d5c3 Update Lavalink.jar build (#4819) 2021-02-15 00:50:58 +01:00
jack1142
6cfaffb8a8 Add i18n deco to Dev and Mutes cog (#4815)
* Add i18n deco to Dev cog

* Add i18n deco to Mutes cog
2021-02-15 00:19:34 +01:00
MAX
3122eb0447 Rename [p]cleanup spam to [p]cleanup duplicates (#4814)
* rename `spam` to `duplicates` and aliases it to `spam`

* style
2021-02-14 21:41:04 +01:00
github-actions[bot]
bf30f2078c [i18n] Automated Crowdin downstream (#4816)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-14 16:57:35 +01:00
jack1142
33850a2c35 Update Python version installed in instructions to 3.8.7 (#4770)
* Update Python version installed in instructions to 3.8.7

* Update the one in Windows instructions too
2021-02-13 17:31:14 -05:00
jack1142
40368cc379 Fix changing default state for a cog as enabled/disabled (#4768)
* Fix changing default state for a cog as enabled/disabled

* Add `, None`
2021-02-13 17:24:42 -05:00
kreusada
a9e572d55a [Reports] Use the bot's default colour for report output (#4800)
* [Reports] Use `ctx.embed_colour()` for report output

* Add context

Co-authored-by: kreusada <67752638+kreus7@users.noreply.github.com>
2021-02-13 17:07:48 -05:00
bobloy
4ca2fe0872 [Docs] Add information about the red index (#4778)
* Add information about the red index

* Update docs/guide_publish_cogs.rst

Co-authored-by: BreezeQS <70638053+BreezeQS@users.noreply.github.com>

Co-authored-by: BreezeQS <70638053+BreezeQS@users.noreply.github.com>
2021-02-13 13:08:33 -05:00
iStrqfing
dd9e60b15f [Trivia] [Overwatch] General + Hero Changes (#4805)
Current/up to date answers regarding some hero's health and abilities
Added more options for "What does Tracer say when using her ultimate?"
Competitive point changes for Season 6+ on August 29, 2017 patch
Mercy's major rework on September 19, 2017 patch
Hanzo's major rework on May 3, 2018 patch
Symmetra's major rework on June 6, 2018 patch
"Offense" and "Defense" categories have been merged into "Damage" on June 26, 2018 patch
McCree's roll cooldown decreased on October 9, 2018 patch
Torbjorn's health changed on March 19, 2019 patch
Sombra's translocator cooldown increased on October 15, 2019 patch
Orisa's fortify cooldown decreased on December 10, 2019 patch
Ana's sleep dart duration decreased on April 29, 2020 patch
Orisa's health changed on September 24, 2020 patch
McCree and Widowmaker's health changed on October 29, 2020 patch
Reinhardt's health changed on December 10, 2020 patch
Removed "What was the name of the Lunar New Year themed event in Overwatch?:" since this changes every year.
2021-02-13 12:02:56 -05:00
kreusada
ee33d46732 Grammar fixes (#4810) 2021-02-13 10:44:02 +01:00
MAX
4c58dcedfe Copy info about the bands from [p]eq set help to [p]eq help (#4794)
* Update equalizer.py

* style
2021-02-11 22:47:39 +01:00
kreusada
82595df730 [Utils] Spoiler Function for Chat Formatting (#4754)
* [Utils] Additional chat formatting functions

* [Utils] Updated docstrings to unify with other docstrings

* [Utils] Spoiler feature for chat_formatting

* Fixes for black style

Co-authored-by: kreusada <67752638+kreus7@users.noreply.github.com>
2021-02-11 22:31:47 +01:00
Neuro Assassin
1920212eda [Cleanup] Fix error when providing message snowflake above the maximum (9223372036854775807) (#4791)
* [Cleanup] Fix angry error

* haha just kidding, does not work

* change to be clearer

* update to module level

* cmon black

* added in wrong place
2021-02-11 22:30:16 +01:00
jack1142
7df1570d51 Various improvements in usage of Rich in Red (#4726)
* Use Rich's default console object instead of making one

* Bump Rich to version 9.8.2

* Disable indent guides in tracebacks

* Skip empty lines between stack levels in traceback rendering

* Use full width of the terminal when printing tracebacks

* Disabling syntax highlighting on the log messages

* Make logger name bold

* Make logger level bold

* Make URLs in console bold

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

* Show only one line per stack level in tracebacks

* Shuffle things in `redbot.logging` a bit

* Change logging handler while redirecting stdout in Dev cog

* Revert last two commits...

This reverts commit cf563bd06a6ae398da12713ceef3db9cc903d902.
This reverts commit 6dddf300726ddf89b8924441eed59b67b58faca0.

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

* Pass cli_flags to init_logging()

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

* First take on the syntax theme colors

* Use the Windows trick

* ARE YOU SERIOUS!?

* Remove dead code

* Use Monokai when Terminal application supports truecolor

* Syntax theme update

* Change logger name color

* This is not needed

* Adjust logging level colors

* Add a flag for showing local variables in Rich tracebacks

* change imports a bit

* Remove usage of blue color fully

* Stop highlighting in Red-DiscordBot splash

* Fix unreadable paths in tracebacks

* Make CRITICAL logging level more readable

* Make time in logs more readable

* Fix the first row being bolded in tables

* Update rich to 9.9.0
2021-02-11 14:20:10 -07:00
github-actions[bot]
663876fba3 Automated Crowdin downstream (#4804)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-11 13:20:38 +00:00
jack1142
ae87aa396a Bump Red's deps and all the pip deps used in our Actions (#4572)
* Bump Red's deps

* Bump deps in all our actions

* Don't bump flake8 in Lint Python action

* Bump apsw-wheels too
2021-02-11 02:40:36 +01:00
kreusada
bf624da51b Grammar fixes (#4788) 2021-02-05 09:48:34 -05:00
github-actions[bot]
0f8f33fed2 Automated Crowdin downstream (#4734)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-02-04 18:05:40 +00:00
jack1142
f9848a69b7 So close, and yet so far away - issue forms for the last time tonight (#4784) 2021-02-02 00:50:10 +01:00
Kowlin
082106eb21 Oh boy! more issue templates! (#4783)
* Oh boy! more issue templates!

* Add some descriptions to command_bug.yml

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

* Update feature_request.yml

* Update command_bug.yml

* typo

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

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

This reverts commit 9737c1b5eb.

* Story likes to repeat itself

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

* Rename command_bug.md to command_bug.yml

* Update command_bug.yml

* Cog name before command name, thank you

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

* Remove deprecation warnings that are no longer relevant

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

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

* Totally not fixing a typo...

* Jack found a Typo

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

* Max line length Compliancy

Thanks Jack (again lol)

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

* Including rolepaydayamount changes in docs

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

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

* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* BLAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACK

* the

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

* Corrected punctuation for bracket escaping note

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

* Minimize the diff

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

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

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

* don't think that was meant to

* Update kickban.py

* smh

* style????

* hm?

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

i dont even know how to do this :/

* failing style is fun, trynna learn.

* .....

* not the best way but lets try?

* yep, didnt work dropping softban.

* Update kickban.py

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

* Use regex instead and add i18n support

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

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

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

* weird

* Address review

* Update redbot/cogs/modlog/modlog.py

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

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

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

* embed version

* non embed

* config stuff

* testing done

* wow black

* Few things before I start local testing

* Fix new lines

* Make messages not depend on modlog

* Yay voicemutes

* black+import

* what is your ducking problem vscode

* adress review

* this is driving me mad

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

* Fix incorrect type hints

* Remove no longer needed line changes

* Remove unused function

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

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

* They call me dumb for a reason

* Stop overriding variable with duration + various formatting tweaks

* :(

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

* Show info about no reason provided in embed

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

* Update redbot/cogs/mutes/mutes.py

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

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

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

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

to:

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

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

* Fix rst format in docstrings

* Reproduce current behaviour for _ in repl

* Prevent adding existing or reserved names

* Fix typo with environment

* Docstring changes

Apply suggestions from code review

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

* Get env before loop

* Hey I'm not the only one doing typos

* Keep new messages in env

* Clear exception of stack frames

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

* Include the `channel` variable in the reserved names

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

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

* duh

* Apply suggestions from code review

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

* [Streams] Convert naive now time to UTC

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

* Add translation function

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-21 13:41:28 +00:00
Predeactor
edbbd76b3c Document that discord.DMChannel can be used in MessagePredicate (#4718)
* Allow "discord.DMChannel" for MessagePredicate

This closes #4707.

* Optional only takes a single type, use Union

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-21 11:42:10 +01:00
Fixator10
315b3e5c98 Add on_red_before_identify dispatch (#4647)
* add before_identify_hook with `on_identify` dispatch

* move before_identify_hook closer to other "hooks"

* add `red_` prefix to avoid potential conflict

* on_red_before_identify

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

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

* switch note to code-block

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

* Create 3040.enhance.rst

* remove towncrier entry

* Make it i18n friendly.

* That was uneeded to change this actually.

* ...

* ..

* .

* Add a setting for aliases.

* DOTS

* Update redbot/core/core_commands.py

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

* Address requested changes maybe

* New format + changes requested.

* okay we'll get there someday

* honk

* aaaaaaaaaaaaaaa

* Black

* Fix missing humanize_timedelta import.

* style

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

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

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

* style *again*

* use qualified name of the parent command

* meh

* another meh

* Revert the last commit...

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

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

* black

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

* Add check for non-human players

* Apply suggestions from code review

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

* style

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

* Make the global variable name clearer

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

My first pr??

* Rephrase of unsupported warning

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

* Remove azure from free list

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

* Oops

Fixed something that caused docs build to error

* Removal of extra space

Fix of spelling error noticed during review

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

* Fix capitalization error

Idk if this was really necessary, but oh well

* Rephrase free tier note

* Rephrase docker warning

* Small changes

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

* Small fix

Just realized i accidentailly removed Contabo

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

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

* Initial generated docs

* Start on docstrings

* More docstrings

* Some more docstrings

* Rest of the doc strings

* Regenerate docs

* Remove unnecessary language. Move to one line.

* Regenerate docs

* Update redbot/cogs/filter/filter.py

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

* Update redbot/cogs/filter/filter.py

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

* Update redbot/cogs/filter/filter.py

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

* Update docs/cog_guides/filter.rst

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

* Update docs/cog_guides/filter.rst

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

* Update docs/cog_guides/filter.rst

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

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

* Update .github/labeler.yml

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

* Update .github/labeler.yml

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

* Update .github/labeler.yml

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

* Update .github/labeler.yml

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

* Update .github/labeler.yml

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

* Update .github/labeler.yml

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

* *ughhh*

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-01-07 18:09:14 +01:00
Vexed
ecf912bc4b Update docs for 2021 (#4706) 2021-01-01 19:33:48 +01:00
aikaterna
d0a0b3fc53 Update LICENSE for 2021 (#4704)
Thank god this disaster of a year is over, onto the next disaster!
2021-01-01 00:05:44 +01:00
Kowlin
6133075fd6 Bump version to 3.4.6.dev1 (#4691) 2020-12-24 17:40:13 +01:00
Kowlin
e218e092b0 Bump to 3.4.5 (#4690) 2020-12-24 17:23:16 +01:00
Neuro Assassin
7208cdb804 Red 3.4.5 - Changelog (#4692)
* PR 4687

* i dont even know anymore

* fix
2020-12-24 17:21:41 +01:00
github-actions[bot]
13cd751932 Automated Crowdin downstream (#4689)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-12-24 15:45:31 +01:00
Lui
1bdaa9d95e [Streams] Initialize all variables (#4687) 2020-12-24 15:43:05 +01:00
jack1142
67e776a640 Version bump to 3.4.5.dev1 (#4686) 2020-12-24 01:14:16 +01:00
jack1142
dc5f025e02 Version bump to 3.4.4 (#4685) 2020-12-24 00:48:32 +01:00
jack1142
2add689729 Red 3.4.4 - Changelog (#4684)
* Red 3.4.4 - Changelog

* Fix my failures

* Flame is a person too

* Apply suggestions from code review

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

* Update changelog_3_4_0.rst

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2020-12-24 00:43:51 +01:00
Flame442
3716bf25a7 [Docs] Create CC requirements docs (#4637)
* Create guide_cog_creators.rst

* Update guide_cog_creation.rst

* FTFY <3

* Bullet other details

* req changes

* Update docs/guide_cog_creators.rst

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

* Apply suggestions from code review

Oh boy I didn't know they added this neat batch commit feature!

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

* Update guide_cog_creation.rst

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-12-24 00:22:10 +01:00
aikaterna
2f18133a93 [Audio] Update Lavalink.jar build (#4683) 2020-12-23 21:59:20 +01:00
Slave In Utero
e8aef1e923 [General] Add new available guild features in [p]serverinfo (#4678)
* add new available guild features

* Remove `ENABLED_DISCOVERABLE_BEFORE`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-12-23 21:20:12 +01:00
jack1142
30dc6fe171 [Trivia] Remove empty string from answers (again) (#4673) 2020-12-23 21:07:24 +01:00
Kowlin
8ae84b7c81 [Streams] Remove the blank suppression of errors (#4680)
* [Streams] Remove the blank suppression of errors

* Okay, maybe do gracefully handle it a little bit...

* Update redbot/cogs/streams/streams.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-12-23 21:00:55 +01:00
Jamie
d01bca2314 Owners can bypass cooldowns with non persistent toggle (#4440)
* dev bypas cooldowns

* Toggleable within dev, new attrib

* Reuqested changes

* Remake content

* Looks like `reset_cooldown()` is under Command object :)

* Remove `await`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-12-23 20:25:32 +01:00
Vexed
300346dcd4 [Docs] Update console image in Getting Started guide for Rich logging (#3905)
* update image

* MAXIMISE THE QUALITY

* add storage driver as JSON (#3935)

* fk

* REEEE

how am i faling to use git so much

* rich!

* make image width 696 pixels so it doesn't scale
2020-12-23 15:27:28 +01:00
Kowlin
ab80f46d2e [Core] Rich logging for not so rich people (#4577)
* Pop stash

* add rich to setup

* Added forceful enabling of rich logging

* revert some unintended pushed

* Fix possible unbound var
Fix possible 0 members w/out members intent

* One day I won't forget to do style passes

* So this is a thing apperently...

* Bump rich to 9.5.1

* Lock secondary deps

* Different stuff, see the full commit description for more info

- Change few things from print to log.info
- put the log handlers on the root logger instead of individual loggers
- capture warnings to a logger

* Modify log handler to show logger name

* Add a Triboolian to force disable rich

* Style checks

* shortened time, added logger name... again.

* aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

* Style & linking

* Be or not to be? Whatever man, it's 4:30 in the morning, goto sleep >.<

* Reintroduce outdated message.

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-12-23 05:11:44 +01:00
Kowlin
afae84fa6b [CI] Update CodeQL to resolve warnings. (#4681)
* Update CodeQL to resolve warnings.

* Make CodeQL analyze our Python dependencies

* `fetch-depth` should be no longer needed

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-12-23 03:57:28 +01:00
Predeactor
d53ff57794 Shorten the audit log reason appropriately, remove unused vars (#4189)
* [Mod] Check for reason length & remove unused vars

This PR also remove unused variable.

* Blame me

* Apply Kowlin order.

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

* This is already handled by ban_user()

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

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

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

* Include Mutes cog

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-12-23 03:22:59 +01:00
kreusada
d3ffb22e86 [Docs] Raspian Installation Directs to 404 (#4682)
I'd assume this would be an appropriate link to replace with.
2020-12-23 01:49:32 +01:00
jack1142
b36a702e62 Make command usage in help for required arguments consistent (#4589)
* Make command usage in help for required arguments consistent

* Bob 3

* Bob 1

* Docstring updates

* Address Flame's review

* Update cog guides in docs
2020-12-22 14:14:47 -05:00
bobloy
59e1e31634 Fix inviteset public link (#4641) 2020-12-19 21:06:38 +01:00
PhenoM4n4n
8280067b7e Improve grammar in max concurrency error (#4501)
* better concurrency grammar

* remove casing

* Apply Bread's suggestion per Draper's comment

Co-authored-by: Sean <29239704+Bakersbakebread@users.noreply.github.com>

* Thanks Pred

Co-authored-by: Predeactor <61093863+Predeactor@users.noreply.github.com>

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Sean <29239704+Bakersbakebread@users.noreply.github.com>
Co-authored-by: Predeactor <61093863+Predeactor@users.noreply.github.com>
2020-12-19 00:31:16 +01:00
github-actions[bot]
7f587ea46b Automated Crowdin downstream (#4664)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-12-18 19:10:17 +01:00
Neuro Assassin
92788a90c1 [CogManagerUI] Fix error when removing path from other OS (#4466)
* Fix error when removing path from other OS

* Update to draper's comment
2020-12-18 04:15:59 +01:00
Ryan
3a12a9b47f [Cleanup] Delete command message when using [p]cleanup self (#4640)
* delete command message

* only delete command if can_mass_purge
2020-12-17 20:37:38 +01:00
bobloy
d22ea2dd11 Warn when new slotmin/slotmax value will cause slots to not work (#4583)
* Properly handle slotmin/slotmax rules

* Use a variable to reduce config calls. No reason to process differently half way through a command anyways.

* Update redbot/cogs/economy/economy.py

* Add positive int converter for slotmin/slotmax

* Option to allow bad mins and maxes.

* Update economy.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-12-17 20:32:57 +01:00
Kowlin
e519286f5c Catch OverflowErrors in the timedelta converter (#4630) 2020-12-16 18:56:42 +01:00
Samuel
06ba425159 bot.remove_command returns a dpy command object instead of None (#4636)
* remove_command returns a dpy command object

* removed typehint at remove_command

* typing

Co-authored-by: npc203 <npc203@users.noreply.github.com>
2020-12-16 18:31:26 +01:00
Slave In Utero
6038ef5550 gen-5-pokemon-trivia (#4646) 2020-12-08 09:53:53 -08:00
github-actions[bot]
b04610b457 Automated Crowdin downstream (#4653)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-12-08 18:39:00 +01:00
Vexed
140693b171 [Docs] Update GC free credit period (#4658)
* [Docs] Update GC free credit period

* i am soo dumb
2020-12-05 17:33:50 +01:00
Ryan
63cc83c81b [Docs] Remove Ubuntu 16.04 from Install Docs (#4650) 2020-12-02 21:07:35 +01:00
El Laggron
e2a6d451c3 [Streams] Handle streams with past schedules (#4631)
* Resolve bug with [p]streamalert youtube

The command didn't handle channels that were not provided as IDs

* Provide a different message if the scheduled date has passed

* Ignore streams scheduled for more than an hour
2020-11-30 18:10:44 +01:00
github-actions[bot]
e2adb29cf3 Automated Crowdin downstream (#4638)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-29 22:04:43 +01:00
kreusada
1ca422a636 General geography category :D (#4618)
* General geography category :D

* Fixes

* Fixed typo

* Added some more questions

* Made some changes, and accuracy fixes, corrections

* *state, not actual river
2020-11-28 18:01:45 -05:00
palmtree5
04cb1befe6 [Docs] Streams user guide (#4521)
* Start on streams user guide

* Finish up streams guide

* Fix a typo in the doc page

* Fix the SAME typo in the relevant command's docstring while we're here

Co-authored-by: palmtree5 <palmtree5+3577255@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-11-27 13:52:56 -05:00
Ryan
da8705fb8f force path to be string (#4624)
Welp forgot to merge
2020-11-26 20:12:23 +00:00
bobloy
395c184eef [Docs] Economy Cog Guide (#4519)
* Started docstrings

* Add to index

* First generated guide

* Indented examples, some more docstrings

* Aliases are now `in ticks and fully qualified`

* More economy docstrings

* Started docstrings

* Add to index

* First generated guide

* Indented examples, some more docstrings

* Aliases are now `in ticks and fully qualified`

* More economy docstrings

* Regenerate docs

* Much more docstrings and regenerate docs

* Better explaination of `bank set` and grammar changes

* Regenerate docs

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-11-22 17:57:11 -05:00
bobloy
c7fd561cd5 [Docs] Downloader cog guide (#4511)
* Downloader cog guide initial commit

* Updated cogguide to prepare description on cog as well.

* Lots of docstring updates

* Even more docstrings

* Fix docstring and generate docs

* Switch to alphabetical

* Aliases are `in ticks and fully qualified`

* Fix grammer, arguments, and explain revision.

* Regenerated docs

* Avoid ticks in links

* New URL logic

* Additional grammar fixes

* Regenerate docs
2020-11-20 20:18:04 -05:00
github-actions[bot]
bc8f2311d9 Automated Crowdin downstream (#4627)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-19 22:18:05 +01:00
El Laggron
f129dcd1a9 [Streams] Resolve bug with [p]streamalert youtube (#4629)
The command didn't handle channels that were not provided as IDs
2020-11-19 18:50:00 +01:00
jack1142
f1d2be58c1 Add python-dateutil to primary deps and lock six with it (#4622) 2020-11-18 22:12:29 +01:00
El Laggron
6060da0f87 [Streams] Support Youtube stream schedules (#4615)
* Catch scheduled livestreams

* Announce scheduled streams and starts

* Add setting, fix bugs

* Add new dependency

* Black reformat

* Fix the duplicated messages bug

* Do not send messages for schedules

* Format embed
2020-11-18 21:48:36 +01:00
jack1142
13ca9a6c2e Version bump to 3.4.4.dev1 (#4616)
Kowlin would want me to admin merge this, so let's just do it.
2020-11-17 00:11:43 +01:00
jack1142
f1c5f4a8e4 Version bump to 3.4.3 (#4614) 2020-11-16 20:10:33 +01:00
jack1142
b7b21a06c8 Red 3.4.3 - Changelog (#4613)
* Red 3.4.3 - Changelog

* Oh man, now that I know this is a thing... Let's use it everywhere

* I can't type

* Apply suggestions from code review

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2020-11-16 19:59:50 +01:00
aikaterna
dc82ef758f [Audio] Update Lavalink.jar build (#4608) 2020-11-16 19:02:04 +01:00
github-actions[bot]
e50b32cc27 [i18n] Automated Crowdin downstream (#4596)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-16 18:26:02 +01:00
bobloy
224d89c6ff [Docs] Fix CustomCommands URL mistake (#4591) 2020-11-16 18:13:52 +01:00
Kian Bral
866728371b Ensure filenames are lowercase when uploading with [p]triviaset custom (#4594)
* added .lower() to when user uploads trivia filename

* Update PR to use casefold() not lower()

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

Co-authored-by: zephyrkul <zephyrkul@users.noreply.github.com>
2020-11-16 17:42:13 +01:00
MAX
1747d901d1 [Mod] Support competing status in [p]userinfo command (#4611)
* Competing in userinfo

* Update names.py

* Update names.py
2020-11-16 17:25:41 +01:00
MAX
e87896815c [Core] Add [p]set competing command (#4609)
* Update core_commands.py

* style

* Update core_commands.py

* Update core_commands.py

* does this fix tho?

* C
2020-11-16 15:18:44 +01:00
jack1142
0f7a3bf6f8 Improve Java version regexes in Audio (#4604)
* Improve Java version regexes in Audio

* Can I fix this very small thing too :P
2020-11-15 22:04:45 -08:00
Predeactor
0a040ad8e3 Fix wrong words in docstrings of reaction and message predicates (#4593)
* Fix a wrong usage of word in docs

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-11-11 17:34:33 +01:00
Flame442
a97cd64f48 [Modlog] Fix error when the bot can't read message history in the modlog channel (#4588) 2020-11-11 17:14:36 +01:00
bobloy
a1a44bf1cc [Downloader] Hide [p]cog reinstallreqs (#4590) 2020-11-11 16:39:33 +01:00
jack1142
48ec2dfee0 Bump versions of actions used by our workflows (#4586) 2020-11-09 20:26:49 +01:00
El Laggron
91f7f9ebf4 [Docs] CogManagerUI user guide (#4152)
* Getting started guide

* Remove DigitalOcean referral link

* Fix typos and mispells, thanks to @Flame442

* Remove cogs.red hyperlink until it is finished

* Add towncrier entry

* Add prolog.txt

This is not necessary for this PR but all of the other cog guides rely on this file.
The cog guides are individual branches based on this one, which is why I'm adding this file right now.

* Add changelog entry

* Add CogManagerUI guide

* Remove towncrier

* CogManagerUI update

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Add section for downloader

Co-authored-by: Toby Harradine <Tobotimus@users.noreply.github.com>
Co-authored-by: Vexed <sebdazeley@gmail.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2020-11-08 10:27:15 -05:00
jack1142
a7ec40664e Fix reason variable shadowing in [p]massban (#4575) 2020-11-07 03:44:59 +01:00
github-actions[bot]
0089380bfd Automated Crowdin downstream (#4578)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-05 16:53:43 +01:00
github-actions[bot]
ffcf104dfc Automated Crowdin downstream (#4567)
Red I18n: "Context comments are changed edition"

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-02 17:32:43 +01:00
PhenoM4n4n
08c29d780b Fix leaderboard error in DMs for global banks (#4569) 2020-10-31 18:36:14 +01:00
jack1142
7c36709f76 Handle None case for until in on_member_join (#4568)
* Handle `None` case for `until` in `on_member_join`

* They said it can't be too long!
2020-10-29 18:12:57 -06:00
bobloy
80f0a297a9 [Docs] CustomCommands Cog Guide (#4490)
* Add to index, url matching links, and add link to customcommands.rst

* Some docstring rewriting

* Adding arguments and more details.

* Handle aliases, rest of arguments and examples.

* Black formatting

* Switch to alphabetical

* Apparently forgot to regenerate this.

* Update redbot/cogs/customcom/customcom.py

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

* Update docs/cog_guides/customcommands.rst

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2020-10-28 23:49:51 -04:00
jack1142
a94f0d03dd Version bump to 3.4.3.dev1 (#4564) 2020-10-28 19:55:18 +01:00
jack1142
ac9149870e Version bump to 3.4.2 (#4561) 2020-10-28 19:31:13 +01:00
jack1142
f850ded822 Red 3.4.2 - Changelog (#4560)
* Changelog

* Add 4559

* Fix release date

* This contributor is important too :)

* We need to hire automatic grammar checker

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

* update

* ...

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2020-10-28 19:24:50 +01:00
Draper
06b87368f6 [Audio] Allow LLSET in DMs (#4562) 2020-10-28 10:55:00 -07:00
aikaterna
af65b73fb2 [Audio] Update Lavalink.jar version (#4559) 2020-10-28 17:20:23 +00:00
Draper
0feacee7f2 [Audio] Fix local search (#4553) 2020-10-28 09:07:50 -07:00
jack1142
4aa84a5d22 Add better error logging for unexpected errors, add error messages for exceeded YouTube quota (#4552) 2020-10-28 11:37:56 +00:00
Draper
c95d526bc6 Merge pull request #4558 from jack1142/V3/never_trust_slime
Never trust Slime
2020-10-28 11:25:26 +00:00
jack1142
b77afeed34 Never trust Slime 2020-10-28 12:17:37 +01:00
Stonedestroyer
7db2ba556d Fixes concurrency spelling with time(s) (#4450)
* Change spelling

* Change for translation
2020-10-28 11:56:27 +01:00
PredaaA
bd0955ac44 [Streams] Remove the __del__ (#4512)
* [Streams] Remove the `__del__`

* Add a teardown function to call Streams.cog_unload()

* Apparently I forgot cog_unload is called automatically (Thanks @rapptz
lol)

Co-authored-by: palmtree5 <3577255+palmtree5@users.noreply.github.com>
2020-10-28 11:55:05 +01:00
jack1142
0d650f6765 Remove multi-line commands from Unix install docs (#4550) 2020-10-28 11:54:43 +01:00
jack1142
8b2c6226f6 Add metadata file to redbot --debuginfo (#4557) 2020-10-28 11:54:16 +01:00
bobloy
252951c706 [Docs] Cleanup Cog Guide (#4488)
* Autogenerated doc and index spot

* Update command descriptions

* Use qualified name in titles and new command descriptions

* Add arguments to descriptions and cleanup self examples.

* Examples are bulleted and indented.

* Handle aliases (none), examples are bulleted and indented

* Switch to alphabetical

* Fix X typo
2020-10-28 00:51:19 -04:00
jack1142
532ac6cfa9 I mean... Technically we fixed the security issue, right? (#4556) 2020-10-28 02:34:11 +01:00
Kowlin
868059f062 3.4.2.dev bump (#4549)
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-27 21:24:19 +01:00
Kowlin
b496ebfba8 3.4.1 bump (#4548) 2020-10-27 20:47:45 +01:00
jack1142
726bfd38ad Merge pull request from GHSA-mp9m-g7qj-6vqr
* Query members for unchunked guilds in massban

* that thing that is a thing ;)
2020-10-27 20:46:49 +01:00
jack1142
21f9a6f0b6 3.4.1 you dummie!
The link will start working after the release.
2020-10-27 20:41:07 +01:00
Neuro Assassin
951a88f39f Red 3.4.1 - Changelog (#4193)
* Add 3.4.1 section

* PR 4184

* PR 4031

* PR 4364

* PR 4325

* PR 4328

* PR 4366

* PR 4024

* PR 4100

* PR 4360

* PR 4382

* PR 4418

* PR 4376

* PR 4389

* PR 4131

* PR 4326

* PR 4329

* PR 4359

* PR 4370

* PR 4375

* PR 4397

* PR 4404

* PR 4409

* PR 4415

* PR 4416

* PR 4424

* PR 4425

* PR 4435

* PR 4437

* PR 4439

* PR 4443

* PR 4451

* PR 4453

* PR 4455

* Address review

* PR 4058

* PR 4422

* PR 4434

* sigh

* PR 4446

* PR 4449

* PR 4463

* PR 4467

* Add aikaterna as contributor

* PR 4469

* PR 4470

* PR 4473

* PR 4474

* 4467 update

* PR 4481, and fix those doc fuckers.  also nuke something, blame jack for anything that goes wrong

* PR 4498

* PR 4499

* PR 4500

* PR 4502

* PR 4504

* PR 4507

* update PR 4504

* address review

* PR 3902

* PR 4492

* PR 4513

* PR 4515

* PR 3634

* PR 4527

* PR 4524

* PR 4523

* PR 4423

* wip

* Trusty

* Draper

* Draper 2

* Flame

* Flame 2

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

* Flame 3

* Trusty 2

* Flame 4

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>
2020-10-27 20:21:14 +01:00
Draper
a4a344d8eb Add bot.get_or_fetch_user/member methods (#4403)
* add 2 get_or_fetch methods

* style

* local tox didnt scream and blow up

* ewh extra space is ugly

* Jack meant this

* I think jack wanted this.

* Nope Jack desired this

* aaaaaaaaaaaaa Jack just say you are reviewing it come on

* add get_or_fetch_member

* Update redbot/core/bot.py

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

* Wubba Lubba Dub Dub

* woa!! this one was really HARD! (sweats)

* fiiiiire

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-27 18:21:20 +01:00
Draper
d421c1c240 [Audio] New stuff from RLL 0.7.0 (#4529)
* New stuff from RLL 0.7.0

* discard here

* formatting

* do this properly

* make it more unique

* bump RLL

* nuke `[p]llset restport`, only `[p]llset wsport` matters

* Update setup.cfg

* properly deprecate Rest port and Ensure Nodes are properly closed upon running LLSET commands

* restore player on a attempt reconnect

* restore player as a task

* ensure we send the signal only if not playing.

* register events a little earlier

* hmmm

* ffs

* update application.yml

* fix permissions edge case
2020-10-27 09:16:19 -07:00
Draper
af8af1934c Merge pull request #4546 from jack1142/V3/update_check_docs
Update check docs to use checks from commands package
2020-10-27 11:44:12 +00:00
jack1142
9a8f3480a1 Update check docs to use checks from commands package 2020-10-27 12:27:15 +01:00
TrustyJAID
085cd1bb49 Modlog account for very long case reasons (#4541)
* Modlog account for very long case reasons

* if
2020-10-27 02:12:06 +01:00
jack1142
b30a8b86a4 Plurality matters (use correct variable name) (#4542) 2020-10-26 19:02:39 -06:00
jack1142
0156ce132c Add Python <3.9 guard until we start supporting Python 3.9 (#4538) 2020-10-26 19:02:00 -06:00
TrustyJAID
b13dec10c5 Replace use of asyncio.gather with bounded_gather (#4537)
* Remove use of asyncio.gather

* black

* typo

* lol 1 character difference

* Let's try this instead

* another typo, it's too early to read

* Add max concurrency on makerole command and prevent multiple roles being added created
2020-10-27 01:20:43 +01:00
TrustyJAID
fd77e97712 [Mutes] Prevent modlog updates on unmute due to category channel sync (#4539)
* [Mutes] Prevent modlog updates on unmute due to category channel sync

* Try here

* would help to remember to change all the right things
2020-10-27 01:18:55 +01:00
jack1142
0b0ace10dd Fix unmute type for manually removed channel overwrites (#4540) 2020-10-26 18:16:11 -06:00
TrustyJAID
b6e96548d0 [Trivia] Add Hockey Trivia (#4384)
* Add Hockey Trivia

* Add more questions and address review

* cleanup authors for now

* Add missing authors

* address vexed's review

* new trivia

* Add New Jersey Devils Trivia

* Add Vancouver Canucks Trivia

* Address Flame's grammar review
do commit messages require proper grammar?
2020-10-26 19:26:58 -04:00
github-actions[bot]
b018c6a24d [i18n] Automated Crowdin downstream (#4476)
Kowlin told me I should just merge.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-10-26 21:26:02 +01:00
TrustyJAID
3ae5301a76 Fix auto channel unmute still applying after bot restart (#4536) 2020-10-26 19:22:33 +01:00
jack1142
bcc24d67d1 Properly iterate through dict's items in multi channel unmute (#4534) 2020-10-26 11:57:29 -06:00
jack1142
46c0f5e373 Fix TypeError in automatic multi channel unmutes (#4533) 2020-10-26 11:56:45 -06:00
jack1142
eeaac828d9 Fix KeyError in [p]muteset role (#4531) 2020-10-26 11:55:52 -06:00
Kowlin
2413c6abd3 [Core] Guild scoped I18n (#3896)
* Guild I18n

Never again!

* Finish off guild scoped i18n

* Black formatting

* Added guild only flags.

* Fix missing import.

* Added listing of guild i18n settings

* Added API support

* Added API support... properly!

* Added API support... for realsies!

* Auto-translate create_cases instances

You're welcome cog creators! Jack talked me into this!

* Fix get_regional_format to actually return properly

* Cleanup `set showsettings`

* Style pass

* Update redbot/core/core_commands.py

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

* Update redbot/core/events.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>

* Fix missing import

* Improve caching

* Removal of unneeded function

* Fix some naming

* IDFK anymore...

* Reformat

* Update redbot/core/settings_caches.py

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

* Update redbot/core/settings_caches.py

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

* Update redbot/core/settings_caches.py

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

* Remove line number

* Fix global sets

* Set contextual locale manually where needed

* Reports cog is wonderful...

* Update redbot/core/core_commands.py

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

* Set contextual locale manually where needed in Mutes cog

* s

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-10-26 17:59:11 +01:00
TrustyJAID
7bb6e60c52 Move mutes to new cog, add role-based and temporary mutes (#3634)
* revert the revert the revert git is hard...

* and remove old mutes

* make voicemutes less yelly

* fix error when no args present in mute commands

* update docstrings

* address review

* black

* oops

* fix voicemutes

* remove mutes.py file

* Remove _voice_perm_check from mod since it's now in mutes cog

* remove naive datetimes
prevent muting the bot
prevent muting yourself
fix error message when lots of channels are present

* change alias for channelunmute
Be more verbose for creating default mute role

* add `[p]activemutes` to show current mutes in the server and time remaining on the mutes

* improve resolution of unmute time

* black

* Show indefinite mutes in activemutes and only show the current servers mutes in activemutes

* replace message.created_at with timezone aware timezone

* remove "server" from activemutes to clean up look since channelmutes will show channel

* better cache management, add tracking for manual muted role removal in the cache and modlog cases

* Fix keyerror in mutes command when unsuccessful mutes

* add typing indicator and improve config settings

* flake8 issue

* add one time message when attempting to mute without a role set, consume rate limits across channels for overwrite mutes

* Don't clear the whole guilds settings when a mute is finished. Optimize server mutes to better handle migration to API method later. Fix typehints.

* Utilize usage to make converter make more sense

* remove decorator permission checks and fix doc strings

* handle role changes better

* More sanely handle channel mutes return and improve failed mutes dialogue. Re-enable task cleaner. Reduce wait time to improve resolution of mute time.

* Handle re-mute on leave properly

* fix unbound error in overwrites mute

* revert the revert the revert git is hard...

* and remove old mutes

* make voicemutes less yelly

* fix error when no args present in mute commands

* update docstrings

* address review

* black

* oops

* fix voicemutes

* Remove _voice_perm_check from mod since it's now in mutes cog

* remove naive datetimes
prevent muting the bot
prevent muting yourself
fix error message when lots of channels are present

* change alias for channelunmute
Be more verbose for creating default mute role

* add `[p]activemutes` to show current mutes in the server and time remaining on the mutes

* improve resolution of unmute time

* black

* Show indefinite mutes in activemutes and only show the current servers mutes in activemutes

* replace message.created_at with timezone aware timezone

* remove "server" from activemutes to clean up look since channelmutes will show channel

* better cache management, add tracking for manual muted role removal in the cache and modlog cases

* Fix keyerror in mutes command when unsuccessful mutes

* add typing indicator and improve config settings

* flake8 issue

* add one time message when attempting to mute without a role set, consume rate limits across channels for overwrite mutes

* Don't clear the whole guilds settings when a mute is finished. Optimize server mutes to better handle migration to API method later. Fix typehints.

* Utilize usage to make converter make more sense

* remove decorator permission checks and fix doc strings

* handle role changes better

* More sanely handle channel mutes return and improve failed mutes dialogue. Re-enable task cleaner. Reduce wait time to improve resolution of mute time.

* Handle re-mute on leave properly

* fix unbound error in overwrites mute

* remove mutes.pt

* remove reliance on mods is_allowed_by_hierarchy since we don't have a setting to control that anyways inside this.

* black

* fix hierarchy check

* wtf

* Cache mute roles for large bots

* fix lint

* fix this error

* Address review 1

* lint

* fix string i18n issue

* remove unused typing.Coroutine import and fix i18n again

* missed this docstring

* Put voiceban and voiceunban back in mod where it's more appropriate

* Address review 2 electric boogaloo

* Make voicemutes use same methods as channel mute

* black

* handle humanize_list doesn't accept generators

* update voicemutes docstrings

* make voiceperm check consistent with rest of error handling

* bleh

* fix modlog case spam when overrides are in place

* <a:pandaexplode:639975629793787922>

* bleck

* use total_seconds() instead of a dict, sorry everyone already using this lmao

* <:excited:474074780887285776> This should be everything

* black

* fix the things

* bleh

* more cleanup

* lmao hang on

* fix voice mutes thingy

* Title Case Permissions

* oh I see

* I'm running out of funny one-liners for commit messages

* oof

* ugh

* let's try this

* voicemutes manage_permissions

* Cleanup mutes if they expire when member is not present

* black

* linters go brr

Co-authored-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
2020-10-26 02:52:11 +01:00
Draper
38169a82df small PR adding [p]llset info and [p]audioset logs (#4527)
* small PR adding `[p]llset info` and `[p]audioset logs`

* fixed + improvements

* Zip file properly
2020-10-25 14:46:59 -07:00
aikaterna
18986bcc42 [Mod] Fix + more info for modset defaultduration (#4525)
* [Mod] Fix + more info for modset defaultduration

* Update settings.py

* Duration must be greater than zero

* Don't need the extra parens here
2020-10-25 20:43:44 +01:00
Draper
ce6c17debc Add data path and metadata file to [p]debuginfo, add missing info to non-embed version (#4524)
* Add data path to `[p]debuginfo`, add missing info in non-embed version

* More things

* cast to str

* another reorder
2020-10-23 18:39:24 +01:00
Chloe
e3359e9b3f Fixed possible exception thrown when balance field is missing during schema conversion (#4523)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-10-23 18:39:14 +01:00
jack1142
c1ab10e202 another reorder 2020-10-23 19:14:08 +02:00
jack1142
1d23c1f2bc cast to str 2020-10-23 19:11:57 +02:00
jack1142
ef1582832d More things 2020-10-23 19:09:08 +02:00
jack1142
95e342f4f4 Add data path to [p]debuginfo, add missing info in non-embed version 2020-10-23 18:28:44 +02:00
Draper
ca078e7cd9 Fix a crash when calling [p]modset showsettings (#4518)
* Fix a crash when calling `[p]modset showsettings`

* Update redbot/cogs/mod/settings.py

* be more explicit
2020-10-22 11:05:40 -07:00
PredaaA
b8a2cf3f91 Move bot_in_a_guild from redbot.core.checks to redbot.core.commands (#4515) 2020-10-22 09:58:18 +01:00
jack1142
e1226c6c88 Update to d.py 1.5.1, explicitly request privileged intents (#4423)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-10-21 19:55:25 +01:00
PredaaA
34fe88da29 [Menus] Handle ctx.me that can be None when clearing reactions (#3902) 2020-10-21 14:23:36 +02:00
Draper
454ff90d09 excluse streams from queue duration (#4513) 2020-10-20 10:34:32 -07:00
Draper
e31196d19f Audio Fixes (#4492)
* handles #4491

* add typing indicators to audio playlists commands like discussed with aika.

* recheck perms upon change of token to avoid needing a reload.

* Ensure the player lock is always released... on rewrite to this as a callback to the task.

* ffs

* resolves#4495

* missed one

* aaaaaaaaa

* fix https://canary.discord.com/channels/133049272517001216/387398816317440000/766711707921678396

* some tweaks

* Clear errors to users around YouTube Quota
2020-10-20 09:57:02 -07:00
Neuro Assassin
335e2a7c25 Bump aiohttp-json-rpc dependency (#4506)
* Bump aiohttp-json-rpc

* Well thats sad
2020-10-18 21:17:05 +02:00
Flame442
694d379aef [Core] Add default embed colour to [p]set showsettings (#4498)
* Add default color to [p]set showsettings

* I didn't want to since I thought it would be too long, but sure

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-18 21:11:38 +02:00
Jyu Viole Grace
f4ef3ea8eb Merge pull request #4507
* change `boosters` to `boosts`
2020-10-18 15:36:53 +01:00
palmtree5
ec90199950 Add a setting for adding a tick reaction when help is DMed (#4467)
* Tick response for help command

* Make this a setting instead

Co-authored-by: palmtree5 <palmtree5+3577255@users.noreply.github.com>
2020-10-18 16:10:00 +02:00
Stonedestroyer
08bd0567ad Grammar fixes (#4500)
* Grammar fixes

* More changes

* Grammar

* Error grammar

* Spelling

* Grammar

* REsolves grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* grammar

* "commited" > "committed"

* apostrophe

* more grammar

* grammar

* `funtion` to `function`

* grammar in alias cog

* grammar in cleanup cog

* grammar in customcom cog

* grammar in mod cog

* grammar in reports cog

* fix grammar in streams cog

* missing apostrophe

* grammar fix in trivia cog

Co-authored-by: Jyu Viole Grace <24418520+thisisjvgrace@users.noreply.github.com>
Co-authored-by: Jyu Viole Grace <thisisjvgrace@users.noreply.github.com>
2020-10-18 08:52:56 +01:00
aikaterna
963b8b0d29 Update Lavalink.jar build (#4504) 2020-10-18 08:46:41 +01:00
Fixator10
009dc9ae4d fix exception for empty strings in [p]choice (#4499) 2020-10-18 08:46:11 +01:00
maxbooiii
33cf275862 [Core] added some missing dots. (#4493)
* core added missing dots

* lower-case
2020-10-18 08:45:32 +01:00
Vexed
4fdea931b9 [Docs] More detailed info about args in Getting Started (#4058)
* initial removal and partial re-adition

* lets not miss a line in removal

* dont merge yet

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

* yep ready now i think

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-18 02:26:58 +02:00
Predeactor
4453b5653a Fix [p]cleanup self not working in DMs for non-owners (#4481)
* Fix cleanup self not working in private.

This fix #4408.

* Apply Jack's logic.

* Obviously Black fault.
AGAIN!

* Apply Jack's trick.

* This is not a converter so let's move this to a different file

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-18 02:07:08 +02:00
Stonedestroyer
152ca39719 Creating bot account and enabling intents guide (#4502)
* Test

* Docs

* Fixes

* Nesting

* grammar fixes

* Update docs/bot_application_guide.rst

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

* Update docs/bot_application_guide.rst

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

* Update docs/bot_application_guide.rst

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

* Update docs/bot_application_guide.rst

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

* Update redbot/core/cli.py

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

* More clear

* remove double `and`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-18 01:52:11 +02:00
Kowlin
9ae733181b Handle verified bots, improve errors in [p]set username (#4463)
* handle verified bots, and more specific errors

* stuff

* fuck, I forgot

* Improve errors by splitting into few different messages

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-17 02:45:52 +02:00
Dav
f5de382946 [Mod] Add default tempban duration setting (#4473)
* Add support for default duration in kickban.py

* add setting command and info to settings view

* add config key

* black

* Thx jack

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

* adress review

* Address review

* typo

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-16 00:15:14 +02:00
PhenoM4n4n
dc817aeeac Allow [p]ban to hackban and rename [p]hackban to [p]massban (#4422)
* ban revamp

* black & converters fix

* discord.object

* Update redbot/cogs/admin/admin.py

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

* remove discord.user converter

* black

* .

* Update redbot/cogs/mod/kickban.py

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

* Update redbot/cogs/mod/kickban.py

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

* Update redbot/cogs/mod/kickban.py

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

* Update redbot/cogs/mod/kickban.py

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

* incomplete

* massban support

* black

* Use 2-tuple to separate result and the message in `ban_user()`

This also fixes the issue with `True` being equal to `1` which caused a problem with previously returned types

* Whoops...

* trailing whitespace...

* I missed this one

* Update kickban.py

* Update kickban.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-15 23:20:20 +02:00
jack1142
47c4edf335 Update Windows instructions to not install Python 3.9 (#4480)
* Update install_windows.rst

* Add more info

* Add more info pt.2
2020-10-14 21:35:05 +01:00
Stonedestroyer
e1c745fe3c Remove ruledropper (#4449) 2020-10-14 21:34:45 +01:00
Vexed
c441857a4c [Core] Add two missing full stops to licenseinfo (#4020)
* full stops

* hereafter -> hereinafter

* Add the other stop that was here...

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-14 22:25:08 +02:00
Jyu Viole Grace
51bc5fed7d whosthatpokemon - Gen IV (#4434) 2020-10-14 08:16:59 -07:00
Draper
2da9b502d8 Audio Cog - v2.3.0 (#4446)
* First commit - Bring everything from dev cog minus NSFW support

* Add a toggle for auto deafen

* Add a one off Send to Owners

* aaaaaaa

* Update this to ensure `get_perms` is not called if the API is disabled

* Apply suggestions from code review

Co-authored-by: Vuks <51289041+Vuks69@users.noreply.github.com>

* silence any errors here (in case API is down so it doesnt affect audio)

* update the message to tell the mto join the Official Red server.

* remove useless sutff, and change dj check order to ensure bot doesnt join VC for non DJ's

* ffs

* Update redbot/cogs/audio/core/tasks/startup.py

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

* Aikas Review

* Add #3995 in here

* update

* *sigh*

* lock behind owner

* to help with debugging

* Revert "to help with debugging"

This reverts commit 8cbf17be

* resolve last review

Co-authored-by: Vuks <51289041+Vuks69@users.noreply.github.com>
Co-authored-by: Twentysix <Twentysix26@users.noreply.github.com>
2020-10-12 11:39:39 -07:00
aikaterna
29ebf0f060 [Core] Strip commas on cog command when pagified (#4468) 2020-10-11 17:44:47 +02:00
aikaterna
ec94327b15 [Core] Pagify cog unload output properly (#4469)
* [Core] Pagify cog unload output properly

When you unload a large amount of cogs (close to message limit on characters), the character count is easily pushed over 2k characters on the command response with the cog names each being wrapped in 2x backticks. The current implementation breaks in the middle of cog names or wherever else it feels like it. 1600 might have been a safe value for splitting but at 1500 I don't see how multiple short cog names could make it break at least.

* Address review
2020-10-11 17:43:12 +02:00
aikaterna
5c00810166 Use bot name instead of "Red" in [p]info and [p]restart (#4470) 2020-10-11 17:21:54 +02:00
PredaaA
804219df29 Use bot.get_user() instead of get_all_members() in [p]dm (#4472) 2020-10-11 17:19:49 +02:00
MeatyChunks
6ea2a403be [General] Fix error on long titles in [p]urban (#4474)
There's a few titles that are greater than 256 which causes a console error. The example I saw was scrolling through the pages of `[p]urban Jackin' Off` which leads to http://synonyms-chokin-the-chicken-spanking-the-monkey-flogging-the-do.urbanup.com/3169366
2020-10-11 17:14:21 +02:00
Stonedestroyer
4f2763c26c Add wheel to pre-requirements installed by make files (#4475) 2020-10-11 17:09:55 +02:00
Predeactor
8ff5a71a5d Update the link to 3rd-party cogs in README to use Red-Index (#4482) 2020-10-11 17:02:54 +02:00
Draper
d6c2e8c8c3 Add bundled install extras. (#4443)
* add an `[all]` extras_requires

* can go here

* add a [dev] which includes [all] + development extras (style, test, docs)

* special case all and dev in update message

* Optimize by changing the place of the check for "special" extras

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-10 01:32:29 +02:00
Vuks
b45e62f354 [Core] add [p]set api list and [p]set api remove (#4370)
* add get_shared_api_keys

* add set listapi command

* fix typo

* refactor `[p]set listapi` into `[p]set api list`

* remove unnecessary check

* fix decorators

* corrected wording

* add remove_shared_api_services

* add `set api remove`

* further typo sniping

* bugsniping

* minor typo

* aaaaaaaaa

* Apply suggestions from code review

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

* update api docstring to reflect new subcommands

* Apply suggestions from code review

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

* update framework_apikeys.rst with new methods

* Update redbot/core/bot.py

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

* rewrite get_shared_api_services into a special case of
get_shared_api_tokens

* rewrite api_list to include keys and tokens in response

* don't show secrets

* better api_remove response

* black

* remove nonexistent method

* remove unnecessary import

* fix wording

* Improve docstrings and type hints

- added overloads to help out developers a bit more
  * this wasn't necessary, but development tools work better
    with this information
- fixed type hint to use Union as now
  its return type depends on whether `service_name` is passed
- updated docstrings to contain information about the added behavior

* Use `humanize_list()` rather than `str.join()`

This is done for consistency within Red
and it makes the list have the last element joined
with `and` (or its equivalent in chosen locale)

* Use `.format()` after translation is applied

If `.format()` is used before `_()`, the search for translation is done
with the string that already has the dynamic text added,
which results in no matches.

* Add plural support

* Improve error message

Updated message to be more specific
(used phrases: "None of the services" and "had any keys set")
and a bit more nice to the user (judging word "anyway" removed)

* Improve readability of `[p]set api list`

It's a lot clearer when the sublists are indented,
especially on mobile where code blocks aren't colored at all.

New look:
https://user-images.githubusercontent.com/6032823/94614944-3bbd7c80-02a7-11eb-89e4-64bdf06c650b.png

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-10-05 22:10:14 +02:00
jack1142
8b477db0a6 Update pyenv instructions to install Python 3.8.6 (#4457) 2020-10-03 09:02:34 -08:00
github-actions[bot]
80d99af5b0 Automated Crowdin downstream (#4462)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-10-03 00:30:26 +02:00
Kai K
d26335b01b [Trivia] MLB Trivia (#4455)
* Create mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

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

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

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

* Update mlb.yaml

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

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

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

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

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

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

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

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

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

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

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

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

* Update mlb.yaml

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2020-10-01 19:09:45 -04:00
Draper
e79aa21b55 Add util functions extracting end_user_data_statement directly from cog's info.json (#4404)
* get_end_user_statement

* add get_end_user_statement

* I hate docs

* lets make Jack and Zeph happy as they want a version that raises.

* Apply suggestions from code review

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

* Update redbot/core/utils/__init__.py

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

* rename to `get_end_user_data_statement`

* aaaaaaaaaaaaaaa

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-29 20:58:30 +02:00
Draper
bf63da3655 Stop backing up lavalink logs (#4453) 2020-09-28 08:50:42 -07:00
Fixator10
d6791111f3 fix [p]set nickname when no nickname specified (#4451) 2020-09-28 13:14:49 +02:00
jack1142
23d454cbbe Fix deprecation mention for shared libs in docs (#4374)
* Fix deprecation mention for shared libs in docs

* Update docs/guide_publish_cogs.rst

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

Co-authored-by: Vexed <sebdazeley@gmail.com>
2020-09-27 21:28:18 -04:00
absj30
f9741cdd27 Fix typo at function's "end_game" docstring (#4186)
Co-authored-by: Ailton Jr <ailton@edu.unipar.br>
2020-09-27 21:28:07 -04:00
Sharky
3699c246df [Mod] Account for duplicated mentions (#4359)
* Account for duplicated mentions

* Spelling fix + Wording change

* Requested changes *hopefully*

* forgot to formattttttttttttttttttttttt

* Improve the consistency with existing commands in inconsistent `[p]modset` group

* What was the point of defining `guild` if you didn't end up using it, Jack!?

* I hate you, web editor ಠ益ಠ

* You could have just copy-pasted this Jack, seriously...

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-27 21:27:53 -04:00
jack1142
284080ec83 Update events.py (#4431) 2020-09-27 21:27:29 -04:00
jack1142
a2ae485286 Deprecate is_allowed_by_hierarchy() core util (#4435) 2020-09-27 21:27:22 -04:00
jack1142
a74547bb4e Update Getting started guide with the link to Index (#4439)
* Update Getting started guide with the link to Index

* Update docs/getting_started.rst

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

Co-authored-by: Twentysix <Twentysix26@users.noreply.github.com>
2020-09-27 21:27:15 -04:00
github-actions[bot]
a6ff5b8e9c Automated Crowdin downstream (#4445)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-24 22:01:14 +02:00
github-actions[bot]
a09dddb2cf Automated Crowdin downstream (#4432)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-24 02:14:41 +02:00
Dav
d7da0b4081 [Mod] Pluralize properly in userinfo (#4397)
* Pluralize properly in userinfo

* black

* totally didn't forget roles

* Almost seems like you have a point there...

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

* Yes... right... this one too

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

* Yes, yes we do.

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-21 00:39:44 +02:00
Flame442
47d9069108 [Core] Catch errors about blocked DMs in [p]traceback (#4329) 2020-09-20 19:42:28 +02:00
bobloy
ddc5660f2c Add custom groups tutorial to Config's docs (#4416)
* Add `Config.custom` tutorial to docs

* Red V2 Data transfer example brought up-to-date as well

* Update docs/framework_config.rst

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

* Update docs/framework_config.rst

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

* Update docs/framework_config.rst

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

* Update docs/framework_config.rst

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

* Update docs/framework_config.rst

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

* Update framework_config.rst

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-20 02:57:37 +02:00
Kowlin
88503bbf24 [Mod] Correctly log and store the previous (nick)name (#4131) 2020-09-20 02:42:12 +02:00
zephyrkul
8a75d75d83 Add quote() function to chat formatting utilities (#4425)
* add quote to chat_formatting

* ...

* jack's request
2020-09-20 02:12:11 +02:00
Dav
980b5fa1c2 [Warnings] Improve consistency in [p]warningset's commands (#4409)
* Be consistent with bool setters in warnings cog

* black
2020-09-20 00:16:42 +02:00
PredaaA
343efba4d5 Handle aiohttp errors in [p]set avatar (#4437)
* [Core comands] Handle aiohttp errors in set avatar

* Update redbot/core/core_commands.py

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-09-19 19:51:38 +02:00
Dav
4e1ce7524b [Modlog API] Handle deleted channels in Case.message_content() (#4415)
* Handle deleted channels in case.message_content()

* remove avatar_url + black
2020-09-19 19:39:59 +02:00
TrustyJAID
fec25fcaba Accept discord.Objects for cases, add last_known_username param in create_case() (#4326)
* [Modlog] Fix typehints for create_case

* Simplify Logic after review

* discord.abc.User to catch both member and user objects and other potential discord.Object's being sent

* fix typehints and Case.edit()

* fix docstrings in create_case

* Add note about last_known_username

* fix the weird thing that scared me
2020-09-19 19:05:00 +02:00
Jamie
6162b0f2bd [Trivia] Fix machamp/machoke (#4424)
* fix machamp/machoke

* swap order
2020-09-14 08:33:49 -07:00
jack1142
6f600b71d3 Exclude locales folders from code ownership (again) (#4418) 2020-09-10 20:33:11 +02:00
github-actions[bot]
f6fccfc949 Automated Crowdin downstream (#4417)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-10 20:32:04 +02:00
Kowlin
e1b02b2952 Escape regex on spotify URL (#4414) 2020-09-09 11:03:22 +01:00
Kowlin
a80a5ec96e Create codeql-analysis.yml (#4413)
* Create codeql-analysis.yml

* Remove the matrix support

* Remove autobuild and strategies
2020-09-09 01:12:27 +02:00
Kowlin
a9656dea38 Delete no-NO in favor of nb-NO (#4396) 2020-09-05 02:48:55 +02:00
github-actions[bot]
f8fcabfe10 Automated Crowdin downstream (#4395)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-03 17:26:47 +02:00
Kingsley Zhong
ea7e142494 Add hierarchy checks to [p]warn (#4100)
* Update warnings.py

* Cleanup the code and pass style check.

Co-authored-by: Kowlin <boxedpp@gmail.com>
2020-09-03 16:23:03 +02:00
github-actions[bot]
e1a9b31e9b Automated Crowdin downstream (#4394)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-09-03 15:48:34 +02:00
Nathaniel F
59f69c7727 [General] URL encode user input for [p]urban and [p]lmgtfy (#4024)
* URL encode user input in the general cog

Adds URL encoding to `[p]lmgtfy` via `urllib2.parse.quote_plus()`
and to `[p]urban` via `aiohttp.ClientSession.get`'s `params` argument

* Black reformatting
2020-09-03 00:35:27 +02:00
jack1142
0200c2cb3f Clarify documentation of modlog.create_case() (#4389) 2020-09-02 23:09:59 +02:00
jack1142
b11359eebb Add float -> int migration to Bank (float was a bug) (#4386)
* Add float -> int migration to Bank (float was a bug)

* wrong refs

* Cause ctx manager compares before and after values...
2020-09-01 02:04:19 +02:00
jack1142
4adf328fac Update .gitignore with .vscode folder (#4387) 2020-09-01 01:25:46 +02:00
Stonedestroyer
f81cf5960f Fix typos in doc string. (#4360) 2020-09-01 00:53:25 +02:00
jack1142
2bf9c1260c Update CODEOWNERS (#4367)
* Update CODEOWNERS

* Prepend with backslash, add downloader fixtures

* Update CODEOWNERS

* Schemas are closely related to Downloader...

...so I should know about the changes to those.

* Would be nice to add my name (thanks Draper)
2020-08-31 16:40:31 +01:00
Vexed
8956f63229 [Mod] Dots and properly capitalise Discord (#4377) 2020-08-31 14:25:43 +01:00
Ian Martin
7d24413846 Ensure Bank API only works with Integers. (#4376)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-08-31 14:24:44 +01:00
PythonTryHard
e1261b92d1 Typo fix on [p]invite command (#4382) 2020-08-31 14:21:15 +01:00
Fixator10
8c89993cd5 JSON schemas for cogs and repos (#4375)
* JSON schemas for cogs and repos

* newline at the end

* capitalization

* Remove *.json from .gitignore

* Remove empty line

* resolve requested changes

* resolve requested changes, again

Co-authored-by: Fixator10 <fixator10@users.noreply.github.com>
2020-08-30 20:20:48 +02:00
github-actions[bot]
ec7c2ca4b9 Automated Crowdin downstream (#4373)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-30 17:42:37 +02:00
jack1142
85afe19455 Bump black to 20.8b1 (and reformat) (#4371)
* Bump black version

* Reformat with black
2020-08-29 19:12:28 +02:00
Ryan
56b54d4d34 [Docs] Update shields in Readme (#4378)
* python shield option 1

* python shield option 2

* updates shields

* swap pypi and d.py

* new format

* no caps
2020-08-29 04:06:54 +02:00
Neuro Assassin
3534e59cb8 [Dev] Add repl pause (#4366)
* [Dev] Add repl pause

* Update redbot/core/dev_commands.py

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

* Address reviews

* Address reviews x2

* Small consistency fix

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-25 13:24:40 +02:00
Kowlin
eeb5f651b2 Stop the insanity that is this inconsistent command name! (#4328) 2020-08-25 05:18:50 -06:00
TrustyJAID
b0250b91cc Merge pull request #4325 from zephyrkul/patch-1
[customcom] Gracefully handle timeouts in cc edit
2020-08-25 05:16:37 -06:00
Theo Suricate
ef839722f4 Added length validation for [p]set name and [p]set nickname (#4364) 2020-08-24 14:59:09 +01:00
maxbooiii
5cd3a5b5af missing dots (#4031) 2020-08-23 03:13:09 +02:00
bobloy
d80d7c939c Fix typo in lint python workflow (#4201) 2020-08-20 21:26:33 +02:00
github-actions[bot]
8c7848f18b Automated Crowdin downstream (#4327)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-20 19:30:44 +02:00
zephyrkul
7d66263948 [cc] don't send success on failure 2020-08-18 18:40:32 -06:00
zephyrkul
7d6662e6b1 [customcom] properly catch TimeoutErrors 2020-08-18 18:32:06 -06:00
Jay Turner
3e6a73ae8c [Economy] Add embed to leaderboard (#4184) 2020-08-18 14:42:36 +01:00
jack1142
94784f366f Dev bump (3.4.1.dev1) (#4197) 2020-08-18 02:10:46 +02:00
Kowlin
bc04937a6a Actually change the version before release! (#4195) 2020-08-18 01:13:01 +02:00
jack1142
29f8cc79ba Red 3.3.12 - Changelog (#4194)
* Red 3.3.12 - Changelog

* Fix date (duh, we're too slow)
2020-08-18 01:00:44 +02:00
zephyrkul
089c253d1d [ctx] Suppress all mentions in maybe_send_embed (#4192)
* [ctx] Suppress all mentions in maybe_send_embed

Whether this method should mention shouldn't be tied to an unrelated setting.

* black

* Update changelog_3_4_0.rst

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-18 00:20:03 +02:00
jack1142
d8e780b228 Red 3.4.0 - Changelog (#4059)
* Add 3.4.0 changelog

* Fix some stuff in previous changelog

- Remove empty section
- Fix alphabetical order in contributor list
- Add missing Flame to contributor list
- Fix the length of rst header underline

* PR 4050

* PR 3993

* PR 4064 (issue 4028)

* PR 4077

* PR 3956

* PR 4079

* PR 4089 (issue 4088)

Co-Authored-By: Dav <dav@mail.stopdavabuse.de>

* PR 4099

* PR 4097

* Add Trusty to contributor list

* PR 4116

* PR 4043 (issue 3945)

* PR 4072

* PR 4109

* PR 4110

* PR 4102

* PR 4112

* PR 4161

* PR 4121

* PR 4134, 4143

* PR 4085

* PR 2982 (issue 2906)

* PR 3679 (issue 3605)

* PR 4148 (issue 4147)

* PR 4011

* PR 4022 (issue 4013)

* PR 4135 (issue 4122)

* PR 4167

* PR 4141

* Add NeuroAssassin to contributor list

* PR 4129

* PR 4149

* PR 4105, 4127 (issue 4106)

* PR 3845

* PR 4142

* PR 4163

* PR 4176

* PR 4172 (issue 4066)

* PR 4038 (issue 3786)

* PR 3081

* PR 4137 (issue 4118)

* PR 4017

* PR 4182

Co-Authored-By: Dav <dav@mail.stopdavabuse.de>

* Add Kowlin to contributor list

* PR 4182

* PR 4169

* PR 3084

* Add `douglas-cpp`, `MeatyChunks`, `zephyrkul` to contributor list

* PR 4138

* Add some anchor

* Add release date

Co-authored-by: Dav <dav@mail.stopdavabuse.de>
Co-authored-by: palmtree5 <3577255+palmtree5@users.noreply.github.com>
2020-08-18 00:04:15 +02:00
El Laggron
a9fce2dcf2 [Docs] Fix the horizontal bars in alias user guide (#4191) 2020-08-17 16:08:12 +02:00
El Laggron
6067c8d55e [Docs] Alias user guide (#3084)
* Getting started guide

* Remove DigitalOcean referral link

* Fix typos and mispells, thanks to @Flame442

* Remove cogs.red hyperlink until it is finished

* Add towncrier entry

* Add prolog.txt

This is not necessary for this PR but all of the other cog guides rely on this file.
The cog guides are individual branches based on this one, which is why I'm adding this file right now.

* Add changelog entry

* Add alias cog guide

* QA changes

* More QA changes

considering -> assuming
red is a girl, not non-binary

* Fix some mistakes

* Fix references

* More and better examples, with arguments

* A first quick fix for review

* An attempt to fix the review by @Flame442

* Delete 1734.docs.3.rst

Co-authored-by: Toby Harradine <Tobotimus@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-17 15:35:44 +02:00
zephyrkul
0ab6abf462 [Filter] Add missing parentheses (#4185) 2020-08-17 15:25:15 +02:00
Douglas
306de3a64c Don't send message about DMing ACL when command's called from DM (#4188)
* Only send a message telling the user the file will be send via DM if the original message didn't come from a DM

* Remove unused import for AsyncIter

* Changed channel instance comparison to discord.DMChannel

Co-authored-by: douglas-cpp <douglasc.dev@gmail.com>
2020-08-17 15:22:38 +02:00
jack1142
929fd04613 EUD things for Downloader (#4169)
* Initial commit

* Send pagified as with other Downloader's things
2020-08-17 01:27:46 +02:00
Dav
581bdaa496 [Core] Make core_commands.py comply with #4048 (#4138)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-08-16 11:37:29 +01:00
Trent Kable
341fd254fb Add allowed_mentions and mention everyone check to stream alerts (#4182)
* [streams]allowed_mentions on stream announcement

Allows role mentions for discord.py 1.4+
# Type

[x] Bugfix
[ ] Enhancement
[ ] New feature

Description of the changes

Referencing line 747. Gives permissions to mention role on stream announcement.

* Update streams.py

* Add `mention_everyone` defaults

Lines for reference:
- [751-753]:
```py
if can_mention_everyone:
  await self.save_streams()
  return # if bot can mention everyone already, let's stop here```
- [722-774]: 
```py
if can_mention_everyone:
  mentions.append(role.mention)
  return # if bot can mention everyone already, let's stop here (part two)```

Hopefully, this is what you had in mind? Humbly admit I may not have a business in biting this piece but looking forward to feedback on the best methodology for the wanted outcome.
Thanks!

* *sweats*

* imagine variable naming

Should complete all passes.

* misplaced unindent on return

* Update redbot/cogs/streams/streams.py

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

* Update redbot/cogs/streams/streams.py

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

* Update redbot/cogs/streams/streams.py

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

* You're a beast jack

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

* this would cover all channels in guild (think)

* give this a reeeeee

* Update streams.py

* adds channel argument

https://github.com/Cog-Creators/Red-DiscordBot/pull/4182#pullrequestreview-468012281

* image style checking, self

* imagine

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-16 00:59:53 +02:00
Kowlin
bf581b9f97 [Streams] Allow for consume all on messages (#4183)
* Added consume all to streams.

* Updated help doc

* Styling checks, man...
2020-08-15 15:04:05 +02:00
jack1142
46eb9ce7a0 Remove things past deprecation time (2020-08-05) (#4163) 2020-08-15 13:47:28 +02:00
Dav
0adaebb290 [Docs] Clarify EUD statement (#4180)
* add a comma

* be a little more specific
2020-08-14 08:41:00 +02:00
github-actions[bot]
d1b7e0eafb Automated Crowdin downstream (#4181)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-14 08:40:04 +02:00
Dav
914f82f352 [Modlog] add timestamp to [p]casesfor and [p]case (#4137)
* add timestamp to casesfor and case

* [Casereader] add timestamp + i18nify

* of course it was needed...

* Update redbot/cogs/modlog/modlog.py

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

* Update redbot/cogs/modlog/modlog.py

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

* well that was easier than expected

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

* thx for the help jack

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-13 23:17:02 +02:00
El Laggron
8e611b466e [Docs] Admin user guide (#3081)
* Getting started guide

* Remove DigitalOcean referral link

* Fix typos and mispells, thanks to @Flame442

* Remove cogs.red hyperlink until it is finished

* Add towncrier entry

* Admin guide

* Add prolog.txt

* Use substitutions for arguments

* Some grammar fixes

* Add prolog.txt

This is not necessary for this PR but all of the other cog guides rely on this file.
The cog guides are individual branches based on this one, which is why I'm adding this file right now.

* Add changelog entry

* Add serverlock

* Apply suggestions from code review

Co-Authored-By: Vexed <51716387+Vexed01@users.noreply.github.com>

* Suggestions from vexed

* Update to new admin commands

* Delete 1734.docs.2.rst

* Apply the changes requested by reviewers

Plus add a small tuto on how to make a bot private

* Fix arguments inconsistency

* Remove ctx from argments

* Update docs/cog_guides/admin.rst

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

* Quotes aaaaaa

Co-authored-by: Toby Harradine <Tobotimus@users.noreply.github.com>
Co-authored-by: Vexed <51716387+Vexed01@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2020-08-13 05:12:58 -04:00
DevilXD
6e63ed4e60 Use aware objects when storing and reading UTC timestamps (#4017)
* Use aware objects instead of naive ones

* Use aware objects when storing and reading UTC timestamps

* Remove unneeded parentheses

* Fixed naive and aware objects unable to be compared here

* Address feedback

* Fix the newly added `modlog.create_case()` calls

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-12 10:46:32 +02:00
Sharky
73a34eacd6 [Mod] Add kick and warn to mention spam (#4038)
* Mention spam addition

Adjust code to allow for warning and kicking in mention spam automoderation.

Added new subcommand group, mentionspam. Which will display settings of warn, kick, ban, mentionspam when called.

Adjust config to account for this.

* Condense config + removal of comments

Condense config into one variable to make one call.

Removed unneeded comments I left.

* Add warning casetype

Copied over from warnings cog

* Update strings + change function names

* Changed prints and logs. Account for showsettings, removed blocking.

If this style breaks, blame draper...

* Black format...still blaming draper.

* Adding period at end of description

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

* config migration

* Fix TypeError, add default information.

* Max_mention wording change

Thanks to @zephyrkul for suggesting the word changes.

* Require argument for max_mention

* Fix warn modlog case creation

* Fix casetype conflict

maaaaaaaaaagicccccccccc timeeeeeeeeeeeeeeeeeeeeeeeee

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2020-08-11 23:24:22 -04:00
jack1142
9798538438 Remove provisional note from NoParseOptional, fix and start using UserInputOptional (#4142) 2020-08-10 20:20:02 +01:00
Dav
35b0224690 [Mute] Indicate that a guild mute/unmute is currently being processed. (#4172)
Co-authored-by: fixator10
2020-08-10 20:19:44 +01:00
jack1142
05ef5fa3a6 Preparations for d.py 1.4 (includes breaking changes related to mass mentions) (#3845)
Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>
2020-08-10 20:19:00 +01:00
Tinonb
7707c862d1 Removed Also And Installation (#4176)
In line 60 I removed the word also as it implies that the bot can is already being hosted by someone but you can host it too. I also removed the word installation from line 65 and changed it to installing as that makes more sense or you would have to change the word updating.
2020-08-09 23:40:27 -04:00
jack1142
01a6ef3a8f Add variation selector-16 as appropriate to emojis across Red (#4127) 2020-08-10 03:05:57 +02:00
jack1142
4385aac90c 3.3.11 changelog (#4173)
* 3.3.11 changelog

* Update docs/changelog_3_3_0.rst

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

* Update docs/changelog_3_3_0.rst

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

* Update docs/changelog_3_3_0.rst

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

* Update docs/changelog_3_3_0.rst

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

Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
2020-08-10 01:16:47 +02:00
Flame442
c9e4c18f17 [Trivia] Remove an unnecessary .format (#4175) 2020-08-10 01:16:26 +02:00
El Laggron
c8526d42b4 [Docs] Bank user guide (#4149)
* Getting started guide

* Remove DigitalOcean referral link

* Fix typos and mispells, thanks to @Flame442

* Remove cogs.red hyperlink until it is finished

* Add towncrier entry

* Add prolog.txt

This is not necessary for this PR but all of the other cog guides rely on this file.
The cog guides are individual branches based on this one, which is why I'm adding this file right now.

* Add Bank cog guide

* Add changelog entry

* Bank guide

* Nope get out from here potato

* Remove reference to the payday command

* reword + drop a character

Co-authored-by: Toby Harradine <Tobotimus@users.noreply.github.com>
Co-authored-by: palmtree5 <3577255+palmtree5@users.noreply.github.com>
2020-08-09 14:20:12 -08:00
Douglas
e9017e8fe2 [Trivia] Fix unresolved reference to bank.BalanceTooHigh (#4170)
Co-authored-by: douglas-cpp <douglasc.dev@gmail.com>
2020-08-08 17:01:45 +02:00
Vexed
61df4f88b3 [Core] A few data API grammar improvements (#4164)
* stuff

* .

* oops

* aaaaaaaaaa
2020-08-07 00:22:08 +02:00
Jyu Viole Grace
fcbb07a333 [Trivia] whosthatpokemon - Generation III (#4141)
* whosthatpokemon - Gen III

* link redirect to red cdn
2020-08-06 23:34:54 +02:00
Draper
989269c732 Lavalink.jar bump for internal manager (#4168) 2020-08-06 22:04:22 +02:00
Vexed
b363398b28 Docs improvements after watching two self-proclaimed incompetent people install it (#4119)
* the thing

* right

* hmm

* review
2020-08-06 21:51:59 +02:00
PredaaA
fc2277bc88 [Audio] Send an more user friendly message at "Track Stuck" errors (#4061)
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-08-06 20:23:49 +01:00
Dav
a9bd1c60e6 [Reports] Give friendly error if no report channel set (#4136) 2020-08-06 21:12:05 +02:00
Dav
297ba8f2b7 [Core] Typo fix (#4035) 2020-08-06 18:54:44 +02:00
jack1142
09933e22f6 Update discord-ext-menus vendor to commit 84caae8038d0d3adc860957ccef05baeec2e2dd8 (#4167) 2020-08-06 17:44:40 +01:00
github-actions[bot]
5f52fb872a [i18n] Automated Crowdin downstream (#4166)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-06 17:19:59 +02:00
Dav
f65ff87b96 [Docs] Clarify documentation for Context.clean_prefix (#4135)
* change docstring for Context.clean_prefix

* "tyop"
2020-08-06 03:54:48 +02:00
Michael H
068ce24513 [Core Commands] Add Help settings view (#4022)
* add help settings view

* Update redbot/core/commands/help.py

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

* natural language handling of time intervals is useful

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-06 03:38:34 +02:00
Michael H
29543ed118 avoid issue with not having before_invoke called (#4129) 2020-08-06 03:34:55 +02:00
maxbooiii
39ae4a3b58 [Streams] Change hitbox to smashcast. (#4161)
* [Streams] Change hitbox to smashcast.

as hitbox is now smashcast.

* Add files via upload

* reee

* :thonk:

* oof

* Add missing new lines at end of file

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-05 17:04:36 -08:00
Michael H
4f808306ba Add a provisional API for replacing the help formatter (#4011)
* Adds an API for replacing the help formatter

* Apply suggestions from code review

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

* add note about provisionality

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-06 02:12:14 +02:00
jack1142
6cef336417 Remove unused try except blocks in modlog.create_case() usage (#4095) 2020-08-05 19:40:52 +01:00
Jamie
0cc04706f6 [Streams] Attempt to fix unclear error in youtubestream (#4148) 2020-08-05 19:39:28 +01:00
jack1142
c673bb0979 Fix the errors related to installed module having invalid commit data (#4086) 2020-08-05 19:35:57 +01:00
Neuro Assassin
5221b1e4a3 Fix missing self argument in [p]licenseinfo (#4154) 2020-08-04 14:13:23 +02:00
MeatyChunks
8e0dbb7185 Fix amount of messages in log message of [p]cleanup message (#4156)
Fixes #4155
2020-08-04 12:14:13 +02:00
jack1142
775528ce9b Reject package (extension) names that can't be valid Python identifiers (#3679)
* Reject package names that can't be valid Python identifiers

* Add info to `[p](re)load`

* Improve internal consistency of package vs cog
2020-08-03 15:17:27 +02:00
Draper
1a3e264b2a Make humanize_list() use babel. (#2982)
* Removes `MAX_BALANCE` from bank, user `bank.get_max_balance()` now
`[p]bankset maxbal` can be used to set the maximum bank balance

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

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

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

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

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

* Fixes docs

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

* Add reference to Babel's `format_list`

* Add Babel to intersphinx

* remove towncrier entry

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

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

* Fixes docs

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

* Add reference to Babel's `format_list`

* Fix order, make the parameters keyword-only

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-08-03 15:17:05 +02:00
Michael H
c5a553a600 Document prefix preservation (#4085)
* Document prefix preservation

* more docs

* ref fix

* update reservations to include dunders

* meh

* Add a broad exclusion in the guarantees section
2020-08-03 15:09:29 +02:00
Michael H
c0b1e50a5f Begin work on a data request API (#4045)
[Core] Data Deletion And Disclosure APIs

 - Adds a Data Deletion API
   - Deletion comes in a few forms based on who is requesting
   - Deletion must be handled by 3rd party
 - Adds a Data Collection Disclosure Command
   - Provides a dynamically generated statement from 3rd party
   extensions
 - Modifies the always available commands to be cog compatible
   - Also prevents them from being unloaded accidentally
2020-08-03 15:09:07 +02:00
jack1142
bb1a256295 Update __init__.py (#4153) 2020-08-03 14:07:04 +01:00
github-actions[bot]
7e7a3a6488 Automated Crowdin downstream (#4133)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-08-01 16:58:27 +02:00
jack1142
36f1fa15a5 Bump pytest to version 6.0.1 and yarl to 1.5.1 (#4126)
* Update pytest to version 6.0.1

* remove some awful monkeypatching

* use new import mode

* Update yarl to 1.5.1
2020-08-01 16:40:19 +02:00
Michael H
3b5183de43 [RPC] Fix for non-rpc users (#4143)
* [RPC] Fix for non-rpc users

  - RPC probably needs rewriting.
  - Also, I noticed some extremely sharp edges
  and a potential crash point (unrelated to the fixed issue)
  on windows that the side effects from have been mitigated here
  partially.

* sysexit on initialization failure
2020-08-01 02:45:51 +02:00
Michael H
bbd08eda3e [RPC] Shutdown properly (#4134)
* [RPC] Shutdown properly

* stop doesn't mean stop, somehow

* 1 more time

* so much salt
2020-07-30 16:11:37 +02:00
Predeactor
dce10d7282 Propose more info on simple serverinfo (#4121)
* Propose more info on simple serverinfo

* Fixed black + serverinfo

* Fix black (Sorry)

* Merge jack's suggestions

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

* Change separator

👍

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

* Black

* Update general.py

Co-authored-by: Ubuntu <ubuntu@vps-35e65bf5.vps.ovh.net>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-07-30 01:30:50 +02:00
jack1142
82d8af1fb1 Make docs tox workflow not stop after first warning (#4090) 2020-07-29 02:50:13 +02:00
Twentysix
6c68aa9dcd [CustomCom] [p]cc show - Handle missing cooldowns (#4112)
The old dataconverter didn't add cooldowns by default and `[p]cc show` expects them to be present
2020-07-29 02:48:50 +02:00
Jyu Viole Grace
7458eefa01 [Trivia] whosthatpokemon2 trivia - Generation 2 Pokémons (#4102)
* Generation 2 Pokemons for whosthatpokemon trivia

* replace "pokemon" with "Pokémon"
2020-07-29 02:46:03 +02:00
jack1142
8ada1ee152 Only accept positive integers in [p]cleanup commands (#4115) 2020-07-29 02:44:36 +02:00
Michael H
d73ad3115f Prevent LicenseInfo command from being a source of user command spam (#4110)
* Prevent LicenseInfo command from being a source of user command spam

* add dep-warn explaining whats needed for this

* name issues

* Tests...

* An empty commit unbroke some of it, but still style issues
2020-07-29 02:39:37 +02:00
MeatyChunks
832bdfde22 [Economy] Prevent forbidden error when blocked by user (#4120)
Stop `[p]payouts` throwing a console error if the user has blocked the bot. Probably too spammy to put the payout message in chat.
2020-07-29 01:46:20 +02:00
Jamie
260a2d5c78 Use mod/admin_or_permissions instead of just mod/admin. (#4109)
* Update modcheck.

* _or_permissions for set nickname & serverprefix
2020-07-29 01:38:19 +02:00
Jamie
57247c5d87 [Streams] Mixer removal (#4072)
* [streams] Mixer is dead soon

* remove Mixer from readme
2020-07-29 01:38:03 +02:00
jack1142
e0616c37a9 Fix the copyright in LICENSE file (#3985)
* Fix the copyright in LICENSE file

* Update LICENSE

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

* Update LICENSE

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

Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
2020-07-29 01:36:15 +02:00
jack1142
3aa6f51dfb Bump dependencies (this switches to HTML 5 writer in Sphinx & changes config.json dir on Mac) (#3982)
* Bump deps

* use html5 writer

* appdirs<1.4.4 compatibility fix

* more bumping

* Revert "appdirs<1.4.4 compatibility fix" (Jack did a dumb)

This reverts commit cc5299d987.

* And another ~~one~~ bump!

I'm gonna blame Neuro for being nice and contributing to aiohttp-json-rpc.

* just one more and pls merge this Kowlin

* Kowlin, pls merge
2020-07-29 01:16:12 +02:00
Michael H
1d80fe9aec Create cog disabling API (#4043)
* create cog disbale base

* Because defaults...

* lol

* announcer needs to respect this

* defaultdict mishap

* Allow None as guild

- Mostly for interop with with ctx.guild

* a whitespace issue

* Apparently, I broke this too

* Apply suggestions from code review

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

* This can probably be more optimized later, but since this is a cached value, it's not a large issue

* Report tunnel closing

* mod too

* whitespace issue

* Fix Artifact of prior method naming

* these 3 places should have the check if i understood it correctly

* Announce the closed tunnels

* tunnel oversight

* Make the player stop at next track

* added where draper said to put it

* Apply suggestions from code review

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
2020-07-28 20:52:36 +02:00
jack1142
97379afe6d Fix the cog_before_invoke hook in Admin (#4124) 2020-07-28 15:29:20 +01:00
github-actions[bot]
fb96392e73 Automated Crowdin downstream (#4103)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-28 03:05:19 +02:00
jack1142
0293a108f0 Add workflow_dispatch trigger to Crowdin workflow (#4113) 2020-07-28 02:17:54 +02:00
PredaaA
28b5be21b3 [General] Change PUBLIC feature to COMMUNITY in serverinfo (#4116) 2020-07-25 22:05:11 +02:00
aikaterna
ae4be2c23c Merge pull request #4111 from thisisjvgrace/fix-gen1-trivia
[Trivia] whosthatpokemon - Gen 1 - replace "pokemon" with "Pokémon"
2020-07-24 10:57:41 -07:00
Jyu Viole Grace
5bca214863 use "Pokémon" instead of "pokemon" 2020-07-24 14:56:13 +05:30
Ryan
6ab007bc1d [CustomCom] Add missing await (#4108) 2020-07-23 23:37:31 +02:00
TrustyJAID
583f093eb0 [Admin] fix erroneous await in _ready.set() (#4107) 2020-07-23 23:19:18 +02:00
Michael H
0d8a899a65 [chat formatting] Add Variation Selector-16 as appropriate (#4105)
- Ensures consistent rendering across devices
  - See:
  https://unicode.org/Public/emoji/12.1/emoji-variation-sequences.txt
2020-07-23 19:40:25 +02:00
jack1142
676bf1bd60 Update chocolatey install commands per chocolatey.org (#4098) 2020-07-23 12:34:19 +01:00
jack1142
e88c67465c Update pyenv instructions to install Python 3.8.5 (#4094) 2020-07-23 12:32:53 +01:00
jack1142
8c484f86a9 Make bordered() use + for corners if ascii_border=True (#4097) 2020-07-23 12:32:41 +01:00
Draper
5fba9bc4ed [Audio] Ensure TrackEnqueueError is always handled (#3879)
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
2020-07-23 12:32:32 +01:00
jack1142
0635921d6b Remove operating systems that reached EOL (#4099) 2020-07-23 10:38:47 +01:00
Michael H
ec262d4c30 [Announcer] Don't die with a lack of channels (#4089) 2020-07-20 18:51:27 +01:00
jack1142
5507816c42 Give friendlier error when package can't be found during bot startup (#4079) 2020-07-20 10:53:54 +01:00
github-actions[bot]
dcc77cf24f Automated Crowdin downstream (#4078)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-20 03:30:58 +02:00
Michael H
a35bcecf94 Fix state transition for subcommands modified by permission hooks (#3956)
* [Permissions] Fix state transition for subcommands modified by
permission hooks

* docs
2020-07-18 21:40:23 +02:00
Michael H
1852420b98 [Core] Add Red.message_eligible_as_command (#4077)
* [Core] Add `Red.message_eligible_as_command`

  - This is a small utility function which makes it easy for cog
  creators to treat non-command messages as commands correctly.

  - This also modifies `Red.ignored_channel_or_guild`'s signature to
  explicitly add support for passing a message object (the only needed
  attributes are entirely shared with context)

* Update redbot/core/bot.py

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

* address review

* Rename

* remove webhhok check, the issue wasn't possible under normal operation

* Ah yes, ctx.bot in a method of the bot...

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-07-18 15:38:57 +02:00
jack1142
c9ce4a78e6 Exclude locales folders from code ownership (#4071) 2020-07-14 13:35:44 +02:00
jack1142
500f91f0cd Fix no message when unregistered reason is used in [p]warn (#3840) 2020-07-14 10:43:51 +01:00
Vexed
1ee32b77dd [Mod] [p]mute|unmute voice now take action instantly (#4064)
* make mute and unmute have the same fail string

* now add the jucy bits

* hmm no

This reverts commit a445bd8415.

* Apply suggestions from code review

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-07-12 18:44:34 +02:00
jack1142
c4d295b25d Ignore that the rule for model doesn't exist when trying to remove it (#4036) 2020-07-10 21:42:31 +01:00
jack1142
fdf2ed6ecc Make [p]tempban respect default_days setting (#3993) 2020-07-10 21:40:04 +01:00
jack1142
326ae76fe0 Fix the error for empty author list in [p]findcog (#4042) 2020-07-10 21:37:41 +01:00
github-actions[bot]
a7a18ad956 Automated Crowdin downstream (#4060)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-09 18:53:49 +02:00
Vexed
cf3636df3c Change wording in VPS providers document (#4050)
* change wording

* hmm

* as discussed in ac

* Update docs/host-list.rst

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

* Update docs/host-list.rst

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

* fix it

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-07-09 18:12:46 +02:00
Kowlin
a59ff57c27 Dev bump for 3.3.11 (#4056) 2020-07-09 08:55:40 +02:00
Kowlin
0cd3bede0d 3.3.10 release bump. (#4054) 2020-07-09 08:45:17 +02:00
Neuro Assassin
637fa37fad Red 3.3.10 - Changelog (#3967)
* Add 3.3.10 or 3.4.0 section

* PR 3981

* PR 3951

* PR 3975

* PR 3974

* PR 3964

* PR 3884

* Various things

* PR 3972

* PR 3970

* Add contributor

* PR 3980

* Add Draper as contributor

* PR 3973

* PR 3965

* PR 3987

* PR 3901

* PR 3906

* PR 3958

* PR 3895

* PR 3920

* PR 3915

* oops

* I don't like info

* PR 3969

* PR 3990

* PR 3911

* PR 3921

* PR 3938

* PR 3608

* Update entries about PR 3608

* PR 4012

* PR 4030

* PR 4026

* PR 4039

* PR 3994

* PR 3991

* PR 4023

* Actually fix conflicts

* A lot of PRs.

* And stamp a date on top of it.

* Fun fact, we format it with YYYY-MM-DD...

* Forgot Sinbad, 👀 Sorry

* Update changelog_3_3_0.rst

Co-authored-by: Neuro Assassin <wrbrown70@yahoo.com>
Co-authored-by: Kowlin <Kowlin@users.noreply.github.com>
2020-07-09 08:41:56 +02:00
aikaterna
07dcf38291 Update Lavalink.jar version (#4055) 2020-07-09 08:28:00 +02:00
Lui
ff1f7362ee Bump d.py dependency (#4053) 2020-07-09 07:38:49 +02:00
Draper
d30e83b5fc Reduce config calls when changing white/blacklist and use sets for their cache (#3910)
* optimise use of config ctx manager to reduce calls to config

* fine you potato

* since jack said yes i'll abuse it

* Apply suggestions from code review

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

* difference_update and update

* Apply suggestions from code review

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

* Update redbot/core/settings_caches.py

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

* one last tweak

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-07-08 19:25:14 +02:00
Dav
14349d0649 Make strings in help command *truly* translatable (#4044)
* make help.py translatable

* jack's not-review 1

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

* pylint is going crazy her, not sure what I'm missing

* Jack's now-this-is-actually-a-review 1

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

* Jack's review 2

* Let's not bother Dav with one missing backtick

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-07-08 15:11:04 +02:00
Dav
49b19450fd [Mod] Make tempbans permanent when using [p]hackban (#4025)
* Remove users from tempban unban list when hackbanning them

* black and missing bracket

* make sure this actually gets processed

* let the user know when a tempban was upgraded

* say more things

* reduce config calls

* jack loves performance

* adress review

* review the 2nd
2020-07-08 01:15:42 +02:00
Dav
5b612b8ac7 [Docs] Update framework_i18n.rst (#4018)
* Update framework_i18n.rst

* Update framework_i18n.rst

* -h flag note

* Add hyphen

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-07-08 00:53:03 +02:00
Draper
e0b922c949 Make localwhitelist check if caller will still be able to use bot after changes (#3903)
* Check invokers theoretical perms in localwhitelist add before completing command

* remove unnecessary code

* add check to remove

* ignore bot owner and server owner

* Update core_commands.py

* lets not crash shit
2020-07-07 20:08:06 +02:00
Michael H
60df447550 Add settings view commands (#4041)
Any group which sent help + settings views has had the settings view
  split into a seperate command. This ensures that custom help behavior
  does not interfere with settings views.
2020-07-07 00:53:41 +02:00
Vexed
2cf7a1f80d [Core] Docstring full stops and a few other grammar fixes (#4023)
* core full stops/other grammar fixes

* need to read better (i'm keeping it on two lines)

* apply review

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-07-06 20:21:45 +02:00
jack1142
4dd0fb97fe Stop putting text about invite when invite isn't sent in tempban message (#3991) 2020-07-06 18:57:16 +01:00
Vexed
12bce6a560 [Image] Update instructions for setting the GIPHY API (#3994)
* update wording for giphy api

* of cource master draper
#3938 - make the command untranslateable

* i18n <your_api_key_here>

* commas to parens as discused in discord
2020-07-06 19:11:04 +02:00
Michael H
d869410d36 Add .gitattributes to ensure project consistent line endings (#4037)
- Renormalized as well
2020-07-06 18:53:10 +02:00
Draper
31bb43ca38 Vendor discord.ext.menus (#4039)
Vendor `discord.ext.menus` from commit `cc108bed812d0e481a628ca573c2eeeca9226b42` at https://github.com/Rapptz/discord-ext-menus

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-07-06 17:37:52 +02:00
jack1142
07e480ff7a Stop using git ls-files *.py for style check (#4040) 2020-07-06 14:45:46 +01:00
MiniJennJenn
c251804162 Trivia Update (#4026)
Co-authored-by: hatred2k <hatred2k@gmail.com>
2020-07-06 09:29:56 +01:00
github-actions[bot]
ff72e415aa Automated Crowdin downstream (#4033)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-07-02 19:04:35 +02:00
aikaterna
7d30e3de14 [Utils] Fix regex for role mentions in MessagePredicate (#4030) 2020-07-01 03:29:16 +02:00
bobloy
8b529f488b Add 'discord.com/invite' to docs of filter_invites() function (#4027) 2020-06-30 14:49:45 +02:00
github-actions[bot]
b5930155df Automated Crowdin downstream (#4016)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-06-25 17:20:12 +02:00
bobloy
632840384b Add discord.com to supported domains in INVITE_URL_RE (#4012)
* Support for discord.com

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

* Non-capturing
2020-06-24 20:06:11 +02:00
jack1142
a96e814af4 Add project_urls and improve our use of classifiers (#4006) 2020-06-22 21:18:53 +02:00
jack1142
b49b53934d Update deprecation warnings (#3608)
* Make deprecation notice specify minor release based on soonest date

* Stop specifying a specific release in shared libs deprecation notice

* Add actual deprecation warning for `APIToken` (OMG, this is so cool)

* Add dates (2020-08-05 for all)

* address review

* improve consistency

* Add __dir__ and show APIToken in docs (or maybe I want to annoy Flame)

* fix module name when importing non-existent name from parent package

* Fix stack level used by depr warn in `redbot.core.commands`
2020-06-22 03:25:33 +02:00
Dav
df410529b0 [i18n/Streams] Change strings mentioning commands to use {command} variable (#3938)
* hopefully all strings in streams.py

* black streams.py

* don't touch docstrings

* uniformity is good

* thx draper

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

* aaaaaaaaaaaaaaaaaaaaaa

* translate more

* sure, joining some strings for jack

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

* more strings to join

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

* yup... I missed this

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

* jaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaack blaaaaaaaaaaaaaaaaaaaaaack

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-06-21 20:38:31 +02:00
Draper
477186d09d Add map(), find() and next() methods to AsyncIter (#3921)
* properly handle prefixes

* Docsss and typehinting

* aaaaaaaaaaa

* Apply suggestions from code review

* ffs

* docs

* docs

* Apply suggestions from code review

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

* skip await if map is none

* implement `.next()`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-06-21 19:47:48 +02:00
Draper
81f146a2ef [Mod] Only send the DM about migration if at least 1 scope entry has a non-default value (#3911)
* Only send notify_owners in mod migration if at least 1 scope entry has a non default value

* update string

* use asynciter on these potentially large loops

* check server settings too
2020-06-21 19:45:35 +02:00
Jamie
84d0282815 [Streams] Invalidate old bearer token when api key is updated. (#3990) 2020-06-21 18:44:38 +01:00
Vexed
d2de3c109a [Downloader] Differentiate core and local cogs in [p]findcog (#3969) 2020-06-21 17:59:52 +01:00
Draper
aad36c7430 Expose info about internally managed jar in [p]audioset info (#3915)
* since i have no clue when RW will be release ... lets add this as it helps out a lot

* update branch name regex

* recheck version after download since now we are showing it.
2020-06-20 01:07:39 +02:00
Vexed
4c62c67fd4 [redbot.setup] Ask for confirmation when passed instance name contains hyphens + allow to use dots (#3920)
* Change regex and the error message

* few changes see ^^^ GH comment

if it doesn't pass the RegEx `[a-zA-Z0-9_\.]*` then:
- if on Linux and contains a "-" anywhere, not allowed
- if it contains a space or starts with a "-", not allowed
- if the top two don't trigger, then `confirm()` with the user.

* black why

* 3.3.9

* fk

* ty aika

* review :aha:

* oopsie

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

* this is just vexed tries and jack fixes

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

* quite sad really

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

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-06-19 16:16:22 +02:00
Flame442
144b7b36d0 [Mod] Consistency periods & proper logging (#3895)
* Consistency periods & proper logging

* woooo jack

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

* Update kickban.py

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-06-19 12:58:40 +02:00
Dav
802641ce6b Use timedelta converter for ban duration and add option to pass delete days to [p]tempban (#3958)
* add duration atribute

* sanity checks

* add days parameter

* maybe resolve conflicts?

* black and make linting happy

* right... I need to send this

* but I still need to return... oops
2020-06-19 01:51:06 +02:00
Vexed
2d63e3d6aa Print getting started guide on startup when bot is in no guilds (#3906)
* Link getting started guide

* 3.3.9

* fk
2020-06-19 01:13:01 +02:00
Vexed
728252ac87 Fix capitalisation in cog creation docs (dev version note) (#3968) 2020-06-19 01:05:48 +02:00
Draper
79d042ad29 [Streams] Only send message about missing client secret once (#3901)
* Send Notify owner messages only when a key has been invalidated since last notify_owner

* grammar

* welp im dumb

* Black and lower config call frequency

* Update redbot/cogs/streams/streams.py

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

* dont use a generic name now to avoid a config migration later

* be even more explicit with var name

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-06-18 23:39:52 +02:00
Neuro Assassin
dd4095b15b [Permissions] Fix integer commands and empty dict rules (#3987) 2020-06-18 21:44:47 +01:00
Vexed
1cf8308d03 [Downloader] Embed version of findcog (#3965) 2020-06-18 21:37:46 +01:00
Jamie
4e890814ff [Filter] Add listing commands (#3973) 2020-06-18 21:23:16 +01:00
Draper
175fbebd73 Move logic for fetching latest Red version info to internal util (#3904)
* Only Send out of date message to Final builds available on PyPi

* Only Send out of date message to Final builds available on PyPi

* sorted the resulting list so that the newest build is first in the list

* forgot about this one

* well jack is a bitch but we love him.

* simplify logic

* Add the new function to `__all__`

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2020-06-18 22:21:59 +02:00
Jyu Viole Grace
879d21c528 [Trivia] addition of Lord of the Rings trivia (#3980) 2020-06-18 17:32:15 +01:00
Jyu Viole Grace
c7202b353d [Trivia] Minor correction in greekmyth trivia (#3970)
* [Trivia] Minor correction in greekmyth trivia

In greekmyth trivia, there is a question: `Who is the God of Medicine and the son of Apollo?` and the only answer written in the yaml file is `Asclepius` , however `Aesculapius` or `Hepius` can also be considered as a right answer. 

Source: https://en.wikipedia.org/wiki/Asclepius

* Lord of The Rings trivia

* Added AUTHOR key

* Revert "Added AUTHOR key"

This reverts commit d60e336771.

* Revert "Lord of The Rings trivia"

This reverts commit d7365e87b9.

Co-authored-by: Jyu Viole Grace <thisisjvgrace@users.noreply.github.com>
2020-06-18 17:05:12 +02:00
Vexed
3a0574eae8 [Core] Change [p]embedset user docstring and message to explicitly say DMs only (#3972)
* change docstring and message to explicitly say DMs

* didn't think i'd need to run black...

* wrong branch...

This reverts commit aa6aa5cf4b.

* wait its the right branch

* review - seperate enabled & disabled strings

* review

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

Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
2020-06-18 16:00:08 +02:00
jack1142
70c733e146 Use a task instead of awaiting for delete delay (#3884) 2020-06-18 15:50:42 +02:00
jack1142
a64c28aa44 Fix unnecessary typing before running commands in Downloader (#3964) 2020-06-18 15:47:12 +02:00
aikaterna
35365a7154 [Downloader] Add command to list pinned cogs (#3974) 2020-06-18 15:43:59 +02:00
aikaterna
9594284f6c [Trivia] Fix whosthatpokemon urls (#3975) 2020-06-18 14:42:01 +02:00
github-actions[bot]
0358473af5 Automated Crowdin downstream (#3984)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-06-18 14:33:59 +02:00
jack1142
8d553a3fc6 Improve command error responses (#3951)
* Update settings.py

* Update modlog.py
2020-06-18 13:46:20 +02:00
Vexed
373dcded2c add the space (#3981) 2020-06-17 15:00:49 +02:00
jack1142
e59d52bae4 Dev bump (#3960) 2020-06-12 01:50:37 +02:00
1588 changed files with 523333 additions and 178987 deletions

5
.cherry_picker.toml Normal file
View File

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

4
.gitattributes vendored Normal file
View File

@@ -0,0 +1,4 @@
* text eol=lf
# binary file excludsions
*.png binary

73
.github/CODEOWNERS vendored
View File

@@ -1,62 +1,23 @@
# Core
redbot/core/bank.py @palmtree5
redbot/core/checks.py @tekulvw
redbot/core/cli.py @tekulvw
redbot/core/config.py @tekulvw
redbot/core/cog_manager.py @tekulvw
redbot/core/core_commands.py @tekulvw
redbot/core/context.py @Tobotimus
redbot/core/commands/* @mikeshardmind
redbot/core/data_manager.py @tekulvw
redbot/core/dev_commands.py @tekulvw
redbot/core/drivers/* @tekulvw
redbot/core/events.py @tekulvw
redbot/core/global_checks.py @tekulvw
redbot/core/i18n.py @tekulvw
redbot/core/modlog.py @palmtree5
redbot/core/rpc.py @tekulvw
redbot/core/utils/chat_formatting.py @tekulvw
redbot/core/utils/mod.py @palmtree5
redbot/core/utils/data_converter.py @mikeshardmind
redbot/core/utils/antispam.py @mikeshardmind
redbot/core/utils/tunnel.py @mikeshardmind
redbot/core/utils/caching.py @mikeshardmind
redbot/core/utils/common_filters.py @mikeshardmind
redbot/core/utils/dbtools.py @mikeshardmind
# Cogs
redbot/cogs/admin/* @tekulvw
redbot/cogs/alias/* @tekulvw
redbot/cogs/audio/** @aikaterna @Drapersniper
redbot/cogs/bank/* @tekulvw
redbot/cogs/cleanup/* @palmtree5
redbot/cogs/customcom/* @palmtree5
redbot/cogs/downloader/* @tekulvw @jack1142
redbot/cogs/economy/* @palmtree5
redbot/cogs/filter/* @palmtree5
redbot/cogs/general/* @palmtree5
redbot/cogs/image/* @palmtree5
redbot/cogs/mod/* @palmtree5
redbot/cogs/modlog/* @palmtree5
redbot/cogs/streams/* @Twentysix26 @palmtree5
redbot/cogs/trivia/* @Tobotimus
redbot/cogs/reports/* @mikeshardmind
redbot/cogs/permissions/* @mikeshardmind
redbot/cogs/warnings/* @palmtree5
/redbot/cogs/audio/** @aikaterna @PredaaA
/redbot/cogs/downloader/* @jack1142
/redbot/cogs/streams/* @palmtree5
/redbot/cogs/mutes/* @TrustyJAID
# Docs
docs/* @tekulvw @palmtree5
# Trivia Lists
/redbot/cogs/trivia/data/lists/whosthatpokemon*.yaml @aikaterna
# Tests
tests/cogs/downloader/* @jack1142
/redbot/pytest/downloader* @jack1142
/tests/cogs/downloader/* @jack1142
# Setup, instance setup, and running the bot
setup.py @tekulvw
redbot/__init__.py @tekulvw
redbot/__main__.py @tekulvw @mikeshardmind
redbot/setup.py @tekulvw
# Schemas
/schema/* @jack1142
# Others
.travis.yml @Kowlin
crowdin.yml @Kowlin
.github/workflows/* @Kowlin
# CI
/.travis.yml @Kowlin
/crowdin.yml @Kowlin
/.github/workflows/* @Kowlin
# Excludes
**/locales/* @ghost

View File

@@ -0,0 +1,86 @@
name: Bug reports for commands
description: For bugs that involve commands found within Red.
labels: 'Type: Bug'
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out an issue. This template is meant for any issues related to commands.
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
- type: input
id: red-version
attributes:
label: "What Red version are you using?"
placeholder: 3.4.5
validations:
required: true
- type: dropdown
id: cog-name
attributes:
label: "Cog name"
description: "From which cog does the command come from?"
options:
- Admin
- Alias
- Audio
- Bank
- Cleanup
- CogManagerUI
- Core
- Customcom
- Dev
- Downloader
- Economy
- Filter
- General
- Image
- Mod
- Modlog
- Mutes
- Permissions
- Reports
- Streams
- Trivia
- Warnings
validations:
required: true
- type: input
id: command-name
attributes:
label: "Command name"
description: "What is the command that caused the error?"
placeholder: "play"
validations:
required: true
- type: textarea
id: weh
attributes:
label: "What did you expect to happen?"
validations:
required: true
- type: textarea
id: wah
attributes:
label: "What actually happened?"
description: |
A clear and concise description of what the bug is.
If the issue is visual in nature, consider posting a screenshot.
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: "How can we reproduce this error?"
description: "List of steps required to reproduce this error."
value: |
1.
2.
3.
...
validations:
required: true
- type: textarea
id: anything-else
attributes:
label: Anything else?
description: Let us know if you have anything else to share.

View File

@@ -0,0 +1,54 @@
name: Bug report
description: "For bugs that don't involve a command."
labels: 'Type: Bug'
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out an issue. This template is meant for any issues not related to any existing command.
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
- type: input
id: red-version
attributes:
label: "What Red version are you using?"
placeholder: 3.4.5
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: "What were you trying to do?"
validations:
required: true
- type: textarea
id: weh
attributes:
label: "What did you expect to happen?"
validations:
required: true
- type: textarea
id: wah
attributes:
label: "What actually happened?"
description: |
If the issue is visual in nature, consider posting a screenshot.
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: "How can we reproduce this error?"
description: |
List of steps required to reproduce the error. If the bug is code related, a minimal code example that reproduces the problem would be a big help.
value: |
1.
2.
3.
...
validations:
required: true
- type: textarea
id: anything-else
attributes:
label: Anything else?
description: Let us know if you have anything else to share.

View File

@@ -0,0 +1,29 @@
name: Enhancement proposal
description: For feature requests and improvements related to already existing functionality.
labels: 'Type: Enhancement'
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out an issue. This template is meant for feature requests and improvements to already existing functionality.
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
- type: input
id: component-name
attributes:
label: "What component of Red (cog, command, API) would you like to see improvements on?"
placeholder: Audio
validations:
required: true
- type: textarea
id: proposal
attributes:
label: "Describe the enhancement you're suggesting."
description: |
Feel free to describe in as much detail as you wish.
validations:
required: true
- type: textarea
id: anything-else
attributes:
label: Anything else?
description: Let us know if you have anything else to share.

View File

@@ -0,0 +1,52 @@
name: Feature request
description: For feature requests regarding Red itself.
labels: 'Type: Feature'
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out an issue, this template is meant for any feature suggestions.
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
- type: dropdown
id: feature-name
attributes:
label: "Type of feature request"
description: "What type of feature would you like to request?"
multiple: true
options:
- API functionality
- Cog
- Command
- Other
validations:
required: true
- type: textarea
id: proposal
attributes:
label: "Description of the feature you're suggesting"
description: |
Feel free to describe in as much detail as you wish.
If you are requesting API functionality:
- Describe what it should do
- Note whether it is to extend existing functionality or introduce new functionality
If you are requesting a cog to be included in core:
- Describe the functionality in as much detail as possible
- Include the command structure, if possible
- Please note that unless it's something that should be core functionality,
we reserve the right to reject your suggestion and point you to our cog
board to request it for a third-party cog
If you are requesting a command:
- Include what cog it should be in and a name for the command
- Describe the intended functionality for the command
- Note any restrictions on who can use the command or where it can be used
validations:
required: true
- type: textarea
id: anything-else
attributes:
label: Anything else?
description: Let us know if you have anything else to share.

View File

@@ -1,20 +0,0 @@
Please be sure to read through other issues as well to make sure what you are suggesting/reporting has not already
been suggested/reported
### Type:
- [ ] Suggestion
- [ ] Bug
### Brief description of the problem
### Expected behavior
### Actual behavior
### Steps to reproduce
1.
2.
3.
4.

View File

@@ -1,34 +0,0 @@
---
name: Bug reports for commands
about: For bugs that involve commands found within Red
title: ''
labels: 'Type: Bug'
assignees: ''
---
# Command bugs
<!--
Did you find a bug with a command? Fill out the following:
-->
#### Command name
<!-- Replace this line with the name of the command -->
#### What cog is this command from?
<!-- Replace this line with the name of the cog -->
#### What were you expecting to happen?
<!-- Replace this line with a description of what you were expecting to happen -->
#### What actually happened?
<!-- Replace this line with a description of what actually happened. Include any error messages -->
#### How can we reproduce this issue?
<!-- Replace with numbered steps to reproduce the issue -->

View File

@@ -1,44 +0,0 @@
---
name: Feature request
about: For feature requests regarding Red itself.
title: ''
labels: 'Type: Feature'
assignees: ''
---
# Feature request
<!-- This template is for feature requests. Please fill out the following: -->
#### Select the type of feature you are requesting:
<!-- To check a box, replace the space between the [] with a x -->
- [ ] Cog
- [ ] Command
- [ ] API functionality
#### Describe your requested feature
<!--
Feel free to describe in as much detail as you wish.
If you are requesting a cog to be included in core:
- Describe the functionality in as much detail as possible
- Include the command structure, if possible
- Please note that unless it's something that should be core functionality,
we reserve the right to reject your suggestion and point you to our cog
board to request it for a third-party cog
If you are requesting a command:
- Include what cog it should be in and a name for the command
- Describe the intended functionality for the command
- Note any restrictions on who can use the command or where it can be used
If you are requesting API functionality:
- Describe what it should do
- Note whether it is to extend existing functionality or introduce new functionality
-->

View File

@@ -1,30 +0,0 @@
---
name: Bug report
about: For bugs that don't involve a command.
title: ''
labels: 'Type: Bug'
assignees: ''
---
# Other bugs
<!--
Did you find a bug with something other than a command? Fill out the following:
-->
#### What were you trying to do?
<!-- Replace this line with a description of what you were trying to do -->
#### What were you expecting to happen?
<!-- Replace this line with a description of what you were expecting to happen -->
#### What actually happened?
<!-- Replace this line with a description of what actually happened. Include any error messages -->
#### How can we reproduce this issue?
<!-- Replace with numbered steps to reproduce the issue -->

View File

@@ -1,7 +1 @@
### Type
- [ ] Bugfix
- [ ] Enhancement
- [ ] New feature
### Description of the changes

View File

@@ -1,7 +0,0 @@
### Type
- [ ] Bugfix
- [ ] Enhancement
- [ ] New feature
### Description of the changes

189
.github/labeler.yml vendored Normal file
View File

@@ -0,0 +1,189 @@
"Category: Admin":
# Source
- redbot/cogs/admin/*
# Docs
- docs/cog_guides/admin.rst
"Category: Alias":
# Source
- redbot/cogs/alias/*
# Docs
- docs/cog_guides/alias.rst
"Category: Audio Cog":
- any:
- redbot/cogs/audio/**/*
all:
- "!redbot/cogs/audio/**/locales/*"
"Category: Bank API":
# Source
- redbot/core/bank.py
# Docs
- docs/framework_bank.rst
"Category: Bank Cog":
# Source
- redbot/cogs/bank/*
# Docs
- docs/cog_guides/bank.rst
"Category: Bot Core":
# Source
- redbot/*
- redbot/core/__init__.py
- redbot/core/_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: 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: Dev Cog":
# Source
- redbot/core/dev_commands.py
# Docs
- docs/cog_guides/dev.rst
"Category: Docs":
- docs/**/*
"Category: Downloader":
# Source
- redbot/cogs/downloader/*
# Docs
- docs/cog_guides/downloader.rst
"Category: Economy Cog":
# Source
- redbot/cogs/economy/*
# Docs
- docs/cog_guides/economy.rst
"Category: Filter":
# Source
- redbot/cogs/filter/*
# Docs
- docs/cog_guides/filter.rst
"Category: General Cog":
# Source
- redbot/cogs/general/*
# Docs
- docs/cog_guides/general.rst
"Category: Help":
- redbot/core/commands/help.py
"Category: i18n":
# Source
- redbot/core/i18n.py
# Locale files
- redbot/**/locales/*
# Docs
- docs/framework_i18n.rst
"Category: Image":
# 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: Modlog Cog":
# Source
- redbot/cogs/modlog/*
# Docs
- docs/cog_guides/modlog.rst
"Category: Mutes Cog":
# Source
- 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
"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

@@ -1,15 +1,18 @@
name: Auto Labeler
name: Auto Labeler - Issues
on:
issues:
types: [opened]
permissions:
issues: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Apply Triage Label
uses: actions/github-script@0.4.0
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
@@ -18,7 +21,7 @@ jobs:
console.log('Issue already has Status label, skipping...');
return;
}
github.issues.addLabels({
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,

58
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@@ -0,0 +1,58 @@
name: "CodeQL"
on:
push:
pull_request:
schedule:
- cron: '0 14 * * 4'
workflow_dispatch:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -e .[all]
# Set the `CODEQL-PYTHON` environment variable to the Python executable
# that includes the dependencies
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@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
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

View File

@@ -0,0 +1,32 @@
name: Crowdin - Upload strings
on:
push:
branches:
- V3/develop
jobs:
deploy:
if: github.repository == 'Cog-Creators/Red-DiscordBot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install -y crowdin
pip install redgettext==3.3
- name: Generate source files
run: |
make gettext
- name: Upload source files
run: |
make upload_translations
env:
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}

View File

@@ -14,13 +14,13 @@ jobs:
name: Lint Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ env.ref }}
- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
with:
python_version: "3.8"
- run: "python -m pip install git+https://github.com/pycqa/pyflakes@1911c20#egg=pyflakes git+https://github.com/pycqa/pycodestyle@d219c68#egg=pycodestyle git+https://gitlab.com/pycqa/flake8@3.7.9#egg=flake8"
python-version: "3.8"
- run: "python -m pip install git+https://github.com/pycqa/pyflakes@1911c20#egg=pyflakes git+https://github.com/pycqa/pycodestyle@d219c68#egg=pycodestyle git+https://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

130
.github/workflows/prepare_release.yml vendored Normal file
View File

@@ -0,0 +1,130 @@
name: Prepare Release
on:
workflow_dispatch:
inputs:
new_stable_version:
description: Version number for the new stable release (leave empty to just strip `.dev1`)
required: false
default: 'auto'
permissions:
contents: write
pull-requests: write
jobs:
crowdin_download_translations:
needs: pr_stable_bump
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install -y crowdin
pip install redgettext==3.3
- name: Generate source files
run: |
make gettext
- name: Download translations
run: |
make download_translations
env:
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
- name: Create Pull Request
id: cpr_crowdin
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Automated Crowdin downstream
title: "Automated Crowdin downstream"
body: |
This is an automated PR that is part of Prepare Release automated workflow (2 out of 2).
Please ensure that there are no errors or invalid files are in the PR.
labels: "Automated PR, Changelog Entry: Skipped"
branch: "automated/i18n"
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
milestone: ${{ needs.pr_stable_bump.outputs.milestone_number }}
- name: Close and reopen the PR with different token to trigger CI
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.cpr_crowdin.outputs.pull-request-number }}
PR_OPERATION: ${{ steps.cpr_crowdin.outputs.pull-request-operation }}
with:
github-token: ${{ secrets.cogcreators_bot_repo_scoped }}
script: |
const script = require(
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/close_and_reopen_pr.js`
);
console.log(script({github, context}));
pr_stable_bump:
runs-on: ubuntu-latest
outputs:
milestone_number: ${{ steps.get_milestone_number.outputs.result }}
steps:
# Checkout repository and install Python
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
# Create PR for stable version bump
- name: Update Red version number from input
id: bump_version_stable
run: |
python .github/workflows/scripts/bump_version.py
env:
PYTHONPATH: ${{ github.workspace }}:${{ env.PYTHONPATH }}
NEW_STABLE_VERSION: ${{ github.event.inputs.new_stable_version }}
# Get milestone number of the milestone for the new stable version
- name: Get milestone number
id: get_milestone_number
uses: actions/github-script@v6
env:
MILESTONE_TITLE: ${{ steps.bump_version_stable.outputs.new_version }}
with:
script: |
const script = require(
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/get_milestone_number_by_exact_title.js`
);
return await script({github, context});
- name: Create Pull Request
id: cpr_bump_stable
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Version bump to ${{ steps.bump_version_stable.outputs.new_version }}
title: Version bump to ${{ steps.bump_version_stable.outputs.new_version }}
body: |
This is an automated PR that is part of Prepare Release automated workflow (1 out of 2).
Please ensure that there are no errors or invalid files are in the PR.
labels: "Automated PR, Changelog Entry: Skipped"
branch: "automated/pr_bumps/${{ steps.bump_version_stable.outputs.new_version }}"
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
milestone: ${{ steps.get_milestone_number.outputs.result }}
- name: Close and reopen the PR with different token to trigger CI
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.cpr_bump_stable.outputs.pull-request-number }}
PR_OPERATION: ${{ steps.cpr_bump_stable.outputs.pull-request-operation }}
with:
github-token: ${{ secrets.cogcreators_bot_repo_scoped }}
script: |
const script = require(
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/close_and_reopen_pr.js`
);
console.log(await script({github, context}));

View File

@@ -1,48 +0,0 @@
name: Publish to Crowdin
on:
schedule:
- cron: '0 12 * * THU'
repository_dispatch:
types: crowdin
env:
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
jobs:
deploy:
if: github.repository == 'Cog-Creators/Red-DiscordBot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.8'
- name: Install dependencies
run: |
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install -y crowdin
pip install redgettext==3.1
- name: Generate source files
run: |
make gettext
- name: Upload source files
run: |
make upload_translations
- name: Download translations
run: |
make download_translations
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Automated Crowdin downstream
title: "[i18n] Automated Crowdin downstream"
body: |
This is an automated PR.
Please ensure that there are no errors or invalid files are in the PR.
labels: "Automated PR, Category: i18n, Changelog Entry: Skipped"
branch: "automated/i18n"

View File

@@ -1,27 +0,0 @@
name: Publish to PyPI
on:
push:
tags:
- "*"
jobs:
deploy:
if: github.repository == 'Cog-Creators/Red-DiscordBot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_token }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

179
.github/workflows/publish_release.yml vendored Normal file
View File

@@ -0,0 +1,179 @@
name: Publish Release
on:
push:
tags:
- "*"
jobs:
release_information:
if: github.repository == 'Cog-Creators/Red-DiscordBot'
name: GO HERE BEFORE APPROVING
runs-on: ubuntu-latest
steps:
# Checkout repository and install Python
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
# Get version to release
- name: Get version to release
id: version_to_release
run: |
python .github/workflows/scripts/bump_version.py
env:
PYTHONPATH: ${{ github.workspace }}:${{ env.PYTHONPATH }}
JUST_RETURN_VERSION: '1'
# Print release information
- name: REVIEW OUTPUT OF THIS STEP BEFORE APPROVING
env:
TAG_BASE_BRANCH: ${{ github.event.base_ref }}
TAG_REF_NAME: ${{ github.ref }}
RELEASE_VERSION: ${{ steps.version_to_release.outputs.version }}
run: |
echo 'Release information:'
echo "- Branch the tag was based off: ${TAG_BASE_BRANCH#'refs/heads/'}"
echo "- Tag name: ${TAG_REF_NAME#'refs/tags/'}"
echo "- Release version: $RELEASE_VERSION"
echo "TAG_NAME=${TAG_REF_NAME#'refs/tags/'}" >> $GITHUB_ENV
- name: Ensure the tag name corresponds to the released version
env:
RELEASE_VERSION: ${{ steps.version_to_release.outputs.version }}
run: |
if [[ "$TAG_NAME" != "$RELEASE_VERSION" ]]; then
echo -n "The tag name ($TAG_NAME) is not the same as"
echo " the release version ($RELEASE_VERSION)!"
exit 1
else
echo "The tag name and the release version are the same ($TAG_NAME)."
echo 'Continuing...'
fi
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build twine
- name: Build
run: python -m build
- name: Check built distributions
run: python -m twine check dist/*
- name: Upload packaged distributions
uses: actions/upload-artifact@v3
with:
name: build-output
path: ./dist
release_to_pypi:
needs:
- release_information
- build
environment: Release
name: Release to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download packaged distributions
uses: actions/download-artifact@v3
with:
name: build-output
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# This is already checked during the build.
verify-metadata: false
# Allow security-minded people to verify whether the files on PyPI
# were automatically uploaded by a CI script.
print-hash: true
pr_dev_bump:
permissions:
contents: write
pull-requests: write
needs: release_to_pypi
name: Update Red version number to dev
runs-on: ubuntu-latest
steps:
- name: Get base branch
env:
TAG_BASE_BRANCH: ${{ github.event.base_ref }}
run: |
echo "BASE_BRANCH=${TAG_BASE_BRANCH#'refs/heads/'}" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
ref: ${{ env.BASE_BRANCH }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
# Version bump to development version
- name: Update Red version number to dev
id: bump_version_dev
run: |
python .github/workflows/scripts/bump_version.py
env:
PYTHONPATH: ${{ github.workspace }}:${{ env.PYTHONPATH }}
DEV_BUMP: '1'
# Get milestone number of the milestone for the old version
- name: Get milestone number
id: get_milestone_number
uses: actions/github-script@v6
env:
MILESTONE_TITLE: ${{ steps.bump_version_dev.outputs.old_version }}
with:
script: |
const script = require(
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/get_milestone_number_by_exact_title.js`
);
return await script({github, context});
- name: Create Pull Request
id: cpr_bump_dev
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Version bump to ${{ steps.bump_version_dev.outputs.new_version }}
title: Version bump to ${{ steps.bump_version_dev.outputs.new_version }}
body: |
This is an automated PR.
Please ensure that there are no errors or invalid files are in the PR.
labels: "Automated PR, Changelog Entry: Skipped"
branch: "automated/pr_bumps/${{ steps.bump_version_dev.outputs.new_version }}"
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
milestone: ${{ steps.get_milestone_number.outputs.result }}
base: ${{ env.BASE_BRANCH }}
- name: Close and reopen the PR with different token to trigger CI
uses: actions/github-script@v6
env:
PR_NUMBER: ${{ steps.cpr_bump_dev.outputs.pull-request-number }}
PR_OPERATION: ${{ steps.cpr_bump_dev.outputs.pull-request-operation }}
with:
github-token: ${{ secrets.cogcreators_bot_repo_scoped }}
script: |
const script = require(
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/close_and_reopen_pr.js`
);
console.log(await script({github, context}));

View File

@@ -0,0 +1,52 @@
import os
import re
import sys
from typing import Match
import redbot
if int(os.environ.get("JUST_RETURN_VERSION", 0)):
print(f"::set-output name=version::{redbot.__version__}")
sys.exit(0)
version_info = None
def repl(match: Match[str]) -> str:
global version_info
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":
version_info = redbot.VersionInfo.from_str(match.group("version"))
version_info.dev_release = None
else:
version_info = redbot.VersionInfo.from_str(new_stable_version)
if int(os.environ.get("DEV_BUMP", 0)):
version_info.micro += 1
version_info.dev_release = 1
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>[^"]*)"$',
repl=repl,
string=fp.read(),
count=1,
flags=re.MULTILINE,
)
if not found:
print("Couldn't find `__version__` line!")
sys.exit(1)
with open("redbot/__init__.py", "w", encoding="utf-8", newline="\n") as fp:
fp.write(new_contents)
print(f"::set-output name=new_version::{version_info}")

View File

@@ -0,0 +1,25 @@
module.exports = (async function ({github, context}) {
const pr_number = process.env.PR_NUMBER;
const pr_operation = process.env.PR_OPERATION;
let sleep_time = 0;
if (!['created', 'updated'].includes(pr_operation)) {
console.log('PR was not created as there were no changes.')
return;
}
for (const new_state of ['closed', 'open']) {
// some sleep time needed to make sure API handles open after close
if (sleep_time)
await new Promise(r => setTimeout(r, sleep_time));
github.rest.issues.update({
issue_number: pr_number,
owner: context.repo.owner,
repo: context.repo.repo,
state: new_state
});
sleep_time = 2000;
}
})

View File

@@ -0,0 +1,49 @@
module.exports = (async function ({github, context}) {
const milestone_title = process.env.MILESTONE_TITLE;
const [repo_owner, repo_name] = process.env.GITHUB_REPOSITORY.split('/');
const {
repository: {
milestones: {
nodes: milestones,
pageInfo: {hasNextPage}
}
}
} = await github.graphql({
query: `
query getMilestoneNumberByTitle(
$repo_owner: String!
$repo_name: String!
$milestone_title: String!
) {
repository(owner:$repo_owner name:$repo_name) {
milestones(query:$milestone_title states:OPEN first:100) {
nodes {
number
title
}
pageInfo {
hasNextPage
}
}
}
}`,
repo_owner: repo_owner,
repo_name: repo_name,
milestone_title: milestone_title,
});
if (hasNextPage) {
// this should realistically never happen so let's just error
core.setFailed('Impossible happened! :)');
return;
}
for (const milestone of milestones)
if (milestone.title === milestone_title)
return milestone.number;
// if no exact match is found, assume the milestone doesn't exist
console.log('The milestone was not found. API returned the array: %o', milestones);
return null;
})

View File

@@ -17,12 +17,18 @@ jobs:
python_version:
- "3.8"
tox_env:
- py
- style
- docs
include:
- tox_env: py
friendly_name: Tests
- tox_env: py38
python_version: "3.8"
friendly_name: Python 3.8 - Tests
- tox_env: py39
python_version: "3.9"
friendly_name: Python 3.9 - Tests
- tox_env: py310
python_version: "3.10-dev"
friendly_name: Python 3.10-dev - Tests
- tox_env: style
friendly_name: Style
- tox_env: docs
@@ -30,17 +36,17 @@ jobs:
fail-fast: false
name: Tox - ${{ matrix.friendly_name }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ env.ref }}
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- 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 }}
@@ -52,6 +58,8 @@ jobs:
matrix:
python_version:
- "3.8"
- "3.9"
- "3.10-dev"
fail-fast: false
name: Tox - Postgres
services:
@@ -64,17 +72,17 @@ jobs:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ env.ref }}
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
pip install "tox<4"
- name: Tox test
env:
TOXENV: postgres
@@ -83,3 +91,13 @@ jobs:
PGPASSWORD: postgres
PGPORT: 5432
run: tox
- name: Verify no errors in PostgreSQL logs.
run: |
logs="$(docker logs "${{ job.services.postgresql.id }}" 2>&1)"
echo "---- PostgreSQL logs ----"
echo "$logs"
echo "---- PostgreSQL logs ----"
error_count="$(echo "$logs" | { grep -c 'ERROR: ' || true; })"
if [[ $error_count -gt 0 ]]; then
exit 1
fi

87
.gitignore vendored
View File

@@ -1,4 +1,3 @@
*.json
*.exe
*.dll
*.pot
@@ -15,6 +14,9 @@ Pipfile.lock
# User-specific stuff:
.idea/
*.iws
.vscode/
*.sublime-project
*.sublime-workspace
## Plugin-specific files:
@@ -141,3 +143,86 @@ ENV/
# Pre-commit hooks
/.pre-commit-config.yaml
### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Windows template
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
### SublimeText template
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# Workspace files are user-specific
# SFTP configuration file
sftp-config.json
sftp-config-alt*.json
# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache
# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings

View File

@@ -1,15 +1,11 @@
version: 2
formats:
- pdf
build:
image: latest
python:
version: 3.8
install:
- requirements: docs/requirements.txt
- method: pip
path: .
extra_requirements:

View File

@@ -1,65 +0,0 @@
dist: xenial
language: python
cache: pip
notifications:
email: false
python:
- 3.8.1
env:
global:
- PIPENV_IGNORE_VIRTUALENVS=1
install:
- pip install --upgrade pip tox
script:
- tox
jobs:
include:
- env: TOXENV=py
- env: TOXENV=docs
- env: TOXENV=style
- env: TOXENV=postgres
services: postgresql
addons:
postgresql: "10"
before_script:
- psql -c 'create database red_db;' -U postgres
# These jobs only occur on tag creation if the prior ones succeed
- stage: PyPi Deployment
if: tag IS present
python: 3.8.1
env:
- DEPLOYING=true
- TOXENV=py38
deploy:
- provider: pypi
distributions: sdist bdist_wheel
user: Red-DiscordBot
password:
secure: Ty9vYnd/wCuQkVC/OsS4E2jT9LVDVfzsFrQc4U2hMYcTJnYbl/3omyObdCWCOBC40vUDkVHAQU8ULHzoCA+2KX9Ds/7/P5zCumAA0uJRR9Smw7OlRzSMxJI+/lGq4CwXKzxDZKuo5rsxXEbW5qmYjtO8Mk6KuLkvieb1vyr2DcqWEFzg/7TZNDfD1oP8et8ITQ26lLP1dtQx/jlAiIBzgK9wziuwj1Divb9A///VsGz43N8maZ+jfsDjYqrfUVWTy3ar7JPUplletenYCR1PmQ5C46XfV0kitKd1aITJ48YPAKyYgKy8AIT+Uz1JArTnqdzLSFRNELS57qS00lzgllbteCyWQ8Uzy0Zpxb/5DDH8/mL1n0MyJrF8qjZd2hLNAXg3z/k9bGXeiMLGwoxRlGXkL2XpiVgI93UKKyVyooGNMgPTc/QdSc7krjAWcOtX/HgLR34jxeLPFEdzJNAFIimfDD8N+XTFcNBw6EvOYm/n5MXkckNoX/G+ThNobHZ7VKSASltZ9zBRAJ2dDh35G3CYmVEk33U77RKbL9le/Za9QVBcAO8i6rqVGYkdO7thHHKHc/1CB1jNnjsFSDt0bURtNfAqfwKCurQC8487zbEzT+2fog3Wygv7g3cklaRg4guY8UjZuFWStYGqbroTsOCd9ATNqeO5B13pNhllSzU=
skip_cleanup: true
on:
repo: Cog-Creators/Red-DiscordBot
tags: true
- stage: Crowdin Deployment
if: tag IS present OR ENV(BUILD_CROWDIN)
python: 3.8.1
env:
- DEPLOYING=true
- TOXENV=py38
before_deploy:
- curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
- echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update -qq
- sudo apt-get install -y crowdin
- pip install redgettext==3.1
deploy:
- provider: script
script: make upload_translations
skip_cleanup: true
on:
repo: Cog-Creators/Red-DiscordBot
tags: true

3344
CHANGES.rst Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -42,7 +42,7 @@ Unsure of how to get started contributing to Red? Please take a look at the Issu
* beginner - issues that can normally be fixed in just a few lines of code and maybe a test or two.
* help-wanted - issues that are currently unassigned to anyone and may be a bit more involved/complex than issues tagged with beginner.
**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github)
At this point you're ready to start making changes. Feel free to ask for help; everyone was a beginner at some point!
@@ -83,7 +83,7 @@ We're using [tox](https://github.com/tox-dev/tox) to run all of our tests. It's
Currently, tox does the following, creating its own virtual environments for each stage:
- Runs all of our unit tests with [pytest](https://github.com/pytest-dev/pytest) on python 3.8 (test environment `py38`)
- Ensures documentation builds without warnings, and all hyperlinks have a valid destination (test environment `docs`)
- Ensures that the code meets our style guide with [black](https://github.com/ambv/black) (test environment `style`)
- Ensures that the code meets our style guide with [black](https://github.com/psf/black) (test environment `style`)
To run all of these tests, just run the command `tox` in the project directory.
@@ -92,9 +92,9 @@ To run a subset of these tests, use the command `tox -e <env>`, where `<env>` is
Your PR will not be merged until all of these tests pass.
### 4.3 Style
Our style checker of choice, [black](https://github.com/ambv/black), actually happens to be an auto-formatter. The checking functionality simply detects whether or not it would try to reformat something in your code, should you run the formatter on it. For this reason, we recommend using this tool as a formatter, regardless of any disagreements you might have with the style it enforces.
Our style checker of choice, [black](https://github.com/psf/black), actually happens to be an auto-formatter. The checking functionality simply detects whether or not it would try to reformat something in your code, should you run the formatter on it. For this reason, we recommend using this tool as a formatter, regardless of any disagreements you might have with the style it enforces.
Use the command `black --help` to see how to use this tool. The full style guide is explained in detail on [black's GitHub repository](https://github.com/ambv/black). **There is one exception to this**, however, which is that we set the line length to 99, instead of black's default 88. This is already set in `pyproject.toml` configuration file in the repo so you can simply format code with Black like so: `black <src>`.
Use the command `black --help` to see how to use this tool. The full style guide is explained in detail on [black's GitHub repository](https://github.com/psf/black). **There is one exception to this**, however, which is that we set the line length to 99, instead of black's default 88. This is already set in `pyproject.toml` configuration file in the repo so you can simply format code with Black like so: `black <src>`.
### 4.4 Make
You may have noticed we have a `Makefile` and a `make.bat` in the top-level directory. For now, you can do a few things with them:

View File

@@ -632,7 +632,8 @@ 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) 2015-2020 Twentysix
Copyright (C) 2017-2021 Cog Creators
Copyright (C) 2015-2017 Twentysix
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -652,7 +653,8 @@ 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) 2015-2020 Twentysix
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
under certain conditions; type `show c' for details.
@@ -700,3 +702,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This project vendors discord.ext.menus package (https://github.com/Rapptz/discord-ext-menus) made by Danny Y. (Rapptz) which is distributed under MIT License.
Copy of this license can be found in discord-ext-menus.LICENSE file in redbot/vendored folder of this repository.

27
MANIFEST.in Normal file
View File

@@ -0,0 +1,27 @@
# include license files
include LICENSE
recursive-include redbot *.LICENSE
# include locale files
recursive-include redbot locales/*.po
# include data folders for cogs
recursive-include redbot/**/data *
# include *.export files from the test fixtures
recursive-include redbot *.export
# include the py.typed file informing about Red being typed
recursive-include redbot py.typed
# include *.sql files from postgres driver
recursive-include redbot/core/drivers/postgres *.sql
# include tests
graft tests
# include tox configuration
include tox.ini
# exclude files containing byte-code and compiled libs
global-exclude *.py[cod]

View File

@@ -1,12 +1,41 @@
.DEFAULT_GOAL := help
PYTHON ?= python3.8
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
ifneq ($(wildcard $(ROOT_DIR)/.venv/.),)
VENV_PYTHON = $(ROOT_DIR)/.venv/bin/python
else
VENV_PYTHON = $(PYTHON)
endif
define HELP_BODY
Usage:
make <command>
Commands:
reformat Reformat all .py files being tracked by git.
stylecheck Check which tracked .py files need reformatting.
stylediff Show the post-reformat diff of the tracked .py files
without modifying them.
gettext Generate pot files.
upload_translations Upload pot files to Crowdin.
download_translations Download translations from Crowdin.
bumpdeps Run script bumping dependencies.
newenv Create or replace this project's virtual environment.
syncenv Sync this project's virtual environment to Red's latest
dependencies.
endef
export HELP_BODY
# Python Code Style
reformat:
$(PYTHON) -m black `git ls-files "*.py"`
$(VENV_PYTHON) -m black $(ROOT_DIR)
stylecheck:
$(PYTHON) -m black --check `git ls-files "*.py"`
$(VENV_PYTHON) -m black --check $(ROOT_DIR)
stylediff:
$(PYTHON) -m black --check --diff `git ls-files "*.py"`
$(VENV_PYTHON) -m black --check --diff $(ROOT_DIR)
# Translations
gettext:
@@ -23,7 +52,11 @@ bumpdeps:
# Development environment
newenv:
$(PYTHON) -m venv --clear .venv
.venv/bin/pip install -U pip setuptools
.venv/bin/pip install -U pip setuptools wheel
$(MAKE) syncenv
syncenv:
.venv/bin/pip install -Ur ./tools/dev-requirements.txt
# Help
help:
@echo "$$HELP_BODY"

View File

@@ -12,32 +12,35 @@
<a href="https://discord.gg/red">
<img src="https://discordapp.com/api/guilds/133049272517001216/widget.png?style=shield" alt="Discord Server">
</a>
<a href="https://www.patreon.com/Red_Devs">
<img src="https://img.shields.io/badge/Support-Red!-yellow.svg" alt="Support Red on Patreon!">
<a href="https://pypi.org/project/Red-DiscordBot/">
<img alt="PyPI" src="https://img.shields.io/pypi/v/Red-Discordbot">
</a>
<a href="https://www.python.org/downloads/">
<img src="https://img.shields.io/badge/Made%20With-Python%203.8-blue.svg?style=for-the-badge" alt="Made with Python 3.8">
</a>
<a href="https://crowdin.com/project/red-discordbot">
<img src="https://d322cqt584bo4o.cloudfront.net/red-discordbot/localized.svg" alt="Localized with Crowdin">
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/Red-Discordbot">
</a>
<a href="https://github.com/Rapptz/discord.py/">
<img src="https://img.shields.io/badge/discord-py-blue.svg" alt="discord.py">
<img src="https://img.shields.io/badge/discord-py-blue.svg" alt="discord.py">
</a>
<a href="https://www.patreon.com/Red_Devs">
<img src="https://img.shields.io/badge/Support-Red!-red.svg" alt="Support Red on Patreon!">
</a>
</p>
<p align="center">
<a href="https://github.com/Cog-Creators/Red-DiscordBot/actions">
<img src="https://github.com/Cog-Creators/Red-DiscordBot/workflows/Tests/badge.svg" 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://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/ambv/black">
<a href="https://github.com/psf/black">
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code Style: Black">
</a>
<a href="http://makeapullrequest.com">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg">
</a>
<a href="https://crowdin.com/project/red-discordbot">
<img src="https://d322cqt584bo4o.cloudfront.net/red-discordbot/localized.svg" alt="Localized with Crowdin">
</a>
</p>
<p align="center">
@@ -57,19 +60,19 @@
# Overview
Red is a fully modular bot meaning all features and commands can be enabled/disabled to your
liking, making it completely customizable. This is also a *self-hosted bot* meaning you will need
liking, making it completely customizable. This is a *self-hosted bot* meaning you will need
to host and maintain your own instance. You can turn Red into an admin bot, music bot, trivia bot,
new best friend or all of these together!
[Installation](#installation) is easy, and you do **NOT** need to know anything about coding! Aside
from installation and updating, every part of the bot can be controlled from within Discord.
from installing and updating, every part of the bot can be controlled from within Discord.
**The default set of modules includes and is not limited to:**
- Moderation features (kick/ban/softban/hackban, mod-log, filter, chat cleanup)
- Trivia (lists are included and can be easily added)
- Music features (YouTube, SoundCloud, local files, playlists, queues)
- Stream alerts (Twitch, Youtube, Mixer, Hitbox, Picarto)
- Stream alerts (Twitch, Youtube, Picarto)
- Bank (slot machine, user credits)
- Custom commands
- Imgur/gif search
@@ -104,14 +107,14 @@ plugins directly from Discord! A few examples are:
- AniList
- And much, much more!
Feel free to take a [peek](https://cogboard.red/t/approved-repositories/210) at a list of
Feel free to take a [peek](https://index.discord.red) at a list of
available 3rd party cogs!
# Join the community!
**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://cogboard.red/t/approved-repositories/210) the cog youre looking for,
[find](https://index.discord.red) the cog youre looking for,
consult our [guide](https://red-discordbot.readthedocs.io/en/stable/guide_cog_creation.html) on
building your own cogs!
@@ -126,3 +129,6 @@ Red is named after the main character of "Transistor", a video game by
Artwork created by [Sinlaire](https://sinlaire.deviantart.com/) on Deviant Art for the Red Discord
Bot Project.
This project vendors [discord.ext.menus](https://github.com/Rapptz/discord-ext-menus) package made by Danny Y. (Rapptz) which is distributed under MIT License.
A copy of this license can be found in the [discord-ext-menus.LICENSE](redbot/vendored/discord-ext-menus.LICENSE) file in the [redbot/vendored](redbot/vendored) folder of this repository.

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,129 @@
"""
A Sphinx extension adding a ``deprecated-removed`` directive that works
similarly to CPython's directive with the same name.
The key difference is that instead of passing the version of planned removal,
the writer must provide the minimum amount of days that must pass
since the date of the release it was deprecated in.
Due to lack of a concrete release schedule for Red, this ensures that
we give enough time to people affected by the changes no matter
when the releases actually happen.
`DeprecatedRemoved` class is heavily based on
`sphinx.domains.changeset.VersionChange` class that is available at:
https://github.com/sphinx-doc/sphinx/blob/0949735210abaa05b6448e531984f159403053f4/sphinx/domains/changeset.py
Copyright 2007-2020 by the Sphinx team, see AUTHORS:
https://github.com/sphinx-doc/sphinx/blob/82f495fed386c798735adf675f867b95d61ee0e1/AUTHORS
The original copy was distributed under BSD License and this derivative work
is distributed under GNU GPL Version 3.
"""
import datetime
import multiprocessing
import subprocess
from typing import Any, Dict, List, Optional
from docutils import nodes
from sphinx import addnodes
from sphinx.application import Sphinx
from sphinx.util.docutils import SphinxDirective
class TagDateCache:
def __init__(self) -> None:
self._tags: Dict[str, datetime.date] = {}
def _populate_tags(self) -> None:
with _LOCK:
if self._tags:
return
out = subprocess.check_output(
("git", "tag", "-l", "--format", "%(creatordate:raw)\t%(refname:short)"),
text=True,
)
lines = out.splitlines(False)
for line in lines:
creator_date, tag_name = line.split("\t", maxsplit=1)
timestamp = int(creator_date.split(" ", maxsplit=1)[0])
self._tags[tag_name] = datetime.datetime.fromtimestamp(
timestamp, tz=datetime.timezone.utc
).date()
def get_tag_date(self, tag_name: str) -> Optional[datetime.date]:
self._populate_tags()
return self._tags.get(tag_name)
_LOCK = multiprocessing.Manager().Lock()
_TAGS = TagDateCache()
class DeprecatedRemoved(SphinxDirective):
has_content = True
required_arguments = 2
optional_arguments = 1
final_argument_whitespace = True
def run(self) -> List[nodes.Node]:
# Some Sphinx stuff
node = addnodes.versionmodified()
node.document = self.state.document
self.set_source_info(node)
node["type"] = self.name
node["version"] = tuple(self.arguments)
if len(self.arguments) == 3:
inodes, messages = self.state.inline_text(self.arguments[2], self.lineno + 1)
para = nodes.paragraph(self.arguments[2], "", *inodes, translatable=False)
self.set_source_info(para)
node.append(para)
else:
messages = []
# Text generation
deprecation_version = self.arguments[0]
minimum_days = int(self.arguments[1])
tag_date = _TAGS.get_tag_date(deprecation_version)
text = (
f"Will be deprecated in version {deprecation_version},"
" and removed in the first minor version that gets released"
f" after {minimum_days} days since deprecation"
if tag_date is None
else f"Deprecated since version {deprecation_version},"
" will be removed in the first minor version that gets released"
f" after {tag_date + datetime.timedelta(days=minimum_days)}"
)
# More Sphinx stuff
if self.content:
self.state.nested_parse(self.content, self.content_offset, node)
classes = ["versionmodified"]
if len(node):
if isinstance(node[0], nodes.paragraph) and node[0].rawsource:
content = nodes.inline(node[0].rawsource, translatable=True)
content.source = node[0].source
content.line = node[0].line
content += node[0].children
node[0].replace_self(nodes.paragraph("", "", content, translatable=False))
node[0].insert(0, nodes.inline("", f"{text}: ", classes=classes))
else:
para = nodes.paragraph(
"", "", nodes.inline("", f"{text}.", classes=classes), translatable=False
)
node.append(para)
ret = [node]
ret += messages
return ret
def setup(app: Sphinx) -> Dict[str, Any]:
app.add_directive("deprecated-removed", DeprecatedRemoved)
return {
"version": "1.0",
"parallel_read_safe": True,
}

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

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

110
docs/autostart_mac.rst Normal file
View File

@@ -0,0 +1,110 @@
.. launchd guide
==============================
Setting up auto-restart on Mac
==============================
-----------------------
Creating the plist file
-----------------------
Start by activating your venv. Then run the following command:
.. code-block:: none
which python
Copy the output of that command.
Now run :code:`sudo nano /Library/LaunchDaemons/red.plist`
Paste the following and replace the following:
- :code:`username` (but not :code:`UserName`) with your Mac username
- :code:`path` with the path you copied earlier
- :code:`instance-name` with your instance name:
.. code-block:: none
:emphasize-lines: 9, 13, 28
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>red</string>
<key>ProgramArguments</key>
<array>
<string>path</string>
<string>-O</string>
<string>-m</string>
<string>redbot</string>
<string>instance-name</string>
<string>--no-prompt</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>StandardOutPath</key>
<string>/tmp/red_out.log</string>
<key>StandardErrorPath</key>
<string>/tmp/red_err.log</string>
<key>UserName</key>
<string>username</string>
<key>InitGroups</key>
<true/>
</dict>
</plist>
.. note::
You may add any additional arguments you need to add to the :code:`redbot` command by
adding them to the end of the array under :code:`ProgramArguments`
.. note::
Should you need to set up auto-restart for additional bots, create a :code:`.plist` file for
each bot under a different file name, and use the respective file names for the commands below.
Save and exit :code:`ctrl + O; enter; ctrl + x`
-------------------------------
Starting and loading the plist
-------------------------------
To start the bot and set it to start on boot, you must run the following command:
.. prompt:: bash
sudo launchctl load -w /Library/LaunchDaemons/red.plist
If you need to shutdown the bot, you can use the ``[p]shutdown`` command or
type the following command in the terminal:
.. prompt:: bash
sudo launchctl stop red
To start the bot again after a shutdown, run the following:
.. prompt:: bash
sudo launchctl start red
To stop the bot and set it to not start on boot anymore, run the following:
.. prompt:: bash
sudo launchctl unload -w /Library/LaunchDaemons/red.plist
To view Red's log, run the following (:code:`red_out.log` is for the console output, and
:code:`red_err.log` for the error logs):
.. prompt:: bash
nano /tmp/red_out.log
nano /tmp/red_err.log

View File

@@ -1,44 +0,0 @@
.. pm2 service guide
==============================================
Setting up auto-restart using pm2 on Linux
==============================================
.. note:: This guide is for setting up PM2 on a Linux environment. This guide assumes that you already have a working Red instance.
--------------
Installing PM2
--------------
Start by installing Node.JS and NPM via your favorite package distributor. From there run the following command:
:code:`npm install pm2 -g`
After PM2 is installed, run the following command to enable your Red instance to be managed by PM2. Replace the brackets with the required information.
You can add additional Red based arguments after the instance, such as :code:`--dev`.
.. code-block:: none
pm2 start redbot --name "<Insert a name here>" --interpreter "<Location to your Python Interpreter>" --interpreter-args "-O" -- <Red Instance> --no-prompt
.. code-block:: none
Arguments to replace.
<Insert a name here>
A name to identify the bot within pm2, this is not your Red instance.
<Location to your Python Interpreter>
The location of your Python interpreter, to find out where that is use the following command inside activated venv:
which python
<Red Instance>
The name of your Red instance.
------------------------------
Ensuring that PM2 stays online
------------------------------
To make sure that PM2 stays online and persistence between machine restarts, run the following commands:
:code:`pm2 save` & :code:`pm2 startup`

View File

@@ -4,6 +4,8 @@
Setting up auto-restart using systemd on Linux
==============================================
.. note:: This guide is for setting up systemd on a Linux environment. This guide assumes that you already have a working Red instance.
-------------------------
Creating the service file
-------------------------
@@ -12,29 +14,32 @@ In order to create the service file, you will first need to know two things, you
First, your Linux :code:`username` can be fetched with the following command:
.. code-block:: bash
.. prompt:: bash
whoami
Next, your python :code:`path` can be fetched with the following commands:
.. code-block:: bash
.. prompt:: bash
:prompts: $,(redenv) $
:modifiers: auto
# If redbot is installed in a venv
source ~/redenv/bin/activate
which python
$ source ~/redenv/bin/activate
(redenv) $ /usr/bin/which python
# If redbot is installed in a pyenv virtualenv
pyenv shell <virtualenv_name>
pyenv which python
$ pyenv shell <virtualenv_name>
(redenv) $ pyenv which python
Then create the new service file:
:code:`sudo -e /etc/systemd/system/red@.service`
:code:`sudo nano /etc/systemd/system/red@.service`
Paste the following in the file, and replace all instances of :code:`username` with the Linux username you retrieved above, and :code:`path` with the python path you retrieved above.
.. code-block:: none
:emphasize-lines: 8-10
[Unit]
Description=%I redbot
@@ -65,20 +70,34 @@ Starting and enabling the service
To start the bot, run the service and add the instance name after the **@**:
:code:`sudo systemctl start red@instancename`
.. prompt:: bash
sudo systemctl start red@instancename
To set the bot to start on boot, you must enable the service, again adding the instance name after the **@**:
:code:`sudo systemctl enable red@instancename`
.. prompt:: bash
sudo systemctl enable red@instancename
If you need to shutdown the bot, you can use the ``[p]shutdown`` command or
type the following command in the terminal, still by adding the instance name after the **@**:
:code:`sudo systemctl stop red@instancename`
.. prompt:: bash
sudo systemctl stop red@instancename
.. warning:: If the service doesn't stop in the next 10 seconds, the process is killed.
Check your logs to know the cause of the error that prevents the shutdown.
To view Reds log, you can acccess through journalctl:
To set the bot to not start on boot anymore, you must disable the service by running the following command, adding the instance name after the **@**:
:code:`sudo journalctl -eu red@instancename`
.. prompt:: bash
sudo systemctl disable red@instancename
You can access Red's log through journalctl:
.. prompt:: bash
sudo journalctl -eu red@instancename

View File

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

View File

@@ -0,0 +1,80 @@
===========================================
Creating a bot account
===========================================
To use Red you will require a bot account and to enable privileged intents. Both these steps will be covered below.
.. _creating-a-bot-account:
-------------------------------
Creating the bot application
-------------------------------
In order to use Red, we must first create a Discord Bot account.
Creating a Bot account is a pretty straightforward process.
1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
2. Navigate to the `application page <https://discord.com/developers/applications>`_
3. Click on the "New Application" button.
.. image:: /.resources/bot-guide/discord_create_app_button.png
:alt: The new application button.
4. Give the application a name and click "Create".
.. image:: /.resources/bot-guide/discord_create_app_form.png
:alt: The new application form filled in.
5. Create a Bot User by navigating to the "Bot" tab and clicking "Add Bot".
- Click "Yes, do it!" to continue.
.. image:: /.resources/bot-guide/discord_create_bot_user.png
:alt: The Add Bot button.
6. If you want others to be able to invite your bot tick the **Public Bot**. Keeping it unticked will prevent others from inviting your bot to their servers and only you will be able to add the bot to servers (provided that you have needed permissions in the server you want to add the bot to).
- Make sure **Require OAuth2 Code Grant** is unchecked.
.. image:: /.resources/bot-guide/discord_bot_user_options.png
:alt: How the Bot User options should look like for most people.
7. Copy the token using the "Copy" button.
- **This is not the Client Secret at the General Information page**
.. warning::
Do not share your token as it is like your password.
If you shared your token you can regenerate it.
Continue to the next section to enable privileged intents.
.. _enabling-privileged-intents:
-------------------------------
Enabling Privileged Intents
-------------------------------
.. warning::
:ref:`Red Bot requires all intents. <intents>`
\This section is required.
1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
2. Navigate to the `application page <https://discord.com/developers/applications>`_
3. Click on the bot you want to enable privileged intents for.
4. Navigate to the bot tab on the left side of the screen.
.. image:: /.resources/bot-guide/discord_bot_tab.png
:alt: The bot tab in the application page.
5. Scroll down to the "Privileged Gateway Intents" section, enable all three privileged intents and save your changes.
.. image:: /.resources/bot-guide/discord_privileged_intents.png
:alt: The privileged gateway intents selector.
.. warning::
Red bots with over 100 servers require `bot verification <https://support.discord.com/hc/en-us/articles/360040720412>`_ which is not covered in this guide.
Remember that :ref:`we do not support public bots <intents>`. We encourage you to read that page before scaling up your bot.
*Parts of this guide have been adapted from* `discord.py intro <https://discordpy.readthedocs.io/en/stable/discord.html#discord-intro>`_ *and* `discord.py privileged intents <https://discordpy.readthedocs.io/en/stable/intents.html#privileged-intents>`_.

5
docs/changelog.rst Normal file
View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,5 @@
.. CustomCommands Cog Reference
.. _cog_customcom:
============================
CustomCommands Cog Reference

454
docs/cog_guides/admin.rst Normal file
View File

@@ -0,0 +1,454 @@
.. _admin:
=====
Admin
=====
This is the cog guide for the admin 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 admin
.. _admin-usage:
-----
Usage
-----
This cog will provide tools for server admins and bot owners.
It can add or remove a role to a member, edit one or make some available
for members so they can self-assign them as they wish.
It also provides tools for the bot owner such as server locking (once enabled,
the bot will instantly leave new servers it joins) and announcements, which
can send something in all the servers of the bot.
.. _admin-commands:
--------
Commands
--------
Here's a list of all commands available for this cog.
.. _admin-command-selfrole:
^^^^^^^^
selfrole
^^^^^^^^
**Syntax**
.. code-block:: none
[p]selfrole <selfrole>
**Description**
Add or remove a role from yourself. It must have been configured as user settable
by admins using the :ref:`selfroleset command <admin-command-selfroleset>`.
**Arguments**
* ``<selfrole>``: The role you want to attribute or remove from yourself. |role-input|
.. _admin-command-selfrole-add:
""""""""""""
selfrole add
""""""""""""
**Syntax**
.. code-block:: none
[p]selfrole add <selfrole>
**Description**
Add a role to yourself. It must have been configured as user settable
by admins using the :ref:`selfroleset command <admin-command-selfroleset>`.
**Arguments**
* ``<selfrole>``: The role you want to attribute to yourself. |role-input|
.. _admin-command-selfrole-remove:
"""""""""""""""
selfrole remove
"""""""""""""""
**Syntax**
.. code-block:: none
[p]selfrole remove <selfrole>
**Description**
Remove a role from yourself. It must have been configured as user settable
by admins using the :ref:`selfroleset command <admin-command-selfroleset>`.
**Arguments**
* ``<selfrole>``: The role you want to remove from yourself. |role-input|
.. _admin-command-selfrole-list:
"""""""""""""
selfrole list
"""""""""""""
**Syntax**
.. code-block:: none
[p]selfrole list
**Description**
List all of the available roles you can assign to yourself.
.. _admin-command-selfroleset:
^^^^^^^^^^^
selfroleset
^^^^^^^^^^^
.. note:: |admin-lock| This is also usable by the members with the
``Manage roles`` permission.
**Syntax**
.. code-block:: none
[p]selfroleset
**Description**
Define the list of user settable roles. Those roles will be available to any
member using the :ref:`selfrole command <admin-command-selfrole>`.
.. _admin-command-selfroleset-add:
"""""""""""""""
selfroleset add
"""""""""""""""
**Syntax**
.. code-block:: none
[p]selfroleset add <role>
**Description**
Add a role, or a selection of roles, to the list of available selfroles.
.. warning:: Members will be able to assign themselves the role.
Make sure it doesn't give extra perms or anything that can break
your server's security.
**Arguments**
* ``<role>``: The role to add to the list. |role-input|
.. _admin-command-selfroleset-clear:
"""""""""""""""""
selfroleset clear
"""""""""""""""""
**Syntax**
.. code-block:: none
[p]selfroleset clear
**Description**
Clear the list of available selfroles for this server.
.. _admin-command-selfroleset-remove:
""""""""""""""""""
selfroleset remove
""""""""""""""""""
**Syntax**
.. code-block:: none
[p]selfroleset remove <role>
**Description**
Remove a role, or a selection of roles, from the list of available selfroles.
**Arguments**
* ``<role>``: The role to remove from the list. |role-input|
.. _admin-command-addrole:
^^^^^^^
addrole
^^^^^^^
.. note:: |admin-lock| This is also usable by the members with the ``Manage
roles`` permission.
**Syntax**
.. code-block:: none
[p]addrole <rolename> [user]
**Description**
Adds a role to a member. If ``user`` is not given, it will be considered
as yourself, the command author.
**Arguments**
* ``<role>``: The role to add to the member. |role-input-quotes|
* ``[user]``: The member you want to add the role to. Defaults to the
command author. |member-input|
.. _admin-command-removerole:
^^^^^^^^^^
removerole
^^^^^^^^^^
.. note:: |admin-lock| This is also usable by the members with the
``Manage roles`` permission.
**Syntax**
.. code-block:: none
[p]removerole <rolename> [user]
**Description**
Removes a role from a member. If ``user`` is not given, it will be considered
as yourself, the command author.
**Arguments**
* ``<role>``: The role to remove. |role-input-quotes|
* ``[user]``: The member to remove the role from. |member-input| Defaults
to the command author.
.. _admin-command-editrole:
^^^^^^^^
editrole
^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]editrole
**Description**
Edits the settings of a role.
.. _admin-command-editrole-name:
"""""""""""""
editrole name
"""""""""""""
**Syntax**
.. code-block:: none
[p]editrole name <role> <name>
**Description**
Edits the name of a role.
**Arguments**
* ``<role>``: The role name to edit. |role-input-quotes|
* ``<name>``: The new role name. If it has spaces, you must use quotes.
.. _admin-command-editrole-color:
""""""""""""""
editrole color
""""""""""""""
**Syntax**
.. code-block:: none
[p]editrole color <role> <color>
**Description**
Edits the color of a role.
**Arguments**
* ``<role>``: The role name to edit. |role-input-quotes|
* ``<color>``: The new color to assign. |color-input|
**Examples**
* ``[p]editrole color "My role" #ff0000``
* ``[p]editrole color "My role" dark_blue``
.. _admin-command-announce:
^^^^^^^^
announce
^^^^^^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]announce <message>
**Description**
Announce your message to all of the servers the bot is in.
The bot will announce the message in the guild's announcements channel.
If this channel is not set, the message won't be announced.
**Arguments**
* ``<message>``: The message to send.
.. _admin-command-announce-cancel:
"""""""""""""""
announce cancel
"""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]announce cancel
**Description**
Cancels an active announcement.
.. _admin-command-announceset:
^^^^^^^^^^^
announceset
^^^^^^^^^^^
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]announceset
**Description**
Change how announcements are received in this guild.
.. _admin-command-announceset-channel:
"""""""""""""""""""
announceset channel
"""""""""""""""""""
**Syntax**
.. code-block:: none
[p]announceset channel [channel]
**Description**
Sets the channel where the bot owner announcements will be sent.
**Arguments**
* ``[channel]``: The channel that will be used for bot announcements.
|channel-input| Defaults to where you typed the command.
.. _admin-command-announceset-clearchannel:
""""""""""""""""""""""""
announceset clearchannel
""""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]announceset clearchannel
**Description**
Disables announcements on your server. To enable them again, you will have to
re-enter your announcements channel with the :ref:`announceset channel
<admin-command-announceset-channel>` command.
.. _admin-command-serverlock:
^^^^^^^^^^
serverlock
^^^^^^^^^^
.. note:: |owner-lock| This is also usable by the members with the
``Administrator`` permission.
**Syntax**
.. code-block:: none
[p]serverlock
**Description**
Lock a bot to its current servers only.
This means that, once you enable this, if someone invites the bot to a new
server, the bot will automatically leave the server.
.. tip:: Another way to prevent your bot from being invited on more servers is
making it private directly from the developer portal.
Once a bot is private, it can only be invited by its owner (or team
owners). Other users will get an error on Discord's webpage explaining that
the bot is private.
To do this, go to the `Discord developer portal
<https://discord.com/developers>`_, select your application, click "Bot" in
the sidebar, then untick "Public bot".
.. image:: ../.resources/admin/public_bot.png

277
docs/cog_guides/alias.rst Normal file
View File

@@ -0,0 +1,277 @@
.. _alias:
=====
Alias
=====
This is the cog guide for the alias cog. You will
find detailed docs about the usage and the commands.
``[p]`` is considered as your prefix.
.. note:: To use this cog, load it by typing this::
[p]load alias
.. _alias-usage:
-----
Usage
-----
This cog is used to create shortcuts for commands.
Here's an example:
.. code-block:: python
[p]play
# with an alias, you can call the command above with a shortcut like this:
[p]p
# "p" is now a shortcut for "play"
In this example, we made an alias named ``p`` that will
invoke the ``play`` command. If you use ``[p]play`` or ``[p]p``, the result will
be the same.
----
Here's another example
.. code-block:: python
[p]cleanup messages
# now we're creating another alias that will group both the command and the subcommand into this:
[p]clear
# "clear" is now a shortcut for "cleanup messages"
In this second example, we made an alias called ``clear`` that will
invoke the ``cleanup messages`` subcommand. Now if you use ``[p]cleanup
message`` or ``[p]clear``, the result will be the same.
----
This is the basic usage, where you can define an alias for the first part of
the command and give the second part when invoking the command. A more advanced
usage of aliases is the usage of arguments.
Let's suppose you want to make an alias to ban someone, delete 7 days of
messages and set the reason to "Spam bot.", that cannot be done with a classic
alias since the required member argument is the first one. If you create the
alias "spamban" using arguments like this ``ban {0} 7 Spam bot.``, ``{0}`` will
be replaced by the first argument of your alias:
.. code-block:: none
# we created the following alias named "spamban"
[p]spamban Slime#3160
# this alias will execute the following command:
[p]ban Slime#3160 7 Spam bot.
For a more detailed explanation, read :ref:`this <alias-command-alias-add>`.
.. _alias-commands:
--------
Commands
--------
.. _alias-command-alias:
^^^^^
alias
^^^^^
**Syntax**
.. code-block:: none
[p]alias
**Description**
This is the main command used for setting up the cog.
It will be used for all other commands.
.. _alias-command-alias-add:
"""""""""
alias add
"""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]alias add <alias_name> <command>
**Description**
Creates an alias. It will be used like this ``[p]alias_name <arguments>``
and will be equal to this ``[p]command <arguments>``.
Let's develop the examples given :ref:`earlier <alias-usage>` a bit more,
the left part of the command is the alias (blue), and the right part is the
parameters members have to give for the command (orange).
.. image:: ../.resources/alias/example-1.png
One more thing you can do with aliases is using arguments, a bit like
CustomCommands. Let's suppose you want an alias that bans x member and deletes
7 days of messages. Without aliases, the command would look like this:
``[p]ban NotSoTrustyJAID#0001 7 My random reason``
A classic alias wouldn't work because the member argument is the first one,
and you can only shorten the left part before the required argument.
An alias with arguments can fix that, you can define the alias on the whole
command and replace the required argument by ``{0}``, which will be replaced
by the first parameter given when invoking the alias.
Back to our example, let's make an alias named ``bigban`` which will be
assigned to this expression: ``ban {0} 7``
.. image:: ../.resources/alias/example-2.png
You can see in blue the "static" part of the alias, what is contained and
doesn't need to be given, the orange part is the arguments given at the end of
the command, just like a classic alias, and the green part is the positional
argument we defined: the first argument of the alias will be the green part.
You can add as many arguments as you want, they can start at ``{0}`` or ``{1}``
and must be in order: ``{1}`` will be the first argument, ``{2}`` will be the
second one...
.. attention:: The numbers must be in order, you cannot use ``{0}`` and ``{2}``
without using ``{1}``.
Here are more examples:
* * Full command: ``[p]cleanup messages 75 True``
* Alias: ``[p]alias add fullclear cleanup messages {0} True``
* Invoked alias: ``[p]fullclear 75``
*The* ``True`` *at the end tells the bot to also clear pinned messages.*
* * Full command: ``[p]repo add SinbadCogs
https://github.com/mikeshardmind/SinbadCogs v3``
* Alias: ``[p]alias add newrepo repo add {2} https://github.com/{1}/{2}``
* Invoked with alias: ``[p]newrepo mikeshardmind SinbadCogs v3``
**Arguments**
* ``<alias_name>``: The new command name.
* ``<command>``: The command to execute when ``[p]alias_name`` is invoked.
.. _alias-command-alias-delete:
""""""""""""
alias delete
""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]alias [delete|remove|del] <alias_name>
**Description**
Removes an alias from the list. Check the list with
the :ref:`alias list <alias-command-alias-list>` command.
**Arguments**
* ``<alias_name>``: The alias' name to delete.
.. _alias-command-alias-list:
""""""""""
alias list
""""""""""
**Syntax**
.. code-block:: none
[p]alias list
**Description**
Shows all of the existing aliases on the current server.
.. _alias-command-alias-show:
""""""""""
alias show
""""""""""
**Syntax**
.. code-block:: none
[p]alias show <alias_name>
**Description**
Shows the command associated to the alias.
**Arguments**
* ``<alias_name>``: The alias you want information from.
.. _alias-command-alias-help:
""""""""""
alias help
""""""""""
**Syntax**
.. code-block:: none
[p]alias help <alias_name>
**Description**
Shows help message for an alias.
**Arguments**
* ``<alias_name>``: Alias you want to get help from.
.. _alias-command-alias-global:
""""""""""""
alias global
""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]alias global
**Description**
Another group command which contains the :ref:`add
<alias-command-alias-add>`, :ref:`del
<alias-command-alias-delete>` and :ref:`list
<alias-command-alias-list>` commands.
They work the same, except the created aliases will be
global instead of being only server-wide.
Please refer to these docs for the commands, they work with the
same arguments. For example, if you want to add a global alias,
instead of doing ``[p]alias add <arguments>``, do ``[p]alias
global add <arguments>``.

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

333
docs/cog_guides/cleanup.rst Normal file
View File

@@ -0,0 +1,333 @@
.. _cleanup:
=======
Cleanup
=======
This is the cog guide for the cleanup 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 cleanup
.. _cleanup-usage:
-----
Usage
-----
This cog contains commands used for "cleaning up" (deleting) messages.
This is designed as a moderator tool and offers many convenient use cases.
All cleanup commands only apply to the channel the command is executed in.
Messages older than two weeks cannot be mass deleted.
This is a limitation of the API.
.. _cleanup-commands:
--------
Commands
--------
.. _cleanup-command-cleanup:
^^^^^^^
cleanup
^^^^^^^
**Syntax**
.. code-block:: none
[p]cleanup
**Description**
Base command for deleting messages.
.. _cleanup-command-cleanup-after:
"""""""""""""
cleanup after
"""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]cleanup after <message_id> [delete_pinned=False]
**Description**
Delete all messages after a specified message.
To get a message id, enable developer mode in Discord's
settings, 'appearance' tab. Then right click a message
and copy its id.
**Arguments:**
- ``<message_id>`` The id of the message to cleanup after. This message won't be deleted.
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
.. _cleanup-command-cleanup-before:
""""""""""""""
cleanup before
""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]cleanup before <message_id> <number> [delete_pinned=False]
**Description**
Deletes X messages before the specified message.
To get a message id, enable developer mode in Discord's
settings, 'appearance' tab. Then right click a message
and copy its id.
**Arguments:**
- ``<message_id>`` The id of the message to cleanup before. This message won't be deleted.
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
.. _cleanup-command-cleanup-between:
"""""""""""""""
cleanup between
"""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]cleanup between <one> <two> [delete_pinned=False]
**Description**
Delete the messages between Message One and Message Two, providing the messages IDs.
The first message ID should be the older message and the second one the newer.
Example:
- ``[p]cleanup between 123456789123456789 987654321987654321``
**Arguments:**
- ``<one>`` The id of the message to cleanup after. This message won't be deleted.
- ``<two>`` The id of the message to cleanup before. This message won't be deleted.
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
.. _cleanup-command-cleanup-bot:
"""""""""""
cleanup bot
"""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]cleanup bot <number> [delete_pinned=False]
**Description**
Clean up command messages and messages from the bot in the current channel.
Can only cleanup custom commands and alias commands if those cogs are loaded.
**Arguments:**
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
.. _cleanup-command-cleanup-messages:
""""""""""""""""
cleanup messages
""""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]cleanup messages <number> [delete_pinned=False]
**Description**
Delete the last X messages in the current channel.
Example:
- ``[p]cleanup messages 26``
**Arguments:**
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
.. _cleanup-command-cleanup-self:
""""""""""""
cleanup self
""""""""""""
**Syntax**
.. code-block:: none
[p]cleanup self <number> [match_pattern] [delete_pinned=False]
**Description**
Clean up messages owned by the bot in the current channel.
By default, all messages are cleaned. If a second argument is specified,
it is used for pattern matching - only messages containing the given text will be deleted.
Examples:
- ``[p]cleanup self 6``
- ``[p]cleanup self 10 Pong``
- ``[p]cleanup self 7 "" True``
**Arguments:**
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
- ``<match_pattern>`` The text that messages must contain to be deleted. Use "" to skip this.
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
.. _cleanup-command-cleanup-spam:
""""""""""""
cleanup spam
""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]cleanup spam [number=50]
**Description**
Deletes duplicate messages in the channel from the last X messages and keeps only one copy.
Defaults to 50.
**Arguments:**
- ``<number>`` The number of messages to check for duplicates. Must be a positive integer.
.. _cleanup-command-cleanup-text:
""""""""""""
cleanup text
""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]cleanup text <text> <number> [delete_pinned=False]
**Description**
Delete the last X messages matching the specified text in the current channel.
Example:
- ``[p]cleanup text "test" 5``
Remember to use double quotes.
**Arguments:**
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
.. _cleanup-command-cleanup-user:
""""""""""""
cleanup user
""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]cleanup user <user> <number> [delete_pinned=False]
**Description**
Delete the last X messages from a specified user in the current channel.
Examples:
- ``[p]cleanup user @Twentysix 2``
- ``[p]cleanup user Red 6``
**Arguments:**
- ``<user>`` The user whose messages are to be cleaned up.
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
.. _cleanup-command-cleanupset:
^^^^^^^^^^
cleanupset
^^^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]cleanupset
**Description**
Manage the settings for the cleanup command.
.. _cleanup-command-cleanupset-notify:
"""""""""""""""""
cleanupset notify
"""""""""""""""""
**Syntax**
.. code-block:: none
[p]cleanupset notify
**Description**
Toggle clean up notification settings.
When enabled, a message will be sent per cleanup, showing how many messages were deleted.
This message will be deleted after 5 seconds.

View File

@@ -0,0 +1,251 @@
.. _cogmanagerui:
==============
Cog Manager UI
==============
This is the cog guide for the core cog. You will
find detailed docs about usage and commands.
``[p]`` is considered as your prefix.
.. note:: This cog is not like the other cogs. It is loaded by default, not
included in the cogs paths and it cannot be unloaded. It contains needed
commands for cog management.
.. _cogmanagerui-usage:
-----
Usage
-----
This cog allows you to manage your cogs and where you can install them. Unlike
V2, which had a ``cogs`` folder where everything was installed, you can
install V3 cogs everywhere, and also make them cross-compatible with other
instances!
If you want to install your cogs using a Github repo (usually what you will
always be looking for), you need to use the downloader cog. However, if you
have the files of a cog or want to code one, this cog is what you should be
looking for.
The most basic command is :ref:`paths <cogmanagerui-command-paths>`, which
will list you all of the currently set paths.
You can add a path by using the :ref:`addpath <cogmanagerui-command-addpath>`
command. All cogs in that path will be available for the bot and listed in
the :ref:`cogs <cogmanagerui-command-cogs>`. You can then load
or unload them.
.. TODO add ref to load and unload commands
.. _cogmanagerui-usage-installation:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
How to install a local package without using downloader
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Let's suppose you made a cog request on the `cog board <https://cogboard.discord.red>`_
and now you want to add your own cog to Red. You should have a folder that
looks like this:
.. image:: ../.resources/cog_manager_ui/custom-cog-example.png
You will first need to add a cog path to your instance. For that, use the
:ref:`addpath <cogmanagerui-command-addpath>` command with a new directory.
Create a folder somewhere (should stay accessible) and copy its path. A path
looks like this:
* Windows: ``C:\Users\username\Documents\MyCogs``
* macOS: ``/Users/username/Documents/MyCogs``
* Linux: ``/home/username/Documents/MyCogs``
You can now use the command we talked about before: type ``[p]addpath
<your_path>``.
.. attention:: A path shouldn't have spaces in it. If it does, add quotation
marks around the path, or a backslash before the space.
In that ``MyCogs`` folder, you can drop your cog folder. You should now have
something that looks like this:
.. image:: ../.resources/cog_manager_ui/cog-path.png
Now if you type ``[p]cogs``, your new cog should be listed, and you will be
able to load it!
.. _cogmanagerui-commands:
--------
Commands
--------
.. note:: The whole cog is locked to the
:ref:`bot owner <getting-started-permissions>`. If you are not the owner
of the instance, you can ignore this.
.. _cogmanagerui-command-cogs:
^^^^
cogs
^^^^
**Syntax**
.. code-block:: none
[p]cogs
**Description**
Returns a list of loaded and unloaded cogs on the bot.
Cogs are unloaded by default. This is where you can find your cogs if you
installed some recently.
All of the cogs located inside a cog path will be listed here. You can see a
list of the paths with the :ref:`paths <cogmanagerui-command-paths>` command.
.. _cogmanagerui-command-paths:
^^^^^
paths
^^^^^
**Syntax**
.. code-block:: none
[p]paths
**Description**
Lists the registered cog paths, with the install path for the downloader and
the core path for the core cogs.
.. TODO add ref to downloader
You can use the :ref:`reorderpath <cogmanagerui-command-reorderpath>` command
to reorder the listed paths.
.. tip:: The number before a cog path can be used for the
:ref:`removepath <cogmanagerui-command-removepath>` command.
.. _cogmanagerui-command-addpath:
^^^^^^^
addpath
^^^^^^^
**Syntax**
.. code-block:: none
[p]addpath <path>
**Description**
Adds a path to the list of available cog paths. This means that all valid cogs
under the path will be added to the list of available cogs, listed in
:ref:`cogs <cogmanagerui-command-cogs>`.
**Arguments**
* ``<path>``: A path that should look like this and point to a folder:
* Windows: ``C:\Users\username\Documents\MyCogs``
* macOS: ``/Users/username/Documents/MyCogs``
* Linux: ``/home/username/Documents/MyCogs``
Try to avoid paths with spaces. If there are spaces, add a backslash before
the space on Linux. Add quotation marks around the path if needed.
.. _cogmanagerui-command-removepath:
^^^^^^^^^^
removepath
^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]removepath <path_number>
**Description**
Removes a path from the list of available paths. Its cogs won't be accessible
anymore.
**Arguments**
* ``<path_number>``: The number of the path to remove. You can get it with
the :ref:`paths <cogmanagerui>` command.
.. _cogmanagerui-command-reorderpath:
^^^^^^^^^^^
reorderpath
^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]reorderpath <from> <to>
**Description**
Reorders the paths listed with the :ref:`paths <cogmanagerui-command-paths>`
command. The goal of this command is to allow the discovery of different cogs.
If there are multiple packages with the same names, the one that is inside the
highest folder in the list will be kept and the other ones will be ignored.
For example, let's suppose this is the output of
:ref:`paths <cogmanagerui-command-paths>`:
1. ``/usr/local/lib/python3.7/site-packages/redbot/cogs``
2. ``/home/laggron/custom_cogs``
3. ``/mnt/not_suspicious_usb_drive/not_suspicious_cogs``
The folders 2 and 3 both have a package named ``leveler`` while being different
cogs, and you want to load the one located in the 3rd folder. To do that, you
have to put the 3rd path higher than the 2nd path, let's swap them! Type
``[p]reorderpath 2 3`` and the output of
:ref:`paths <cogmanagerui-command-paths>` will then be the following:
1. ``/usr/local/lib/python3.7/site-packages/redbot/cogs``
2. ``/mnt/not_suspicious_usb_drive/not_suspicious_cogs``
3. ``/home/laggron/custom_cogs``
**Arguments**
* ``<from>``: The index of the path you want to move.
* ``<to>``: The location where you want to insert the path.
.. _cogmanagerui-command-installpath:
^^^^^^^^^^^
installpath
^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]installpath [path]
**Description**
Shows the install path, or sets a new one.
If you want to set a new path, the same rules as for
:ref:`addpath <cogmanagerui-command-addpath>` apply
.. warning:: If you edit the install path, the cogs won't be transferred.
**Arguments**
* ``[path]``: The absolute path to set. If omitted, the current path will
be returned instead.

3581
docs/cog_guides/core.rst Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,294 @@
.. _customcommands:
==============
CustomCommands
==============
This is the cog guide for the customcommands 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 customcom
.. _customcommands-usage:
-----
Usage
-----
This cog contains commands for creating and managing custom commands that display text.
These are useful for storing information members might need, like FAQ answers or invite links.
Custom commands can be used by anyone by default, so be careful with pings.
Commands can only be lowercase, and will not respond to any uppercase letters.
.. _customcommands-commands:
--------
Commands
--------
.. _customcommands-command-customcom:
^^^^^^^^^
customcom
^^^^^^^^^
**Syntax**
.. code-block:: none
[p]customcom
.. tip:: Alias: ``cc``
**Description**
Base command for Custom Commands management.
.. _customcommands-command-customcom-cooldown:
""""""""""""""""""
customcom cooldown
""""""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]customcom cooldown <command> [cooldown] [per=member]
**Description**
Set, edit, or view the cooldown for a custom command.
You may set cooldowns per member, channel, or guild. Multiple
cooldowns may be set. All cooldowns must be cooled to call the
custom command.
Examples:
- ``[p]customcom cooldown pingrole``
- ``[p]customcom cooldown yourcommand 30``
- ``[p]cc cooldown mycommand 30 guild``
**Arguments:**
- ``<command>`` The custom command to check or set the cooldown.
- ``[cooldown]`` The number of seconds to wait before allowing the command to be invoked again. If omitted, will instead return the current cooldown settings.
- ``[per]`` The group to apply the cooldown on. Defaults to per member. Valid choices are server / guild, user / member, and channel.
.. _customcommands-command-customcom-create:
""""""""""""""""
customcom create
""""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]customcom create <command> <text>
.. tip:: Alias: ``customcom add``
**Description**
Create custom commands.
If a type is not specified, a simple CC will be created.
CCs can be enhanced with arguments, see the guide
:ref:`here <cog_customcom>`.
.. _customcommands-command-customcom-create-random:
"""""""""""""""""""""""
customcom create random
"""""""""""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]customcom create random <command>
**Description**
Create a CC where it will randomly choose a response!
Note: This command is interactive.
**Arguments:**
- ``<command>`` The command executed to return the text. Cast to lowercase.
.. _customcommands-command-customcom-create-simple:
"""""""""""""""""""""""
customcom create simple
"""""""""""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]customcom create simple <command> <text>
**Description**
Add a simple custom command.
Example:
- ``[p]customcom create simple yourcommand Text you want``
**Arguments:**
- ``<command>`` The command executed to return the text. Cast to lowercase.
- ``<text>`` The text to return when executing the command. See guide for enhanced usage.
.. _customcommands-command-customcom-delete:
""""""""""""""""
customcom delete
""""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]customcom delete <command>
.. tip:: Aliases: ``customcom del``, ``customcom remove``
**Description**
Delete a custom command.
Example:
- ``[p]customcom delete yourcommand``
**Arguments:**
- ``<command>`` The custom command to delete.
.. _customcommands-command-customcom-edit:
""""""""""""""
customcom edit
""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]customcom edit <command> [text]
**Description**
Edit a custom command.
Example:
- ``[p]customcom edit yourcommand Text you want``
**Arguments:**
- ``<command>`` The custom command to edit.
- ``<text>`` The new text to return when executing the command.
.. _customcommands-command-customcom-list:
""""""""""""""
customcom list
""""""""""""""
**Syntax**
.. code-block:: none
[p]customcom list
**Description**
List all available custom commands.
The list displays a preview of each command's response, with
markdown escaped and newlines replaced with spaces.
.. _customcommands-command-customcom-raw:
"""""""""""""
customcom raw
"""""""""""""
**Syntax**
.. code-block:: none
[p]customcom raw <command>
**Description**
Get the raw response of a custom command, to get the proper markdown.
This is helpful for copy and pasting.
**Arguments:**
- ``<command>`` The custom command to get the raw response of.
.. _customcommands-command-customcom-search:
""""""""""""""""
customcom search
""""""""""""""""
**Syntax**
.. code-block:: none
[p]customcom search <query>
**Description**
Searches through custom commands, according to the query.
Uses fuzzywuzzy searching to find close matches.
**Arguments:**
- ``<query>`` The query to search for. Can be multiple words.
.. _customcommands-command-customcom-show:
""""""""""""""
customcom show
""""""""""""""
**Syntax**
.. code-block:: none
[p]customcom show <command_name>
**Description**
Shows a custom command's responses and its settings.
**Arguments:**
- ``<command_name>`` The custom command to show.

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

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

View File

@@ -0,0 +1,538 @@
.. _downloader:
==========
Downloader
==========
This is the cog guide for the downloader 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 downloader
.. _downloader-usage:
-----
Usage
-----
Install community cogs made by Cog Creators.
Community cogs, also called third party cogs, are not included
in the default Red install.
Community cogs come in repositories. Repos are a group of cogs
you can install. You always need to add the creator's repository
using the ``[p]repo`` command before you can install one or more
cogs from the creator.
.. _downloader-commands:
--------
Commands
--------
.. _downloader-command-cog:
^^^
cog
^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]cog
**Description**
Base command for cog installation management commands.
.. _downloader-command-cog-checkforupdates:
"""""""""""""""""""
cog checkforupdates
"""""""""""""""""""
**Syntax**
.. code-block:: none
[p]cog checkforupdates
**Description**
Check for available cog updates (including pinned cogs).
This command doesn't update cogs, it only checks for updates.
Use ``[p]cog update`` to update cogs.
.. _downloader-command-cog-info:
""""""""
cog info
""""""""
**Syntax**
.. code-block:: none
[p]cog info <repo> <cog>
**Description**
List information about a single cog.
Example:
- ``[p]cog info 26-Cogs defender``
**Arguments**
- ``<repo>`` The repo to get cog info from.
- ``<cog>`` The cog to get info on.
.. _downloader-command-cog-install:
"""""""""""
cog install
"""""""""""
**Syntax**
.. code-block:: none
[p]cog install <repo> <cogs...>
**Description**
Install a cog from the given repo.
Examples:
- ``[p]cog install 26-Cogs defender``
- ``[p]cog install Laggrons-Dumb-Cogs say roleinvite``
**Arguments**
- ``<repo>`` The name of the repo to install cogs from.
- ``<cogs...>`` The cog or cogs to install.
.. _downloader-command-cog-installversion:
""""""""""""""""""
cog installversion
""""""""""""""""""
**Syntax**
.. code-block:: none
[p]cog installversion <repo> <revision> <cogs...>
**Description**
Install a cog from the specified revision of given repo.
Revisions are "commit ids" that point to the point in the code when a specific change was made.
The latest revision can be found in the URL bar for any GitHub repo by `pressing "y" on that repo <https://docs.github.com/en/free-pro-team@latest/github/managing-files-in-a-repository/getting-permanent-links-to-files#press-y-to-permalink-to-a-file-in-a-specific-commit>`_.
Older revisions can be found in the URL bar by `viewing the commit history of any repo <https://cdn.discordapp.com/attachments/133251234164375552/775760247787749406/unknown.png>`_
Example:
- ``[p]cog installversion Broken-Repo e798cc268e199612b1316a3d1f193da0770c7016 cog_name``
**Arguments**
- ``<repo>`` The name of the repo to install cogs from.
- ``<revision>`` The revision to install from.
- ``<cogs...>`` The cog or cogs to install.
.. _downloader-command-cog-list:
""""""""
cog list
""""""""
**Syntax**
.. code-block:: none
[p]cog list <repo>
**Description**
List all available cogs from a single repo.
Example:
- ``[p]cog list 26-Cogs``
**Arguments**
- ``<repo>`` The repo to list cogs from.
.. _downloader-command-cog-listpinned:
""""""""""""""
cog listpinned
""""""""""""""
**Syntax**
.. code-block:: none
[p]cog listpinned
**Description**
List currently pinned cogs.
.. _downloader-command-cog-pin:
"""""""
cog pin
"""""""
**Syntax**
.. code-block:: none
[p]cog pin <cogs...>
**Description**
Pin cogs - this will lock cogs on their current version.
Examples:
- ``[p]cog pin defender``
- ``[p]cog pin outdated_cog1 outdated_cog2``
**Arguments**
- ``<cogs...>`` The cog or cogs to pin. Must already be installed.
.. _downloader-command-cog-uninstall:
"""""""""""""
cog uninstall
"""""""""""""
**Syntax**
.. code-block:: none
[p]cog uninstall <cogs...>
**Description**
Uninstall cogs.
You may only uninstall cogs which were previously installed
by Downloader.
Examples:
- ``[p]cog uninstall defender``
- ``[p]cog uninstall say roleinvite``
**Arguments**
- ``<cogs...>`` The cog or cogs to uninstall.
.. _downloader-command-cog-unpin:
"""""""""
cog unpin
"""""""""
**Syntax**
.. code-block:: none
[p]cog unpin <cogs...>
**Description**
Unpin cogs - this will remove the update lock from those cogs.
Examples:
- ``[p]cog unpin defender``
- ``[p]cog unpin updated_cog1 updated_cog2``
**Arguments**
- ``<cogs...>`` The cog or cogs to unpin. Must already be installed and pinned.
.. _downloader-command-cog-update:
""""""""""
cog update
""""""""""
**Syntax**
.. code-block:: none
[p]cog update [cogs...]
**Description**
Update all cogs, or ones of your choosing.
Examples:
- ``[p]cog update``
- ``[p]cog update defender``
**Arguments**
- ``[cogs...]`` The cog or cogs to update. If omitted, all cogs are updated.
.. _downloader-command-cog-updateallfromrepos:
""""""""""""""""""""""
cog updateallfromrepos
""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]cog updateallfromrepos <repos...>
**Description**
Update all cogs from repos of your choosing.
Examples:
- ``[p]cog updateallfromrepos 26-Cogs``
- ``[p]cog updateallfromrepos Laggrons-Dumb-Cogs 26-Cogs``
**Arguments**
- ``<repos...>`` The repo or repos to update all cogs from.
.. _downloader-command-cog-updatetoversion:
"""""""""""""""""""
cog updatetoversion
"""""""""""""""""""
**Syntax**
.. code-block:: none
[p]cog updatetoversion <repo> <revision> [cogs...]
**Description**
Update all cogs, or ones of your choosing to chosen revision of one repo.
Note that update doesn't mean downgrade and therefore ``revision``
has to be newer than the version that cog currently has installed. If you want to
downgrade the cog, uninstall and install it again.
See ``[p]cog installversion`` for an explanation of ``revision``.
Example:
- ``[p]cog updatetoversion Broken-Repo e798cc268e199612b1316a3d1f193da0770c7016 cog_name``
**Arguments**
- ``<repo>`` The repo or repos to update all cogs from.
- ``<revision>`` The revision to update to.
- ``[cogs...]`` The cog or cogs to update.
.. _downloader-command-findcog:
^^^^^^^
findcog
^^^^^^^
**Syntax**
.. code-block:: none
[p]findcog <command_name>
**Description**
Find which cog a command comes from.
This will only work with loaded cogs.
Example:
- ``[p]findcog ping``
**Arguments**
- ``<command_name>`` The command to search for.
.. _downloader-command-pipinstall:
^^^^^^^^^^
pipinstall
^^^^^^^^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]pipinstall <deps...>
**Description**
Install a group of dependencies using pip.
Examples:
- ``[p]pipinstall bs4``
- ``[p]pipinstall py-cpuinfo psutil``
Improper usage of this command can break your bot, be careful.
**Arguments**
- ``<deps...>`` The package or packages you wish to install.
.. _downloader-command-repo:
^^^^
repo
^^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]repo
**Description**
Base command for repository management.
.. _downloader-command-repo-add:
""""""""
repo add
""""""""
**Syntax**
.. code-block:: none
[p]repo add <name> <repo_url> [branch]
**Description**
Add a new repo.
Examples:
- ``[p]repo add 26-Cogs https://github.com/Twentysix26/x26-Cogs``
- ``[p]repo add Laggrons-Dumb-Cogs https://github.com/retke/Laggrons-Dumb-Cogs v3``
Repo names can only contain characters A-z, numbers, underscores, and hyphens.
The branch will be the default branch if not specified.
**Arguments**
- ``<name>`` The name given to the repo.
- ``<repo_url>`` URL to the cog branch. Usually GitHub or GitLab.
- ``[branch]`` Optional branch to install cogs from.
.. _downloader-command-repo-delete:
"""""""""""
repo delete
"""""""""""
**Syntax**
.. code-block:: none
[p]repo delete <repo>
.. tip:: Aliases: ``repo remove``, ``repo del``
**Description**
Remove repos and their files.
Examples:
- ``[p]repo delete 26-Cogs``
- ``[p]repo delete 26-Cogs Laggrons-Dumb-Cogs``
**Arguments**
- ``<repos...>`` The repo or repos to remove.
.. _downloader-command-repo-info:
"""""""""
repo info
"""""""""
**Syntax**
.. code-block:: none
[p]repo info <repo>
**Description**
Show information about a repo.
Example:
- ``[p]repo info 26-Cogs``
**Arguments**
- ``<repo>`` The name of the repo to show info about.
.. _downloader-command-repo-list:
"""""""""
repo list
"""""""""
**Syntax**
.. code-block:: none
[p]repo list
**Description**
List all installed repos.
.. _downloader-command-repo-update:
"""""""""""
repo update
"""""""""""
**Syntax**
.. code-block:: none
[p]repo update [repos...]
**Description**
Update all repos, or ones of your choosing.
This will *not* update the cogs installed from those repos.
Examples:
- ``[p]repo update``
- ``[p]repo update 26-Cogs``
- ``[p]repo update 26-Cogs Laggrons-Dumb-Cogs``
**Arguments**
- ``[repos...]`` The name or names of repos to update. If omitted, all repos are updated.

541
docs/cog_guides/economy.rst Normal file
View File

@@ -0,0 +1,541 @@
.. _economy:
=======
Economy
=======
This is the cog guide for the economy 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 economy
.. _economy-usage:
-----
Usage
-----
Get rich and have fun with imaginary currency!
.. _economy-commands:
--------
Commands
--------
.. _economy-command-bank:
^^^^
bank
^^^^
**Syntax**
.. code-block:: none
[p]bank
**Description**
Base command to manage the bank.
.. _economy-command-bank-balance:
""""""""""""
bank balance
""""""""""""
**Syntax**
.. code-block:: none
[p]bank balance [user]
**Description**
Show the user's account balance.
Example:
- ``[p]bank balance``
- ``[p]bank balance @Twentysix``
**Arguments**
- ``<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:
""""""""
bank set
""""""""
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]bank set <to> <creds>
**Description**
Set the balance of a user's bank account.
Putting + or - signs before the amount will add/remove currency on the user's bank account instead.
Examples:
- ``[p]bank set @Twentysix 26`` - Sets balance to 26
- ``[p]bank set @Twentysix +2`` - Increases balance by 2
- ``[p]bank set @Twentysix -6`` - Decreases balance by 6
**Arguments**
- ``<to>`` The user to set the currency of.
- ``<creds>`` The amount of currency to set their balance to.
.. _economy-command-bank-transfer:
"""""""""""""
bank transfer
"""""""""""""
**Syntax**
.. code-block:: none
[p]bank transfer <to> <amount>
**Description**
Transfer currency to other users.
This will come out of your balance, so make sure you have enough.
Example:
- ``[p]bank transfer @Twentysix 500``
**Arguments**
- ``<to>`` The user to give currency to.
- ``<amount>`` The amount of currency to give.
.. _economy-command-economyset:
^^^^^^^^^^
economyset
^^^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]economyset
**Description**
Base command to manage Economy settings.
.. _economy-command-economyset-paydayamount:
"""""""""""""""""""""""
economyset paydayamount
"""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]economyset paydayamount <creds>
**Description**
Set the amount earned each payday.
Example:
- ``[p]economyset paydayamount 400``
**Arguments**
- ``<creds>`` The new amount to give when using the payday command. Default is 120.
.. _economy-command-economyset-paydaytime:
"""""""""""""""""""""
economyset paydaytime
"""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]economyset paydaytime <duration>
**Description**
Set the cooldown for the payday command.
Examples:
- ``[p]economyset paydaytime 86400``
- ``[p]economyset paydaytime 1d``
**Arguments**
- | ``<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:
"""""""""""""""""""""""""""
economyset rolepaydayamount
"""""""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]economyset rolepaydayamount <role> <creds>
**Description**
Set the amount earned each payday for a role.
Set to 0 will remove the custom payday for that role instead.
Only available when not using a global bank.
Example:
- ``[p]economyset rolepaydayamount @Members 400``
**Arguments**
- ``<role>`` The role to assign a custom payday amount to.
- ``<creds>`` The new amount to give when using the payday command.
.. _economy-command-economyset-showsettings:
"""""""""""""""""""""""
economyset showsettings
"""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]economyset showsettings
**Description**
Shows the current economy settings
.. _economy-command-economyset-slotmax:
""""""""""""""""""
economyset slotmax
""""""""""""""""""
**Syntax**
.. code-block:: none
[p]economyset slotmax <bid>
**Description**
Set the maximum slot machine bid.
Example:
- ``[p]economyset slotmax 50``
**Arguments**
- ``<bid>`` The new maximum bid for using the slot machine. Default is 100.
.. _economy-command-economyset-slotmin:
""""""""""""""""""
economyset slotmin
""""""""""""""""""
**Syntax**
.. code-block:: none
[p]economyset slotmin <bid>
**Description**
Set the minimum slot machine bid.
Example:
- ``[p]economyset slotmin 10``
**Arguments**
- ``<bid>`` The new minimum bid for using the slot machine. Default is 5.
.. _economy-command-economyset-slottime:
"""""""""""""""""""
economyset slottime
"""""""""""""""""""
**Syntax**
.. code-block:: none
[p]economyset slottime <duration>
**Description**
Set the cooldown for the slot machine.
Examples:
- ``[p]economyset slottime 10``
- ``[p]economyset slottime 10m``
**Arguments**
- | ``<duration>`` The new duration to wait in between uses of the slot machine. Default is 5 seconds.
| Accepts: seconds, minutes, hours, days, weeks (if no unit is specified, the duration is assumed to be given in seconds)
.. _economy-command-leaderboard:
^^^^^^^^^^^
leaderboard
^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]leaderboard [top=10] [show_global=False]
**Description**
Print the leaderboard.
Defaults to top 10.
Examples:
- ``[p]leaderboard``
- ``[p]leaderboard 50`` - Shows the top 50 instead of top 10.
- ``[p]leaderboard 100 yes`` - Shows the top 100 from all servers.
**Arguments**
- ``<top>`` How many positions on the leaderboard to show. Defaults to 10 if omitted.
- ``<show_global>`` Whether to include results from all servers. This will default to false unless specified.
.. _economy-command-payday:
^^^^^^
payday
^^^^^^
**Syntax**
.. code-block:: none
[p]payday
**Description**
Get some free currency.
The amount awarded and frequency can be configured.
.. _economy-command-payouts:
^^^^^^^
payouts
^^^^^^^
**Syntax**
.. code-block:: none
[p]payouts
**Description**
Show the payouts for the slot machine.
.. _economy-command-slot:
^^^^
slot
^^^^
**Syntax**
.. code-block:: none
[p]slot <bid>
**Description**
Use the slot machine.
Example:
- ``[p]slot 50``
**Arguments**
- ``<bid>`` The amount to bet on the slot machine. Winning payouts are higher when you bet more.

335
docs/cog_guides/filter.rst Normal file
View File

@@ -0,0 +1,335 @@
.. _filter:
======
Filter
======
This is the cog guide for the filter 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 filter
.. _filter-usage:
-----
Usage
-----
This cog is designed for "filtering" unwanted words and phrases from a server.
It provides tools to manage a list of words or sentences, and to customize automatic actions to be taken against users who use those words in channels or in their name/nickname.
This can be used to prevent inappropriate language, off-topic discussions, invite links, and more.
.. _filter-commands:
--------
Commands
--------
.. _filter-command-filter:
^^^^^^
filter
^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]filter
**Description**
Base command to add or remove words from the server filter.
Use double quotes to add or remove sentences.
.. _filter-command-filter-add:
""""""""""
filter add
""""""""""
**Syntax**
.. code-block:: none
[p]filter add [words...]
**Description**
Add words to the filter.
Use double quotes to add sentences.
Examples:
- ``[p]filter add word1 word2 word3``
- ``[p]filter add "This is a sentence"``
**Arguments:**
- ``[words...]`` The words or sentences to filter.
.. _filter-command-filter-channel:
""""""""""""""
filter channel
""""""""""""""
**Syntax**
.. code-block:: none
[p]filter channel
**Description**
Base command to add or remove words from the channel filter.
Use double quotes to add or remove sentences.
.. _filter-command-filter-channel-add:
""""""""""""""""""
filter channel add
""""""""""""""""""
**Syntax**
.. code-block:: none
[p]filter channel add [words...]
**Description**
Add words to the filter.
Use double quotes to add sentences.
Examples:
- ``[p]filter channel add word1 word2 word3``
- ``[p]filter channel add "This is a sentence"``
**Arguments:**
- ``[words...]`` The words or sentences to filter.
.. _filter-command-filter-channel-clear:
""""""""""""""""""""
filter channel clear
""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]filter channel clear
**Description**
Clears this channel's filter list.
.. _filter-command-filter-channel-list:
"""""""""""""""""""
filter channel list
"""""""""""""""""""
**Syntax**
.. code-block:: none
[p]filter channel list
**Description**
Send a list of the channel's filtered words.
.. _filter-command-filter-channel-remove:
"""""""""""""""""""""
filter channel remove
"""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]filter channel remove [words...]
**Description**
Remove words from the filter.
Use double quotes to remove sentences.
Examples:
- ``[p]filter channel remove word1 word2 word3``
- ``[p]filter channel remove "This is a sentence"``
**Arguments:**
- ``[words...]`` The words or sentences to no longer filter.
.. _filter-command-filter-clear:
""""""""""""
filter clear
""""""""""""
**Syntax**
.. code-block:: none
[p]filter clear
**Description**
Clears this server's filter list.
.. _filter-command-filter-delete:
"""""""""""""
filter delete
"""""""""""""
**Syntax**
.. code-block:: none
[p]filter delete [words...]
.. tip:: Aliases: ``filter remove``, ``filter del``
**Description**
Remove words from the filter.
Use double quotes to remove sentences.
Examples:
- ``[p]filter remove word1 word2 word3``
- ``[p]filter remove "This is a sentence"``
**Arguments:**
- ``[words...]`` The words or sentences to no longer filter.
.. _filter-command-filter-list:
"""""""""""
filter list
"""""""""""
**Syntax**
.. code-block:: none
[p]filter list
**Description**
Send a list of this server's filtered words.
.. _filter-command-filter-names:
""""""""""""
filter names
""""""""""""
**Syntax**
.. code-block:: none
[p]filter names
**Description**
Toggle name and nickname filtering.
This is disabled by default.
.. _filter-command-filterset:
^^^^^^^^^
filterset
^^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]filterset
**Description**
Base command to manage filter settings.
.. _filter-command-filterset-ban:
"""""""""""""
filterset ban
"""""""""""""
**Syntax**
.. code-block:: none
[p]filterset ban <count> <timeframe>
**Description**
Set the filter's autoban conditions.
Users will be banned if they send ``<count>`` filtered words in
``<timeframe>`` seconds.
Set both to zero to disable autoban.
Examples:
- ``[p]filterset ban 5 5`` - Ban users who say 5 filtered words in 5 seconds.
- ``[p]filterset ban 2 20`` - Ban users who say 2 filtered words in 20 seconds.
**Arguments:**
- ``<count>`` The amount of filtered words required to trigger a ban.
- ``<timeframe>`` The period of time in which too many filtered words will trigger a ban.
.. _filter-command-filterset-defaultname:
"""""""""""""""""""""
filterset defaultname
"""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]filterset defaultname <name>
**Description**
Set the nickname for users with a filtered name.
Note that this has no effect if filtering names is disabled
(to toggle, run ``[p]filter names``).
The default name used is *John Doe*.
Example:
- ``[p]filterset defaultname Missingno``
**Arguments:**
- ``<name>`` The new nickname to assign.

218
docs/cog_guides/general.rst Normal file
View File

@@ -0,0 +1,218 @@
.. _general:
=======
General
=======
This is the cog guide for the general 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 general
.. _general-usage:
-----
Usage
-----
This cog includes a miscellaneous group of games, useful
tools, and informative commands such as ``serverinfo`` or ``urban``.
.. _general-commands:
--------
Commands
--------
Here's a list of all commands available for this cog.
.. _general-command-8:
^^^^^^^^^
8 (8ball)
^^^^^^^^^
**Syntax**
.. code-block:: none
[p]8 <question>
**Description**
Ask 8 ball a question.
.. note:: Your question must end with a question mark.
**Arguments**
* ``<question>``: The question you would like to ask 8 ball.
.. _general-command-choose:
^^^^^^
choose
^^^^^^
**Syntax**
.. code-block:: none
[p]choose <first> <second> [others...]
**Description**
Choose between multiple options.
Options are separated by spaces.
.. note:: There must be at least 2 options to pick from.
.. note:: To denote options which include whitespace, you should enclose the option in double quotes.
**Arguments**
* ``<first>``: The first mandatory option.
* ``<second>``: The second mandatory option.
* ``[others...]``: Any remaining optional options.
.. _general-command-flip:
^^^^
flip
^^^^
**Syntax**
.. code-block:: none
[p]flip [user]
**Description**
Flip a coin... or a user.
**Arguments**
* ``[user]``: The user to flip. Defaults to flipping a coin if no user is provided.
.. _general-command-lmgtfy:
^^^^^^
lmgtfy
^^^^^^
**Syntax**
.. code-block:: none
[p]lmgtfy <search_terms>
**Description**
Create a lmgtfy link.
**Arguments**
* ``<search_terms>``: The terms used to generate the lmgtfy link.
.. _general-command-roll:
^^^^
roll
^^^^
**Syntax**
.. code-block:: none
[p]roll [number=100]
**Description**
Roll a random number. The result will be between 1 and ``<number>``.
**Arguments**
* ``[number]``: The maximum number that can be rolled. Defaults to 100.
.. _general-command-rps:
^^^^^^^^^^^^^^^^^^^^^^^^^
rps (Rock Paper Scissors)
^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]rps <your_choice>
**Description**
Play Rock Paper Scissors.
**Arguments**
* ``<your_choice>``: The choice that you choose.
.. note:: Choices **must** be between ``rock``, ``paper``, or ``scissors``.
.. _general-commands-serverinfo:
^^^^^^^^^^
serverinfo
^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]serverinfo [details=False]
**Description**
Show server information.
**Arguments**
* ``[details]``: Show extra details about the server when set to True. Defaults to False.
.. _general-commands-stopwatch:
^^^^^^^^^
stopwatch
^^^^^^^^^
**Syntax**
.. code-block:: none
[p]stopwatch
**Description**
Start or stop the stopwatch.
.. _general-commands-urban:
^^^^^
urban
^^^^^
**Syntax**
.. code-block:: none
[p]urban <word>
**Description**
Search the Urban Dictionary.
**Arguments**
* ``<word>``: The term to search for.

205
docs/cog_guides/image.rst Normal file
View File

@@ -0,0 +1,205 @@
.. _image:
=====
Image
=====
This is the cog guide for the image 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 image
.. _image-usage:
-----
Usage
-----
This cog provides commands for retrieving pictures from
websites such as Giphy and Imgur.
.. _image-commands:
--------
Commands
--------
Here's a list of all commands available for this cog.
.. _image-command-gif:
^^^
gif
^^^
**Syntax**
.. code-block:: none
[p]gif <keywords...>
**Description**
Retrieve the first search result from Giphy. This command requires API tokens
to be set via the :ref:`giphycreds <image-command-giphycreds>` command.
**Arguments**
* ``<keywords...>``: The keywords used to search Giphy.
.. _image-command-gifr:
^^^^
gifr
^^^^
**Syntax**
.. code-block:: none
[p]gifr <keywords...>
**Description**
Retrieve a random GIF from a Giphy search. This command requires API tokens
to be set via the :ref:`giphycreds <image-command-giphycreds>` command.
**Arguments**
* ``<keywords...>``: The keywords used to generate a random GIF.
.. _image-command-imgur:
^^^^^
imgur
^^^^^
**Syntax**
.. code-block:: none
[p]imgur
**Description**
Retrieves pictures from Imgur. This command requires API tokens to be set
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
.. _image-command-imgur-search:
""""""""""""
imgur search
""""""""""""
**Syntax**
.. code-block:: none
[p]imgur search [count=1] <terms...>
**Description**
Search for pictures on Imgur. This command requires API tokens to be set
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
**Arguments**
* ``[count]``: How many images should be returned (maximum 5). Defaults to 1.
* ``<terms...>``: The terms used to search Imgur.
.. _image-command-imgur-subreddit:
"""""""""""""""
imgur subreddit
"""""""""""""""
**Syntax**
.. code-block:: none
[p]imgur subreddit <subreddit> [count=1] [sort_type=top] [window=day]
**Description**
Get images from a subreddit. This command requires API tokens to be set
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
**Arguments**
* ``<subreddit>``: The subreddit to get images from.
* ``[count]``: The number of images to return (maximum 5). Defaults to 1.
* ``[sort_type]``: New, or top results. Defaults to top.
* ``[window]``: The timeframe, can be the past day, week, month, year or all. Defaults to day.
.. _image-command-giphycreds:
^^^^^^^^^^
giphycreds
^^^^^^^^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]giphycreds
**Description**
Explains how to set GIPHY API tokens.
**Getting your API key**
1. Login (or create) a GIPHY account.
2. Visit `this page <https://developers.giphy.com/dashboard>`__.
3. Press 'Create an App'.
4. Click 'Select API', and then 'Next Step'.
5. Add an app name, for example 'Red'.
6. Add an app description, for example 'Used for Red's image cog'.
7. Click 'Create App'. You'll need to agree to the GIPHY API terms.
8. Copy the API Key.
9. In Discord, run the following command::
[p]set api GIPHY api_key <your_api_key_here>
.. _image-command-imgurcreds:
^^^^^^^^^^
imgurcreds
^^^^^^^^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]imgurcreds
**Description**
Explains how to set Imgur API tokens.
**Getting your API key**
1. Login to (or create) an Imgur account.
2. Visit `this page <https://api.imgur.com/oauth2/addclient>`__.
3. Add an app name for your application, for example 'Red'.
4. Select 'Anonymous usage without user authorization' for the auth type.
5. Set the authorization callback URL to ``https://localhost``
6. Leave the app website blank.
7. Enter a valid email address and a description.
8. Check the captcha box and click next.
9. Your Client ID will be on the next page.
10. In Discord, run the following command::
[p]set api imgur client_id <your_client_id_here>

763
docs/cog_guides/mod.rst Normal file
View File

@@ -0,0 +1,763 @@
.. _mod:
===
Mod
===
This is the cog guide for the mod 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 mod
.. _mod-usage:
-----
Usage
-----
A range of highly customizable moderation tools used to protect your
guild from users who cannot follow the rules.
.. _mod-commands:
--------
Commands
--------
.. _mod-command-ban:
^^^
ban
^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]ban <user> [days] [reason]
**Description**
Ban a user from this server and optionally delete days of messages.
``days`` is the amount of days of messages to cleanup on ban.
**Arguments**
* ``<user>``: The user to ban. |user-input|
* ``[days]``: The amount of days of messages to cleanup on ban. This parameter defaults to the defaultdays setting, or no days if this has not yet been configured.
* ``[reason]``: The reason why the user was banned (optional).
**Example Usage**
* ``[p]ban 428675506947227648 7 Continued to spam after told to stop.``
This will ban the user with ID 428675506947227648 and it will delete 7 days worth of messages.
* ``[p]ban @Twentysix 7 Continued to spam after told to stop.``
This will ban Twentysix and it will delete 7 days worth of messages.
A user ID should be provided if the user is not a member of this server.
If days is not a number, it's treated as the first word of the reason.
Minimum 0 days, maximum 7. If not specified, the defaultdays setting will be used instead.
.. _mod-command-kick:
^^^^
kick
^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]kick <member> [reason]
**Description**
Kick a user.
**Arguments**
* ``<member>``: The member to kick. |member-input|
* ``[reason]``: The reason why the user was kicked (optional).
**Example Usage**
* ``[p]kick 428675506947227648 wanted to be kicked.``
This will kick the user with ID 428675506947227648 from the server.
* ``[p]kick @Twentysix wanted to be kicked.``
This will kick Twentysix from the server.
If a reason is specified, it will be the reason that shows up
in the audit log.
.. _mod-command-massban:
^^^^^^^
massban
^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]massban <user_ids...> [days] [reason]
.. tip:: Alias: ``hackban``
**Description**
Mass bans user(s) from the server.
**Arguments**
* ``<user_ids...>``: The users to ban. This must be a list of user IDs separated by spaces.
* ``[days]``: The amount of days of messages to cleanup on massban.
* ``[reason]``: The reason why these users were banned.
**Example Usage**
* ``[p]massban 345628097929936898 57287406247743488 7 they broke all rules.``
This will ban all the added userids and delete 7 days worth of their messages.
.. _mod-command-modset:
^^^^^^
modset
^^^^^^
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]modset
**Description**
Manage server administration settings.
.. _mod-command-modset-defaultdays:
""""""""""""""""""
modset defaultdays
""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset defaultdays [days=0]
**Description**
Set the default number of days worth of messages to be deleted when a user is banned.
The number of days must be between 0 and 7.
**Arguments**
* ``[days=0]``: The default number of days of messages to be deleted when a user is banned.
.. note:: This value must be between 0 and 7.
.. _mod-command-modset-defaultduration:
""""""""""""""""""""""
modset defaultduration
""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset defaultduration <duration>
**Description**
Set the default time to be used when a user is tempbanned.
Accepts: seconds, minutes, hours, days, weeks
**Arguments**
* ``<duration>``: The default duration for when a user is temporarily banned. Accepts seconds, minutes, hours, days or weeks.
**Example Usage**
* ``[p]modset defaultduration 7d12h10m``
* ``[p]modset defaultduration 7 days 12 hours 10 minutes``
.. _mod-command-modset-deletenames:
""""""""""""""""""
modset deletenames
""""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]modset deletenames [confirmation=False]
**Description**
Delete all stored usernames and nicknames.
**Arguments**
- ``<confirmation>``: Whether to delete all stored usernames and nicknames. |bool-input|
.. _mod-command-modset-deleterepeats:
""""""""""""""""""""
modset deleterepeats
""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset deleterepeats [repeats]
**Description**
Enable auto-deletion of repeated messages.
**Arguments**
* ``[repeats]``: The number of repeated messages needed before further messages are deleted.
.. note:: Must be between 2 and 20. Set to -1 to disable this feature.
.. _mod-command-modset-dm:
"""""""""
modset dm
"""""""""
**Syntax**
.. code-block:: none
[p]modset dm [enabled]
**Description**
Toggle whether a message should be sent to a user when they are kicked/banned.
If this option is enabled, the bot will attempt to DM the user with the guild name
and reason as to why they were kicked/banned.
**Arguments**
* ``[enabled]``: Whether a message should be sent to a user when they are kicked/banned. |bool-input|
.. _mod-command-modset-hierarchy:
""""""""""""""""
modset hierarchy
""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset hierarchy
**Description**
Toggle role hierarchy check for mods and admins.
.. warning:: Disabling this setting will allow mods to take actions on users above them in the role hierarchy!
This is enabled by default.
.. _mod-command-modset-mentionspam:
""""""""""""""""""
modset mentionspam
""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset mentionspam
**Description**
Manage the automoderation settings for mentionspam.
.. _mod-command-modset-mentionspam-ban:
""""""""""""""""""""""
modset mentionspam ban
""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset mentionspam ban <max_mentions>
**Description**
Set the autoban conditions for mention spam.
Users will be banned if they send any message which contains more than
``<max_mentions>`` mentions.
**Arguments**
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
.. _mod-command-modset-mentionspam-kick:
"""""""""""""""""""""""
modset mentionspam kick
"""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset mentionspam kick <max_mentions>
**Description**
Set the autokick conditions for mention spam.
Users will be kicked if they send any message which contains more than
``<max_mentions>`` mentions.
**Arguments**
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
.. _mod-command-modset-mentionspam-strict:
"""""""""""""""""""""""""
modset mentionspam strict
"""""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset mentionspam strict [enabled]
**Description**
Setting to account for duplicate mentions.
If enabled all mentions will count including duplicated mentions.
If disabled only unique mentions will count.
Use this command without any parameter to see the current setting.
**Arguments**
* ``[enabled]``: Whether all mentions will count, including duplicated mentions. |bool-input|
.. _mod-command-modset-mentionspam-warn:
"""""""""""""""""""""""
modset mentionspam warn
"""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset mentionspam warn <max_mentions>
**Description**
Sets the autowarn conditions for mention spam.
Users will be warned if they send any messages which contain more than
``<max_mentions>`` mentions.
**Arguments**
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
.. _mod-command-modset-reinvite:
"""""""""""""""
modset reinvite
"""""""""""""""
**Syntax**
.. code-block:: none
[p]modset reinvite
**Description**
Toggle whether an invite will be sent to a user when unbanned.
If this is True, the bot will attempt to create and send a single-use invite
to the newly-unbanned user.
.. _mod-command-modset-showsettings:
"""""""""""""""""""
modset showsettings
"""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset showsettings
**Description**
Show the current server administration settings.
.. _mod-command-modset-trackallnames:
""""""""""""""""""""
modset trackallnames
""""""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]modset trackallnames [enabled]
**Description**
Toggle whether all name changes should be tracked.
Toggling this off also overrides the tracknicknames setting.
**Arguments**
* ``[enabled]``: Whether all name changes should be tracked. |bool-input|
.. _mod-command-modset-tracknicknames:
"""""""""""""""""""""
modset tracknicknames
"""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]modset tracknicknames [enabled]
**Description**
Toggle whether nickname changes should be tracked.
This setting will be overridden if trackallnames is disabled.
**Arguments**
* ``[enabled]``: Whether all nickname changes should be tracked. |bool-input|
.. _mod-command-movedeletedelay:
^^^^^^^^^^^^^^^
movedeletedelay
^^^^^^^^^^^^^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]movedeletedelay
**Description**
Move deletedelay settings to core
.. _mod-command-moveignoredchannels:
^^^^^^^^^^^^^^^^^^^
moveignoredchannels
^^^^^^^^^^^^^^^^^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]moveignoredchannels
**Description**
Move ignored channels and servers to core
.. _mod-command-names:
^^^^^
names
^^^^^
**Syntax**
.. code-block:: none
[p]names <member>
**Description**
Show previous names and nicknames of a member.
**Arguments**
* ``<member>``: |member-input|
.. _mod-command-rename:
^^^^^^
rename
^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]rename <member> [nickname]
**Description**
Change a member's nickname.
Leaving the nickname empty will remove it.
**Arguments**
* ``<member>``: |member-input|
* ``[nickname]``: The new nickname for the member.
.. _mod-command-slowmode:
^^^^^^^^
slowmode
^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]slowmode [interval=0:00:00]
**Description**
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 channel's slowmode settings.
.. note::
Interval can be anything from 0 seconds to 6 hours.
Use without parameters to disable.
.. _mod-command-softban:
^^^^^^^
softban
^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]softban <member> [reason]
**Description**
Kick a member and delete 1 day's worth of their messages.
**Arguments**
* ``<member>``: The member to softban. |member-input-quotes|
* ``[reason]``: Reason for the kick (optional).
.. _mod-command-tempban:
^^^^^^^
tempban
^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]tempban <member> [duration] [days] [reason]
**Description**
Temporarily ban a user from this server.
**Arguments**
* ``<member>``: The member to temporarily ban. |member-input-quotes|
* ``[duration]``: The amount of time the user should be banned for.
* ``[days]``: The amount of days of messages to cleanup on tempban.
* ``[reason]``: The reason for the tempban (optional).
**Example Usage**
* ``[p]tempban @Twentysix Because I say so``
This will ban Twentysix for the default amount of time set by an administrator.
* ``[p]tempban @Twentysix 15m You need a timeout``
This will ban Twentysix for 15 minutes.
* ``[p]tempban 428675506947227648 1d2h15m 5 Evil person``
This will ban the user with ID 428675506947227648 for 1 day 2 hours 15 minutes and will delete the last 5 days of their messages.
.. _mod-command-unban:
^^^^^
unban
^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]unban <user_id> [reason]
**Description**
Unban a user from this server.
**Arguments**
* ``<user_id>``: |user-input|
* ``[reason]``: The reason for the unban (optional).
.. _mod-command-userinfo:
^^^^^^^^
userinfo
^^^^^^^^
**Syntax**
.. code-block:: none
[p]userinfo [member]
**Description**
Show information about a user.
This includes fields for status, discord join date, server
join date, voice state and previous names/nicknames.
If the user has no roles, previous names or previous nicknames,
these fields will be omitted.
**Arguments**
* ``[member]``: |member-input|
.. _mod-command-voiceban:
^^^^^^^^
voiceban
^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]voiceban <member> [reason]
**Description**
Ban a user from speaking and listening in the server's voice channels.
**Arguments**
* ``<member>``: The member to ban from voice. |member-input|
* ``[reason]``: The reason for the voiceban (optional).
.. _mod-command-voicekick:
^^^^^^^^^
voicekick
^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]voicekick <member> [reason]
**Description**
Kick a member from a voice channel.
**Arguments**
* ``<member>``: |member-input|
* ``[reason]``: The reason for the voicekick (optional).
.. _mod-command-voiceunban:
^^^^^^^^^^
voiceunban
^^^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]voiceunban <member> [reason]
**Description**
Unban a user from speaking and listening in the server's voice channels.
**Arguments**
* ``<member>``: The member to unban from voice. |member-input-quotes|
* ``[reason]``: The reason for the voiceunban (optional).

194
docs/cog_guides/modlog.rst Normal file
View File

@@ -0,0 +1,194 @@
.. _modlog:
======
ModLog
======
This is the cog guide for the modlog 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 modlog
.. _modlog-usage:
-----
Usage
-----
Manage log channels for moderation actions.
.. _modlog-commands:
--------
Commands
--------
.. _modlog-command-case:
^^^^
case
^^^^
**Syntax**
.. code-block:: none
[p]case <number>
**Description**
Show the specified case.
**Arguments**
* ``<case>``: The case number to get information for.
.. _modlog-command-casesfor:
^^^^^^^^
casesfor
^^^^^^^^
**Syntax**
.. code-block:: none
[p]casesfor <member>
**Description**
Display cases for the specified member.
**Arguments**
* ``<member>``: The member to get cases for. |member-input|
.. _modlog-command-listcases:
^^^^^^^^^
listcases
^^^^^^^^^
**Syntax**
.. code-block:: none
[p]listcases <member>
**Description**
List cases for the specified member.
**Arguments**
* ``<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:
^^^^^^
reason
^^^^^^
**Syntax**
.. code-block:: none
[p]reason [case] <reason>
**Description**
Specify a reason for a modlog case.
Please note that you can only edit cases you are
the owner of unless you are a mod, admin or server owner.
**Arguments**
* ``[case]``: The case number to update the reason for.
* ``<reason>``: The new reason for the specified case.
.. note:: If no case number is specified, the latest case will be used.

410
docs/cog_guides/mutes.rst Normal file
View File

@@ -0,0 +1,410 @@
.. _mutes:
=====
Mutes
=====
This is the cog guide for the mutes 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 mutes
.. _mutes-usage:
-----
Usage
-----
Mute users temporarily or indefinitely.
.. _mutes-commands:
--------
Commands
--------
.. _mutes-command-activemutes:
^^^^^^^^^^^
activemutes
^^^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]activemutes
**Description**
Displays active mutes on this server.
.. _mutes-command-mute:
^^^^
mute
^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]mute <users...> [time_and_reason]
**Description**
Mute users.
Examples:
* ``[p]mute @member1 @member2 spam 5 hours``
* ``[p]mute @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 indefinite if this hasn't been configured.
.. _mutes-command-mutechannel:
^^^^^^^^^^^
mutechannel
^^^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]mutechannel <users...> [time_and_reason]
.. tip:: Alias: ``channelmute``
**Description**
Mute a user in the current text channel.
Examples:
* ``[p]mutechannel @member1 @member2 spam 5 hours``
* ``[p]mutechannel @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 indefinite if this hasn't been configured.
.. _mutes-command-muteset:
^^^^^^^
muteset
^^^^^^^
**Syntax**
.. code-block:: none
[p]muteset
**Description**
Mute settings.
.. _mutes-command-muteset-defaulttime:
"""""""""""""""""""
muteset defaulttime
"""""""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]muteset defaulttime [time]
.. tip:: Alias: ``muteset time``
**Description**
Set the default mute time for the mute command.
If no time interval is provided this will be cleared.
**Arguments**
* ``[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:
""""""""""""""""
muteset makerole
""""""""""""""""
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]muteset makerole <name>
**Description**
Create a Muted role.
This will create a role and apply overwrites to all available channels
to more easily setup muting a user.
If you already have a muted role created on the server use
``[p]muteset role ROLE_NAME_HERE``
**Arguments**
* ``<name>``: The name of the muted role to create.
.. _mutes-command-muteset-notification:
""""""""""""""""""""
muteset notification
""""""""""""""""""""
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]muteset notification [channel]
**Description**
Set the notification channel for automatic unmute issues.
If no channel is provided this will be cleared and notifications
about issues when unmuting users will not be sent anywhere.
**Arguments**
* ``[channel]``: The channel to receive unmute issue updates. |channel-input|
.. _mutes-command-muteset-role:
""""""""""""
muteset role
""""""""""""
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]muteset role [role]
**Description**
Sets the role to be applied when muting a user.
If no role is setup the bot will attempt to mute a user by setting
channel overwrites in all channels to prevent the user from sending messages.
.. Note::
If no role is setup a user may be able to leave the server
and rejoin no longer being muted.
**Arguments**
* ``[role]``: The role for muted users to receive. |role-input|
.. _mutes-command-muteset-senddm:
""""""""""""""
muteset senddm
""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]muteset senddm <true_or_false>
**Description**
Set whether mute notifications should be sent to users in DMs.
**Arguments**
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
.. _mutes-command-muteset-settings:
""""""""""""""""
muteset settings
""""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]muteset settings
.. tip:: Alias: ``muteset showsettings``
**Description**
Shows the current mute settings for this guild.
.. _mutes-command-muteset-showmoderator:
"""""""""""""""""""""
muteset showmoderator
"""""""""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]muteset showmoderator <true_or_false>
**Description**
Decide whether the name of the moderator muting a user should be included in the DM to that user.
**Arguments**
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
.. _mutes-command-unmute:
^^^^^^
unmute
^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]unmute <users...> [reason]
**Description**
Unmute users.
**Arguments**
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
* ``[reason]``: The reason for the unmute.
.. _mutes-command-unmutechannel:
^^^^^^^^^^^^^
unmutechannel
^^^^^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]unmutechannel <users...> [reason]
.. tip:: Alias: ``channelunmute``
**Description**
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-voicemute:
^^^^^^^^^
voicemute
^^^^^^^^^
**Syntax**
.. code-block:: none
[p]voicemute <users...> [reason]
**Description**
Mute a user in their current voice channel.
Examples:
* ``[p]voicemute @member1 @member2 spam 5 hours``
* ``[p]voicemute @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 indefinite if this hasn't been configured.
.. _mutes-command-voiceunmute:
^^^^^^^^^^^
voiceunmute
^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]voiceunmute <users...> [reason]
**Description**
Unmute a user in their current voice channel.
**Arguments**
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
* ``[reason]``: The reason for the unmute.

View File

@@ -0,0 +1,440 @@
.. _permissions:
===========
Permissions
===========
This is the cog guide for the permissions 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 permissions
.. _permissions-usage:
-----
Usage
-----
Customise permissions for commands and cogs.
This cog extends the default permission model of the bot. By default, many commands are restricted based on what the command can do.
This cog allows you to refine some of those restrictions. You can allow wider or narrower access to most commands using it. You cannot, however, change the restrictions on owner-only commands.
When additional rules are set using this cog, those rules will be checked prior to checking for the default restrictions of the command.
Global rules (set by the owner) are checked first, then rules set for servers. If multiple global or server rules apply to the case, the order they are checked in is:
1. Rules about a user.
2. Rules about the voice channel a user is in.
3. Rules about the text channel a command was issued in.
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).
.. _permissions-commands:
--------
Commands
--------
.. _permissions-command-permissions:
^^^^^^^^^^^
permissions
^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]permissions
**Description**
Command permission management tools.
.. _permissions-command-permissions-acl:
"""""""""""""""
permissions acl
"""""""""""""""
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]permissions acl
**Description**
Manage permissions with YAML files.
.. tip:: See :ref:`here <cog_permissions>` for more information with configuring these yaml files.
.. _permissions-command-permissions-acl-getglobal:
"""""""""""""""""""""""""
permissions acl getglobal
"""""""""""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]permissions acl getglobal
**Description**
Get a YAML file detailing all global rules.
.. _permissions-command-permissions-acl-getserver:
"""""""""""""""""""""""""
permissions acl getserver
"""""""""""""""""""""""""
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]permissions acl getserver
**Description**
Get a YAML file detailing all rules in this server.
.. _permissions-command-permissions-acl-setglobal:
"""""""""""""""""""""""""
permissions acl setglobal
"""""""""""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]permissions acl setglobal
**Description**
Set global rules with a YAML file.
.. warning::
This will override reset *all* global rules
to the rules specified in the uploaded file.
This does not validate the names of commands and cogs before
setting the new rules.
.. _permissions-command-permissions-acl-setserver:
"""""""""""""""""""""""""
permissions acl setserver
"""""""""""""""""""""""""
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]permissions acl setserver
**Description**
Set rules for this server with a YAML file.
.. warning::
This will override reset *all* rules in this
server to the rules specified in the uploaded file.
.. _permissions-command-permissions-acl-updateglobal:
""""""""""""""""""""""""""""
permissions acl updateglobal
""""""""""""""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]permissions acl updateglobal
**Description**
Update global rules with a YAML file.
This won't touch any rules not specified in the YAML
file.
.. _permissions-command-permissions-acl-updateserver:
""""""""""""""""""""""""""""
permissions acl updateserver
""""""""""""""""""""""""""""
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]permissions acl updateserver
**Description**
Update rules for this server with a YAML file.
This won't touch any rules not specified in the YAML
file.
.. _permissions-command-permissions-acl-yamlexample:
"""""""""""""""""""""""""""
permissions acl yamlexample
"""""""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]permissions acl yamlexample
**Description**
Sends an example of the yaml layout for permissions
.. _permissions-command-permissions-addglobalrule:
"""""""""""""""""""""""""
permissions addglobalrule
"""""""""""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]permissions addglobalrule <allow_or_deny> <cog_or_command> <who_or_what...>
**Description**
Add a global rule to a cog or command.
**Arguments**
* ``<allow_or_deny>``: This should be one of "allow" or "deny".
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
.. _permissions-command-permissions-addserverrule:
"""""""""""""""""""""""""
permissions addserverrule
"""""""""""""""""""""""""
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]permissions addserverrule <allow_or_deny> <cog_or_command> <who_or_what...>
**Description**
Add a rule to a cog or command in this server.
**Arguments**
* ``<allow_or_deny>``: This should be one of "allow" or "deny".
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
.. _permissions-command-permissions-canrun:
""""""""""""""""""
permissions canrun
""""""""""""""""""
**Syntax**
.. code-block:: none
[p]permissions canrun <user> <command>
**Description**
Check if a user can run a command.
This will take the current context into account, such as the
server and text channel.
**Arguments**
* ``<user>``: The user to check permissions for.
* ``<command>``: The command to check whether the user can run it or not.
.. _permissions-command-permissions-clearglobalrules:
""""""""""""""""""""""""""""
permissions clearglobalrules
""""""""""""""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]permissions clearglobalrules
**Description**
Reset all global rules.
.. _permissions-command-permissions-clearserverrules:
""""""""""""""""""""""""""""
permissions clearserverrules
""""""""""""""""""""""""""""
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]permissions clearserverrules
**Description**
Reset all rules in this server.
.. _permissions-command-permissions-explain:
"""""""""""""""""""
permissions explain
"""""""""""""""""""
**Syntax**
.. code-block:: none
[p]permissions explain
**Description**
Explain how permissions works.
.. _permissions-command-permissions-removeglobalrule:
""""""""""""""""""""""""""""
permissions removeglobalrule
""""""""""""""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]permissions removeglobalrule <cog_or_command> <who_or_what...>
**Description**
Remove a global rule from a command.
**Arguments**
* ``<cog_or_command>``: The cog or command to remove the rule from. This is case sensitive.
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
.. _permissions-command-permissions-removeserverrule:
""""""""""""""""""""""""""""
permissions removeserverrule
""""""""""""""""""""""""""""
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]permissions removeserverrule <cog_or_command> <who_or_what...>
**Description**
Remove a server rule from a command.
**Arguments**
* ``<cog_or_command>``: The cog or command to remove the rule from. This is case sensitive.
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
.. _permissions-command-permissions-setdefaultglobalrule:
""""""""""""""""""""""""""""""""
permissions setdefaultglobalrule
""""""""""""""""""""""""""""""""
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]permissions setdefaultglobalrule <allow_or_deny> <cog_or_command>
**Description**
Set the default global rule for a command or a cog.
This is the rule a command will default to when no other rule
is found.
**Arguments**
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
.. _permissions-command-permissions-setdefaultserverrule:
""""""""""""""""""""""""""""""""
permissions setdefaultserverrule
""""""""""""""""""""""""""""""""
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]permissions setdefaultserverrule <allow_or_deny> <cog_or_command>
**Description**
Set the default rule for a command or a cog in this server.
This is the rule a command will default to when no other rule
is found.
**Arguments**
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.

141
docs/cog_guides/reports.rst Normal file
View File

@@ -0,0 +1,141 @@
.. _reports:
=======
Reports
=======
This is the cog guide for the reports 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 reports
.. _reports-usage:
-----
Usage
-----
Create user reports that server staff can respond to.
Users can open reports using ``[p]report``. These are then sent
to a channel in the server for staff, and the report creator
gets a DM. Both can be used to communicate.
.. _reports-commands:
--------
Commands
--------
.. _reports-command-report:
^^^^^^
report
^^^^^^
**Syntax**
.. code-block:: none
[p]report [text]
**Description**
Send a report.
Use without arguments for interactive reporting, or do
``[p]report [text]`` to use it non-interactively.
**Arguments**
* ``[text]``: The content included within the report.
.. _reports-command-report-interact:
"""""""""""""""
report interact
"""""""""""""""
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]report interact <ticket_number>
**Description**
Open a message tunnel.
This tunnel will forward things you say in this channel
to the ticket opener's direct messages.
Tunnels do not persist across bot restarts.
**Arguments**
* ``<ticket_number>``: The ticket number to open the tunnel in.
.. _reports-command-reportset:
^^^^^^^^^
reportset
^^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]reportset
**Description**
Manage Reports.
.. _reports-command-reportset-output:
""""""""""""""""
reportset output
""""""""""""""""
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]reportset output <channel>
**Description**
Set the channel where reports will be sent.
**Arguments**
* ``<channel>``: |channel-input|
.. _reports-command-reportset-toggle:
""""""""""""""""
reportset toggle
""""""""""""""""
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]reportset toggle
**Description**
Enable or disable reporting for this server.

517
docs/cog_guides/streams.rst Normal file
View File

@@ -0,0 +1,517 @@
.. _streams:
=======
Streams
=======
This is the cog guide for the Streams 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 streams
.. _streams-usage:
-----
Usage
-----
This cog provides commands to check if a channel
on a supported streaming service is live as well
as to create and manage alerts for channels.
Supported streaming services are:
- Twitch
- Youtube
- Picarto
Youtube and Twitch both require setting authentication
details for commands for those services to work. See
:ref:`[p]streamset twitchtoken <streams-command-streamset-twitchtoken>` and
:ref:`[p]streamset youtubekey <streams-command-streamset-youtubekey>`
for more information.
.. _streams-commands:
--------
Commands
--------
.. _streams-command-streamset:
^^^^^^^^^
streamset
^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset
**Description**
Manage stream alert settings.
.. _streams-command-streamset-autodelete:
^^^^^^^^^^^^^^^^^^^^
streamset autodelete
^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset autodelete <on_off>
**Description**
Toggles automatic deletion of stream alerts when the
stream goes offline.
**Arguments**
* ``<on_off>``: Whether to turn on or off
.. _streams-command-streamset-ignorereruns:
^^^^^^^^^^^^^^^^^^^^^^
streamset ignorereruns
^^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset ignorereruns
**Description**
Toggles excluding reruns from the alerts.
At this time, this functionality only applies to Twitch stream alerts.
.. _streams-command-streamset-mention:
^^^^^^^^^^^^^^^^^
streamset mention
^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset mention
**Description**
Toggle mentions for stream alerts.
.. _streams-command-streamset-mention-all:
^^^^^^^^^^^^^^^^^^^^^
streamset mention all
^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset mention all
**Description**
Toggle mentioning ``@everyone`` for stream alerts.
.. _streams-command-streamset-mention-online:
^^^^^^^^^^^^^^^^^^^^^^^^
streamset mention online
^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset mention online
**Description**
Toggle mentioning ``@here`` for stream alerts.
.. _streams-command-streamset-mention-role:
^^^^^^^^^^^^^^^^^^^^^^
streamset mention role
^^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset mention role <role>
**Description**
Toggle mentioning a role for stream alerts.
**Arguments**
* ``<role>``: The role to toggle a mention for. |role-input|
.. _streams-command-streamset-message:
^^^^^^^^^^^^^^^^^
streamset message
^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset message
**Description**
Manage custom messages for stream alerts.
.. _streams-command-streamset-message-mention:
^^^^^^^^^^^^^^^^^^^^^^^^^
streamset message mention
^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset message mention <message>
**Description**
Sets a stream alert message for when mentions are enabled.
Use ``{mention}`` in the message to insert the selected mentions.
Use ``{stream}`` in the message to insert the channel or user name.
Use ``{stream.display_name}`` in the message to insert the channel's display name
(on Twitch, this may be different from ``{stream}``).
For example: ``[p]streamset message mention {mention}, {stream.display_name} is live!``
**Arguments**
* ``<message>``: Your alert message
.. _streams-command-streamset-message-nomention:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
streamset message nomention
^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset message nomention <message>
**Description**
Sets a stream alert message for when mentions are disabled.
Use ``{stream}`` in the message to insert the channel or user name.
Use ``{stream.display_name}`` in the message to insert the channel's display name
(on Twitch, this may be different from ``{stream}``).
For example: ``[p]streamset message nomention {stream.display_name} is live!``
**Arguments**
* ``<message>``: Your alert message
.. _streams-command-streamset-message-clear:
^^^^^^^^^^^^^^^^^^^^^^^
streamset message clear
^^^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset message clear
**Description**
Resets the stream alert messages for the server.
.. _streams-command-streamset-timer:
^^^^^^^^^^^^^^^
streamset timer
^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset timer <refresh_timer>
**Description**
Sets the refresh time for stream alerts (how frequently they will be checked).
This cannot be set to anything less than 60 seconds.
**Arguments**
* ``<refresh_timer>``: The frequency with which streams should be checked, in seconds
.. _streams-command-streamset-youtubekey:
^^^^^^^^^^^^^^^^^^^^
streamset youtubekey
^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset youtubekey
**Description**
Explains how to set the YouTube token.
To get one, do the following:
1. Create a project
(see https://support.google.com/googleapi/answer/6251787 for details)
2. Enable the YouTube Data API v3
(see https://support.google.com/googleapi/answer/6158841 for instructions)
3. Set up your API key
(see https://support.google.com/googleapi/answer/6158862 for instructions)
4. Copy your API key and run the command ``[p]set api youtube api_key <your_api_key_here>``
.. attention:: These tokens are sensitive and should only be
used in a private channel or in DM with the bot.
.. _streams-command-streamset-twitchtoken:
^^^^^^^^^^^^^^^^^^^^^
streamset twitchtoken
^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamset twitchtoken
**Description**
Explains how to set the Twitch token.
To set the Twitch API tokens, follow these steps:
1. Go to this page: https://dev.twitch.tv/dashboard/apps.
2. Click Register Your Application.
3. Enter a name, set the OAuth Redirect URI to http://localhost, and select an Application Category of your choosing.
4. Click Register.
5. Copy your client ID and your client secret into:
``[p]set api twitch client_id <your_client_id_here> client_secret <your_client_secret_here>``
.. attention:: These tokens are sensitive and should only be
used in a private channel or in DM with the bot.
.. _streams-command-picarto:
^^^^^^^
picarto
^^^^^^^
**Syntax**
.. code-block:: none
[p]picarto <channel_name>
**Description**
Check if a Picarto channel is live.
**Arguments**
* ``<channel_name>``: The Picarto channel to check.
.. _streams-command-twitchstream:
^^^^^^^^^^^^
twitchstream
^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]twitchstream <channel_name>
**Description**
Check if a Twitch channel is live.
**Arguments**
* ``<channel_name>``: The Twitch channel to check.
.. _streams-command-youtubestream:
^^^^^^^^^^^^^
youtubestream
^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]youtubestream <channel_id_or_name>
**Description**
Check if a YouTube channel is live.
**Arguments**
* ``<channel_id_or_name>``: The name or id of the YouTube channel to be checked.
.. _streams-command-streamalert:
^^^^^^^^^^^
streamalert
^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamalert
**Description**
Manage automated stream alerts.
.. _streams-command-streamalert-list:
^^^^^^^^^^^^^^^^
streamalert list
^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamalert list
**Description**
Lists all active alerts in the current server.
.. _streams-command-streamalert-picarto:
^^^^^^^^^^^^^^^^^^^
streamalert picarto
^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamalert picarto <channel_name>
**Description**
Toggle alerts in the current channel for the
specified Picarto channel.
**Arguments**
* ``<channel_name>``: The Picarto channel to toggle the alert for.
.. _streams-command-streamalert-twitch-channel:
^^^^^^^^^^^^^^^^^^^^^^^^^^
streamalert twitch channel
^^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamalert twitch channel <channel_name>
**Description**
Toggle alerts in the current channel for the
specified Twitch channel.
**Arguments**
* ``<channel_name>``: The Twitch channel to toggle the alert for.
.. _streams-command-streamalert-youtube:
^^^^^^^^^^^^^^^^^^^
streamalert youtube
^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamalert youtube <channel_name>
**Description**
Toggle alerts in the current channel for the
specified Picarto channel.
**Arguments**
* ``<channel_id_or_name>``: The name or id of the YouTube channel to be checked.
.. _streams-command-streamalert-stop:
^^^^^^^^^^^^^^^^
streamalert stop
^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]streamalert stop [disable-all=No]
**Description**
Disable all stream alerts for this channel or server.
**Arguments**
* ``[disable-all]``: Defaults to ``no``. If this is set to ``yes``, all
stream alerts in the current server will be disabled.
If ``no`` or unspecified, all stream alerts in the
current channel will be stopped.

439
docs/cog_guides/trivia.rst Normal file
View File

@@ -0,0 +1,439 @@
.. _trivia:
======
Trivia
======
This is the cog guide for the trivia 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 trivia
.. _trivia-usage:
-----
Usage
-----
This cog allows for playing trivia with others. You may
choose to play just one category at a time or choose
multiple to add variety to your game. You can even create
your own lists!
.. _trivia-commands:
--------
Commands
--------
Here is a list of all of the commands for this cog:
.. _trivia-command-triviaset:
^^^^^^^^^
triviaset
^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]triviaset
**Description**
Commands for managing trivia settings.
.. _trivia-command-triviaset-botplays:
^^^^^^^^^^^^^^^^^^
triviaset botplays
^^^^^^^^^^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]triviaset botplays <true_or_false>
**Description**
Sets whether the bot gains a point if nobody guesses correctly.
**Arguments**
- ``<true_or_false>`` If ``true``, the bot will gain a point if nobody
guesses correctly, otherwise it will not.
.. _trivia-command-triviaset-maxscore:
^^^^^^^^^^^^^^^^^^
triviaset maxscore
^^^^^^^^^^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]triviaset maxscore <score>
**Description**
Sets the total points required to win.
**Arguments**
- ``<score>`` The amount of points required to win.
.. _trivia-command-triviaset-override:
^^^^^^^^^^^^^^^^^^
triviaset override
^^^^^^^^^^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]triviaset override <enabled>
**Description**
Allow/disallow trivia lists to override the settings.
**Arguments**
- ``<enabled>`` Whether trivia lists should be able to override settings.
.. _trivia-command-triviaset-payout:
^^^^^^^^^^^^^^^^
triviaset payout
^^^^^^^^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]triviaset payout <multiplier>
**Description**
Sets the payout multiplier.
If a user wins trivia when at least 3 users are playing, they will receive credits;
the amount received is determined by multiplying their total score by this multiplier.
**Arguments**
- ``<multiplier>`` The amount to multiply the winner's score by to determine payout.
This can be any positive decimal number. Setting this to 0 will disable.
.. _trivia-command-triviaset-revealanswer:
^^^^^^^^^^^^^^^^^^^^^^
triviaset revealanswer
^^^^^^^^^^^^^^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]triviaset revealanswer <true_or_false>
**Description**
Sets whether or not the answer is revealed if the time limit for answering runs out.
**Arguments**
- ``<true_or_false>`` If ``true``, the bot will reveal the answer if there is no
correct guess within the time limit.
.. _trivia-command-triviaset-showsettings:
^^^^^^^^^^^^^^^^^^^^^^
triviaset showsettings
^^^^^^^^^^^^^^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]triviaset showsettings
**Description**
Shows the current trivia settings.
.. _trivia-command-triviaset-stopafter:
^^^^^^^^^^^^^^^^^^^
triviaset stopafter
^^^^^^^^^^^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]triviaset stopafter <seconds>
**Description**
Sets how long the bot should wait before stopping the trivia
session due to lack of response.
**Arguments**
- ``<seconds>`` The number of seconds to wait before stopping the session.
.. _trivia-command-triviaset-timelimit:
^^^^^^^^^^^^^^^^^^^
triviaset timelimit
^^^^^^^^^^^^^^^^^^^
.. note:: |mod-lock|
**Syntax**
.. code-block:: none
[p]triviaset timelimit <seconds>
**Description**
Sets the maximum time permitted to answer a question.
**Arguments**
- ``<seconds>`` The number of seconds to wait for an answer.
.. _trivia-command-triviaset-custom:
^^^^^^^^^^^^^^^^
triviaset custom
^^^^^^^^^^^^^^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]triviaset custom
**Description**
Manage custom trivia lists.
.. tip::
Looking to learn how to create your own trivia lists?
See :ref:`here <guide_trivia_list_creation>` for more information.
.. _trivia-command-triviaset-custom-upload:
^^^^^^^^^^^^^^^^^^^^^^^
triviaset custom upload
^^^^^^^^^^^^^^^^^^^^^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]triviaset custom upload
**Description**
Upload a custom trivia list. The bot will prompt you to upload
your list as an attachment in Discord.
.. _trivia-command-triviaset-custom-list:
^^^^^^^^^^^^^^^^^^^^^
triviaset custom list
^^^^^^^^^^^^^^^^^^^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]triviaset custom list
**Description**
List all uploaded custom trivia lists.
.. _trivia-command-triviaset-custom-delete:
^^^^^^^^^^^^^^^^^^^^^^^
triviaset custom delete
^^^^^^^^^^^^^^^^^^^^^^^
.. note:: |owner-lock|
**Syntax**
.. code-block:: none
[p]triviaset custom delete <name>
**Description**
Delete a custom trivia list.
**Arguments**
- ``<name>`` The name of the custom list to be deleted.
.. _trivia-command-trivia:
^^^^^^
trivia
^^^^^^
**Syntax**
.. code-block:: none
[p]trivia <categories...>
**Description**
Start a trivia session on the specified category.
Multiple categories can be listed, in which case the trivia session
will use all of the specified lists to select questions from.
**Arguments**
- ``<categories...>`` The category to play. Can be multiple.
.. _trivia-command-trivia-leaderboard:
^^^^^^^^^^^^^^^^^^
trivia leaderboard
^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]trivia leaderboard
**Description**
Shows the trivia leaderboard. Defaults to the top ten in the
current server, sorted by total wins. The subcommands provide
more customized leaderboards.
.. _trivia-command-trivia-leaderboard-global:
^^^^^^^^^^^^^^^^^^^^^^^^^
trivia leaderboard global
^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]trivia leaderboard global [sort_by=wins] [top=10]
**Description**
The global trivia leaderboard.
**Arguments**
- ``[sort_by=wins]`` The method by which to sort the leaderboard (defaults to wins). Can be one of:
- ``wins`` Total wins
- ``avg`` Average score
- ``total`` Total correct answers from all sessions
- ``games`` Total games played.
- ``[top=10]`` The number of ranks to show on the leaderboard. Defaults to 10
.. _trivia-command-trivia-leaderboard-server:
^^^^^^^^^^^^^^^^^^^^^^^^^
trivia leaderboard server
^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]trivia leaderboard server [sort_by=wins] [top=10]
**Description**
The trivia leaderboard for this server.
**Arguments**
- ``[sort_by=wins]`` The method by which to sort the leaderboard (defaults to wins). Can be one of:
- ``wins`` Total wins
- ``avg`` Average score
- ``total`` Total correct answers from all sessions
- ``games`` Total games played.
- ``[top=10]`` The number of ranks to show on the leaderboard. Defaults to 10
.. _trivia-command-trivia-list:
^^^^^^^^^^^
trivia list
^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]trivia list
**Description**
Lists the available trivia categories
.. _trivia-command-trivia-stop:
^^^^^^^^^^^
trivia stop
^^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]trivia stop
**Description**
Stops an ongoing trivia session.

View File

@@ -0,0 +1,403 @@
.. _warnings:
========
Warnings
========
This is the cog guide for the warnings 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 warnings
.. _warnings-usage:
-----
Usage
-----
Warn misbehaving users and take automated actions.
.. _warnings-commands:
--------
Commands
--------
.. _warnings-command-actionlist:
^^^^^^^^^^
actionlist
^^^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]actionlist
**Description**
List all configured automated actions for Warnings.
.. _warnings-command-mywarnings:
^^^^^^^^^^
mywarnings
^^^^^^^^^^
**Syntax**
.. code-block:: none
[p]mywarnings
**Description**
List warnings for yourself.
.. _warnings-command-reasonlist:
^^^^^^^^^^
reasonlist
^^^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]reasonlist
**Description**
List all configured reasons for Warnings.
.. _warnings-command-unwarn:
^^^^^^
unwarn
^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]unwarn <member> <warn_id> [reason]
**Description**
Remove a warning from a member.
**Arguments**
* ``<member>``: The member to remove the warning from. |member-input-quotes|
* ``<warn_id>``: The warning ID to remove from the member.
* ``[reason]``: The reason for unwarning this member.
.. _warnings-command-warn:
^^^^
warn
^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]warn <member> [points=1] <reason>
**Description**
Warn the user for the specified reason.
**Arguments**
* ``<member>``: The member to warn. |member-input-quotes|
* ``[points]``: The number of points the warning should be for. If no number is supplied, 1 point will be given. Pre-set warnings disregard this.
* ``<reason>``: The reason for the warning. This can be a registered reason, or a custom reason if ``[p]warningset allowcustomreasons`` is set.
.. _warnings-command-warnaction:
^^^^^^^^^^
warnaction
^^^^^^^^^^
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]warnaction
**Description**
Manage automated actions for Warnings.
Actions are essentially command macros. Any command can be run
when the action is initially triggered, and/or when the action
is lifted.
Actions must be given a name and a points threshold. When a
user is warned enough so that their points go over this
threshold, the action will be executed.
.. _warnings-command-warnaction-add:
""""""""""""""
warnaction add
""""""""""""""
**Syntax**
.. code-block:: none
[p]warnaction add <name> <points>
**Description**
Create an automated action.
Duplicate action names are not allowed.
**Arguments**
* ``<name>``: The name of the action.
* ``<points>``: The number of points for this action.
.. _warnings-command-warnaction-delete:
"""""""""""""""""
warnaction delete
"""""""""""""""""
**Syntax**
.. code-block:: none
[p]warnaction delete <action_name>
**Description**
Delete the action with the specified name.
**Arguments**
* ``<action_name>``: The name of the action to delete.
.. _warnings-command-warnings:
^^^^^^^^
warnings
^^^^^^^^
.. note:: |admin-lock|
**Syntax**
.. code-block:: none
[p]warnings <member>
**Description**
List the warnings for the specified member.
**Arguments**
* ``<member>``: The member to get the warnings for. |member-input|
.. _warnings-command-warningset:
^^^^^^^^^^
warningset
^^^^^^^^^^
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]warningset
**Description**
Manage settings for Warnings.
.. _warnings-command-warningset-allowcustomreasons:
"""""""""""""""""""""""""""""
warningset allowcustomreasons
"""""""""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]warningset allowcustomreasons <true_or_false>
**Description**
Enable or disable custom reasons for a warning.
**Arguments**
* ``<true_or_false>``: |bool-input|
.. _warnings-command-warningset-senddm:
"""""""""""""""""
warningset senddm
"""""""""""""""""
**Syntax**
.. code-block:: none
[p]warningset senddm <true_or_false>
**Description**
Set whether warnings should be sent to users in DMs.
**Arguments**
* ``<true_or_false>``: |bool-input|
.. _warnings-command-warningset-showmoderator:
""""""""""""""""""""""""
warningset showmoderator
""""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]warningset showmoderator <true_or_false>
**Description**
Decide whether the name of the moderator warning a user should be included in the DM to that user.
**Arguments**
* ``<true_or_false>``: |bool-input|
.. _warnings-command-warningset-usewarnchannel:
"""""""""""""""""""""""""
warningset usewarnchannel
"""""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]warningset usewarnchannel <true_or_false>
**Description**
Set if warnings should be sent to a channel set with ``[p]warningset warnchannel``.
**Arguments**
* ``<true_or_false>``: |bool-input|
.. _warnings-command-warningset-warnchannel:
""""""""""""""""""""""
warningset warnchannel
""""""""""""""""""""""
**Syntax**
.. code-block:: none
[p]warningset warnchannel [channel]
**Description**
Set the channel where warnings should be sent to.
**Arguments**
* ``[channel]``: |channel-input| Leave empty to use the channel ``[p]warn`` command was called in.
.. _warnings-command-warnreason:
^^^^^^^^^^
warnreason
^^^^^^^^^^
.. note:: |guildowner-lock|
**Syntax**
.. code-block:: none
[p]warnreason
**Description**
Manage warning reasons.
Reasons must be given a name, description and points value. The
name of the reason must be given when a user is warned.
.. _warnings-command-warnreason-create:
"""""""""""""""""
warnreason create
"""""""""""""""""
**Syntax**
.. code-block:: none
[p]warnreason create <name> <points> <description>
.. tip:: Alias: ``warnreason add``
**Description**
Create a warning reason.
**Arguments**
* ``<name>``: The name for the new reason.
* ``<points>``: The number of points with the new reason.
* ``<description>``: The description of the new warn reason.
.. _warnings-command-warnreason-delete:
"""""""""""""""""
warnreason delete
"""""""""""""""""
**Syntax**
.. code-block:: none
[p]warnreason delete <reason_name>
**Description**
Delete a warning reason.
**Arguments**
* ``<reason_name>``: The name of the reason to delete.

View File

@@ -1,4 +1,5 @@
.. Permissions Cog Reference
.. _cog_permissions:
=========================
Permissions Cog Reference

View File

@@ -21,6 +21,7 @@ import os
import sys
sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath("_ext"))
os.environ["BUILDING_DOCS"] = "1"
@@ -42,6 +43,8 @@ extensions = [
"sphinx.ext.napoleon",
"sphinx.ext.doctest",
"sphinxcontrib_trio",
"sphinx-prompt",
"deprecated_removed",
]
# Add any paths that contain templates here, relative to this directory.
@@ -58,7 +61,7 @@ master_doc = "index"
# General information about the project.
project = "Red - Discord Bot"
copyright = "2018-2020, Cog Creators"
copyright = "2018-2021, Cog Creators"
author = "Cog Creators"
# The version info for the project you're documenting, acts as replacement for
@@ -83,10 +86,16 @@ language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
# to ensure that include files (partial pages) aren't built, exclude them
"**/_includes/**",
]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
pygments_style = "default"
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
@@ -101,6 +110,9 @@ with open("prolog.txt", "r") as file:
# Adds d.py version to available substitutions in all files
rst_prolog += f"\n.. |DPY_VERSION| replace:: {dpy_version}"
# Add release highlight indicator to available substitutions in all files
rst_prolog += f"\n.. |cool| replace:: \N{HEAVY BLACK HEART}\N{VARIATION SELECTOR-16}"
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -108,8 +120,11 @@ rst_prolog += f"\n.. |DPY_VERSION| replace:: {dpy_version}"
#
html_theme = "sphinx_rtd_theme"
# This will be needed until sphinx_rtd_theme supports the html5 writer
html4_writer = True
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#
html_extra_path = ["_html"]
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -218,6 +233,7 @@ intersphinx_mapping = {
"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),
}
# Extlinks

View File

@@ -73,3 +73,5 @@ Additional References
.. automethod:: Red.set_shared_api_tokens
.. automethod:: Red.remove_shared_api_tokens
.. automethod:: Red.remove_shared_api_services

View File

@@ -7,5 +7,5 @@ Command Check Decorators
The following are all decorators for commands, which add restrictions to where and when they can be
run.
.. automodule:: redbot.core.checks
:members:
.. automodule:: redbot.core.commands
:members: permissions_check, bot_has_permissions, bot_in_a_guild, has_permissions, has_guild_permissions, is_owner, guildowner, guildowner_or_permissions, admin, admin_or_permissions, mod, mod_or_permissions

View File

@@ -13,6 +13,14 @@ extend functionalities used throughout the bot, as outlined below.
.. autofunction:: redbot.core.commands.group
.. autoclass:: redbot.core.commands.Cog
.. automethod:: format_help_for_context
.. automethod:: red_get_data_for_user
.. automethod:: red_delete_data_for_user
.. autoclass:: redbot.core.commands.Command
:members:
:inherited-members: format_help_for_context
@@ -32,5 +40,24 @@ extend functionalities used throughout the bot, as outlined below.
.. automodule:: redbot.core.commands.converter
:members:
:exclude-members: convert
:exclude-members: UserInputOptional, convert
:no-undoc-members:
.. autodata:: UserInputOptional
:annotation:
.. _framework-commands-help:
******************
Help Functionality
******************
.. warning::
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>`_
.. automodule:: redbot.core.commands.help
:members:

View File

@@ -21,8 +21,9 @@ Basic Usage
.. code-block:: python
from redbot.core import Config
from redbot.core import commands
class MyCog:
class MyCog(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890)
@@ -52,7 +53,7 @@ Then, in the class's :code:`__init__` function, you need to get a config instanc
.. code-block:: python
class MyCog:
class MyCog(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890)
@@ -68,7 +69,7 @@ After we've gotten that, we need to register default values:
.. code-block:: python
class MyCog:
class MyCog(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890)
default_global = {
@@ -127,7 +128,7 @@ Notice a few things in the above examples:
self.config.<insert scope here, or nothing if global>.variable_name.set(new_value)
It is also possible to use :code:`async with` syntax to get and set config
values. When entering the statement, the config value is retreived, and on exit,
values. When entering the statement, the config value is retrieved, and on exit,
it is saved. This puts a safeguard on any code within the :code:`async with`
block such that if it breaks from the block in any way (whether it be from
:code:`return`, :code:`break`, :code:`continue` or an exception), the value will
@@ -188,19 +189,120 @@ features within Config to enable developers to work with data how they wish.
This usage guide will cover the following features:
- :py:meth:`Config.init_custom`
- :py:meth:`Config.register_custom`
- :py:meth:`Config.custom`
- :py:meth:`Group.get_raw`
- :py:meth:`Group.set_raw`
- :py:meth:`Group.clear_raw`
Custom Groups
^^^^^^^^^^^^^
While Config has built-in groups for the common discord objects,
sometimes you need a combination of these or your own defined grouping.
Config handles this by allowing you to define custom groups.
Let's start by showing how :py:meth:`Config.custom` can be equivalent to :py:meth:`Config.guild` by modifying the above
Tutorial example.
.. code-block:: python
from redbot.core import Config, commands
class MyCog(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890)
default_guild = {
"blah": [],
"baz": 1234567890
}
# self.config.register_guild(**default_guild)
self.config.init_custom("CustomGuildGroup", 1)
self.config.register_custom("CustomGuildGroup", **default_guild)
In the above, we registered the custom group named "CustomGuildGroup" to contain the same defaults
that :code:`self.config.guild` normally would. First, we initialized the group "CustomGuildGroup" to
accept one identifier by calling :py:meth:`Config.init_custom` with the argument :code:`1`. Then we used
:py:meth:`Config.register_custom` to register the default values.
.. important::
:py:meth:`Config.init_custom` **must** be called prior to using a custom group.
Now let's use this custom group:
.. code-block:: python
@commands.command()
async def setbaz(self, ctx, new_value):
# await self.config.guild(ctx.guild).baz.set(new_value)
await self.config.custom("CustomGuildGroup", ctx.guild.id).baz.set(new_value)
await ctx.send("Value of baz has been changed!")
@commands.command()
async def checkbaz(self, ctx):
# baz_val = await self.config.guild(ctx.guild).baz()
baz_val = await self.config.custom("CustomGuildGroup", ctx.guild.id).baz()
await ctx.send("The value of baz is {}".format("True" if baz_val else "False"))
Here we used :py:meth:`Config.custom` to access our custom group much like we would have used :py:meth:`Config.guild`.
Since it's a custom group, we need to use :code:`id` attribute of guild to get a unique identifier.
Now let's see an example that uses multiple identifiers:
.. code-block:: python
from redbot.core import Config, commands, checks
class ChannelAccess(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, identifier=1234567890)
default_access = {
"allowed": False
}
self.config.init_custom("ChannelAccess", 2)
self.config.register_custom("ChannelAccess", **default_access)
@commands.command()
@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")
@commands.command()
async def checkaccess(self, ctx, channel: discord.TextChannel):
allowed = await self.config.custom("ChannelAccess", channel.id, ctx.author.id).allowed()
await ctx.send("Your access to this channel is {}".format("Allowed" if allowed else "Denied"))
In the above example, we defined the custom group "ChannelAccess" to accept two identifiers
using :py:meth:`Config.init_custom`. Then, we were able to set the default value for any member's
access to any channel to `False` until the bot owner grants them access.
.. important::
The ordering of the identifiers matter. :code:`custom("ChannelAccess", channel.id, member.id)` is NOT the same
as :code:`custom("ChannelAccess", member.id, channel.id)`
Raw Group Access
^^^^^^^^^^^^^^^^
For this example let's suppose that we're creating a cog that allows users to buy and own multiple pets using
the built-in Economy credits::
from redbot.core import bank
from redbot.core import Config
from discord.ext import commands
from redbot.core import Config, commands
class Pets:
class Pets(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, 1234567890)
@@ -346,13 +448,13 @@ much the same way they would in V2. The following examples will demonstrate how
.. code-block:: python
from redbot.core import Config
from redbot.core import Config, commands
class ExampleCog:
class ExampleCog(commands.Cog):
def __init__(self):
self.config = Config.get_conf(self, 1234567890)
self.config.init_custom("V2", 1)
self.data = {}
async def load_data(self):

View File

@@ -33,21 +33,17 @@ Tutorial
After making your cog, generate a :code:`messages.pot` file
The process of generating this will depend on the operating system
you are using
We recommend using redgettext - a modified version of pygettext for Red.
You can install redgettext by running :code:`pip install redgettext` in a command prompt.
In a command prompt in your cog's package (where yourcog.py is),
create a directory called "locales".
Then do one of the following:
Windows: :code:`python <your python install path>\Tools\i18n\pygettext.py -D -n -p locales`
Mac: ?
Linux: :code:`pygettext3 -D -n -p locales`
This will generate a messages.pot file with strings to be translated, including
To generate the :code:`messages.pot` file, you will now need to run
:code:`python -m redgettext -c [path_to_cog]`
This file will contain all strings to be translated, including
docstrings.
(For advanced usage check :code:`python -m redgettext -h`)
You can now use a tool like `poedit
<https://poedit.net/>`_ to translate the strings in your messages.pot file.
-------------
API Reference

View File

@@ -8,7 +8,7 @@ General Utility
===============
.. automodule:: redbot.core.utils
:members: deduplicate_iterables, bounded_gather, bounded_gather_iter
:members: deduplicate_iterables, bounded_gather, bounded_gather_iter, get_end_user_data_statement, get_end_user_data_statement_or_raise
.. autoclass:: AsyncIter
:members:

View File

@@ -13,21 +13,21 @@ This is a quick start guide for a general usage.
.. note::
If you haven't installed Red, please do it by following
the :ref:`installation guides <main>`.
one of the `installation guides <install_guides/index>`.
Assuming you correctly installed Red, you should have a
window like this:
.. image:: .resources/red-console.png
.. _gettings-started-invite:
.. _getting-started-invite:
-------------------------
Invite Red to your server
-------------------------
When started, the console will show you ``Invite URL`` (here at
the bottom of the screenshot).
When started, the console will show you the ``Invite URL``
(visible at the bottom of the screenshot above).
Paste the link into your browser and select the server you want
to invite the bot in, like any other bot.
@@ -63,7 +63,7 @@ example, if your prefix is ``!``, you will execute your command like this:
The commands
~~~~~~~~~~~~
The command you're going to use the most is help. That command will
The command you're going to use the most is **help**. This command will
show you **all of the available commands** of the bot with a small description.
.. code-block:: none
@@ -81,18 +81,33 @@ parameters.
[p]help command
The parameters are shown as enclosed in ``< >`` if they're required, or
``[ ]`` if optional.
As an example, the ban command will show this in the help message, assuming
your prefix is ``!``:
``Syntax: !ban <user> [days] [reason]``
.. note::
Arguments enclosed in ``< >`` are **required** for the command to work.
This means that it is necessary to provide ``user``. However, the
``days`` value (number of messages to delete) is optional, as well as
the ``reason`` value, used for the modlog.
Arguments enclosed in ``[ ]`` are **optional** for the command;
you can decide whether to use them or not.
If your argument includes spaces like ``Hello world!``, most of the time
you will need to place it in double quotes like this: ``"Hello world!"``.
Sometimes (especially for the last argument) these double quotes are not
required.
You can use help to show the **categories** too, generally called cogs.
Just do something like this (notice the capitalization):
Arguments followed by an ellipsis ``...`` means that you may provide
multiple arguments for the command.
For example, the command ``[p]cog install`` in the downloader cog has
the syntax ``cog install <repo> <cogs...>``, meaning that you can provide
1 or more ``cogs`` to install from the ``repo``.
Arguments followed by ``=value`` means that, if not specified,
the argument will be equal to ``value``.
For example, the command ``[p]cleanup messages`` in the cleanup cog has
the syntax ``cleanup messages <number> [delete_pinned=False]``, which means
``delete_pinned`` default will be false, unless you specify it as true.
You can use help to show the **categories** too, generally called cogs,
by doing the following (notice the capitalization):
.. code-block:: none
@@ -107,7 +122,7 @@ To get the description of a subcommand, type this:
When using subcommands, you also need to specify the command group.
As an example, ``cleanup`` has 6 subcommands. If you want
to use one, do it like this: ``[p]cleanup messages 10``
to use one of them, do: ``[p]cleanup messages 10``
.. _getting-started-cogs:
@@ -153,14 +168,10 @@ download them using the downloader cog.
You can start using the downloader cog by loading it: ``[p]load downloader``
You can find cogs by searching on ``cogs.red``. Find whatever you want,
You can find cogs by searching on `<https://index.discord.red>`_. Find whatever you want,
there are hundreds of cogs available!
.. note:: ``cogs.red``, the website that list all of the cogs is not
ready for v3 yet. For now, you can refer to `this post
<https://cogboard.red/t/approved-repositories/210>`_.
.. 26-cogs not available, let's use my repo :3
.. note:: An even better way to discover new cogs and repositories is in the works! Stay tuned!
Cogs come in repositories. A repository is a container of cogs
that you can install. Let's suppose you want to install the ``say``
@@ -205,8 +216,8 @@ or system files.
Server owner
~~~~~~~~~~~~
The server owner can access all commands on his guild, except the global
ones or those who can interact with system files (available for the
The server owner can access all commands on their guild, except the global
ones or those that can interact with system files (available for the
bot owner).
~~~~~~~~~~~~~
@@ -226,12 +237,13 @@ Moderator
A moderator is a step above the average users. You can set multiple moderator
roles with the ``[p]set addmodrole`` and ``[p]set removemodrole`` commands.
For example, in the mod cog (again), a mod will be able to mute, kick and ban;
but he won't be able to modify the cog settings with the ``[p]modset`` command.
For example, in the filter cog, a mod will be able to use the various commands
under ``[p]filter`` (such as adding and removing filtered words), but they will
not be able to modify the cog settings with the ``[p]filterset`` command.
.. tip::
If you don't like the default permission settings for some commands or
if want to restrict a cog or a command to a channel/member, you can use
want to restrict a cog or a command to a channel/member, you can use
the permissions cog.
.. _getting-started-hosting:
@@ -242,9 +254,9 @@ Hosting
If you are hosting Red on your personal computer, you will soon notice that
if you close the window or if you shut down you computer, Red will be offline.
She needs an environment to work and respond.
It needs an environment to work and respond.
You can try to host Red somewhere she will always be online, like on a virtual
You can try to host Red somewhere it will always be online, like on a virtual
private server (VPS) or on a personal server (e.g. Raspberry Pi).
If you want to do it, follow these steps.
@@ -254,15 +266,15 @@ If you want to do it, follow these steps.
basics of the Unix commands, such as navigating the system files or use
a terminal text editor.
You should follow `this guide
You should read `DigitalOcean's tutorial: An Introduction to Linux Basics
<https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-basics>`_
from DigitalOcean which will introduce you to the Linux basics.
if you have not used Linux before.
1. **Find a host**
You need to find a server to host Red. You can rent a VPS (it can be free)
on an online service. Please check :ref:`this list <host-list>` for
quality VPS providers.
on an online service. Please check :ref:`this list of hosts <host-list>` for
more information.
You can also buy a Raspberry Pi (~$20), which is a micro-computer that will
be able to host Red. The model 3 or above is recommended.
@@ -270,10 +282,10 @@ If you want to do it, follow these steps.
2. **Install Linux**
Most of the VPS providers have tools for installing Linux automatically. If
you're a beginner, we recommend **Ubuntu 20.04 LTS**.
you're a beginner, we recommend **Ubuntu 22.04 LTS**.
For Raspberry Pi users, just install `Raspbian
<https://www.raspberrypi.org/downloads/raspbian/>`_ on a micro-SD card.
<https://www.raspberrypi.org/software/>`_ on a micro-SD card.
2.1. **Log in**
@@ -295,8 +307,8 @@ If you want to do it, follow these steps.
3. **Install and set up Red**
Just follow one of the Linux installation guide. We provide guides for the
most used distributions. Check the :ref:`home page <main>` and search for
Follow one of the Linux installation guides. We provide guides for the
most used distributions. Check the `list of install guides <install_guides/index>` and search for
your distribution.
4. **Set up an auto-restart**
@@ -306,7 +318,7 @@ If you want to do it, follow these steps.
side task and handle fatal errors, so you can just leave your server running
and enjoy Red!
For that, just follow :ref:`this guide <systemd-service-guide>`.
For that, follow :ref:`the systemd service guide <systemd-service-guide>`.
.. _getting-started-userdocs:
@@ -332,9 +344,12 @@ The cog guides are formatted the same. They're divided into 3 sections:
A line that will show how the command must be invoked, with the arguments.
.. tip:: If the command show something like ``[lavalinkset|llset]``, that means
you can invoke the command with ``lavalinkset`` or with ``llset``, this is
called an alias.
* **Aliases**
Each command may have one or more aliases, which are alternative command names
you can use to invoke the same command. For example, ``[p]set colour`` can also
be invoked with ``[p]set color``. If there are aliases for a command, they will
appear just under the syntax.
* **Description**
@@ -344,22 +359,3 @@ The cog guides are formatted the same. They're divided into 3 sections:
* **Arguments**
A list of all arguments needed (or not) for the command, with more details.
.. tip::
Arguments enclosed in ``< >`` means that the argument is **required**
for the command to work.
Arguments enclosed in ``[ ]`` means that the argument is **optional**
for the command; you can decide to use it or not.
If your argument includes spaces like ``Hello world!``, most of the time
you will need to place it in double quotes like this: ``"Hello world!"``.
Sometimes (especially for the last argument) these double quotes are not
required.
Arguments followed by ``=something`` means that, if not specified,
the argument will be equal to ``something``.
For example, ``[days=1]`` in the ``ban`` command means that the number
of days of messages to be deleted will be equal to ``1`` if not
specified.

View File

@@ -35,8 +35,8 @@ Open a terminal or command prompt and type one of the following
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
data loss, crashes or worse. Please keep this in mind when using the Development version
While working on cog creation.
data loss, crashes or worse. Please keep this in mind when using the development version
while working on cog creation.
.. code-block:: none
@@ -83,9 +83,12 @@ In that file, place the following code:
from redbot.core import commands
class Mycog(commands.Cog):
class MyCog(commands.Cog):
"""My custom cog"""
def __init__(self, bot):
self.bot = bot
@commands.command()
async def mycom(self, ctx):
"""This does stuff!"""
@@ -96,10 +99,11 @@ Open :code:`__init__.py`. In that file, place the following:
.. code-block:: python
from .mycog import Mycog
from .mycog import MyCog
def setup(bot):
bot.add_cog(Mycog())
bot.add_cog(MyCog(bot))
Make sure that both files are saved.
@@ -155,6 +159,12 @@ Publishing your cog
Go to :doc:`/guide_publish_cogs`
--------------------------------
Becoming an Approved Cog Creator
--------------------------------
:doc:`/guide_cog_creators` explains the Cog Creator Application process and lists requirements and good practices for Cog Creators. This information is worth following for anyone creating cogs for Red, regardless of if you plan to publish your cogs or not.
--------------------
Additional resources
--------------------
@@ -162,70 +172,3 @@ Additional resources
Be sure to check out the :doc:`/guide_migration` for some resources
on developing cogs for V3. This will also cover differences between V2 and V3 for
those who developed cogs for V2.
---------------------------
Guidelines for Cog Creators
---------------------------
The following are a list of guidelines Cog Creators should strive to follow.
Not all of these are strict requirements (some are) but are all generally advisable.
1. Cogs should follow a few naming conventions for consistency.
- Cog classes should be TitleCased, using alphabetic characters only.
- Commands should be lower case, using alphanumeric characters only.
- Cog modules should be lower case, using alphabetic characters only.
2. Cogs and commands should have docstrings suitable for use in help output.
- This one is slightly flexible if using other methods of setting help.
3. Don't prevent normal operation of the bot without the user opting into this.
- This includes as a side effect by blocking the event loop.
4. If your cog uses logging:
- The namespace for logging should be: ``red.your_repo_name.cog_name``.
- Print statements are not a substitute for proper logging.
5. If you use asyncio.create_task, your tasks need to:
- Be cancelled on cog unload.
- Handle errors.
6. Event listeners should exit early if it is an event you don't need.
This makes your events less expensive in terms of CPU time. Examples below:
- Checking that you are in a guild before interacting with config for an antispam command.
- Checking that you aren't reacting to a bot message (``not message.author.bot``) early on.
7. Use .gitignore (or something else) to keep unwanted files out of your cog repo.
8. Put a license on your cog repo.
- By default, in most jurisdictions, without a license that at least offers the code for use,
users cannot legally use your code.
9. Use botwide features when they apply. Some examples of this:
- ``ctx.embed_color``
- ``bot.is_automod_immune``
10. Use checks to limit command use when the bot needs special permissions.
11. 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.
12. Don't abuse bot internals.
- If you need access to something, ask us or open an issue.
- If you're sure the current usage is safe, document why,
but we'd prefer you work with us on ensuring you have access to what you need.
13. Update your cogs for breakage.
- We announce this in advance.
- If you need help, ask.

201
docs/guide_cog_creators.rst Normal file
View File

@@ -0,0 +1,201 @@
.. Cog Creator Applications
.. role:: python(code)
:language: python
================================
Becoming an Approved Cog Creator
================================
This guide serves to explain the Cog Creator Application process and lays out the requirements to be a Cog Creator.
----------------------------------
Creating a Cog Creator Application
----------------------------------
.. note::
You will need to have created and published your cogs before you create a Cog Creator Application!
See `guide_cog_creation` and `guide_publish_cogs` for more information.
Cog Creator Applications are hosted on the `cogboard <https://cogboard.discord.red/c/apps/12>`__.
To create an application, start a new topic in the "Applications" category and fill out all of the required information.
QA reviews Cog Creator Applications for security and functionality on a first come, first serve basis.
Once your application is reviewed, you will have 14 days to make any requested changes, or to check in with the member of QA who is reviewing your application.
-----------------------------
Requirements for Cog Creators
-----------------------------
The following is a list of the requirements for approved Cog Creators.
QA uses this list to request changes for Cog Creator Applications.
Handling these requirements before submitting your application can streamline the review process.
Any Cog Creator that does not follow these requirements will have their repo removed from approved listings and may have their Cog Creator status revoked.
- Readme that contains
- Repository name
- Installation instructions
- Extra setup instructions (if applicable)
- Credits (if applicable)
- 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``
See `info-json-format` for more information on how to set up ``info.json`` files.
- No cog contains malicious code.
- No cog contains code that could impact the stability of the bot, such as blocking the event loop for an extended period of time, unreasonably high IO usage, etc.
- No cog contains copied code that does not respect the license of the source.
- Disclose in the ``install_msg`` key of the ``info.json`` file of each cog that contains any of the following:
- Heavy memory or I/O usage.
- Any NSFW material.
- Bundled data.
- Stored data (outside of using Config).
- Interactions with outside services.
- Any extra setup instructions required.
- No cog breaks the Discord TOS.
- No cog conflicts with any core cogs (e.g., causing a core cog to fail to load) unless it is intended to replace that cog.
- Your repo shows an understanding of a range of common cog practices. This requirement exists to ensure QA can trust the safety and functionality of any future code you will create. This is handled on a case-by-case basis, however the following points should outline what we are looking to see:
- Cogs that are more than what is able to be run in a simple eval.
- Cogs that are more than just a simple API access request.
- Cogs that properly use Red utilities, including Config, checks, and any other utility functions.
- Cogs that 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.
*While we're looking for these things to qualify your code, you don't need to apply all of them in order to qualify.*
- Any unusable or broken commands or cogs are hidden.
- The default locale must be English.
- The main cog class and every command must have a doc-string.
- No cog allows for escalation of permissions. (e.g., sending a mass ping through the bot without having permission to do so)
- Respect the role hierarchy. Dont let a lower role have a way to grant a higher role.
- 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.
- Cogs use public methods of Red where possible.
- Use the proper method if one exists. (and ask for one if it doesn't exist)
- 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:
--------------------------------
Recommendations for Cog Creators
--------------------------------
The following is a list of recommendations for Cog Creators.
While not required for approved Cog Creators, they are still recommended in order to ensure consistency between repos.
- Cogs should follow a few naming conventions for consistency.
- Cog classes should be TitleCased, using alphabetic characters only.
- Commands should be lower case, using alphanumeric characters only.
- Cog modules should be lower case, using alphabetic characters only.
- If your cog uses logging:
- The namespace for logging should be: ``red.your_repo_name.cog_name``.
- Print statements are not a substitute for proper logging.
- If you use asyncio.create_task, your tasks should:
- Be cancelled on cog unload.
- Handle errors.
- | Event listeners should exit early if it is an event you don't need.
| This makes your events less expensive in terms of CPU time. Examples below:
- Checking that you are in a guild before interacting with config for an antispam command.
- Checking that you aren't reacting to a bot message (``not message.author.bot``) early on.
- Use .gitignore (or something else) to keep unwanted files out of your cog repo.
- Put a license on your cog repo.
- By default, in most jurisdictions, without a license that at least offers the code for use,
users cannot legally use your code.
- Use botwide features when they apply. Some examples of this:
- ``ctx.embed_color``
- ``bot.is_automod_immune``
- 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() <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,
a cog which logs command invocation errors could choose to ignore this
but a cog which takes actions based on messages should not.
- Respect settings when treating non-command messages as commands.
- Handle user data responsibly
- Don't do unexpected things with user data.
- Don't expose user data to additional audiences without permission.
- Don't collect data your cogs don't need.
- | Don't store data in unexpected locations.
| Utilize the cog data path, Config, or if you need something more
prompt the owner to provide it.
- Utilize the data deletion and statement APIs
- See `redbot.core.commands.Cog.red_delete_data_for_user()`
- | Make a statement about what data your cogs use with the module level
variable ``__red_end_user_data_statement__``.
| This should be a string containing a user friendly explanation of what data
your cog stores and why.
- Set contextual locales in events and other background tasks that use i18n APIs
- See `redbot.core.i18n.set_contextual_locales_from_guild()`
- Usage of i18n APIs within commands automatically has proper contextual locales set.
----------------------------
Perks of being a Cog Creator
----------------------------
- Added to a growing, curated list of approved repositories hosted on the `Red Index <https://index.discord.red/>`__.
- The Cog Creator role on the main Red Server and the Cog Support Server.
- Access to an additional testing channel and the #advanced-coding channel on the main Red Server.
- Write permission in the #v3-burndown channel on the main Red Server.
- Access to an additional testing channel and the Cog Creators channel on the Support Server.
- Alerted about breaking changes in Red before anyone else.
- Ability to request a channel in the Cog Support Server if you feel like the traffic/question volume for your cogs warrants it.
-------------
Other Details
-------------
- Once a QA member has conducted a final review, you will have up to 14 days to make the necessary changes.
- The reviewer of your application has the final word.
- Hidden cogs will not be explicitly reviewed, however they are not allowed to contain malicious or ToS breaking code.
- QA reserves the right to revoke these roles and all privileges if you are found to be in gross negligence, malicious intent, or reckless abandonment of your repository.
- If a Cog Creator's repository is not maintained and kept up to date, that repo will be removed from the approved repo listings until such issues are addressed.
- 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

@@ -55,6 +55,9 @@ Keys common to both repo and cog info.json (case sensitive)
Keys specific to the cog info.json (case sensitive)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ``end_user_data_statement`` (string) - A statement explaining what end user data the cog is storing.
This is displayed when a user executes ``[p]cog info``. If the statement has changed since last update, user will be informed during the update.
- ``min_bot_version`` (string) - Min version number of Red in the format ``MAJOR.MINOR.MICRO``
- ``max_bot_version`` (string) - Max version number of Red in the format ``MAJOR.MINOR.MICRO``,
@@ -82,5 +85,13 @@ Keys specific to the cog info.json (case sensitive)
``SHARED_LIBRARY``. If ``SHARED_LIBRARY`` then ``hidden`` will be ``True``.
.. warning::
Shared libraries are deprecated since version 3.2 and are marked for removal in version 3.4.
Shared libraries are deprecated since version 3.2 and are marked for removal in the future.
Adding to the Index
-------------------
Repositories that are correctly configured can be added to the `public index of cogs <https://index.discord.red/>`_.
To be added to the index, make a pull request to the `Red-Index repository <https://github.com/Cog-Creators/Red-Index>`_ in the unapproved section. You can learn more about this process in the repository description.
To be added to the approved repositories, first see `guide_cog_creators`.

View File

@@ -0,0 +1,178 @@
.. _guide_trivia_list_creation:
==========================
Trivia List Creation Guide
==========================
The Trivia cog allows you to create your own "trivia lists",
which are then processed in the cog - allowing you to create as
many questions as you'd like, with easy to use syntax.
---------------
Getting Started
---------------
Let's start off by creating a file named ``mytrivia.yaml``.
Our trivia list will be named after the file, so in this case,
it will be called ``mytrivia``.
------------
Author Field
------------
We should first include an ``AUTHOR`` field,
to let the user know who wrote the questions.
When the user starts the trivia, the author(s) will
be sent in the starting message (see below).
.. image:: .resources/trivia/trivia_author.png
The following should be placed at the top of your file, replacing "Red"
with your name:
.. code-block:: yaml
AUTHOR: Red
If there are multiple authors, we can separate them with commas.
.. code-block:: yaml
AUTHOR: Red, Rojo, Rouge
---------------------
Questions and Answers
---------------------
Writing questions and answers is simple. Once you've finished your
``AUTHOR`` field, you can move on to your questions just below.
Questions should consist of at least one answer, with other
possible answers included if necessary. You must put a colon at the end
of the question, for example:
.. code-block:: yaml
How many days are there in a regular year?:
Answers will follow below, each separated by a line break and with a
hyphen at the start of the line.
.. code-block:: yaml
How many days are there in a regular year?:
- 365
- three hundred and sixty five
It's always nice to include alternative answers if a question needs it.
We can add as many valid answers as we'd like below this question. Answers
are **NOT** case sensitive, so you don't need to worry about adding the same
answer multiple times in different casings.
There are multiple special characters in YAML, such as colons, hashtags, hyphens
and more. If these characters are included within our questions or answers,
you'll need to enclose the content with quotation marks.
.. code-block:: yaml
"Who is the #1 followed user on Twitter?":
If we didn't have these quotation marks, the question would not render.
.. code-block:: yaml
Who is the #1 followed user on Twitter?:
.. tip::
We can also include line breaks within our questions by using ``\n``, like
this for example:
.. code-block:: yaml
"My first line\nMy second line":
As you've added more questions, your file should look something like this:
.. code-block:: yaml
AUTHOR: Red
How many days are there in a regular year?:
- 365
- three hundred and sixty five
"Who is the #1 followed user on Twitter?":
- Barack Obama
- Obama
What is the only sea without any coasts?:
- Sargasso
- Sargasso Sea
Who won the Premier League in 2015?:
- Chelsea
- chelsea f.c.
How much money is a US Olympic gold medalist awarded?:
- $37,500
- 37,500
- 37.5k
- 37500
- $37500
You can keep adding questions until you are satisfied, and then you can upload and
play your very own trivia! See :ref:`[p]triviaset custom <trivia-command-triviaset-custom>` for more information.
Still stuck? Take a look at
`the core trivia lists <https://github.com/Cog-Creators/Red-DiscordBot/tree/V3/develop/redbot/cogs/trivia/data/lists>`_
for reference.
--------------------------
Optional: Custom Overrides
--------------------------
Once you've got the hang of the question-answer format,
you might want to add some custom overrides with the CONFIG key - in a similar way to the AUTHOR key.
These will override the settings set with :ref:`[p]triviaset <trivia-command-triviaset>`.
For example, with a trivia list which has questions that are quick to answer you could decrease the time limit
and require a higher score to win.
Here are all the overrides available:
.. code-block:: yaml
CONFIG:
bot_plays: true or false # bot gains points if no one answers correctly
delay: positive number # answer time limit (seconds), must be greater than or equal to 4
timeout: positive number # timeout for no responses (seconds), must be greater than delay
max_score: positive integer # points required to win
reveal_answer: true or false # reveal answer on timeout
payout_multiplier: non-negative number # payout multiplier
use_spoilers: true or false # use spoilers in answers
So, your final file might look something like this:
.. code-block:: yaml
AUTHOR: Red
CONFIG:
bot_plays: false
use_spoilers: true
delay: 20
payout_multiplier: 0.5
max_score: 20
How many days are there in a regular year?:
- 365
- three hundred and sixty five
"Who is the #1 followed user on Twitter?":
- Barack Obama
- Obama
What is the only sea without any coasts?:
- Sargasso
- Sargasso Sea
Who won the Premier League in 2015?:
- Chelsea
- chelsea f.c.
How much money is a US Olympic gold medallist awarded?:
- $37,500
- 37,500
- 37.5k
- 37500
- $37500

View File

@@ -2,89 +2,153 @@
.. _host-list:
=============
VPS providers
=============
===================
Hosting Information
===================
.. note::
This doc is written for the :ref:`hosting section <getting-started-hosting>`
of the :ref:`getting started <getting-started>` guide. Please take a look
if you don't know how to host Red on a VPS.
of the :ref:`getting started guide <getting-started>`. Please take a look
if you don't know how to host Red.
This is a list of the recommended VPS providers.
| For your instance of Red to stay online 24/7, it needs to be hosted on a dedicated system.
This page contains hosting related information and advice for beginners in
topics such as picking a provider.
First, we would like to make something clear:
.. warning::
Due to their inability to handle Red's data structure and meet the
conditions of being a supported platform; platforms such as Heroku,
Pterodactyl, repl.it, Termux and alike are **NOT** officially supported.
Docker support found in GitHub is also a work in progress and not ready
for daily use. Workarounds for getting Red running on those platforms
are imperfect due to Red's nature. You will not be able to receive
support if an issue occurs when hosting on any of these platforms.
------------------------------------
Hosting on a VPS or Dedicated Server
------------------------------------
| You can host Red in a VPS running Linux or Windows. Using a Linux VPS is the
recommended option. Dedicated servers also work but are overpowered and cost
ineffective unless one plans to run a very large bot or use their server for
more than just hosting Red. If you have already created an instance, Red can be moved to a different
server for hosting with a backup/restore process. More information and guidance
about this process is available in the `Red Support Server <https://discord.com/invite/red>`_.
.. warning::
Please be aware that a Linux server is controlled through a command line.
If you don't know Unix basics, please take a look at `this guide
<https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-basics>`_
from DigitalOcean which will introduce you to the Linux basics.
If you don't know Unix basics, please take a look at
`DigitalOcean's tutorial: An Introduction to Linux Basics
<https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-basics>`_.
-------------
Linux hosting
-------------
+------------------------------------+------------------------------------------------------+
|Link |Description |
+====================================+======================================================+
|`Scaleway |Incredibly cheap but powerful VPSes, owned by |
|<https://www.scaleway.com/>`_ |`<https://online.net/>`_, based in Europe. |
+------------------------------------+------------------------------------------------------+
|`DigitalOcean |US-based cheap VPSes. The gold standard. Locations |
|<https://www.digitalocean.com/>`_ |available world wide. |
+------------------------------------+------------------------------------------------------+
|`OVH <https://www.ovh.co.uk/>`_ |Cheap VPSes, used by many people. French and Canadian |
| |locations available. |
+------------------------------------+------------------------------------------------------+
|`Time4VPS |Cheap VPSes, seemingly based in Lithuania. |
|<https://www.time4vps.eu/>`_ | |
+------------------------------------+------------------------------------------------------+
|`Linode <https://www.linode.com/>`_ |More cheap VPSes! |
+------------------------------------+------------------------------------------------------+
|`Vultr <https://www.vultr.com/>`_ |US-based, DigitalOcean-like. |
+------------------------------------+------------------------------------------------------+
------
Others
------
+-------------------------------------+-----------------------------------------------------+
|Link | |
+=====================================+=====================================================+
|`AWS <https://aws.amazon.com/>`_ |Amazon Web Services. Free for a year (with certain |
| |limits), but very pricey after that. |
+-------------------------------------+-----------------------------------------------------+
|`Google Cloud |Same as AWS, but it's Google. |
|<https://cloud.google.com/compute/>`_| |
+-------------------------------------+-----------------------------------------------------+
|`Microsoft Azure |Same as AWS, but it's Microsoft. |
|<https://azure.microsoft.com>`_ | |
+-------------------------------------+-----------------------------------------------------+
|`Oracle Cloud |Same as AWS, but it's Oracle. |
|<https://oracle.com/cloud/>`_ | |
+-------------------------------------+-----------------------------------------------------+
|`LowEndBox <http://lowendbox.com/>`_ |A curator for lower specced servers. |
+-------------------------------------+-----------------------------------------------------+
------------
Self-hosting
Self Hosting
------------
You can always self-host on your own hardware.
A Raspberry Pi 3 will be more than sufficient for small to medium sized bots.
| It's possible to self host Red with your own hardware. A Raspberry Pi 3
will have enough computing capacity to handle a small to medium sized bot.
You can also host on your own computer or rack server. Any modern hardware
should work without issues. However, this option leaves you responsible for
keeping the bot online by paying for electricity costs and dealing with power outages.
For bigger bots, you can build your own server PC for usage, or buy a rack
server. Any modern hardware should work 100% fine.
-------------------
Choosing a Provider
-------------------
| The following are some common providers suitable for hosting Red. With
each having their pros and cons, this list is mainly intended to act as a
starting point. You should conduct your own research and come to
a conclusion depending on your needs and budget, taking into account
providers not listed here if desired. The key is the provider offering
an OS supported by Red.
.. tip::
You will have better results with Audio when the region in your Discord
server settings is closer to the bulk of the server's audience and
the location you picked for your Red host.
-----------------
Average Providers
-----------------
| `Scaleway <https://www.scaleway.com/>`_ is a VPS and dedicated server
provider French in origin with locations in Poland and Netherlands.
| `DigitalOcean <https://www.digitalocean.com/>`_ is a US based cloud services company
with locations available worldwide, the VPS service is provided under the brand name
"Droplet".
| `OVH <https://us.ovhcloud.com/vps/>`_ is a company focused on providing hosting
and cloud services with locations in Europe, North America and Asia Pacific.
| `Time4VPS <https://www.time4vps.eu/>`_ is a Lithuanian VPS provider mainly focused
on lower cost.
| `GalaxyGate <https://galaxygate.net/>`_ is a VPS and dedicated server provider
with a single location in New York.
| `Linode <https://www.linode.com/>`_ is a US based cloud services company similar
to DigitalOcean with locations available worldwide.
| `AWS Lightsail <https://aws.amazon.com/lightsail/>`_ is a VPS service from Amazon
Web Services priced lower than their enterprise offerings.
| `Vultr <https://www.vultr.com/>`_ is a US based provider of VPS and dedicated servers
with locations available worldwide.
| `Hetzner Online <https://www.hetzner.com/>`_ is a German VPS and dedicated server
provider with locations in Germany, US and Finland.
| `Contabo <https://contabo.com/>`_ is also a German VPS and dedicated server provider
with locations in Germany, Asia, Australia and the United States.
| `Ramnode <https://www.ramnode.com/>`_ is a US based VPS provider focused on
low to middle end VPS with locations in the US and Netherlands.
| `LowEndBox <http://lowendbox.com/>`_ is a website where hosting providers are
discussed and curated, often with lower costs and less known providers.
| `AlphaVps <https://alphavps.com>`_ is a Bulgaria VPS and dedicated server provider
with locations in Los Angeles, New York, England, Germany and Bulgaria.
--------------------
Higher End Providers
--------------------
| `AWS EC2 <https://aws.amazon.com/ec2/>`__ is the enterprise offering of Amazon Web Services.
A limited free plan is available for 12 months, after which a complex pricing model with
high costs take over.
| `Google Compute Engine <https://cloud.google.com/compute/>`__ is Google's EC2 competitor.
However, an always free plan with limited resources is offered.
| `Microsoft Azure VM <https://azure.microsoft.com/services/virtual-machines/>`__ is
Microsoft's EC2 competitor with lower costs than EC2 for Windows instances, but similar
otherwise.
| `Oracle Cloud Compute <https://www.oracle.com/cloud/compute/>`__ is Oracle's EC2
competitor. But an always free plan is available with slightly higher specifications
compared to that of Google Compute Engine.
------------
Free hosting
Free Hosting
------------
`Google Cloud Compute Free Tier <https://cloud.google.com/free/docs/gcp-free-tier>`_,
`Oracle Cloud Compute Always Free <https://oracle.com/cloud/free/#always-free>`_ and
`AWS EC2 Free Tier <https://aws.amazon.com/free/>`_ have free tier VPSes suitable for small bots.
AWS EC2 is not *always* free—it's a 12 month free trial.
Additionally, new Google Cloud customers get a $300 credit which is valid
for 12 months.
| `Google Compute Engine <https://cloud.google.com/free/docs/gcp-free-tier>`_,
`Oracle Cloud Compute <https://oracle.com/cloud/free/#always-free>`_ and
`AWS EC2 <https://aws.amazon.com/free/>`_ have free tier VPSes suitable for small bots.
Other than that... no. There is no good free VPS hoster, outside of
persuading somebody to host for you, which is incredibly unlikely.
| **Note:** The free tier offered by AWS for EC2 only lasts for 12 months, while
Oracle Cloud and Google Cloud offer always free tiers with limited resources.
| Additionally, new Google Cloud customers get a $300 credit which is valid for 3 months.
New Oracle Cloud customers also get $300 of free credit, but only valid for 30 days.
| Excluding the above, there is no recommended free VPS host. Persuasion of
another individual for hosting Red is an option, albeit low in success rate.

View File

@@ -12,12 +12,13 @@ Welcome to Red - Discord Bot's documentation!
:maxdepth: 1
:caption: Installation Guides:
install_windows
install_linux_mac
install_guides/index
bot_application_guide
update_red
about_venv
autostart_windows
autostart_mac
autostart_systemd
autostart_pm2
.. toctree::
:maxdepth: 2
@@ -25,12 +26,36 @@ Welcome to Red - Discord Bot's documentation!
cog_customcom
cog_permissions
guide_trivia_list_creation
.. toctree::
:maxdepth: 2
:caption: User guides:
getting_started
intents
cog_guides/admin
cog_guides/alias
cog_guides/bank
cog_guides/cleanup
cog_guides/cog_manager_ui
cog_guides/core
cog_guides/customcommands
cog_guides/dev
cog_guides/downloader
cog_guides/economy
cog_guides/filter
cog_guides/general
cog_guides/image
cog_guides/permissions
cog_guides/mod
cog_guides/modlog
cog_guides/mutes
cog_guides/reports
cog_guides/streams
cog_guides/trivia
cog_guides/warnings
red_core_data_statement
.. toctree::
:maxdepth: 2
@@ -39,6 +64,7 @@ Welcome to Red - Discord Bot's documentation!
guide_migration
guide_cog_creation
guide_publish_cogs
guide_cog_creators
framework_apikeys
framework_bank
framework_bot
@@ -54,19 +80,11 @@ Welcome to Red - Discord Bot's documentation!
framework_utils
version_guarantees
.. toctree::
:maxdepth: 2
:caption: Changelogs:
changelog_3_3_0
release_notes_3_2_0
changelog_3_2_0
changelog_3_1_0
.. toctree::
:maxdepth: 2
:caption: Others
changelog
host-list

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

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

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

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