mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
Compare commits
555 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7dee8d7963 | ||
|
|
0281d6c93e | ||
|
|
f4c8077268 | ||
|
|
7b8acd7ef6 | ||
|
|
6ee976c341 | ||
|
|
0b0b23b971 | ||
|
|
2b1e603124 | ||
|
|
dd61b669b0 | ||
|
|
57b76bc0d7 | ||
|
|
573e5c2b40 | ||
|
|
ad1e1aa2ba | ||
|
|
4242a7adf2 | ||
|
|
e03f97d1cd | ||
|
|
975c0007fe | ||
|
|
bef3aa5f69 | ||
|
|
cbf8247e6e | ||
|
|
23c86d7850 | ||
|
|
aa21091b84 | ||
|
|
72ec88aa3c | ||
|
|
b1f331e51f | ||
|
|
0c9c210dbb | ||
|
|
47d4675f52 | ||
|
|
80d0bab29a | ||
|
|
e61327a65c | ||
|
|
11ebd40dfa | ||
|
|
00e41d38f9 | ||
|
|
afb4f6079a | ||
|
|
97b467939c | ||
|
|
f54499eaba | ||
|
|
f8d6bbb0af | ||
|
|
24afd61a85 | ||
|
|
8e118733ea | ||
|
|
f01c0ec675 | ||
|
|
94d12cb45f | ||
|
|
e9ed52cf16 | ||
|
|
194dea545d | ||
|
|
59400204e8 | ||
|
|
1c863c7b3b | ||
|
|
ad9e00d1d9 | ||
|
|
463f0c5e6d | ||
|
|
e71312ede0 | ||
|
|
48d74712bc | ||
|
|
c3a493a500 | ||
|
|
4034ddd452 | ||
|
|
2ae1eb9ec9 | ||
|
|
0b390fe2f6 | ||
|
|
b2e7458353 | ||
|
|
6adb7e6de7 | ||
|
|
1756593785 | ||
|
|
c3b96b7a9e | ||
|
|
a26b9d6d3a | ||
|
|
76c2c75f2c | ||
|
|
afabc4769d | ||
|
|
b5e6231408 | ||
|
|
de1141af98 | ||
|
|
24cc3115fe | ||
|
|
a3e371e0ab | ||
|
|
bc76d53cd5 | ||
|
|
273ad147c8 | ||
|
|
3a81e8327f | ||
|
|
8c2976504a | ||
|
|
4c7a691ec9 | ||
|
|
f5011a90e1 | ||
|
|
0c83fcd495 | ||
|
|
293d8065ec | ||
|
|
a30f9ff7e6 | ||
|
|
edfb9ffe62 | ||
|
|
f5f684bad5 | ||
|
|
9dc7462d0f | ||
|
|
9345b691b3 | ||
|
|
185b607544 | ||
|
|
ff09713aad | ||
|
|
dbd71db6a8 | ||
|
|
409ece427f | ||
|
|
569840e9e6 | ||
|
|
a393a10ceb | ||
|
|
531b4fe357 | ||
|
|
47a267b38b | ||
|
|
d322d91a18 | ||
|
|
76abb7cab2 | ||
|
|
ecccea6781 | ||
|
|
da8cabaf50 | ||
|
|
3fd0afd87d | ||
|
|
fef3fc19ca | ||
|
|
8997bf6002 | ||
|
|
eb3267e332 | ||
|
|
ca84cc9c2a | ||
|
|
6c4a5e5407 | ||
|
|
7dfe24397e | ||
|
|
63359ce831 | ||
|
|
6b81d80588 | ||
|
|
97377a9f8d | ||
|
|
56377b0596 | ||
|
|
4d4cb14725 | ||
|
|
1132498f6c | ||
|
|
5069f464cc | ||
|
|
2157ed4f9b | ||
|
|
ef098c8d02 | ||
|
|
64deccff5f | ||
|
|
d844c6f1f8 | ||
|
|
9ef4271afa | ||
|
|
bb2e3687fc | ||
|
|
979a6aa9eb | ||
|
|
0747b92653 | ||
|
|
47cc879b80 | ||
|
|
b6471797cc | ||
|
|
742339a990 | ||
|
|
e8c89d4d08 | ||
|
|
483682dfb5 | ||
|
|
100de11ce6 | ||
|
|
dbb91dfce8 | ||
|
|
3ac2512c14 | ||
|
|
a06a704365 | ||
|
|
9e23c3a5b8 | ||
|
|
1248927fb6 | ||
|
|
93b51acf31 | ||
|
|
7e03756f06 | ||
|
|
d04cc36bc6 | ||
|
|
6fbcdfc74a | ||
|
|
7e05bec6a0 | ||
|
|
6f920daeed | ||
|
|
df7bbe5b55 | ||
|
|
8e1b906012 | ||
|
|
ba210bd08e | ||
|
|
d8e584b5e8 | ||
|
|
bad23a4a93 | ||
|
|
48cfde7b8c | ||
|
|
8ee3ac9352 | ||
|
|
9c85917dad | ||
|
|
fdcbe00143 | ||
|
|
7dff136937 | ||
|
|
49bf103891 | ||
|
|
41204ccf77 | ||
|
|
b1c3b37235 | ||
|
|
4dc7efab29 | ||
|
|
85cf0f52d9 | ||
|
|
8acc1c3e02 | ||
|
|
be5751a7ea | ||
|
|
30dc128c39 | ||
|
|
3b92c225ac | ||
|
|
9d04f17cd2 | ||
|
|
31700a226e | ||
|
|
dc94c96c9e | ||
|
|
10e09d6abc | ||
|
|
3abf4cac05 | ||
|
|
9b7aa17564 | ||
|
|
f47d1dffb3 | ||
|
|
edb3369169 | ||
|
|
e8ce3d8682 | ||
|
|
a59e73a605 | ||
|
|
69cf604e0e | ||
|
|
1ec95beb56 | ||
|
|
1262921b17 | ||
|
|
8dfa5c2a86 | ||
|
|
327f2fed50 | ||
|
|
6cd7a380f4 | ||
|
|
ecb60c0856 | ||
|
|
cbe50bf82e | ||
|
|
a2132ad0a5 | ||
|
|
2386b8363f | ||
|
|
7f820dab0c | ||
|
|
5893d590a7 | ||
|
|
59216e2632 | ||
|
|
31b975eecc | ||
|
|
2369017f6a | ||
|
|
91f19c7410 | ||
|
|
70ca8ff1f4 | ||
|
|
e7d7eba68f | ||
|
|
1d828c447c | ||
|
|
66fe981ea8 | ||
|
|
41d89c7b54 | ||
|
|
30d452b311 | ||
|
|
c52ef73097 | ||
|
|
d3310f80fa | ||
|
|
d7455ff568 | ||
|
|
b52f7ede46 | ||
|
|
1d654c2edc | ||
|
|
a04fb84ffd | ||
|
|
5f4b0e853e | ||
|
|
c541425b57 | ||
|
|
7b80043d19 | ||
|
|
b3fd90ae4c | ||
|
|
525c3885cd | ||
|
|
ba1bf23363 | ||
|
|
970f8a7a1e | ||
|
|
8996aee7fb | ||
|
|
af307377ad | ||
|
|
0cc9bccb86 | ||
|
|
2fe251ecf3 | ||
|
|
f1439a37c8 | ||
|
|
b7c710ac04 | ||
|
|
6a53d7dcd5 | ||
|
|
4edf975996 | ||
|
|
3de5b56216 | ||
|
|
226d8d734d | ||
|
|
6cef8408e8 | ||
|
|
2abafbcc10 | ||
|
|
db1892da65 | ||
|
|
5fecff0779 | ||
|
|
d8d4b4f15a | ||
|
|
c6551f4bcc | ||
|
|
ab8f00ae7b | ||
|
|
e2737a08d2 | ||
|
|
588fa19594 | ||
|
|
1ed64949aa | ||
|
|
0d284cabe9 | ||
|
|
e1f5d65d16 | ||
|
|
9681cac820 | ||
|
|
f48f0bd1d1 | ||
|
|
f98db62b69 | ||
|
|
f051eae92d | ||
|
|
eafbb06756 | ||
|
|
fa305cb060 | ||
|
|
64c72e79b5 | ||
|
|
c2da29c93e | ||
|
|
67f4dd5201 | ||
|
|
2c4bd38ba1 | ||
|
|
aa51fd9ad1 | ||
|
|
ccdd1ca892 | ||
|
|
030607fb04 | ||
|
|
896d5e9200 | ||
|
|
d47c91cca8 | ||
|
|
145b2e43ce | ||
|
|
533f036ed2 | ||
|
|
79d11e947c | ||
|
|
a70f444255 | ||
|
|
44e129bc66 | ||
|
|
c79d0d723e | ||
|
|
0a5aa94cde | ||
|
|
f06b734e15 | ||
|
|
b2e17775a0 | ||
|
|
469b2de391 | ||
|
|
d597c35fff | ||
|
|
6774801649 | ||
|
|
7c7e5edb19 | ||
|
|
2ab204438e | ||
|
|
8de6b97700 | ||
|
|
d9c46342d4 | ||
|
|
a89a27cadf | ||
|
|
9811e4e871 | ||
|
|
6c32ff58e4 | ||
|
|
7e7d5322b7 | ||
|
|
e0c335eda2 | ||
|
|
d0f22a7773 | ||
|
|
c390b89bd2 | ||
|
|
2168585ee1 | ||
|
|
794d486bc0 | ||
|
|
0358aabd1f | ||
|
|
a13870b45f | ||
|
|
eda1288bea | ||
|
|
f13d910f66 | ||
|
|
b493103dcb | ||
|
|
7db635a05b | ||
|
|
b98156c589 | ||
|
|
82e92a8dc3 | ||
|
|
60a9d47003 | ||
|
|
88a348210c | ||
|
|
fa6b2f8c10 | ||
|
|
519acedf46 | ||
|
|
d3308af0e2 | ||
|
|
9b1171ea8c | ||
|
|
0e97c26b2d | ||
|
|
19ebd02595 | ||
|
|
99479342ea | ||
|
|
abb0101420 | ||
|
|
d9dd37b867 | ||
|
|
1ab303bce7 | ||
|
|
43ab6e2ef5 | ||
|
|
14f142da2b | ||
|
|
f890f65c35 | ||
|
|
7af2ed13ec | ||
|
|
e88884edb6 | ||
|
|
f02491a092 | ||
|
|
e8c044a9bf | ||
|
|
0e58897bfc | ||
|
|
9bfc3ecbce | ||
|
|
1c7178a10b | ||
|
|
3cb17116be | ||
|
|
eb613ea154 | ||
|
|
4dd496c67f | ||
|
|
333e359bbb | ||
|
|
fb3dc51fe2 | ||
|
|
f7c14b4321 | ||
|
|
72172ff1cb | ||
|
|
b018a76b61 | ||
|
|
bbb15924b9 | ||
|
|
6c8b6eb71c | ||
|
|
ed4f36a529 | ||
|
|
1fbd6d854b | ||
|
|
66f906c274 | ||
|
|
4574f13ad5 | ||
|
|
0580213cb6 | ||
|
|
6023f9015c | ||
|
|
d5cdebcd76 | ||
|
|
e864924acb | ||
|
|
86aed37769 | ||
|
|
51fa3f502e | ||
|
|
0f20f15c26 | ||
|
|
3f749b840f | ||
|
|
6cda937ec2 | ||
|
|
0c35c9686b | ||
|
|
236a10c464 | ||
|
|
236d30f335 | ||
|
|
115083b18b | ||
|
|
85288c1d06 | ||
|
|
cc5c31999d | ||
|
|
16465c8d83 | ||
|
|
86aff952f0 | ||
|
|
3be22b683c | ||
|
|
a90974d659 | ||
|
|
86c6f199b3 | ||
|
|
a3de616e4d | ||
|
|
a82c08c9d3 | ||
|
|
fcbe37b956 | ||
|
|
1cb5836db4 | ||
|
|
64e6044aba | ||
|
|
501c2b97dd | ||
|
|
b0a3f00f41 | ||
|
|
aaeb1b5daa | ||
|
|
4158244117 | ||
|
|
76c0ee243e | ||
|
|
f8b0cc6c6a | ||
|
|
7ff89302b2 | ||
|
|
1241ea165c | ||
|
|
f02528378f | ||
|
|
d7d6ab46f4 | ||
|
|
9d820234bb | ||
|
|
cadcffbae5 | ||
|
|
6f04698013 | ||
|
|
d07eb0f7b2 | ||
|
|
008fb0f042 | ||
|
|
a32f10d758 | ||
|
|
4daf81aa5b | ||
|
|
87a9c10369 | ||
|
|
4d1381d7c9 | ||
|
|
fb5f9b6498 | ||
|
|
6ced7ba945 | ||
|
|
7429b4ff89 | ||
|
|
a0f72ed7dd | ||
|
|
ae80e62a13 | ||
|
|
febc503df1 | ||
|
|
ccec53eef3 | ||
|
|
9455ccabfa | ||
|
|
0cc964b87c | ||
|
|
cc4ccd8414 | ||
|
|
68557336da | ||
|
|
7a41becbde | ||
|
|
c00f8b3aab | ||
|
|
9c11e85bb4 | ||
|
|
5522f909bd | ||
|
|
1fd9324171 | ||
|
|
4580a13e98 | ||
|
|
485e6837ca | ||
|
|
cc3c1a6a95 | ||
|
|
9d50a851eb | ||
|
|
ee69f6e17f | ||
|
|
22ede49462 | ||
|
|
e93057093e | ||
|
|
cf85a6470f | ||
|
|
9cdcf07773 | ||
|
|
6bb11ad227 | ||
|
|
3f1d02598e | ||
|
|
53bf387f01 | ||
|
|
1e8f4fc2a2 | ||
|
|
e36d1bccbf | ||
|
|
d13d02ebfc | ||
|
|
1cf497b128 | ||
|
|
acdc1df084 | ||
|
|
ec55622418 | ||
|
|
23023da09c | ||
|
|
60b495091a | ||
|
|
22df591db2 | ||
|
|
27bed5010f | ||
|
|
955b40ac6d | ||
|
|
96e8d8cdf5 | ||
|
|
6cb2378e2e | ||
|
|
02c0328002 | ||
|
|
61c73f2f1f | ||
|
|
841b922e9c | ||
|
|
56c9241de4 | ||
|
|
c9f1a45854 | ||
|
|
bc9f34c04b | ||
|
|
88d2cb3976 | ||
|
|
0b8dec77c3 | ||
|
|
2995a457f6 | ||
|
|
35f1681dc1 | ||
|
|
febca8ccbb | ||
|
|
c9a0971945 | ||
|
|
78e64ec559 | ||
|
|
d932abad16 | ||
|
|
67e43eb00b | ||
|
|
d8e20afa1d | ||
|
|
511de5163f | ||
|
|
9ec85d4819 | ||
|
|
5a5b22003f | ||
|
|
c69e8d31fd | ||
|
|
f6d9632c8f | ||
|
|
d87199779e | ||
|
|
ed4f2cf466 | ||
|
|
7a5ada2d92 | ||
|
|
aa55b08a0a | ||
|
|
0f299ae195 | ||
|
|
f763d29fd4 | ||
|
|
335988c916 | ||
|
|
c8ff3c4cce | ||
|
|
193cb3b035 | ||
|
|
2d9548ec0e | ||
|
|
593eeb5362 | ||
|
|
7d716a2d67 | ||
|
|
02f1ad919d | ||
|
|
58d8cb4d1f | ||
|
|
2ee64618af | ||
|
|
a6590b0380 | ||
|
|
50f3168b14 | ||
|
|
299a537f84 | ||
|
|
eeffbf8231 | ||
|
|
0338e8e0a8 | ||
|
|
78dc1d4cd8 | ||
|
|
8d46568180 | ||
|
|
b0ab6186ef | ||
|
|
9baf9ba546 | ||
|
|
669f3e3073 | ||
|
|
c6517d5087 | ||
|
|
9ab307c1ef | ||
|
|
e33985f969 | ||
|
|
b05933274a | ||
|
|
05cd11b657 | ||
|
|
de53d15cf8 | ||
|
|
cfa8f15faa | ||
|
|
6ff844e605 | ||
|
|
fbe378657c | ||
|
|
a4ba249e27 | ||
|
|
1ecbe6cebb | ||
|
|
a787033e1d | ||
|
|
8cc004f70f | ||
|
|
ff7c146b62 | ||
|
|
faab711ec8 | ||
|
|
c49d0ec9d3 | ||
|
|
337f58f9fb | ||
|
|
dce2378806 | ||
|
|
9c05db1104 | ||
|
|
90406be9ea | ||
|
|
d1df27bc14 | ||
|
|
e5b8fc4585 | ||
|
|
db0f4ce44d | ||
|
|
5a047bf979 | ||
|
|
6297bfcab6 | ||
|
|
d27dbded8a | ||
|
|
a228a0d0b3 | ||
|
|
7db3339aba | ||
|
|
b091f13df5 | ||
|
|
e878483318 | ||
|
|
551e6d9f55 | ||
|
|
cef55459c6 | ||
|
|
5e527cb27d | ||
|
|
bae85c35c1 | ||
|
|
4e469ce15e | ||
|
|
e068294cc8 | ||
|
|
2c51182e8e | ||
|
|
442cad7917 | ||
|
|
e993e749ee | ||
|
|
bf0fab8575 | ||
|
|
0158dbab1d | ||
|
|
6acdcdeae9 | ||
|
|
fc560db72d | ||
|
|
4ec0d2bb01 | ||
|
|
78c92cc766 | ||
|
|
6c4e5af5ee | ||
|
|
3f4842603b | ||
|
|
f071ec09e2 | ||
|
|
483ef36d1b | ||
|
|
42293afd43 | ||
|
|
7abc9bdcf1 | ||
|
|
6db5c866af | ||
|
|
a70f0b7872 | ||
|
|
4348318fd1 | ||
|
|
b64ece3ee9 | ||
|
|
d56f31a708 | ||
|
|
67bcd72d9c | ||
|
|
1d34e9e47b | ||
|
|
9aee8ce28f | ||
|
|
17dc9e0c47 | ||
|
|
b8535ee53e | ||
|
|
4b70acb989 | ||
|
|
334cd4fa2a | ||
|
|
a8f35f762c | ||
|
|
6eb922e7d9 | ||
|
|
b4037a80d8 | ||
|
|
cb18a66336 | ||
|
|
cddd99eba7 | ||
|
|
92cabd134d | ||
|
|
2c8c97490b | ||
|
|
2ce8e65527 | ||
|
|
d69326b1fe | ||
|
|
cbbb9d9b9b | ||
|
|
b2e9b38a03 | ||
|
|
89e3a78ead | ||
|
|
eeed082542 | ||
|
|
e5b236fb1c | ||
|
|
63fd7cc95f | ||
|
|
33dddaf5b4 | ||
|
|
3254698c78 | ||
|
|
0dded8aa47 | ||
|
|
ed9bb77eec | ||
|
|
86649e897f | ||
|
|
d84c8efa34 | ||
|
|
a0a433b13d | ||
|
|
4366af6f6c | ||
|
|
42edb12b2e | ||
|
|
36ea867dcf | ||
|
|
cad7f400f9 | ||
|
|
6d40de8da3 | ||
|
|
8880251749 | ||
|
|
17d24b28f1 | ||
|
|
c4f8f65d4d | ||
|
|
4e2e4bfe6a | ||
|
|
f628093208 | ||
|
|
6f0a8b11d7 | ||
|
|
f6cf0d5670 | ||
|
|
8eac787f7b | ||
|
|
88abe469b6 | ||
|
|
b0f93a3ce1 | ||
|
|
f8664a4e8a | ||
|
|
6a8968e34d | ||
|
|
dbd25e92a1 | ||
|
|
c57ef4828e | ||
|
|
6bf85a42f8 | ||
|
|
d15011e2c5 | ||
|
|
f05debc923 | ||
|
|
b586c2f990 | ||
|
|
c34f1e2f01 | ||
|
|
299d6c57d9 | ||
|
|
173127e015 | ||
|
|
91ecd6560a | ||
|
|
7413e3c350 | ||
|
|
d13d6477c5 | ||
|
|
ee0627f41f | ||
|
|
ec5428f1e9 | ||
|
|
37c52d6066 | ||
|
|
48fa10343c | ||
|
|
43071e3fa2 | ||
|
|
80e7a70f9e | ||
|
|
11913806a4 | ||
|
|
f42d675ac0 | ||
|
|
e154a630df | ||
|
|
2b67b9d06d | ||
|
|
2ab46fbe41 | ||
|
|
49cc9374d4 | ||
|
|
ad6b8662b2 | ||
|
|
9d35df2048 | ||
|
|
ec26687e9e | ||
|
|
3b7f9e24b4 | ||
|
|
0fb7c8bdba | ||
|
|
34b912bc7c | ||
|
|
a9dc93cf81 |
40
.git-blame-ignore-revs
Normal file
40
.git-blame-ignore-revs
Normal file
@@ -0,0 +1,40 @@
|
||||
# Since version 2.23 (released in August 2019), git-blame has a feature
|
||||
# to ignore or bypass certain commits.
|
||||
#
|
||||
# This file contains a list of commits that are not likely what you
|
||||
# are looking for in a blame, such as mass reformatting or renaming.
|
||||
# You can set this file as a default ignore file for blame by running
|
||||
# the following command.
|
||||
#
|
||||
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
|
||||
# [V3] Update code standards (black code format pass) (#1650)
|
||||
b88b5a2601f56bda985729352d24842f087a8ade
|
||||
|
||||
# Black tests and setup.py (#1657)
|
||||
e01cdbb0912387749d9459e1d934f9ed393a9b51
|
||||
|
||||
# Black formatting for generate_strings.py and docs/conf.py (#1658)
|
||||
1ecaf6f8d5f2af731bec3eb6ad3a9721ab7a2812
|
||||
|
||||
# [V3 Travis] Update travis to not skip pipfile lock... (#1678)
|
||||
# additional black formatting pass to conform to black 18.5b
|
||||
d3f406a34a5cae6ea63664e76e8e74be43f9949f
|
||||
|
||||
# [V3] Update black version and reformat (#1745)
|
||||
14cc701b25cea385fd0d537cdb6475d341c017c5
|
||||
|
||||
# [V3] Clean up some ugly auto-formatted strings (#1753)
|
||||
622382f42588ac1d8a52bd3e39bf171c89ff0224
|
||||
|
||||
# [CI] Improve automated checks (#2702)
|
||||
16443c8cc0c24cbc5b3dc7de858edb71b9ca6cd3
|
||||
|
||||
# Bump black to 20.8b1 (and reformat) (#4371)
|
||||
85afe19455f91af21a0f603705eeb5d9599b45cc
|
||||
|
||||
# Reformat with Black 22.1.0 (#5633)
|
||||
c69e8d31fdadbe10230ec0ea2ef35402e5c4cf43
|
||||
|
||||
# Reformat with Black 2023 formatting changes
|
||||
226d8d734de43e1d5ea96a528a8e480641604db1
|
||||
2
.git_archive_info.txt
Normal file
2
.git_archive_info.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
$Format:%h$
|
||||
$Format:%(describe:tags=true)$
|
||||
7
.gitattributes
vendored
7
.gitattributes
vendored
@@ -2,3 +2,10 @@
|
||||
|
||||
# binary file excludsions
|
||||
*.png binary
|
||||
|
||||
# include commit/tag information in `.git_archive_info.txt` when packing with git-archive
|
||||
.git_archive_info.txt export-subst
|
||||
|
||||
# hide diffs for .po files by default
|
||||
# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github
|
||||
*.po linguist-generated
|
||||
|
||||
15
.github/CODEOWNERS
vendored
15
.github/CODEOWNERS
vendored
@@ -1,18 +1,25 @@
|
||||
# Cogs
|
||||
/redbot/cogs/audio/** @aikaterna @PredaaA
|
||||
/redbot/cogs/downloader/* @jack1142
|
||||
/redbot/cogs/downloader/* @Jackenmen
|
||||
/redbot/cogs/streams/* @palmtree5
|
||||
/redbot/cogs/mutes/* @TrustyJAID
|
||||
|
||||
# Docs - Install and update guides
|
||||
/docs/install_guides/** @Jackenmen
|
||||
/docs/update_red.rst @Jackenmen
|
||||
|
||||
# Docs - Version guarantees
|
||||
/docs/version_guarantees.rst @Jackenmen
|
||||
|
||||
# Trivia Lists
|
||||
/redbot/cogs/trivia/data/lists/whosthatpokemon*.yaml @aikaterna
|
||||
|
||||
# Tests
|
||||
/redbot/pytest/downloader* @jack1142
|
||||
/tests/cogs/downloader/* @jack1142
|
||||
/redbot/pytest/downloader* @Jackenmen
|
||||
/tests/cogs/downloader/* @Jackenmen
|
||||
|
||||
# Schemas
|
||||
/schema/* @jack1142
|
||||
/schema/* @Jackenmen
|
||||
|
||||
# CI
|
||||
/.travis.yml @Kowlin
|
||||
|
||||
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1 +1,17 @@
|
||||
### Description of the changes
|
||||
|
||||
|
||||
|
||||
### Have the changes in this PR been tested?
|
||||
|
||||
<!--
|
||||
Choose one (remove the line that doesn't apply):
|
||||
-->
|
||||
Yes
|
||||
No
|
||||
<!--
|
||||
If the question doesn't apply (for example, it's not a code change), choose Yes.
|
||||
|
||||
Please respond to this question truthfully. We do not delay nor reject PRs
|
||||
based on the answer to this question but it allows to better review this PR.
|
||||
-->
|
||||
|
||||
403
.github/labeler.yml
vendored
403
.github/labeler.yml
vendored
@@ -1,189 +1,328 @@
|
||||
"Category: Admin":
|
||||
"Category: CI":
|
||||
- .github/workflows/**/*
|
||||
|
||||
|
||||
"Category: Cogs - Admin":
|
||||
# Source
|
||||
- redbot/cogs/admin/*
|
||||
# Docs
|
||||
- docs/cog_guides/admin.rst
|
||||
"Category: Alias":
|
||||
- docs/.resources/admin/**/*
|
||||
"Category: Cogs - Alias":
|
||||
# Source
|
||||
- redbot/cogs/alias/*
|
||||
# Docs
|
||||
- docs/cog_guides/alias.rst
|
||||
"Category: Audio Cog":
|
||||
# Tests
|
||||
- redbot/pytest/alias.py
|
||||
- tests/cogs/test_alias.py
|
||||
- docs/.resources/alias/**/*
|
||||
"Category: Cogs - Audio":
|
||||
# Source
|
||||
- any:
|
||||
- redbot/cogs/audio/**/*
|
||||
all:
|
||||
- "!redbot/cogs/audio/**/locales/*"
|
||||
"Category: Bank API":
|
||||
# Source
|
||||
- redbot/core/bank.py
|
||||
# Docs
|
||||
- docs/framework_bank.rst
|
||||
"Category: Bank Cog":
|
||||
# Source
|
||||
- redbot/cogs/bank/*
|
||||
# Docs
|
||||
- docs/cog_guides/bank.rst
|
||||
"Category: Bot Core":
|
||||
# Source
|
||||
- redbot/*
|
||||
- redbot/core/__init__.py
|
||||
- redbot/core/_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":
|
||||
- docs/cog_guides/audio.rst
|
||||
# Tests
|
||||
- tests/cogs/audio/**/*
|
||||
"Category: Cogs - Bank": [] # historical label for a removed cog
|
||||
"Category: Cogs - Cleanup":
|
||||
# Source
|
||||
- redbot/cogs/cleanup/*
|
||||
# Docs
|
||||
- docs/cog_guides/cleanup.rst
|
||||
"Category: Command Module":
|
||||
# Source
|
||||
- any:
|
||||
# Source
|
||||
- redbot/core/commands/*
|
||||
# Docs
|
||||
- docs/framework_checks.rst
|
||||
- docs/framework_commands.rst
|
||||
all:
|
||||
- "!redbot/core/commands/help.py"
|
||||
"Category: Config":
|
||||
# Source
|
||||
- redbot/core/drivers/*
|
||||
- redbot/core/config.py
|
||||
# Docs
|
||||
- docs/framework_config.rst
|
||||
"Category: CustomCom":
|
||||
"Category: Cogs - CustomCommands":
|
||||
# Source
|
||||
- redbot/cogs/customcom/*
|
||||
# Docs
|
||||
- docs/cog_customcom.rst
|
||||
- docs/cog_guides/customcommands.rst
|
||||
"Category: Dev Cog":
|
||||
"Category: Cogs - Dev":
|
||||
# Source
|
||||
- redbot/core/dev_commands.py
|
||||
# Docs
|
||||
- docs/cog_guides/dev.rst
|
||||
"Category: Docs":
|
||||
- docs/**/*
|
||||
"Category: Downloader":
|
||||
# Tests
|
||||
- tests/core/test_dev_commands.py
|
||||
"Category: Cogs - Downloader":
|
||||
# Source
|
||||
- redbot/cogs/downloader/*
|
||||
# Docs
|
||||
- docs/cog_guides/downloader.rst
|
||||
"Category: Economy Cog":
|
||||
# Tests
|
||||
- redbot/pytest/downloader.py
|
||||
- redbot/pytest/downloader_testrepo.*
|
||||
- tests/cogs/downloader/**/*
|
||||
"Category: Cogs - Economy":
|
||||
# Source
|
||||
- redbot/cogs/economy/*
|
||||
# Docs
|
||||
- docs/cog_guides/economy.rst
|
||||
"Category: Filter":
|
||||
# Tests
|
||||
- redbot/pytest/economy.py
|
||||
- tests/cogs/test_economy.py
|
||||
"Category: Cogs - Filter":
|
||||
# Source
|
||||
- redbot/cogs/filter/*
|
||||
# Docs
|
||||
- docs/cog_guides/filter.rst
|
||||
"Category: General Cog":
|
||||
"Category: Cogs - General":
|
||||
# Source
|
||||
- redbot/cogs/general/*
|
||||
# Docs
|
||||
- docs/cog_guides/general.rst
|
||||
"Category: Help":
|
||||
"Category: Cogs - Image":
|
||||
# Source
|
||||
- redbot/cogs/image/*
|
||||
# Docs
|
||||
- docs/cog_guides/image.rst
|
||||
"Category: Cogs - Mod":
|
||||
# Source
|
||||
- redbot/cogs/mod/*
|
||||
# Docs
|
||||
- docs/cog_guides/mod.rst
|
||||
# Tests
|
||||
- redbot/pytest/mod.py
|
||||
- tests/cogs/test_mod.py
|
||||
"Category: Cogs - Modlog":
|
||||
# Source
|
||||
- redbot/cogs/modlog/*
|
||||
# Docs
|
||||
- docs/cog_guides/modlog.rst
|
||||
"Category: Cogs - Mutes":
|
||||
# Source
|
||||
- redbot/cogs/mutes/*
|
||||
# Docs
|
||||
- docs/cog_guides/mutes.rst
|
||||
"Category: Cogs - Permissions":
|
||||
# Source
|
||||
- redbot/cogs/permissions/*
|
||||
# Docs
|
||||
- docs/cog_guides/permissions.rst
|
||||
- docs/cog_permissions.rst
|
||||
# Tests
|
||||
- redbot/pytest/permissions.py
|
||||
- tests/cogs/test_permissions.py
|
||||
"Category: Cogs - Reports":
|
||||
# Source
|
||||
- redbot/cogs/reports/*
|
||||
# Docs
|
||||
- docs/cog_guides/reports.rst
|
||||
"Category: Cogs - Streams":
|
||||
# Source
|
||||
- redbot/cogs/streams/*
|
||||
# Docs
|
||||
- docs/cog_guides/streams.rst
|
||||
"Category: Cogs - Trivia":
|
||||
# Source
|
||||
- redbot/cogs/trivia/*
|
||||
# Docs
|
||||
- docs/cog_guides/trivia.rst
|
||||
- docs/guide_trivia_list_creation.rst
|
||||
- docs/.resources/trivia/**/*
|
||||
# Tests
|
||||
- tests/cogs/test_trivia.py
|
||||
"Category: Cogs - Trivia - Lists":
|
||||
- redbot/cogs/trivia/data/lists/*
|
||||
"Category: Cogs - Warnings":
|
||||
# Source
|
||||
- redbot/cogs/warnings/*
|
||||
# Docs
|
||||
- docs/cog_guides/warnings.rst
|
||||
|
||||
|
||||
"Category: Core - API - Audio": [] # potential future feature
|
||||
"Category: Core - API - Bank":
|
||||
# Source
|
||||
- redbot/core/bank.py
|
||||
# Docs
|
||||
- docs/framework_bank.rst
|
||||
"Category: Core - API - App Commands Package":
|
||||
# Source
|
||||
- redbot/core/app_commands/*
|
||||
# Tests
|
||||
- tests/core/test_app_commands.py
|
||||
"Category: Core - API - Commands Package":
|
||||
# Source
|
||||
- any:
|
||||
- redbot/core/commands/*
|
||||
- "!redbot/core/commands/help.py"
|
||||
# this isn't in commands package but it just re-exports things from it
|
||||
- redbot/core/checks.py
|
||||
# Docs
|
||||
- docs/framework_checks.rst
|
||||
- docs/framework_commands.rst
|
||||
# Tests
|
||||
- tests/core/test_commands.py
|
||||
"Category: Core - API - Config":
|
||||
# Source
|
||||
- any:
|
||||
- redbot/core/_drivers/**/*
|
||||
- "!redbot/core/_drivers/**/locales/*"
|
||||
- redbot/core/config.py
|
||||
# Docs
|
||||
- docs/framework_config.rst
|
||||
# Tests
|
||||
- tests/core/test_config.py
|
||||
"Category: Core - API - Other":
|
||||
# Source
|
||||
- redbot/__init__.py
|
||||
- redbot/core/__init__.py
|
||||
- redbot/core/data_manager.py
|
||||
- redbot/core/errors.py
|
||||
- redbot/core/tree.py
|
||||
# Docs
|
||||
- docs/framework_datamanager.rst
|
||||
- docs/framework_tree.rst
|
||||
# Tests
|
||||
- redbot/pytest/data_manager.py
|
||||
- tests/core/test_cog_manager.py
|
||||
- tests/core/test_data_manager.py
|
||||
- tests/core/test_version.py
|
||||
"Category: Core - API - Utils Package":
|
||||
# Source
|
||||
- any:
|
||||
- redbot/core/utils/*
|
||||
- "!redbot/core/utils/_internal_utils.py"
|
||||
# Docs
|
||||
- docs/framework_utils.rst
|
||||
# Tests
|
||||
- tests/core/test_utils.py
|
||||
"Category: Core - Bot Class":
|
||||
# Source
|
||||
- redbot/core/bot.py
|
||||
# Docs
|
||||
- docs/framework_apikeys.rst
|
||||
- docs/framework_bot.rst
|
||||
"Category: Core - Bot Commands":
|
||||
# Source
|
||||
- redbot/core/core_commands.py
|
||||
- redbot/core/_diagnoser.py
|
||||
# Docs
|
||||
- docs/.resources/cog_manager_ui/**/*
|
||||
- docs/cog_guides/cog_manager_ui.rst
|
||||
- docs/cog_guides/core.rst
|
||||
"Category: Core - Command-line Interfaces":
|
||||
- redbot/__main__.py
|
||||
- redbot/logging.py
|
||||
- redbot/core/_cli.py
|
||||
- redbot/core/_debuginfo.py
|
||||
- redbot/setup.py
|
||||
"Category: Core - Help":
|
||||
- redbot/core/commands/help.py
|
||||
"Category: i18n":
|
||||
"Category: Core - 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":
|
||||
"Category: Core - Modlog":
|
||||
# Source
|
||||
- redbot/core/generic_casetypes.py
|
||||
- redbot/core/modlog.py
|
||||
# Docs
|
||||
- docs/framework_modlog.rst
|
||||
"Category: Modlog Cog":
|
||||
"Category: Core - Other Internals":
|
||||
# Source
|
||||
- redbot/cogs/modlog/*
|
||||
# Docs
|
||||
- docs/cog_guides/modlog.rst
|
||||
"Category: Mutes Cog":
|
||||
- redbot/core/_cog_manager.py
|
||||
- redbot/core/_events.py
|
||||
- redbot/core/_global_checks.py
|
||||
- redbot/core/_settings_caches.py
|
||||
- redbot/core/_sharedlibdeprecation.py
|
||||
- redbot/core/utils/_internal_utils.py
|
||||
# Tests
|
||||
- redbot/pytest/__init__.py
|
||||
- redbot/pytest/cog_manager.py
|
||||
- redbot/pytest/core.py
|
||||
- tests/core/test_installation.py
|
||||
"Category: Core - RPC/ZMQ":
|
||||
# Source
|
||||
- redbot/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
|
||||
- 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
|
||||
# Tests
|
||||
- redbot/pytest/rpc.py
|
||||
- tests/core/test_rpc.py
|
||||
- tests/rpc_test.html
|
||||
|
||||
|
||||
"Category: Docker": [] # potential future feature
|
||||
|
||||
|
||||
"Category: Docs - Changelogs":
|
||||
- CHANGES.rst
|
||||
- docs/changelog.rst
|
||||
- docs/incompatible_changes/**/*
|
||||
"Category: Docs - For Developers":
|
||||
- docs/framework_events.rst
|
||||
- docs/guide_cog_creation.rst
|
||||
- docs/guide_cog_creators.rst
|
||||
- docs/guide_migration.rst
|
||||
- docs/guide_publish_cogs.rst
|
||||
- docs/guide_slash_and_interactions.rst
|
||||
"Category: Docs - Install Guides":
|
||||
- docs/about_venv.rst
|
||||
- docs/autostart_*.rst
|
||||
- docs/.resources/bot-guide/**/*
|
||||
- docs/bot_application_guide.rst
|
||||
- docs/install_guides/**/*
|
||||
- docs/update_red.rst
|
||||
"Category: Docs - Other":
|
||||
- docs/host-list.rst
|
||||
- docs/index.rst
|
||||
- docs/version_guarantees.rst
|
||||
- README.md
|
||||
"Category: Docs - User Guides":
|
||||
- docs/getting_started.rst
|
||||
- docs/intents.rst
|
||||
- docs/red_core_data_statement.rst
|
||||
# TODO: move these to `docs/.resources/getting_started` subfolder
|
||||
- docs/.resources/red-console.png
|
||||
- docs/.resources/code-grant.png
|
||||
- docs/.resources/instances-ssh-button.png
|
||||
- docs/.resources/ssh-output.png
|
||||
|
||||
|
||||
"Category: Meta":
|
||||
# top-level files
|
||||
- any:
|
||||
- '*'
|
||||
- '!README.md'
|
||||
- '!CHANGES.rst'
|
||||
# .gitattributes files
|
||||
- '**/.gitattributes'
|
||||
# GitHub configuration files, with the exception of CI configuration
|
||||
- .github/*
|
||||
- .github/ISSUE_TEMPLATE/*
|
||||
- .github/PULL_REQUEST_TEMPLATE/*
|
||||
# documentation configuration, extensions, scripts, templates, etc.
|
||||
- docs/conf.py
|
||||
- docs/_ext/**/*
|
||||
- docs/_html/**/*
|
||||
- docs/make.bat
|
||||
- docs/Makefile
|
||||
- docs/prolog.txt
|
||||
- docs/_templates/**/*
|
||||
# empty file
|
||||
- redbot/cogs/__init__.py
|
||||
# py.typed file
|
||||
- redbot/py.typed
|
||||
# requirements files
|
||||
- requirements/*
|
||||
# schema files
|
||||
- schema/*
|
||||
# tests configuration, global fixtures, etc.
|
||||
- tests/conftest.py
|
||||
- tests/__init__.py
|
||||
- tests/*/__init__.py
|
||||
# repository tools
|
||||
- tools/*
|
||||
|
||||
|
||||
# "Category: RPC/ZMQ methods": [] # can't be matched by file patterns
|
||||
|
||||
|
||||
"Category: Vendored Packages":
|
||||
- redbot/vendored/**/*
|
||||
|
||||
3
.github/workflows/auto_labeler_issues.yml
vendored
3
.github/workflows/auto_labeler_issues.yml
vendored
@@ -7,8 +7,7 @@ permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
apply_triage_label_to_issues:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Apply Triage Label
|
||||
|
||||
27
.github/workflows/auto_labeler_pr.yml
vendored
Normal file
27
.github/workflows/auto_labeler_pr.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Auto Labeler - PRs
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- labeled
|
||||
- unlabeled
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
label_pull_requests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Apply Type Label
|
||||
uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
sync-labels: true
|
||||
|
||||
- name: Label documentation-only changes.
|
||||
uses: Jackenmen/label-doconly-changes@v1
|
||||
env:
|
||||
LDC_LABELS: Docs-only
|
||||
23
.github/workflows/check_label_pattern_exhaustiveness.yaml
vendored
Normal file
23
.github/workflows/check_label_pattern_exhaustiveness.yaml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Check label pattern exhaustiveness
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
check_label_pattern_exhaustiveness:
|
||||
name: Check label pattern exhaustiveness
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- name: Install script's pre-requirements
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
python -m pip install -U pathspec pyyaml rich
|
||||
- name: Check label pattern exhaustiveness
|
||||
run: |
|
||||
python .github/workflows/scripts/check_label_pattern_exhaustiveness.py
|
||||
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U pip setuptools wheel
|
||||
python -m pip install -U pip wheel
|
||||
python -m pip install -e .[all]
|
||||
# Set the `CODEQL-PYTHON` environment variable to the Python executable
|
||||
# that includes the dependencies
|
||||
|
||||
8
.github/workflows/crowdin_upload_strings.yml
vendored
8
.github/workflows/crowdin_upload_strings.yml
vendored
@@ -19,8 +19,8 @@ jobs:
|
||||
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y crowdin
|
||||
pip install redgettext==3.3
|
||||
sudo apt-get install -y crowdin3
|
||||
pip install redgettext==3.4.2
|
||||
- name: Generate source files
|
||||
run: |
|
||||
make gettext
|
||||
@@ -28,5 +28,5 @@ jobs:
|
||||
run: |
|
||||
make upload_translations
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}
|
||||
|
||||
12
.github/workflows/prepare_release.yml
vendored
12
.github/workflows/prepare_release.yml
vendored
@@ -26,8 +26,8 @@ jobs:
|
||||
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y crowdin
|
||||
pip install redgettext==3.3
|
||||
sudo apt-get install -y crowdin3
|
||||
pip install redgettext==3.4.2
|
||||
|
||||
- name: Generate source files
|
||||
run: |
|
||||
@@ -36,8 +36,8 @@ jobs:
|
||||
run: |
|
||||
make download_translations
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}
|
||||
|
||||
- name: Create Pull Request
|
||||
id: cpr_crowdin
|
||||
@@ -45,11 +45,11 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Automated Crowdin downstream
|
||||
title: "[i18n] Automated Crowdin downstream"
|
||||
title: "Automated Crowdin downstream"
|
||||
body: |
|
||||
This is an automated PR that is part of Prepare Release automated workflow (2 out of 2).
|
||||
Please ensure that there are no errors or invalid files are in the PR.
|
||||
labels: "Automated PR, Category: i18n, Changelog Entry: Skipped"
|
||||
labels: "Automated PR, Changelog Entry: Skipped"
|
||||
branch: "automated/i18n"
|
||||
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||
milestone: ${{ needs.pr_stable_bump.outputs.milestone_number }}
|
||||
|
||||
2
.github/workflows/publish_release.yml
vendored
2
.github/workflows/publish_release.yml
vendored
@@ -2,7 +2,7 @@ name: Publish Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
- "3.[0-9]+.[0-9]+"
|
||||
|
||||
jobs:
|
||||
release_information:
|
||||
|
||||
99
.github/workflows/run_pip_compile.yaml
vendored
Normal file
99
.github/workflows/run_pip_compile.yaml
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
name: Generate requirements files with pip-compile.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
generate_requirements:
|
||||
name: Generate requirements files for ${{ matrix.os }} platform.
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Checkout the repository.
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.8.
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: |
|
||||
3.11
|
||||
3.10
|
||||
3.9
|
||||
3.8
|
||||
|
||||
- name: Install dependencies on Linux/macOS
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: |
|
||||
python3.11 -m pip install -U pip pip-tools
|
||||
python3.10 -m pip install -U pip pip-tools
|
||||
python3.9 -m pip install -U pip pip-tools
|
||||
python3.8 -m pip install -U pip pip-tools
|
||||
|
||||
- name: Install dependencies on Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
py -3.11 -m pip install -U pip pip-tools
|
||||
py -3.10 -m pip install -U pip pip-tools
|
||||
py -3.9 -m pip install -U pip pip-tools
|
||||
py -3.8 -m pip install -U pip pip-tools
|
||||
|
||||
- name: Generate requirements files.
|
||||
id: compile_requirements
|
||||
run: |
|
||||
python .github/workflows/scripts/compile_requirements.py
|
||||
|
||||
- name: Upload requirements files.
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.compile_requirements.outputs.sys_platform }}
|
||||
path: requirements/${{ steps.compile_requirements.outputs.sys_platform }}-*.txt
|
||||
|
||||
merge_requirements:
|
||||
name: Merge requirements files.
|
||||
needs: generate_requirements
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository.
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python 3.8.
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U "packaging>=22.0"
|
||||
|
||||
- name: Download Windows requirements.
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: win32
|
||||
path: requirements
|
||||
- name: Download Linux requirements.
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: linux
|
||||
path: requirements
|
||||
- name: Download macOS requirements.
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: darwin
|
||||
path: requirements
|
||||
|
||||
- name: Merge requirements files.
|
||||
run: |
|
||||
python .github/workflows/scripts/merge_requirements.py
|
||||
|
||||
- name: Upload merged requirements files.
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: merged
|
||||
path: |
|
||||
requirements/base.txt
|
||||
requirements/extra-*.txt
|
||||
21
.github/workflows/scripts/bump_version.py
vendored
21
.github/workflows/scripts/bump_version.py
vendored
@@ -1,13 +1,20 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from typing import Match
|
||||
from typing import Any, Match
|
||||
|
||||
import redbot
|
||||
|
||||
GITHUB_OUTPUT = os.environ["GITHUB_OUTPUT"]
|
||||
|
||||
|
||||
def set_output(name: str, value: Any) -> None:
|
||||
with open(GITHUB_OUTPUT, "a", encoding="utf-8") as fp:
|
||||
fp.write(f"{name}={value}\n")
|
||||
|
||||
|
||||
if int(os.environ.get("JUST_RETURN_VERSION", 0)):
|
||||
print(f"::set-output name=version::{redbot.__version__}")
|
||||
set_output("version", redbot._VERSION)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
@@ -17,7 +24,7 @@ version_info = None
|
||||
def repl(match: Match[str]) -> str:
|
||||
global version_info
|
||||
|
||||
print(f"::set-output name=old_version::{match.group('version')}")
|
||||
set_output("old_version", match.group("version"))
|
||||
|
||||
new_stable_version = os.environ.get("NEW_STABLE_VERSION", "auto")
|
||||
if new_stable_version == "auto":
|
||||
@@ -30,12 +37,12 @@ def repl(match: Match[str]) -> str:
|
||||
version_info.micro += 1
|
||||
version_info.dev_release = 1
|
||||
|
||||
return f'__version__ = "{version_info}"'
|
||||
return f'_VERSION = "{version_info}"'
|
||||
|
||||
|
||||
with open("redbot/__init__.py", encoding="utf-8") as fp:
|
||||
new_contents, found = re.subn(
|
||||
pattern=r'^__version__ = "(?P<version>[^"]*)"$',
|
||||
pattern=r'^_VERSION = "(?P<version>[^"]*)"$',
|
||||
repl=repl,
|
||||
string=fp.read(),
|
||||
count=1,
|
||||
@@ -43,10 +50,10 @@ with open("redbot/__init__.py", encoding="utf-8") as fp:
|
||||
)
|
||||
|
||||
if not found:
|
||||
print("Couldn't find `__version__` line!")
|
||||
print("Couldn't find `_VERSION` line!")
|
||||
sys.exit(1)
|
||||
|
||||
with open("redbot/__init__.py", "w", encoding="utf-8", newline="\n") as fp:
|
||||
fp.write(new_contents)
|
||||
|
||||
print(f"::set-output name=new_version::{version_info}")
|
||||
set_output("new_version", version_info)
|
||||
|
||||
215
.github/workflows/scripts/check_label_pattern_exhaustiveness.py
vendored
Normal file
215
.github/workflows/scripts/check_label_pattern_exhaustiveness.py
vendored
Normal file
@@ -0,0 +1,215 @@
|
||||
import itertools
|
||||
import operator
|
||||
import os
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, Iterable, List, Optional
|
||||
from typing_extensions import Self
|
||||
|
||||
import rich
|
||||
import yaml
|
||||
from rich.console import Console, ConsoleOptions, RenderResult
|
||||
from rich.tree import Tree
|
||||
from pathspec import PathSpec
|
||||
from pathspec.patterns.gitwildmatch import GitWildMatchPattern
|
||||
|
||||
|
||||
ROOT_PATH = Path(__file__).resolve().parents[3]
|
||||
|
||||
|
||||
class Matcher:
|
||||
def __init__(self, *, any: Iterable[str] = (), all: Iterable[str] = ()) -> None:
|
||||
self.any_patterns = tuple(any)
|
||||
self.any_specs = self._get_pathspecs(self.any_patterns)
|
||||
self.all_patterns = tuple(all)
|
||||
self.all_specs = self._get_pathspecs(self.all_patterns)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"Matcher(any={self.any_patterns!r}, all={self.all_patterns!r})"
|
||||
|
||||
def __eq__(self, other: Any) -> bool:
|
||||
if isinstance(other, self.__class__):
|
||||
return (
|
||||
self.any_patterns == other.any_patterns and self.all_patterns == other.all_patterns
|
||||
)
|
||||
return NotImplemented
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash((self.any_patterns, self.all_patterns))
|
||||
|
||||
@classmethod
|
||||
def _get_pathspecs(cls, patterns: Iterable[str]) -> List[PathSpec]:
|
||||
return tuple(
|
||||
PathSpec.from_lines(GitWildMatchPattern, cls._get_pattern_lines(pattern))
|
||||
for pattern in patterns
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _get_pattern_lines(pattern: str) -> List[str]:
|
||||
# an approximation of actions/labeler's minimatch globs
|
||||
if pattern.startswith("!"):
|
||||
pattern_lines = ["*", f"!/{pattern[1:]}"]
|
||||
else:
|
||||
pattern_lines = [f"/{pattern}"]
|
||||
if pattern.endswith("*") and "**" not in pattern:
|
||||
pattern_lines.append(f"!/{pattern}/")
|
||||
return pattern_lines
|
||||
|
||||
@classmethod
|
||||
def get_label_matchers(cls) -> Dict[str, List[Self]]:
|
||||
with open(ROOT_PATH / ".github/labeler.yml", encoding="utf-8") as fp:
|
||||
label_definitions = yaml.safe_load(fp)
|
||||
label_matchers: Dict[str, List[Matcher]] = {}
|
||||
for label_name, matcher_definitions in label_definitions.items():
|
||||
matchers = label_matchers[label_name] = []
|
||||
for idx, matcher_data in enumerate(matcher_definitions):
|
||||
if isinstance(matcher_data, str):
|
||||
matchers.append(cls(any=[matcher_data]))
|
||||
elif isinstance(matcher_data, dict):
|
||||
matchers.append(
|
||||
cls(any=matcher_data.pop("any", []), all=matcher_data.pop("all", []))
|
||||
)
|
||||
if matcher_data:
|
||||
raise RuntimeError(
|
||||
f"Unexpected keys at index {idx} for label {label_name!r}: "
|
||||
+ ", ".join(map(repr, matcher_data))
|
||||
)
|
||||
elif matcher_data is not None:
|
||||
raise RuntimeError(f"Unexpected type at index {idx} for label {label_name!r}")
|
||||
|
||||
return label_matchers
|
||||
|
||||
|
||||
class PathNode:
|
||||
def __init__(self, parent_tree: Tree, path: Path, *, label: Optional[str] = None) -> None:
|
||||
self.parent_tree = parent_tree
|
||||
self.path = path
|
||||
self.label = label
|
||||
|
||||
def __rich__(self) -> str:
|
||||
if self.label is not None:
|
||||
return self.label
|
||||
return self.path.name
|
||||
|
||||
|
||||
class DirectoryTree:
|
||||
def __init__(self, label: str) -> None:
|
||||
self.root = Tree(PathNode(Tree(""), Path(), label=label))
|
||||
self._previous = self.root
|
||||
|
||||
def __bool__(self) -> bool:
|
||||
return bool(self.root.children)
|
||||
|
||||
def __rich_console__(self, console: Console, options: ConsoleOptions) -> RenderResult:
|
||||
yield from self.root.__rich_console__(console, options)
|
||||
|
||||
def add(self, file: Path) -> Tree:
|
||||
common_path = Path(os.path.commonpath([file.parent, self._previous.label.path]))
|
||||
|
||||
parent_tree = self._previous
|
||||
while parent_tree != self.root and parent_tree.label.path != common_path:
|
||||
parent_tree = parent_tree.label.parent_tree
|
||||
|
||||
for part in file.relative_to(common_path).parts:
|
||||
if parent_tree.label.path.name == "locales":
|
||||
if not parent_tree.children:
|
||||
parent_tree.add(PathNode(parent_tree, parent_tree.label.path / "*.po"))
|
||||
continue
|
||||
parent_tree = parent_tree.add(PathNode(parent_tree, parent_tree.label.path / part))
|
||||
|
||||
self._previous = parent_tree
|
||||
return parent_tree
|
||||
|
||||
|
||||
class App:
|
||||
def __init__(self) -> None:
|
||||
self.exit_code = 0
|
||||
self.label_matchers = Matcher.get_label_matchers()
|
||||
self.tracked_files = [
|
||||
Path(filename)
|
||||
for filename in subprocess.check_output(
|
||||
("git", "ls-tree", "-r", "HEAD", "--name-only"), encoding="utf-8", cwd=ROOT_PATH
|
||||
).splitlines()
|
||||
]
|
||||
self.matches_per_label = {label_name: set() for label_name in self.label_matchers}
|
||||
self.matches_per_file = []
|
||||
self.used_matchers = set()
|
||||
|
||||
def run(self) -> int:
|
||||
old_cwd = os.getcwd()
|
||||
try:
|
||||
os.chdir(ROOT_PATH)
|
||||
self._run()
|
||||
finally:
|
||||
os.chdir(old_cwd)
|
||||
return self.exit_code
|
||||
|
||||
def _run(self) -> None:
|
||||
self._collect_match_information()
|
||||
self._show_matches_per_label()
|
||||
self._show_files_without_labels()
|
||||
self._show_files_with_multiple_labels()
|
||||
self._show_unused_matchers()
|
||||
|
||||
def _collect_match_information(self) -> None:
|
||||
tmp_matches_per_file = {file: [] for file in self.tracked_files}
|
||||
|
||||
for file in self.tracked_files:
|
||||
for label_name, matchers in self.label_matchers.items():
|
||||
matched = False
|
||||
for matcher in matchers:
|
||||
if all(
|
||||
path_spec.match_file(file)
|
||||
for path_spec in itertools.chain(matcher.all_specs, matcher.any_specs)
|
||||
):
|
||||
self.matches_per_label[label_name].add(file)
|
||||
matched = True
|
||||
self.used_matchers.add(matcher)
|
||||
if matched:
|
||||
tmp_matches_per_file[file].append(label_name)
|
||||
|
||||
self.matches_per_file = sorted(tmp_matches_per_file.items(), key=operator.itemgetter(0))
|
||||
|
||||
def _show_matches_per_label(self) -> None:
|
||||
for label_name, files in self.matches_per_label.items():
|
||||
top_tree = DirectoryTree(f"{label_name}:")
|
||||
for file in sorted(files):
|
||||
top_tree.add(file)
|
||||
rich.print(top_tree)
|
||||
print()
|
||||
|
||||
def _show_files_without_labels(self) -> None:
|
||||
top_tree = DirectoryTree("\n--- Not matched ---")
|
||||
for file, labels in self.matches_per_file:
|
||||
if not labels:
|
||||
top_tree.add(file)
|
||||
if top_tree:
|
||||
self.exit_code = 1
|
||||
rich.print(top_tree)
|
||||
else:
|
||||
print("--- All files match at least one label's patterns ---")
|
||||
|
||||
def _show_files_with_multiple_labels(self) -> None:
|
||||
top_tree = DirectoryTree("\n--- Matched by more than one label ---")
|
||||
for file, labels in self.matches_per_file:
|
||||
if len(labels) > 1:
|
||||
tree = top_tree.add(file)
|
||||
for label_name in labels:
|
||||
tree.add(label_name)
|
||||
if top_tree:
|
||||
rich.print(top_tree)
|
||||
else:
|
||||
print("--- None of the files are matched by more than one label's patterns ---")
|
||||
|
||||
def _show_unused_matchers(self) -> None:
|
||||
for label_name, matchers in self.label_matchers.items():
|
||||
for idx, matcher in enumerate(matchers):
|
||||
if matcher not in self.used_matchers:
|
||||
print(
|
||||
f"--- Matcher {idx} for label {label_name!r} does not match any files! ---"
|
||||
)
|
||||
self.exit_code = 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(App().run())
|
||||
45
.github/workflows/scripts/compile_requirements.py
vendored
Normal file
45
.github/workflows/scripts/compile_requirements.py
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
EXCLUDE_STEM_RE = re.compile(r".*-3\.(?!8-)(\d+)-extra-(doc|style)")
|
||||
GITHUB_OUTPUT = os.environ["GITHUB_OUTPUT"]
|
||||
REQUIREMENTS_FOLDER = Path(__file__).parents[3].absolute() / "requirements"
|
||||
os.chdir(REQUIREMENTS_FOLDER)
|
||||
|
||||
|
||||
def pip_compile(version: str, name: str) -> None:
|
||||
stem = f"{sys.platform}-{version}-{name}"
|
||||
if EXCLUDE_STEM_RE.fullmatch(stem):
|
||||
return
|
||||
|
||||
executable = ("py", f"-{version}") if sys.platform == "win32" else (f"python{version}",)
|
||||
subprocess.check_call(
|
||||
(
|
||||
*executable,
|
||||
"-m",
|
||||
"piptools",
|
||||
"compile",
|
||||
"--upgrade",
|
||||
"--resolver=backtracking",
|
||||
"--verbose",
|
||||
f"{name}.in",
|
||||
"--output-file",
|
||||
f"{stem}.txt",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
for minor in range(8, 11 + 1):
|
||||
version = f"3.{minor}"
|
||||
pip_compile(version, "base")
|
||||
shutil.copyfile(f"{sys.platform}-{version}-base.txt", "base.txt")
|
||||
for file in REQUIREMENTS_FOLDER.glob("extra-*.in"):
|
||||
pip_compile(version, file.stem)
|
||||
|
||||
with open(GITHUB_OUTPUT, "a", encoding="utf-8") as fp:
|
||||
fp.write(f"sys_platform={sys.platform}\n")
|
||||
203
.github/workflows/scripts/merge_requirements.py
vendored
Normal file
203
.github/workflows/scripts/merge_requirements.py
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import Dict, Iterable, List, TextIO, Tuple
|
||||
|
||||
from packaging.markers import Marker
|
||||
from packaging.requirements import Requirement
|
||||
|
||||
|
||||
REQUIREMENTS_FOLDER = Path(__file__).parents[3].absolute() / "requirements"
|
||||
os.chdir(REQUIREMENTS_FOLDER)
|
||||
|
||||
|
||||
class RequirementData:
|
||||
def __init__(self, requirement_string: str) -> None:
|
||||
self.req = Requirement(requirement_string)
|
||||
self.comments = set()
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash(self.req)
|
||||
|
||||
def __eq__(self, other: RequirementData) -> bool:
|
||||
return self.req == other.req
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return self.req.name
|
||||
|
||||
@property
|
||||
def marker(self) -> Marker:
|
||||
return self.req.marker
|
||||
|
||||
@marker.setter
|
||||
def marker(self, value: Marker) -> None:
|
||||
self.req.marker = value
|
||||
|
||||
|
||||
def get_requirements(fp: TextIO) -> List[RequirementData]:
|
||||
requirements = []
|
||||
|
||||
current = None
|
||||
for line in fp.read().splitlines():
|
||||
annotation_prefix = " # "
|
||||
if line.startswith(annotation_prefix) and current is not None:
|
||||
source = line[len(annotation_prefix) :].strip()
|
||||
if source == "via":
|
||||
continue
|
||||
via_prefix = "via "
|
||||
if source.startswith(via_prefix):
|
||||
source = source[len(via_prefix) :]
|
||||
current.comments.add(source)
|
||||
elif line and not line.startswith(("#", " ")):
|
||||
current = RequirementData(line)
|
||||
requirements.append(current)
|
||||
|
||||
return requirements
|
||||
|
||||
|
||||
def iter_envs(envs: Iterable[str]) -> Iterable[Tuple[str, str]]:
|
||||
for env_name in envs:
|
||||
platform, python_version = env_name.split("-", maxsplit=1)
|
||||
yield (platform, python_version)
|
||||
|
||||
|
||||
names = ["base"]
|
||||
names.extend(file.stem for file in REQUIREMENTS_FOLDER.glob("extra-*.in"))
|
||||
base_requirements: List[RequirementData] = []
|
||||
|
||||
for name in names:
|
||||
# {req_data: {sys_platform: RequirementData}
|
||||
input_data: Dict[RequirementData, Dict[str, RequirementData]] = {}
|
||||
all_envs = set()
|
||||
all_platforms = set()
|
||||
all_python_versions = set()
|
||||
for file in REQUIREMENTS_FOLDER.glob(f"*-{name}.txt"):
|
||||
platform_name, python_version, _ = file.stem.split("-", maxsplit=2)
|
||||
env_name = f"{platform_name}-{python_version}"
|
||||
all_envs.add(env_name)
|
||||
all_platforms.add(platform_name)
|
||||
all_python_versions.add(python_version)
|
||||
with file.open(encoding="utf-8") as fp:
|
||||
requirements = get_requirements(fp)
|
||||
|
||||
for req in requirements:
|
||||
envs = input_data.setdefault(req, {})
|
||||
envs[env_name] = req
|
||||
|
||||
output = base_requirements if name == "base" else []
|
||||
for req, envs in input_data.items():
|
||||
# {platform: [python_versions...]}
|
||||
python_versions_per_platform: Dict[str, List[str]] = {}
|
||||
# {python_version: [platforms...]}
|
||||
platforms_per_python_version: Dict[str, List[str]] = {}
|
||||
platforms = python_versions_per_platform.keys()
|
||||
python_versions = platforms_per_python_version.keys()
|
||||
for env_name, other_req in envs.items():
|
||||
platform_name, python_version = env_name.split("-", maxsplit=1)
|
||||
python_versions_per_platform.setdefault(platform_name, []).append(python_version)
|
||||
platforms_per_python_version.setdefault(python_version, []).append(platform_name)
|
||||
|
||||
req.comments.update(other_req.comments)
|
||||
|
||||
base_req = next(
|
||||
(base_req for base_req in base_requirements if base_req.name == req.name), None
|
||||
)
|
||||
if base_req is not None:
|
||||
old_base_marker = base_req.marker
|
||||
old_req_marker = req.marker
|
||||
req.marker = base_req.marker = None
|
||||
if base_req.req != req.req:
|
||||
raise RuntimeError(f"Incompatible requirements for {req.name}.")
|
||||
|
||||
base_req.marker = old_base_marker
|
||||
req.marker = old_req_marker
|
||||
if base_req.marker is None or base_req.marker == req.marker:
|
||||
continue
|
||||
|
||||
if len(envs) == len(all_envs):
|
||||
output.append(req)
|
||||
continue
|
||||
|
||||
# At this point I'm wondering why I didn't just go for
|
||||
# a more generic boolean algebra simplification (sympy.simplify_logic())...
|
||||
if (
|
||||
len(set(map(frozenset, python_versions_per_platform.values()))) == 1
|
||||
or len(set(map(frozenset, platforms_per_python_version.values()))) == 1
|
||||
):
|
||||
# Either all platforms have the same Python version set
|
||||
# or all Python versions have the same platform set.
|
||||
# We can generate markers for platform (platform_marker) and Python
|
||||
# (python_version_marker) version sets separately and then simply require
|
||||
# that both markers are fulfilled at the same time (env_marker).
|
||||
|
||||
python_version_marker = (
|
||||
# Requirement present on less Python versions than not.
|
||||
" or ".join(
|
||||
f"python_version == '{python_version}'" for python_version in python_versions
|
||||
)
|
||||
if len(python_versions) < len(all_python_versions - python_versions)
|
||||
# Requirement present on more Python versions than not
|
||||
# This may generate an empty string when Python version is irrelevant.
|
||||
else " and ".join(
|
||||
f"python_version != '{python_version}'"
|
||||
for python_version in all_python_versions - python_versions
|
||||
)
|
||||
)
|
||||
|
||||
platform_marker = (
|
||||
# Requirement present on less platforms than not.
|
||||
" or ".join(f"sys_platform == '{platform}'" for platform in platforms)
|
||||
if len(platforms) < len(all_platforms - platforms)
|
||||
# Requirement present on more platforms than not
|
||||
# This may generate an empty string when platform is irrelevant.
|
||||
else " and ".join(
|
||||
f"sys_platform != '{platform}'" for platform in all_platforms - platforms
|
||||
)
|
||||
)
|
||||
|
||||
if python_version_marker and platform_marker:
|
||||
env_marker = f"({python_version_marker}) and ({platform_marker})"
|
||||
else:
|
||||
env_marker = python_version_marker or platform_marker
|
||||
else:
|
||||
# Fallback to generic case.
|
||||
env_marker = (
|
||||
# Requirement present on less envs than not.
|
||||
" or ".join(
|
||||
f"(sys_platform == '{platform}' and python_version == '{python_version}')"
|
||||
for platform, python_version in iter_envs(envs)
|
||||
)
|
||||
if len(envs) < len(all_envs - envs.keys())
|
||||
else " and ".join(
|
||||
f"(sys_platform != '{platform}' and python_version != '{python_version}')"
|
||||
for platform, python_version in iter_envs(all_envs - envs.keys())
|
||||
)
|
||||
)
|
||||
|
||||
new_marker = f"({req.marker}) and ({env_marker})" if req.marker is not None else env_marker
|
||||
req.marker = Marker(new_marker)
|
||||
if base_req is not None and base_req.marker == req.marker:
|
||||
continue
|
||||
|
||||
output.append(req)
|
||||
|
||||
output.sort(key=lambda req: (req.marker is not None, req.name))
|
||||
with open(f"{name}.txt", "w+", encoding="utf-8") as fp:
|
||||
for req in output:
|
||||
fp.write(str(req.req))
|
||||
fp.write("\n")
|
||||
comments = sorted(req.comments)
|
||||
|
||||
if len(comments) == 1:
|
||||
source = comments[0]
|
||||
fp.write(" # via ")
|
||||
fp.write(source)
|
||||
fp.write("\n")
|
||||
else:
|
||||
fp.write(" # via\n")
|
||||
for source in comments:
|
||||
fp.write(" # ")
|
||||
fp.write(source)
|
||||
fp.write("\n")
|
||||
14
.github/workflows/tests.yml
vendored
14
.github/workflows/tests.yml
vendored
@@ -27,8 +27,11 @@ jobs:
|
||||
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
|
||||
python_version: "3.10"
|
||||
friendly_name: Python 3.10 - Tests
|
||||
- tox_env: py311
|
||||
python_version: "3.11"
|
||||
friendly_name: Python 3.11 - Tests
|
||||
- tox_env: style
|
||||
friendly_name: Style
|
||||
- tox_env: docs
|
||||
@@ -46,7 +49,7 @@ jobs:
|
||||
- name: Install tox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install "tox<4"
|
||||
pip install tox
|
||||
- name: Tox test
|
||||
env:
|
||||
TOXENV: ${{ matrix.tox_env }}
|
||||
@@ -59,7 +62,8 @@ jobs:
|
||||
python_version:
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10-dev"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
fail-fast: false
|
||||
name: Tox - Postgres
|
||||
services:
|
||||
@@ -82,7 +86,7 @@ jobs:
|
||||
- name: Install tox
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install "tox<4"
|
||||
pip install tox
|
||||
- name: Tox test
|
||||
env:
|
||||
TOXENV: postgres
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
version: 2
|
||||
|
||||
build:
|
||||
image: latest
|
||||
os: "ubuntu-22.04"
|
||||
tools:
|
||||
python: "3.8"
|
||||
|
||||
python:
|
||||
version: 3.8
|
||||
install:
|
||||
- method: pip
|
||||
path: .
|
||||
extra_requirements:
|
||||
- docs
|
||||
- doc
|
||||
|
||||
884
CHANGES.rst
884
CHANGES.rst
@@ -1,5 +1,807 @@
|
||||
.. Red changelogs
|
||||
|
||||
Redbot 3.5.10 (2024-07-10)
|
||||
==========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`Flame442`, :ghuser:`Jackenmen`, :ghuser:`Kowlin`, :ghuser:`SeaswimmerTheFsh`, :ghuser:`TrustyJAID`, :ghuser:`yamikaitou`
|
||||
|
||||
Read before updating
|
||||
--------------------
|
||||
|
||||
#. This release fixes a security issue in one of the APIs we provide for 3rd-party cog creators. See `Security changelog below <important-3510-1>` for more information.
|
||||
#. Following operating systems are no longer supported as they have already reached their end of life:
|
||||
|
||||
- CentOS 7
|
||||
- CentOS Stream 8
|
||||
- Fedora 38
|
||||
- versions of RHEL/Alma Linux/Oracle Linux/Rocky Linux 8 older than 8.8
|
||||
- versions of RHEL/Alma Linux/Oracle Linux/Rocky Linux 9 older than 9.2
|
||||
|
||||
#. Information for Audio users that are using an external Lavalink instance (if you don't know what that is, you should skip this point):
|
||||
|
||||
We've updated our default application.yml file and you should update your instance's ``application.yml`` accordingly.
|
||||
More specifically, we switched from using the built-in YT source to YT source plugin.
|
||||
`Download Red 3.5.10's default application.yml file <https://github.com/Cog-Creators/Red-DiscordBot/releases/download/3.5.10/Red-DiscordBot-3.5.10-default-lavalink-application.yml>`__
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
.. _important-3510-1:
|
||||
|
||||
Security
|
||||
********
|
||||
|
||||
- **Core** - Fixed incorrect authorization in one of the utilities provided to 3rd-party cog creators (`commands.can_manage_channel()`) resulting in anyone being authorized to run a command using it, if the command has no other permission controls. None of the core commands or core cogs are affected. The maintainers of the project are not aware of any public 3rd-party cog utilizing this API at the time of writing this changelog. `Full security advisory can be found on our GitHub <https://github.com/Cog-Creators/Red-DiscordBot/security/advisories/GHSA-5jq8-q6rj-9gq4>`__.
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- **Core - Bot Commands** - Added ``[p]set bot banner`` command for setting the bot's banner (:issue:`6321`, :issue:`6401`)
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- **Core** - Red's ``--team-members-are-owners`` flag now only considers Team Owner, Admins, and Developers as bot owners (:issue:`6401`)
|
||||
- **Core - Dependencies** - Red's dependencies have been bumped (:issue:`6402`)
|
||||
- **Cogs - Audio** - Updated the cog to configure managed Lavalink node to use YT source plugin instead of the built-in, no longer supported, implementation (:issue:`6373`)
|
||||
- **Cogs - Filter** - The cog now checks poll contents and attachment alt text for filtered words (:issue:`6401`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core** - Fixed command autocompletion not showing any proper result (error message) when bot's global checks (channel/server ignores, allowlist/blocklist) do not pass (:issue:`6374`, :issue:`6375`)
|
||||
- **Cogs - Audio** - Fixed one of the recent YT playback issues (:issue:`6373`)
|
||||
|
||||
Developer changes
|
||||
-----------------
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- |cool| **Core - Dependencies** - Bumped ``discord.py`` to version 2.4.0 (:issue:`6401`)
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- Added Ubuntu 24.04 install guide (:issue:`6364`)
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- Bumped Python version used by Arch Linux, RHEL 8, and RHEL 9 install guides to 3.11 (:issue:`6386`)
|
||||
- Removed a mention of the Atom editor from the list of the recommended editor now that it's discontinued (:issue:`6388`)
|
||||
|
||||
Removals
|
||||
********
|
||||
|
||||
- Removed all mentions of pyenv now that the last OS using it (CentOS 7) is no longer supported (:issue:`6386`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- Fixed Java instructions in macOS install guide (:issue:`6368`)
|
||||
- Fixed list of required ``info.json`` keys from the `guide_cog_creators` document (:issue:`6382`)
|
||||
|
||||
----
|
||||
|
||||
Redbot 3.5.9 (2024-04-21)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`giplgwm`, :ghuser:`Jackenmen`, :ghuser:`Kuro-Rui`, :ghuser:`Kowlin`, :ghuser:`palmtree5`, :ghuser:`TrustyJAID`, :ghuser:`Zephyrkul`
|
||||
|
||||
Read before updating
|
||||
--------------------
|
||||
|
||||
#. Information for Audio users that are using an external Lavalink instance (if you don't know what that is, you should skip this point):
|
||||
|
||||
Red 3.5.9 uses a new Lavalink jar that you will need to manually update from `our GitHub <https://github.com/Cog-Creators/Lavalink-Jars/releases/tag/3.7.11%2Bred.3>`__.
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core** - Fixed inaccuracies in error messages shown when the user passes a time duration outside accepted range (:issue:`6357`)
|
||||
- **Core** - Commands that ask the user to "Type ``more`` to continue" when they return long output will now typically wait for 60 seconds rather than just 15 (:issue:`6346`, :issue:`6352`)
|
||||
- |cool| **Cogs - Audio** - Resolved recent issues where the player would be stuck at 0:00 on some tracks (:issue:`6358`)
|
||||
- **Cogs - Mutes** - The Mutes cog will no longer erroneously accept very large values (i.e. hundreds of years) for mute durations (:issue:`6353`)
|
||||
- **Cogs - Mutes** - To avoid ambiguity, the Mutes cog will now parse the time only when it's placed at the beginning, the end, or directly after ``t=``/``time=`` prefix in the mute command arguments (:issue:`6274`, :issue:`6349`)
|
||||
- **Cogs - Streams** - The schedule announcements for YT streams will now use relative Discord timestamps (:issue:`6257`, :issue:`6264`)
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- **Core - Commands Package** - Functions and converters for parsing text into `datetime.timedelta` or `dateutil.relativedelta.relativedelta` in the `redbot.core.commands.converter` package now support negative values when ``minimum`` parameter is set accordingly (:issue:`6349`)
|
||||
- **Core - Utils Package** - The `redbot.core.utils.chat_formatting.humanize_timedelta()` function now allows specifying the maximum number of different units that will be present in the final string with the ``maximum_units`` parameter (:issue:`6350`)
|
||||
- **Core - Utils Package** - The `redbot.core.utils.chat_formatting.humanize_timedelta()` function now supports formatting negative `datetime.timedelta` instances. New ``negative_format`` parameter was added to allow specifying a different way of formatting negative `datetime.timedelta` instances (:issue:`6350`)
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- Updated links to the Lavalink repository (:issue:`6356`)
|
||||
|
||||
----
|
||||
|
||||
Redbot 3.5.8 (2024-04-01)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`Flame442`, :ghuser:`Jackenmen`, :ghuser:`Kreusada`, :ghuser:`TrustyJAID`
|
||||
|
||||
Read before updating
|
||||
--------------------
|
||||
|
||||
#. Server-wide mutes in the Mutes cog can no longer be performed using channel permissions (overrides). Instead, the cog will now use Discord's native server timeout functionality when a mute role is not set. Role mutes and channel-specific mutes are not affected.
|
||||
|
||||
Red 3.5.7 and lower allowed usage of channel permissions (overrides) for server-wide mutes when ``[p]muteset forcerole`` setting was explicitly disabled and no mute role was set for the server. This behavior is no longer available and now, when mute role is not set, server-wide mutes will be performed using Discord's native server timeouts.
|
||||
|
||||
If you were one of the few users that chose to use channel permissions (overrides) for server-wide mutes, please note that the existing server mutes will now be considered channel-specific mutes and can only be removed with ``[p]channelunmute`` (and will be automatically removed after timeout elapses, if they have one set). If you want to quickly remove all channel-specific mutes (that were previously server-wide mutes) for a user, you can use the hidden ``[p]forceunmute <user>`` command that has been provided to ease the migration.
|
||||
|
||||
#. Information for Audio users that are using an external Lavalink instance (if you don't know what that is, you should skip this point):
|
||||
|
||||
Red 3.5.8 uses a new Lavalink jar that you will need to manually update from `our GitHub <https://github.com/Cog-Creators/Lavalink-Jars/releases/tag/3.7.11%2Bred.2>`__.
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- |cool| **Cogs - Mutes** - Added support for Discord's native server timeouts. The cog will now use those when a mute role is not set or, when the new ``[p]timeout`` command is used (:issue:`5604`)
|
||||
- **Cogs - Trivia** - Trivia lists can now have a description as documented in :ref:`guide_trivia_list_creation` (:issue:`5897`)
|
||||
- |cool| **Cogs - Trivia** - Added ``[p]trivia info`` command for getting information about the specified Trivia list, including its setting overrides (:issue:`3978`, :issue:`5897`)
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- **Core - Bot Commands** - The ``[p]addpath`` command will now detect potentially incorrect paths and prompt for confirmation (:issue:`6330`)
|
||||
- **Core - Bot Commands** - The ``[p]addpath`` command will now error out when the user tries adding a path that's part of the core path or instance's data path (:issue:`6330`)
|
||||
- **Core - Dependencies** - Red's dependencies have been bumped (:issue:`6333`)
|
||||
- **Cogs - Audio** - The cog will now log the reason for Lavalink.jar being re-downloaded (:issue:`6334`)
|
||||
- |cool| **Cogs - Mutes** - The ``[p]activemutes`` command will now use menus for pagination (:issue:`6266`)
|
||||
|
||||
Removals
|
||||
********
|
||||
|
||||
- **Cogs - Mutes** - Server-wide mutes can no longer be performed using channel permissions (overrides). Server timeouts or mute role can be used instead (:issue:`5604`)
|
||||
- **Cogs - Mutes** - The ``[p]muteset forcerole`` command and the setting it adjusted has been removed. Server timeouts will now be used for a server, if it has no mute role set (:issue:`5604`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- |cool| **Cogs - Audio** - Resolves recent issues where the wrong video was served for YT playback (:issue:`6337`, :issue:`6340`)
|
||||
- **Cogs - Audio** - Fixed Lavalink.jar downloading for RC and Red-specific versions (:issue:`6334`)
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- |cool| Added install instructions for Amazon Linux 2023 (:issue:`6331`)
|
||||
|
||||
----
|
||||
|
||||
Redbot 3.5.7 (2024-03-24)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`Flame442`, :ghuser:`karlsbjorn`, :ghuser:`Jackenmen`
|
||||
|
||||
This is a hotfix release fixing a bug with Red's reaction-based menus introduced in the previous release.
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core** - Fixed an issue with Red's reaction-based menus *with custom controls* not working properly (:issue:`6324`)
|
||||
- **Core - Bot Commands** - Updated supported image formats in ``[p]set bot avatar``'s error messages to include GIFs (:issue:`6323`)
|
||||
|
||||
----
|
||||
|
||||
Redbot 3.5.6 (2024-03-22)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`BlizzardTheWolf`, :ghuser:`DJTOMATO`, :ghuser:`Dav-Git`, :ghuser:`Flame442`, :ghuser:`goettner`, :ghuser:`Jackenmen`, :ghuser:`Jan200101`, :ghuser:`japandotorg`, :ghuser:`Kowlin`, :ghuser:`Kreusada`, :ghuser:`laggron42`, :ghuser:`madebylydia`, :ghuser:`michael-is-qcde`, :ghuser:`scarecr0w12`, :ghuser:`yeetbruises`, :ghuser:`Zephyrkul`
|
||||
|
||||
Read before updating
|
||||
--------------------
|
||||
|
||||
#. macOS 11 (Big Sur), Fedora 37, Ubuntu 22.10 (Kinetic Kudu), 23.04 (Lunar Lobster), openSUSE Leap 15.4, and Raspberry Pi OS (Legacy) 10 Buster are no longer supported as they have already reached their end of life.
|
||||
#. Information for Audio users that are using an external Lavalink instance (if you don't know what that is, you should skip this point):
|
||||
|
||||
Red 3.5.6 uses a new Lavalink jar that you will need to manually update from `our GitHub <https://github.com/Cog-Creators/Lavalink-Jars/releases/tag/3.7.11>`__.
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- **Cogs - Trivia - Lists** - Added a ``doom`` trivia about the whole Doom video game franchise (:issue:`4803`)
|
||||
- **Cogs - Trivia - Lists** - Added a trivia about Star Trek (:issue:`2946`)
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- Improved handling of very large numbers in various areas of the bot (:issue:`4619`, :issue:`6283`)
|
||||
- **Core** - Empty (server) prefixes are now disallowed (:issue:`6013`)
|
||||
- |cool| **Core** - Menu-based help will now be sent to DMs when max number of pages (``[p]helpset maxpages``) is set to 0, similarly to non-menu help (:issue:`5093`, :issue:`5375`)
|
||||
- |cool| **Core** - Prefix can now be automatically inserted into help tagline by putting ``[p]`` at the position that the prefix should appear at (:issue:`4669`, :issue:`4972`)
|
||||
- **Core - Command-line Interfaces** - Improved first-time user experience when setting up new instance by asking for confirmation after user enters the prefix (:issue:`6287`)
|
||||
- **Core - Dependencies** - Red's dependencies have been bumped (:issue:`6312`)
|
||||
- **Core - Modlog** - Case auto-creation for bans and unbans now relies directly on recently introduced audit log events which should make it work more reliably (:issue:`5970`)
|
||||
- |cool| **Cogs - Alias** - Fixed a long-known issue with aliases not retaining new lines from the arguments they are passed (:issue:`2704`, :issue:`4656`)
|
||||
- **Cogs - Downloader** - Downloader commands will now try to detect potential Git authentication failures and report them more clearly (:issue:`5420`)
|
||||
- **Cogs - Modlog** - The cog help now mentions how the user can change the modlog settings (:issue:`6300`)
|
||||
- **Cogs - Trivia - Lists** - Updated FIFA World Cup list to include outcomes of the 2022 tournament (:issue:`5931`)
|
||||
|
||||
Removals
|
||||
********
|
||||
|
||||
- **Core - OS Support** - macOS 11 (Big Sur), Fedora 37, Ubuntu 22.10 (Kinetic Kudu), 23.04 (Lunar Lobster), openSUSE Leap 15.4, and Raspberry Pi OS (Legacy) 10 Buster are no longer supported as they have already reached end of life (:issue:`6309`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Cogs - Admin** - Fixed the ``[p]editrole colour`` command erroring out whenever it's ran (:issue:`6270`)
|
||||
- |cool| **Cogs - Audio** - Fixed YT playback (:issue:`6305`)
|
||||
- **Cogs - Audio** - Fixed not being able to seek when player is paused (:issue:`6305`)
|
||||
- **Cogs - Audio** - Fixed handling of file name suffixes in ``[p]playlist upload`` caused by changes in Discord API (:issue:`6279`, :issue:`6280`)
|
||||
- |cool| **Cogs - General** - Fixed issues with ``[p]lmgtfy`` command once and for all by deploying an equivalent service as part of Cog-Creators' infrastructure (:issue:`6255`, :issue:`6268`, :issue:`6269`)
|
||||
- **Cogs - Streams** - Fixed markdown formatting in the ``[p]streamalert list`` command to be compliant with newer Discord markdown renderer (:issue:`6292`)
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- **Core - Utils Package** - Added `SimpleMenu.start_dm()` method for sending the menu to the given user rather than `Context` (:issue:`6286`)
|
||||
- **Core - Utils Package** - The `menu()` utility function received a new `provisional <developer-guarantees-exclusions>` ``user`` parameter for defining who can interact with the menu (instead of the default ``ctx.author``) (:issue:`4913`)
|
||||
|
||||
If no issues arise, we plan on including this parameter under developer guarantees
|
||||
in the first release made after 2024-05-24.
|
||||
|
||||
- **Core - Utils Package** - The `SimpleMenu.start()` method received a new `provisional <developer-guarantees-exclusions>` ``user`` parameter for defining who can interact with the menu (instead of the default ``ctx.author``) (:issue:`4913`)
|
||||
|
||||
If no issues arise, we plan on including this parameter under developer guarantees
|
||||
in the first release made after 2024-05-24.
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core - Commands Package** - Fixed an edge case where the permission names passed as keyword arguments were not validated in Red's custom decorators (:issue:`6291`)
|
||||
- **Core - Utils Package** - Tracebacks from custom control functions are no longer suppressed by ``menu()`` when ``[p]set usebuttons`` option is enabled (:issue:`6310`)
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- |cool| Added install guide for Raspberry Pi OS 12 Bookworm (:issue:`6309`)
|
||||
- Added a tip in `guide_slash_and_interactions` about forcing the client to see the new commands after syncing (:issue:`6298`)
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- Install guide for Raspberry Pi OS Legacy now describes installation for Raspberry Pi OS (Legacy) 11 (:issue:`6309`)
|
||||
- Updated Python versions used in Arch Linux and openSUSE Leap instructions to 3.10 and 3.11 respectively (:issue:`6309`)
|
||||
- Clarified the meaning of the word `"provisional" <developer-guarantees-exclusions>` that is used across the documentation to refer to APIs excluded from version guarantees (:issue:`6311`)
|
||||
- Added ``force_registration=True`` to all `Config.get_conf()` usage examples in `framework_config` documentation to reflect our current recommendations (:issue:`6259`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- Fixed the "Edit on GitHub" links in Red's online documentation (:issue:`6258`)
|
||||
|
||||
----
|
||||
|
||||
Redbot 3.5.5 (2023-09-14)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`Flame442`, :ghuser:`Jackenmen`, :ghuser:`karlsbjorn`, :ghuser:`Kreusada`, :ghuser:`ltzmax`, :ghuser:`palmtree5`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- **Core - Dependencies** - Red's dependencies have been bumped (:issue:`6248`)
|
||||
- **Cogs - Downloader** - Cogs in the ``[p]cog list`` command are now listed alphabetically (:issue:`6214`, :issue:`6215`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core - Bot Commands** - Fixed handling of an edge case in the ``[p]diagnoseissues`` command that involved commands without a cog (:issue:`6237`)
|
||||
- **Core - Bot Commands** - Fixed the formatting of nested result lists in the ``[p]diagnoseissues`` command (:issue:`6238`)
|
||||
- **Cogs - Mod** - Fixed the formatting of the help description for the ``[p]ban``, ``[p]kick``, and ``[p]tempban`` commands (:issue:`6245`)
|
||||
- |cool| **Cogs - Streams** - Updated the implementation of Twitch streams to no longer use the "Get Users Follows" endpoint that was deprecated in February 2023 (:issue:`6246`, :issue:`6247`)
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- Updated Python version in ``pyenv`` instructions (:issue:`6241`)
|
||||
|
||||
----
|
||||
|
||||
Redbot 3.5.4 (2023-08-12)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`Jackenmen`, :ghuser:`laggron42`, :ghuser:`Leo40Git`, :ghuser:`PredaaA`, :ghuser:`TrustyJAID`
|
||||
|
||||
Read before updating
|
||||
--------------------
|
||||
|
||||
#. Information for Audio users that are using an external Lavalink instance (if you don't know what that is, you should skip this point):
|
||||
|
||||
Red 3.5.4 uses a new Lavalink jar that you will need to manually update from `our GitHub <https://github.com/Cog-Creators/Lavalink-Jars/releases/tag/3.7.8>`__.
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- |cool| **Core - Bot Commands** - Added ``[p]set status custom`` command allowing the bot owner to change the bot's custom status (:issue:`6226`)
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- **Core - Dependencies** - Red's dependencies have been bumped (:issue:`6225`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core** - Fixed errors showing in logs when the button menu timed out and the original message no longer existed (:issue:`6228`, :issue:`6229`)
|
||||
- |cool| **Cogs - Audio** - Fixed YT playback (:issue:`6221`)
|
||||
- **Cogs - Audio** - Fixed poor quality of ``[p]local/queue search``'s results when case sensitive matching was involved (:issue:`6129`, :issue:`6224`)
|
||||
- **Cogs - Audio** - Fixed ``[p]local search`` resorting to YT playback when file name involved certain characters such as ``-`` (:issue:`6223`)
|
||||
- **Cogs - CustomCommands** - Fixed poor quality of ``[p]customcom search``'s results when case sensitive matching was involved (:issue:`6224`)
|
||||
- **Cogs - Streams** - Fixed Picarto channels showing without the channel avatar (:issue:`6230`)
|
||||
|
||||
----
|
||||
|
||||
Redbot 3.5.3 (2023-07-24)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`AAA3A-AAA3A`, :ghuser:`aikaterna`, :ghuser:`Drapersniper`, :ghuser:`Flame442`, :ghuser:`flaree`, :ghuser:`Jackenmen`, :ghuser:`Kowlin`, :ghuser:`Kreusada`, :ghuser:`Om1609`, :ghuser:`PredaaA`, :ghuser:`TrustyJAID`, :ghuser:`Zephyrkul`
|
||||
|
||||
Read before updating
|
||||
--------------------
|
||||
|
||||
#. Fedora 36, Ubuntu 18.04 LTS and versions of RHEL/Alma Linux/Oracle Linux/Rocky Linux older than 8.6 are no longer supported as they have already reached their end of life.
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- |cool| Red has been updated to support `Discord's new username system <https://discord.com/blog/usernames>`__ (:issue:`6130`)
|
||||
|
||||
This means that we now support passing the new usernames as arguments
|
||||
and properly display usernames/global display names in core commands and cogs where applicable.
|
||||
|
||||
- **Core** - All bots are are now considered to be immune to auto-moderation (:issue:`6130`)
|
||||
- **Core** - Added list of command-line arguments to ``redbot --debuginfo <instance_name>`` and ``[p]debuginfo`` (:issue:`6164`)
|
||||
- **Core - Bot Commands** - The ``[p]set api`` command will now hide the button once the time to open the modal to set API keys elapses (:issue:`6166`)
|
||||
- **Core - Command-line Interfaces** - Multiple arguments to ``--co-owner``, ``--load-cogs``, and ``--unload-cogs`` flags can now be specified both by passing multiple arguments right after the flag and by repeating the flag multiple times with different arguments (:issue:`6200`)
|
||||
- **Core - Dependencies** - Red's dependencies have been bumped (:issue:`6185`)
|
||||
- |cool| **Cogs - Audio** - The managed Lavalink server can now be run with either Java 11 or Java 17 (:issue:`6190`)
|
||||
- **Cogs - Audio** - Added an option to auto-use default HTTP/HTTPS port for unmanaged Lavalink server (:issue:`5629`)
|
||||
- **Cogs - Mod** - The cog now tracks both the usernames *and* global display names (:issue:`6130`)
|
||||
|
||||
Removals
|
||||
********
|
||||
|
||||
- **Core - OS Support** - Fedora 36, Ubuntu 18.04 LTS and versions of RHEL/Alma Linux/Oracle Linux/Rocky Linux older than 8.6 are no longer supported as they have already reached end of life (:issue:`6189`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core** - Red's menu timeout is now consistent between reaction and button menus (:issue:`6173`)
|
||||
- **Core - Bot Commands** - Fixed message too long error in the ``[p]slash list`` command (:issue:`6167`)
|
||||
- **Core - Command-line Interfaces** - Red will now properly exit with code ``1`` (``CRITICAL``) when the bot fails after connecting to Discord but before becoming ready instead of indefinitely hanging in non-working condition (:issue:`6202`)
|
||||
- **Cogs - Audio** - Fixed playlist selection in the picker used by the playlist-related commands (:issue:`6169`, :issue:`6170`)
|
||||
- **Cogs - Cleanup** - Fixed an issue with ``[p]cleanup self`` not working in DMs (:issue:`6196`, :issue:`6197`)
|
||||
- **Cogs - Downloader** - Fixed ``CancelledError`` tracebacks showing up in logs when the bot is shut down quickly after the cog is loaded (:issue:`6203`)
|
||||
- **Cogs - Mutes** - Fixed ``CancelledError`` tracebacks showing up in logs when the bot is shut down quickly after the cog is loaded (:issue:`6203`)
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- |cool| **Core - Utils Package** - Added new view (`ConfirmView`) that can be used to ask for confirmation (:issue:`6174`, :issue:`6176`)
|
||||
- **Core - Commands Package** - Added `Command.is_enabled()` method allowing to check whether the command is disabled in a guild/globally (:issue:`4130`, :issue:`5552`, :issue:`6209`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core - Commands Package** - Fixed handling of cases where the string returned by `Cog.format_help_for_context()`/`Command.format_help_for_context()` starts with ``"\n\n"`` (:issue:`5941`)
|
||||
- **Cogs - Dev** - Fixed issues with exception formatting in ``[p]eval/repl/debug`` commands not including the code for chained/grouped exceptions (:issue:`6178`)
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- Added usage example to `get_end_user_data_statement_or_raise()` (:issue:`6171`)
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- |cool| Added install instructions for Debian 12 Bookworm (:issue:`6190`)
|
||||
- |cool| The install guides have been updated to install Java 17 when possible (:issue:`6190`)
|
||||
|
||||
|
||||
----
|
||||
|
||||
Redbot 3.5.2 (2023-05-14)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`flaree`, :ghuser:`Flame442`, :ghuser:`Jackenmen`, :ghuser:`karlsbjorn`, :ghuser:`rramboer`, :ghuser:`synrg`, :ghuser:`TrustyJAID`, :ghuser:`Vexed01`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- **Core** - Added list of global prefixes to ``redbot --debuginfo <instance_name>`` and ``[p]debuginfo`` (:issue:`6153`)
|
||||
- **Core - Dependencies** - Red's dependencies have been bumped (:issue:`6155`)
|
||||
- **Cogs - Downloader** - Updated the code block style in ``[p]repo list`` and ``[p]cog list`` to account for Discord client changes (:issue:`6003`, :issue:`6152`)
|
||||
- **Cogs - Trivia** - Updated the code block style in the scoreboard to account for Discord client changes (:issue:`6152`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- Fixed visual issues with numbered and unnumbered lists caused by Discord's new Markdown support (:issue:`6101`)
|
||||
- **Core** - Fixed handling of cooldown errors for application commands (:issue:`6159`)
|
||||
- **Core - Bot Commands** - Added missing backtick to the help of ``[p]set serverprefix`` (:issue:`6004`)
|
||||
- **Core - Command-line Interfaces** - Fixed ``redbot --debuginfo`` trying to start/starting the bot (:issue:`6131`)
|
||||
- **Cogs - Audio** - Fixed Audio's managed node trying to allocate 4 GB of memory on 32-bit platforms regardless of how much is actually available (:issue:`6137`, :issue:`6150`)
|
||||
- **Cogs - Audio** - Fixed song selection in ``[p]search`` always picking the first option when buttons are used (:issue:`6136`, :issue:`6143`)
|
||||
- **Cogs - CustomCommands** - Fixed parameter handling (:issue:`6138`, :issue:`6149`)
|
||||
- **Cogs - Mutes** - Fixed ``[p]channelmute`` returning "That user is already muted" error when the user is not actually muted (:issue:`6144`)
|
||||
- **Cogs - Mutes** - Fixed unexpected error in automatic channel unmuting when the relevant channel is not available (:issue:`6140`, :issue:`6144`)
|
||||
- **Cogs - Reports** - Fixed ``[p]report`` command not working in DMs (:issue:`6148`)
|
||||
- **Vendored Packages** - Fixed menus breaking in DMs (:issue:`6139`)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- **Core - Data Manager** - Added a new `data_manager.instance_name()` public function (:issue:`6146`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core - Utils Package** - Fixed ``menu()`` passing an instance of `discord.PartialEmoji` instead of `str` when a button with a unicode emoji is used (:issue:`6143`)
|
||||
- **Cogs - Dev** - Fixed issues with exception formatting in ``[p]eval/repl/debug`` commands failing when code from a previous invocation of any of those commands was used (:issue:`6135`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- Fixed the search box on the documentation page returning no results (:issue:`6185`)
|
||||
- Fixed command choices example in `Slash Commands and Interactions guide <guide_slash_and_interactions>` (:issue:`6154`)
|
||||
- Updated `the 3.5.0 changelog <redbot-3-5-0-2023-05-04>`, `incompatible-changes-3.5`, and `end-user-guarantees` documents to mention the new ``x86-64-v2`` instruction set requirement (:issue:`6141`, :issue:`6147`)
|
||||
|
||||
|
||||
----
|
||||
|
||||
Redbot 3.5.1 (2023-05-04)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`Flame442`, :ghuser:`Jackenmen`
|
||||
|
||||
This is a hotfix release fixing documentation issues and a bug with the update notification logic
|
||||
that caused Red to crash.
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core** - Fixed a crash in the Red update notification logic (:issue:`6124`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- Fix the instructions for updating Red (:issue:`6123`)
|
||||
|
||||
----
|
||||
|
||||
.. _redbot-3-5-0-2023-05-04:
|
||||
|
||||
Redbot 3.5.0 (2023-05-04)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`AAA3A-AAA3A`, :ghuser:`aikaterna`, :ghuser:`alexratman`, :ghuser:`AntonioNarra`, :ghuser:`Arman0334`, :ghuser:`Dav-Git`, :ghuser:`Drapersniper`, :ghuser:`Flame442`, :ghuser:`Honkertonken`, :ghuser:`i-am-zaidali`, :ghuser:`Jackenmen`, :ghuser:`japandotorg`, :ghuser:`karlsbjorn`, :ghuser:`keqking`, :ghuser:`Kowlin`, :ghuser:`Kreusada`, :ghuser:`Kuro-Rui`, :ghuser:`leetfin`, :ghuser:`npc203`, :ghuser:`palmtree5`, :ghuser:`PredaaA`, :ghuser:`Predeactor`, :ghuser:`TrustyJAID`, :ghuser:`Vexed01`, :ghuser:`yuansheng1549`
|
||||
|
||||
Read before updating
|
||||
--------------------
|
||||
|
||||
#. ``[p]bankset`` is now a core command and as a consequence, the bank cog has been removed. This means that when you start the bot for the first time after the update, you'll see a "Failed to load package bank" message. That is perfectly normal and this message can be ignored.
|
||||
#. Red 3.5 comes with breaking changes for users. Look at `Backward incompatible changes in Red 3.5 document <incompatible-changes-3.5>` and `End-user changelog <important-350-1>` for full details.
|
||||
|
||||
Note that because this release also comes with breaking changes for developers,
|
||||
the cogs you're currently using will likely not work with the new release
|
||||
until you update (and that's *if* they have been updated).
|
||||
|
||||
`Our update instructions <update_red>` include instructions on how you can safely update
|
||||
your bot and cogs from versions before 3.5. **Make sure** that you look at the instructions
|
||||
for **the version you currently have**, not the version you're updating to.
|
||||
|
||||
Note that any cogs that have not yet been updated will likely not work
|
||||
until their author releases an update.
|
||||
|
||||
#. Red 3.5 comes with breaking changes for cog developers. Look at `Backward incompatible changes in Red 3.5 document <incompatible-changes-3.5>` and `Developer changelog <important-350-2>` for full details.
|
||||
#. Fedora 35 and Debian 10 (Buster) are no longer supported as they have already reached their end of life.
|
||||
#. On x86-64 systems, we now require that the CPU supports x86-64-v2 instruction set. This roughly translates to us dropping support for Intel CPUs that have been released before 2009 and AMD CPUs that have been released before 2012.
|
||||
|
||||
.. _important-350-1:
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Breaking Changes
|
||||
****************
|
||||
|
||||
- **Core** - The bot will no longer launch without an owner set (:issue:`4926`)
|
||||
- **Core - OS support** - On x86-64 systems, we now require that the CPU supports x86-64-v2 instruction set. This roughly translates to us dropping support for Intel CPUs that have been released before 2009 and AMD CPUs that have been released before 2012 (:issue:`6100`)
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- |cool| **Core** - Preference for button menus over reaction menus can now be set with ``[p]set usebuttons``. While this depends on the cog, this should allow users to replace most existing reaction menus with button menus (:issue:`5683`, :issue:`5885`)
|
||||
- **Core** - The error message for uncaught bot errors is now configurable. See help of ``[p]set errormsg`` for more details (:issue:`5622`, :issue:`5894`)
|
||||
- |cool| **Core - Bot Commands** - Added ``[p]slash`` command for managing application commands (:issue:`5672`, :issue:`5992`, :issue:`6015`)
|
||||
- **Core - Command-line Interfaces** - Added new launch flag ``--unload-cogs`` (:issue:`5796`, :issue:`5802`)
|
||||
- **Cogs - Streams** - Added ``[p]streamset livebutton`` to add a link button under stream alerts (:issue:`5646`, :issue:`5856`)
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- **Core** - The home directory is now always preferred for the metadata file on Linux, even for system users (:issue:`5022`)
|
||||
- **Core** - Bot prefixes can no longer start with ``/`` (:issue:`5693`)
|
||||
- **Core** - Cooldown messages now use relative discord timestamps (:issue:`5893`)
|
||||
- |cool| **Core** - Added the option to request a ``file`` containing all content remaining in interactive prompts (:issue:`5901`, :issue:`5902`)
|
||||
- **Core** - Parsing errors for integer and number arguments are now more user-friendly (:issue:`5600`)
|
||||
- |cool| **Core** - Reaction menus now trigger both when adding and removing the reaction (:issue:`4517`)
|
||||
- **Core** - Threads will now inherit parent channel's embed settings (:issue:`5600`)
|
||||
- |cool| **Core** - Commands can now be used in threads, voice channels, and stage channels (:issue:`5600`, :issue:`5709`)
|
||||
- **Core** - Voice and stage channels can now be a destination for owner notifications (``[p]set ownernotifications adddestination``) (:issue:`5709`)
|
||||
- **Core** - Channel embed settings can now be applied to forum, voice, and stage channels (:issue:`5709`)
|
||||
- **Core** - Command invocations in specific threads can now be ignored with ``[p]ignore channel``. See `incompatible-changes-3.5` for details (:issue:`5600`)
|
||||
- **Core - Bot Commands** - ``[p]modlogset`` and ``[p]bankset`` are now core commands (:issue:`4128`, :issue:`4486`)
|
||||
- **Core - Bot Commands** - Moved ``[p]set`` subcommands: ``username``, ``nickname``, ``avatar``, ``description``, and ``custominfo`` to ``[p]set bot`` subgroup (:issue:`4612`, :issue:`5432`)
|
||||
- **Core - Bot Commands** - Moved activity related ``[p]set`` subcommands to ``[p]set status`` (:issue:`4612`, :issue:`5432`)
|
||||
- **Core - Bot Commands** - Moved status related ``[p]set`` subcommands to ``[p]set status`` (:issue:`4612`, :issue:`5432`)
|
||||
- **Core - Bot Commands** - Moved ``[p]set globallocale`` to ``[p]set locale global`` (:issue:`4612`, :issue:`5432`)
|
||||
- **Core - Bot Commands** - ``[p]set locale`` can now also be used through ``[p]set locale server`` (:issue:`4612`, :issue:`5432`)
|
||||
- **Core - Bot Commands** - Moved ``[p]set globalregionalformat`` to ``[p]set regionalformat global`` (:issue:`4612`, :issue:`5432`)
|
||||
- **Core - Bot Commands** - ``[p]set regionalformat`` can now also be used through ``[p]set regionalformat server`` (:issue:`4612`, :issue:`5432`)
|
||||
- |cool| **Core - Bot Commands** - Help can now use buttons and/or select menus instead of reaction menus. See the help of ``[p]helpset usemenus`` command for more information (:issue:`5634`, :issue:`5886`)
|
||||
- **Core - Bot Commands** - ``[p]set api`` now sends a modal to securely set api tokens when no arguments are passed (:issue:`5637`)
|
||||
- **Core - Bot Commands** - ``[p]traceback`` now prompts to continue if the output requires multiple messages (:issue:`5621`, :issue:`5851`)
|
||||
- **Core - Bot Commands** - ``[p]removepath`` now allows passing more than one path at once (:issue:`5820`, :issue:`5859`)
|
||||
- **Core - Bot Commands** - Always available commands such as ``[p]licenseinfo`` now always accept a mention prefix (:issue:`5460`, :issue:`5865`)
|
||||
- **Core - Bot Commands** - Added an optional ``server`` parameter to ``[p]set showsettings`` and ``[p]set serverprefix`` to prevent lock outs in servers after forgetting a prefix (:issue:`5891`, :issue:`5918`)
|
||||
- **Core - Command-line Interfaces** - ``-v`` and ``--verbose`` are now aliased to ``--debug``, and the flag can be passed up to 3 times to increase the verbosity of the debugging logs (:issue:`5613`)
|
||||
- **Core - Command-line Interfaces** - Updated the output of ``--debuginfo`` to be consistent with ``[p]debuginfo`` and allow passing the instance name for additional information (:issue:`5662`)
|
||||
- **Core - Command-line Interfaces** - Added new exit codes ``2`` (invalid CLI usage) and ``78`` (configuration error) (:issue:`5069`, :issue:`5674`)
|
||||
- **Core - Command-line Interfaces** - Instance names must now start and end with a letter or number (:issue:`5680`)
|
||||
- **Core - Command-line Interfaces** - Instance names can no longer consecutive underscores (_) and periods (.) (:issue:`5680`)
|
||||
- **Core - Command-line Interfaces** - Added descriptions for the ``--overwrite-existing-instance`` and ``--debug`` flags in ``redbot-setup --help`` (:issue:`5808`, :issue:`5818`)
|
||||
- **Core - Command-line Interfaces** - Modified the console messages for shutting down the bot to be more consistent (:issue:`6095`)
|
||||
- |cool| **Core - Dependencies** - Bumped ``discord.py`` to version 2.2.3 (:issue:`5600`, :issue:`5709`, :issue:`5920`, :issue:`5998`, :issue:`6100`, :issue:`6109`)
|
||||
- **Core - Dependencies** - Added support for Python versions 3.10 and 3.11 (:issue:`5611`)
|
||||
- **Core - Dependencies** - Red's other dependencies have been bumped (:issue:`5611`, :issue:`5631`, :issue:`6100`)
|
||||
- **Core - Modlog** - Modlog channel can now be set to a voice or stage channel with the ``[p]modlogset channel`` command (:issue:`5709`)
|
||||
- **Cogs - Admin** - Announcement channel can now be set to a voice or stage channel with the ``[p]announceset channel`` command (:issue:`5709`)
|
||||
- **Cogs - Audio** - Expanded ``[p]llset`` to allow configuring the backend options of the internal/managed node (Lavalink) (:issue:`5593`)
|
||||
- **Cogs - Audio** - The cog now uses verbose and trace level logging to improve readability of the debug logs (:issue:`5618`)
|
||||
- **Cogs - Audio** - Swapped references from "internal"/"external" to "managed"/"unmanaged" (:issue:`5944`, :issue:`5952`)
|
||||
- **Cogs - Cleanup** - Cleanups now include a message in the audit log detailing who triggered the deletion (:issue:`5861`, :issue:`5863`)
|
||||
- **Cogs - CustomCommands** - ``{channel}`` substitution parameter may now be a thread, voice channel, or stage channel (:issue:`5600`)
|
||||
- **Cogs - Downloader** - Added an argument allowing to automatically reload cogs after updating with ``[p]cog update`` (:issue:`3539`, :issue:`5623`)
|
||||
- **Cogs - Economy** - Moved ``[p]economyset registeramount`` to ``[p]bankset registeramount`` (:issue:`4128`, :issue:`4486`)
|
||||
- **Cogs - Economy** - Moved ``[p]bank reset`` to ``[p]bankset reset`` (:issue:`4128`, :issue:`4486`)
|
||||
- **Cogs - Economy** - Moved ``[p]bank prune`` to ``[p]bankset prune`` (:issue:`4128`, :issue:`4486`)
|
||||
- **Cogs - Filter** - Messages in threads will now be checked for the filtered words of thread's parent channel and server (:issue:`5600`)
|
||||
- **Cogs - Filter** - Messages in voice or stage channels will now be checked for the filtered words and have their own channel word list (:issue:`5709`)
|
||||
- **Cogs - General** - Added stage channel information to the extended output of ``[p]serverinfo`` (:issue:`5785`)
|
||||
- **Cogs - Mutes** - Usage of ``[p]channelmute`` and ``[p]channelunmute`` commands in a thread will now mute the user in thread's parent channel (:issue:`5600`)
|
||||
- **Cogs - Mutes** - The cog will now deny Send Messages in Threads, Create Public Threads, Create Private Threads, and Use Application Commands permissions in the generated mute role and channel overrides (:issue:`5600`, :issue:`5709`)
|
||||
- **Cogs - Mutes** - Notification channel can now be set to a voice or stage channel with the ``[p]muteset notification`` command (:issue:`5709`)
|
||||
- **Cogs - Mutes** - Channel/voice mutes will now behave differently for voice/stage channels: voice mute will only deny the Speak permission while channel mute will deny message permissions as well (:issue:`5709`)
|
||||
- **Cogs - Permissions** - Red's command permission system will now use thread's parent channel for resolving rules (:issue:`5600`)
|
||||
- **Cogs - Reports** - Reports channel can now be set to a voice or stage channel with the ``[p]reportset output`` command (:issue:`5709`)
|
||||
- **Cogs - Streams** - ``[p]streamalert list`` now shows the platform of each channel (:issue:`3866`, :issue:`5160`)
|
||||
- **Cogs - Streams** - ``[p]streamalert`` subcommands now accept an additional argument to toggle alerts in a particular channel (:issue:`3866`, :issue:`5160`)
|
||||
- **Cogs - Streams** - Stream alerts can now be sent to a voice or stage channel (:issue:`5709`)
|
||||
- **Cogs - Warnings** - Warn channel can now be set to a voice or stage channel with the ``[p]warningset warnchannel`` command (:issue:`5709`)
|
||||
|
||||
Removals
|
||||
********
|
||||
|
||||
- **Core** - Removed ``redbot-launcher`` (:issue:`5999`)
|
||||
- **Core - OS Support** - Fedora 35 and Debian 10 (Buster) are no longer supported as they have already reached end of life (:issue:`5974`, :issue:`6110`)
|
||||
- **Cogs - Audio** - Removed the ``[p]llsetup`` alias of ``[p]llset`` (:issue:`5953`)
|
||||
- **Cogs - Bank** - Removed the bank cog as its only command - ``[p]bankset`` - is now a core command (:issue:`4128`, :issue:`4486`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core** - Duration parsing in command arguments no longer matches on certain kinds of invalid data (:issue:`5385`, :issue:`5393`)
|
||||
- **Core** - Optimized how disabled commands are checked when cogs are loaded (:issue:`5550`)
|
||||
- **Core - Bot Commands** - The core path is now always an absolute path in ``[p]paths`` (:issue:`5142`)
|
||||
- **Core - Command-line Interfaces** - Fixed an unintended suppression of exceptions in Red's shutdown logic (:issue:`5661`, :issue:`5673`)
|
||||
- |cool| **Core - Modlog** - Fixed enormous performance issues with commands that have to gather a lot of cases such as ``[p]casesfor`` and ``[p]listcases`` (:issue:`4977`)
|
||||
- **Core - Modlog** - Case messages are no longer edited immediately after being sent (:issue:`5577`)
|
||||
- **Cogs - Audio** - Fixed a RAM allocation warning happening in unintended cases (:issue:`5643`)
|
||||
- **Cogs - Audio** - Fixed the Audio's managed node becoming unresponsive after it's been used for a while (:issue:`5903`)
|
||||
- **Cogs - Downloader** - Fixed a missing space to an output of ``[p]cog install`` (:issue:`5531`)
|
||||
- **Cogs - Trivia - Lists** - Fixed some inaccuracies in the ``worldflags`` list (:issue:`5684`)
|
||||
- **Cogs - Trivia - Lists** - Fixed some inaccuracies in the ``geography`` list (:issue:`5743`)
|
||||
- **Cogs - Trivia - Lists** - Fixed some inaccuracies in the ``clashroyale`` list (:issue:`5771`)
|
||||
|
||||
.. _important-350-2:
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Breaking Changes
|
||||
****************
|
||||
|
||||
- **Core** - Fixed edge cases in the ordering logic of ``VersionInfo`` (:issue:`5932`)
|
||||
- **Core** - Removed ``is_mod_or_superior()``, ``is_admin_or_superior()``, and ``check_permissions()`` from ``redbot.core.checks`` (:issue:`6016`)
|
||||
- **Core - Bot Class** - Merged ``RedBase`` with the `Red` class (:issue:`5159`)
|
||||
- **Core - Bot Class** - Removed the ``guild_id`` parameter from `Red.allowed_by_whitelist_blacklist()`. Use the ``guild`` parameter instead (:issue:`4905`, :issue:`4914`, :issue:`5433`)
|
||||
- **Core - Bot Class** - Removed the ``user`` parameter from `Red.embed_requested()` (:issue:`5576`)
|
||||
- **Core - Bot Class** - The ``command`` parameter of `Red.embed_requested()` is now keyword-only (:issue:`5576`)
|
||||
- **Core - Bot Class** - The ``check_permissions`` parameter of `Red.embed_requested()` now defaults to ``True`` (:issue:`5576`)
|
||||
- **Core - Bot Class** - `Red.add_cog()` will now raise `discord.ClientException` rather than `RuntimeError` when a cog with the same name is already loaded (:issue:`5600`)
|
||||
- **Core - Bot Class** - Some of the method arguments in the `Red` class have been made positional-only. See `incompatible-changes-3.5` for more information (:issue:`5600`)
|
||||
- **Core - Bot Class** - `Red.add_cog()` and `Red.remove_cog()` are now asynchronous methods (:issue:`5600`)
|
||||
- **Core - Bot Class** - ``setup()`` and ``teardown()`` functions in cog packages are now required to be asynchronous (:issue:`5600`)
|
||||
- **Core - Bot Class** - The list returned by `Red.get_owner_notification_destinations()` may now contain instances of `discord.VoiceChannel` and `discord.StageChannel` (:issue:`5709`)
|
||||
- **Core - Commands Package** - `Context.maybe_send_embed()` now raises a `ValueError` if the message's length is not between 1 and 2000 characters (:issue:`4383`, :issue:`4465`)
|
||||
- **Core - Commands Package** - Removed ``GuildConverter`` from the `redbot.core.commands.converter` namespace. Use ``discord.Guild`` or ``commands.GuildConverter`` as the converter instead (:issue:`4928`, :issue:`5433`)
|
||||
- **Core - Commands Package** - :class:`~discord.ext.commands.BadArgument` is no longer wrapped with a ``ConversionFailure`` class (:issue:`5600`)
|
||||
- **Core - Commands Package** - Some of the method arguments in the `commands.Command` and ``commands.CogMixin`` class have been made positional-only. See `incompatible-changes-3.5` for more information (:issue:`5600`)
|
||||
- **Core - Commands Package** - Removed ``commands.requires.DM_PERMS`` (:issue:`5709`)
|
||||
- **Core - Commands Package** - ``ctx.channel`` can now be a `discord.PartialMessageable` if it represents a DM channel (:issue:`5995`, :issue:`6005`)
|
||||
- **Core - Config** - Unserializable values can no longer be registered as config defaults (:issue:`5557`)
|
||||
- **Core - Config** - ``_from_id`` methods now raise a `TypeError` if the provided value is not an ``int`` (:issue:`5459`, :issue:`5564`)
|
||||
- **Core - Modlog** - `Case.message` is now a `discord.PartialMessage` unless the case object is created with `modlog.create_case()` (:issue:`4977`)
|
||||
- **Core - Modlog** - `modlog.get_modlog_channel()` may now return an instance of `discord.VoiceChannel` or `discord.StageChannel` (:issue:`5709`)
|
||||
- **Core - Modlog** - `modlog.create_case()` now raises a `ValueError` when an invalid casetype is passed (:issue:`3346`, :issue:`5386`)
|
||||
- **Core - Modlog** - `modlog.create_case()` now raises a `RuntimeError` when a bot user is passed as the ``user`` argument (:issue:`5386`)
|
||||
- **Core - Utils Package** - `redbot.core.utils.menus.menu()` now listens to both reaction add and remove events (:issue:`4517`)
|
||||
- **Core - Utils Package** - Removed ``redbot.core.utils.mod.is_allowed_by_hierarchy()`` (:issue:`4435`, :issue:`5433`)
|
||||
- **Core - Utils Package** - Removed the ``caching`` and ``safety`` modules (:issue:`5653`)
|
||||
- **Core - Utils Package** - `DEFAULT_CONTROLS`, `ALPHABET_EMOJIS`, and `NUMBER_EMOJIS` are now immutable (:issue:`5586`, :issue:`5666`)
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- **Core** - Added an ``on_cog_remove`` event which is dispatched when cogs are unloaded (:issue:`5570`)
|
||||
- **Core** - Added `RedTree` and general app command support (:issue:`5672`, :issue:`5992`, :issue:`6015`)
|
||||
- **Core** - Added ``redbot.core.app_commands`` package shadowing ``discord.app_commands``. We expect developers to use it instead of ``discord.app_commands`` when working with Red (:issue:`6006`)
|
||||
- **Core - App Commands Package** - Allowed setting ``red_force_enable`` in ``extras`` to ``True`` in an app command to bypass ``[p]slash enable`` (:issue:`6018`)
|
||||
- **Core - Bot Class** - Added `Red.send_interactive()` - a port of `Context.send_interactive()` that can be used with any `discord.abc.Messageable` (:issue:`5851`)
|
||||
- **Core - Bot Class** - Added `Red.enable_app_command()`, `Red.disable_app_command()`, and `Red.list_enabled_app_commands()` (:issue:`5992`)
|
||||
- **Core - Bank** - Added `redbot.core.bank.is_owner_if_bank_global()` (:issue:`3709`, :issue:`4486`)
|
||||
- **Core - Commands Package** - Added `RawUserIdConverter` (:issue:`4486`)
|
||||
- |cool| **Core - Commands Package** - Added support for hybrid commands (:issue:`5681`)
|
||||
- **Core - Commands Package** - Added `positive_int` and `finite_float` converters (:issue:`5939`, :issue:`5969`)
|
||||
- **Core - Commands Package** - Added new checks for proper permission resolution in both channels and threads: `bot_can_manage_channel()`, `bot_can_react()`, `can_manage_channel()`, `guildowner_or_can_manage_channel()`, `admin_or_can_manage_channel()`, `mod_or_can_manage_channel()` (:issue:`5600`)
|
||||
- **Core - Dependencies** - Added ``red_commons`` as a dependency (:issue:`5624`)
|
||||
- **Core - Modlog** - Added `Case.parent_channel` and `Case.parent_channel_id` (support for threads) (:issue:`5600`)
|
||||
- **Core - Utils Package** - Added `SimpleMenu`, a template view subclass (:issue:`5634`)
|
||||
- **Core - Utils Package** - Added `SetApiModal` and `SetApiView` (:issue:`5637`)
|
||||
- **Core - Utils Package** - Added new utilities for proper permissions resolution in both channels and threads: `can_user_send_messages_in()`, `can_user_manage_channel()`, `can_user_react_in()` (:issue:`5600`)
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- |cool| **Core** - :func:`logging.getLogger()` now returns a custom logger subclass with support for ``verbose`` and ``trace`` level logging (:issue:`5613`)
|
||||
- **Core** - Added extra information to version info for dev versions of Red (:issue:`5664`)
|
||||
- **Core** - Modernized packaging-related things (:issue:`5924`)
|
||||
- **Core** - Modified `developer-guarantees`, privatizing many APIs that were not intended to be public. See `incompatible-changes-3.5` for more details (:issue:`6021`)
|
||||
- **Core - Bot Class** - `Red.ignored_channel_or_guild()` now accepts `discord.Interaction` objects (:issue:`6015`)
|
||||
- **Core - Bot Class** - The ``channel`` parameter of `Red.embed_requested()` now accepts any messageable guild channel (:issue:`5576`)
|
||||
- **Core - Bot Class** - The bot's color is now set earlier in the launch process (:issue:`5627`)
|
||||
- **Core - Bot Class** - `Red.remove_cog()` returns a `commands.Cog` instance now (:issue:`5600`)
|
||||
- **Core - Commands Package** - The `provisional <developer-guarantees-exclusions>` ``Literal`` converter has been replaced with discord.py's own `typing.Literal` implementation (:issue:`5600`)
|
||||
- **Core - Commands Package** - Added a ``join_character`` parameter to `Red.send_interactive()` and `Context.send_interactive()` to allow choosing the character messages are joined with (:issue:`5901`, :issue:`5902`)
|
||||
- **Core - Modlog** - `modlog.set_modlog_channel()` can now accept `discord.VoiceChannel` and `discord.StageChannel` (:issue:`5709`)
|
||||
- **Core - Utils Package** - `menu()` now defaults to `DEFAULT_CONTROLS` if the ``controls`` argument is not passed (:issue:`5678`)
|
||||
- **Core - Utils Package** - Removed ``bordered()`` (:issue:`5692`)
|
||||
- **Core - Utils Package** - Optimized the performance of `pagify()` to better handle large inputs (:issue:`5698`)
|
||||
- **Core - Utils Package** - ``channel`` parameter in `MessagePredicate`'s methods now accepts any `discord.abc.Messageable` (:issue:`5942`)
|
||||
- |cool| **Cogs - Dev** - Tracebacks for code ran with ``[p]eval``, ``[p]debug``, and ``[p]repl`` commands now include source lines (:issue:`5843`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- **Core - Commands Package** - Fixed decorator order inconsistencies in permissions checks (:issue:`5625`)
|
||||
- **Core - Modlog** - Fixed `modlog.get_case()` and `modlog.get_all_cases()` raising a runtime error when no modlog channel is configured (:issue:`5644`, :issue:`5866`)
|
||||
- **Core - Utils Package** - Fixed an unintended `IndexError` in menus when page number is below 0 or above last page number (:issue:`5430`)
|
||||
- **Cogs - Dev** - Fixed line numbers in tracebacks (:issue:`5843`)
|
||||
- **Cogs - Dev** - ``[p]mock`` only works in servers now (:issue:`5923`, :issue:`5926`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
Additions
|
||||
*********
|
||||
|
||||
- Added `end-user-guarantees` codifying our support policy for different operating system versions (:issue:`5437`, :issue:`5677`)
|
||||
- Added a list of currently supported operating system versions and architectures (:issue:`5437`, :issue:`5677`, :issue:`5803`, :issue:`5974`, :issue:`6110`)
|
||||
- Added documentation for the `redbot.core.utils.antispam` module (:issue:`5641`)
|
||||
- |cool| Added a cog guide for the Audio cog (:issue:`5871`, :issue:`5895`)
|
||||
- Added documentation for creating app commands with Red (:issue:`6008`)
|
||||
- Added documentation listing past and future breaking changes (:issue:`5603`)
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- Linux install guides have been updated to, if possible, use the Python versions already distributed through the official repositories (:issue:`5611`)
|
||||
|
||||
Fixes
|
||||
*****
|
||||
|
||||
- Removed references to the ``master`` discord.py docs (:issue:`5713`)
|
||||
- Removed some duplicated references (:issue:`5782`, :issue:`5778`)
|
||||
- Fixed an inaccurate typehint in the documentation for `Config.user()` (:issue:`5790`, :issue:`5791`)
|
||||
|
||||
----
|
||||
|
||||
Redbot 3.4.19 (2023-04-20)
|
||||
==========================
|
||||
|
||||
@@ -101,7 +903,9 @@ Changes
|
||||
- Updated the screenshot showing what intents need to be selected (:issue:`5935`, :issue:`5936`)
|
||||
- Updated bot hosting list with the new location for Contabo and addition of AlphaVPS (:issue:`5928`)
|
||||
- Updated installation URLs for Homebrew and Chocolatey (:issue:`5776`)
|
||||
- Updated the auto-restart script for Linux to only restart when there's a critical error (crash) or the restart command is ran (:issue:`5069`, :issue:`5674`)
|
||||
|
||||
----
|
||||
|
||||
Redbot 3.4.18 (2022-08-15)
|
||||
==========================
|
||||
@@ -357,8 +1161,8 @@ Developer changelog
|
||||
Additions
|
||||
*********
|
||||
|
||||
- **Core - Bot Class** - Added optional ``check_permissions`` keyword-only argument to `Red.embed_requested() <RedBase.embed_requested()>` which, if ``True``, will make the method also check whether the bot can send embeds in the given channel (:issue:`5452`)
|
||||
- |cool| **Core - Bot Class** - Added `Red.get_invite_url() <RedBase.get_invite_url()>` and `Red.is_invite_url_public() <RedBase.is_invite_url_public()>` that expose the functionality of ``[p]invite`` programmatically (:issue:`5152`, :issue:`5424`)
|
||||
- **Core - Bot Class** - Added optional ``check_permissions`` keyword-only argument to `Red.embed_requested()` which, if ``True``, will make the method also check whether the bot can send embeds in the given channel (:issue:`5452`)
|
||||
- |cool| **Core - Bot Class** - Added `Red.get_invite_url()` and `Red.is_invite_url_public()` that expose the functionality of ``[p]invite`` programmatically (:issue:`5152`, :issue:`5424`)
|
||||
- |cool| **Core - Commands Package** - Added optional ``message`` argument to `Context.tick()` and `Context.react_quietly()` which is used if adding the reaction doesn't succeed (:issue:`3359`, :issue:`4092`)
|
||||
|
||||
Changes
|
||||
@@ -538,14 +1342,14 @@ Additions
|
||||
|
||||
Here's the list of the methods that were added to the ``bot`` object:
|
||||
|
||||
- `Red.add_to_blacklist() <RedBase.add_to_blacklist()>`
|
||||
- `Red.remove_from_blacklist() <RedBase.remove_from_blacklist()>`
|
||||
- `Red.get_blacklist() <RedBase.get_blacklist()>`
|
||||
- `Red.clear_blacklist() <RedBase.clear_blacklist()>`
|
||||
- `Red.add_to_whitelist() <RedBase.add_to_whitelist()>`
|
||||
- `Red.remove_from_whitelist() <RedBase.remove_from_whitelist()>`
|
||||
- `Red.get_whitelist() <RedBase.get_whitelist()>`
|
||||
- `Red.clear_whitelist() <RedBase.clear_whitelist()>`
|
||||
- `Red.add_to_blacklist()`
|
||||
- `Red.remove_from_blacklist()`
|
||||
- `Red.get_blacklist()`
|
||||
- `Red.clear_blacklist()`
|
||||
- `Red.add_to_whitelist()`
|
||||
- `Red.remove_from_whitelist()`
|
||||
- `Red.get_whitelist()`
|
||||
- `Red.clear_whitelist()`
|
||||
- |cool| **Core - Commands Package** - Added `RelativedeltaConverter` and `parse_relativedelta` to the ``redbot.core.commands`` package (:issue:`5000`)
|
||||
|
||||
This converter and function return `dateutil.relativedelta.relativedelta` object that represents a relative delta.
|
||||
@@ -873,7 +1677,7 @@ Changes
|
||||
Deprecations
|
||||
************
|
||||
|
||||
- **Core - Bot Class** - Added ``guild`` parameter to `bot.allowed_by_whitelist_blacklist() <RedBase.allowed_by_whitelist_blacklist()>` which is meant to replace the deprecated ``guild_id`` parameter (:issue:`4905`, :issue:`4914`)
|
||||
- **Core - Bot Class** - Added ``guild`` parameter to `bot.allowed_by_whitelist_blacklist() <Red.allowed_by_whitelist_blacklist()>` which is meant to replace the deprecated ``guild_id`` parameter (:issue:`4905`, :issue:`4914`)
|
||||
|
||||
- Read the method's documentation for more information
|
||||
- **Core - Commands Package** - Deprecated importing ``GuildConverter`` from ``redbot.core.commands.converter`` namespace (:issue:`4928`)
|
||||
@@ -1054,8 +1858,8 @@ Additions
|
||||
|
||||
- Variables can be added and removed from the environment of Dev cog using two new methods:
|
||||
|
||||
- `bot.add_dev_env_value() <RedBase.add_dev_env_value()>`
|
||||
- `bot.remove_dev_env_value() <RedBase.remove_dev_env_value()>`
|
||||
- `bot.add_dev_env_value() <Red.add_dev_env_value()>`
|
||||
- `bot.remove_dev_env_value() <Red.remove_dev_env_value()>`
|
||||
|
||||
Changes
|
||||
*******
|
||||
@@ -1429,9 +2233,9 @@ Developer changelog
|
||||
Additions
|
||||
*********
|
||||
|
||||
- **Core - Bot Class** - Added `bot.get_or_fetch_user() <RedBase.get_or_fetch_user()>` and `bot.get_or_fetch_member() <RedBase.get_or_fetch_member()>` methods (:issue:`4403`, :issue:`4402`)
|
||||
- **Core - Bot Class** - Added `bot.remove_shared_api_services() <RedBase.remove_shared_api_services()>` to remove all keys and tokens associated with an API service (:issue:`4370`)
|
||||
- **Core - Bot Class** - Added an option to return all tokens for an API service if ``service_name`` is not specified in `bot.get_shared_api_tokens() <RedBase.get_shared_api_tokens()>` (:issue:`4370`)
|
||||
- **Core - Bot Class** - Added `bot.get_or_fetch_user() <Red.get_or_fetch_user()>` and `bot.get_or_fetch_member() <Red.get_or_fetch_member()>` methods (:issue:`4403`, :issue:`4402`)
|
||||
- **Core - Bot Class** - Added `bot.remove_shared_api_services() <Red.remove_shared_api_services()>` to remove all keys and tokens associated with an API service (:issue:`4370`)
|
||||
- **Core - Bot Class** - Added an option to return all tokens for an API service if ``service_name`` is not specified in `bot.get_shared_api_tokens() <Red.get_shared_api_tokens()>` (:issue:`4370`)
|
||||
- **Core - Dependencies** - Added ``[all]`` and ``[dev]`` extras to the ``Red-DiscordBot`` package (:issue:`4443`)
|
||||
- |cool| **Core - i18n** - Added API for setting contextual locales (:issue:`3896`, :issue:`1970`)
|
||||
|
||||
@@ -1582,22 +2386,22 @@ Additions
|
||||
|
||||
- |cool| **Core** - Added cog disabling API (:issue:`4043`, :issue:`3945`)
|
||||
|
||||
- New methods added: `bot.cog_disabled_in_guild() <RedBase.cog_disabled_in_guild()>`, `bot.cog_disabled_in_guild_raw() <RedBase.cog_disabled_in_guild_raw()>`
|
||||
- New methods added: `bot.cog_disabled_in_guild() <Red.cog_disabled_in_guild()>`, `bot.cog_disabled_in_guild_raw() <Red.cog_disabled_in_guild_raw()>`
|
||||
- Cog disabling is automatically applied for commands and only needs to be done manually for things like event listeners; see `recommendations-for-cog-creators` for more information
|
||||
- |cool| **Core** - Added data request API (:issue:`4045`, :issue:`4169`)
|
||||
|
||||
- New special methods added to `redbot.core.commands.Cog`: `red_get_data_for_user()` (documented provisionally), `red_delete_data_for_user()`
|
||||
- New special methods added to `redbot.core.commands.Cog`: `red_get_data_for_user()` (documented `provisionally <developer-guarantees-exclusions>`), `red_delete_data_for_user()`
|
||||
- New special module level variable added: ``__red_end_user_data_statement__``
|
||||
- These methods and variables should be added by all cogs according to their documentation; see `recommendations-for-cog-creators` for more information
|
||||
- New ``info.json`` key added: ``end_user_data_statement``; see `Info.json format documentation <info-json-format>` for more information
|
||||
- **Core - Bot Class** - Added `bot.message_eligible_as_command() <RedBase.message_eligible_as_command()>` utility method which can be used to determine if a message may be responded to as a command (:issue:`4077`)
|
||||
- |cool| **Core - Commands Package** - Added a provisional API for replacing the help formatter. See `documentation <framework-commands-help>` for more details (:issue:`4011`)
|
||||
- **Core - Commands Package** - `commands.NoParseOptional <NoParseOptional>` is no longer provisional and is now fully supported part of API (:issue:`4142`)
|
||||
- **Core - Bot Class** - Added `bot.message_eligible_as_command() <Red.message_eligible_as_command()>` utility method which can be used to determine if a message may be responded to as a command (:issue:`4077`)
|
||||
- |cool| **Core - Commands Package** - Added a `provisional API <developer-guarantees-exclusions>` for replacing the help formatter. See `documentation <framework-commands-help>` for more details (:issue:`4011`)
|
||||
- **Core - Commands Package** - `commands.NoParseOptional <NoParseOptional>` is no longer `provisional <developer-guarantees-exclusions>` and is now fully supported part of API (:issue:`4142`)
|
||||
|
||||
Changes
|
||||
*******
|
||||
|
||||
- **Core - Bot Class** - `bot.ignored_channel_or_guild() <RedBase.ignored_channel_or_guild()>` now accepts `discord.Message` objects (:issue:`4077`)
|
||||
- **Core - Bot Class** - `bot.ignored_channel_or_guild() <Red.ignored_channel_or_guild()>` now accepts `discord.Message` objects (:issue:`4077`)
|
||||
- |cool| **Core - Commands Package** - Autohelp in group commands is now sent *after* invoking the group, which allows before invoke hooks to prevent autohelp from getting triggered (:issue:`4129`)
|
||||
- **Core - Utils Package** - `humanize_list()` now accepts ``locale`` and ``style`` keyword arguments. See its documentation for more information (:issue:`2982`)
|
||||
- |cool| **Core - Utils Package** - `humanize_list()` is now properly localized (:issue:`2906`, :issue:`2982`)
|
||||
@@ -1850,7 +2654,7 @@ Developer changelog
|
||||
Additions
|
||||
*********
|
||||
|
||||
- **Core - Bot Class** - Added `bot.set_prefixes() <RedBase.set_prefixes()>` method that allows developers to set global/server prefixes (:issue:`3890`)
|
||||
- **Core - Bot Class** - Added `bot.set_prefixes() <Red.set_prefixes()>` method that allows developers to set global/server prefixes (:issue:`3890`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
@@ -1944,7 +2748,7 @@ Documentation changes
|
||||
Changes
|
||||
*******
|
||||
|
||||
- Added information about provisional status of RPC (:issue:`3862`)
|
||||
- Added information about `provisional <developer-guarantees-exclusions>` status of RPC (:issue:`3862`)
|
||||
- Revised install instructions (:issue:`3847`)
|
||||
- Improved navigation in `document about updating Red <update_red>` (:issue:`3856`, :issue:`3849`)
|
||||
|
||||
@@ -2813,13 +3617,13 @@ Breaking Changes
|
||||
|
||||
New methods for this include:
|
||||
|
||||
- `RedBase.get_shared_api_tokens()`
|
||||
- `RedBase.set_shared_api_tokens()`
|
||||
- `RedBase.get_embed_colour()` (and its alias - ``get_embed_color()``)
|
||||
- `RedBase.get_admin_roles()`
|
||||
- `RedBase.get_admin_role_ids()`
|
||||
- `RedBase.get_mod_roles()`
|
||||
- `RedBase.get_mod_role_ids()`
|
||||
- `Red.get_shared_api_tokens()`
|
||||
- `Red.set_shared_api_tokens()`
|
||||
- `Red.get_embed_colour()` (and its alias - ``get_embed_color()``)
|
||||
- `Red.get_admin_roles()`
|
||||
- `Red.get_admin_role_ids()`
|
||||
- `Red.get_mod_roles()`
|
||||
- `Red.get_mod_role_ids()`
|
||||
- **Core - Bot Class** - Removed ``bot._counter``, Made a few more attributes private (``cog_mgr``, ``main_dir``) (:issue:`2976`)
|
||||
- **Core - Modlog** - Modlog casetypes no longer have an attribute for auditlog action type (:issue:`2897`)
|
||||
- **Core - Modlog** - Removed ``redbot.core.modlog.get_next_case_number()`` (:issue:`2908`)
|
||||
@@ -2829,11 +3633,11 @@ Additions
|
||||
|
||||
- Added a few methods and classes replacing direct config access (which is no longer supported) (:issue:`2976`)
|
||||
|
||||
- `Red.allowed_by_whitelist_blacklist() <RedBase.allowed_by_whitelist_blacklist()>`
|
||||
- `Red.get_valid_prefixes() <RedBase.get_valid_prefixes()>`
|
||||
- `Red.remove_shared_api_tokens() <RedBase.remove_shared_api_tokens()>`
|
||||
- `Red.allowed_by_whitelist_blacklist()`
|
||||
- `Red.get_valid_prefixes()`
|
||||
- `Red.remove_shared_api_tokens()`
|
||||
- `redbot.core.commands.help.HelpSettings`
|
||||
- **Core - Bot Class** - Added the method `Red.wait_until_red_ready() <RedBase.wait_until_red_ready()>` that waits until Red's post connection startup is done (:issue:`3273`)
|
||||
- **Core - Bot Class** - Added the method `Red.wait_until_red_ready()` that waits until Red's post connection startup is done (:issue:`3273`)
|
||||
- **Core - Bot Class** - New event ``on_red_api_tokens_update`` is now dispatched when shared api keys for a service are updated (:issue:`3134`)
|
||||
- **Core - Config** - 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 (:issue:`2654`)
|
||||
- **Core - Config** - Added methods to Config for accessing things by id without mocked objects (:issue:`2804`)
|
||||
@@ -2862,8 +3666,8 @@ Additions
|
||||
Changes
|
||||
*******
|
||||
|
||||
- **Core - Bot Class** - `Red.send_filtered() <RedBase.send_filtered()>` now returns the message that is sent (:issue:`3052`)
|
||||
- **Core - Bot Class** - `Red.send_to_owners() <RedBase.send_to_owners()>` and `Red.get_owner_notification_destinations() <RedBase.get_owner_notification_destinations()>` now log when they are not able to find the owner notification destination (:issue:`3273`)
|
||||
- **Core - Bot Class** - `Red.send_filtered()` now returns the message that is sent (:issue:`3052`)
|
||||
- **Core - Bot Class** - `Red.send_to_owners()` and `Red.get_owner_notification_destinations()` now log when they are not able to find the owner notification destination (:issue:`3273`)
|
||||
- **Core - Commands Package** - Allowed passing ``cls`` in the `redbot.core.commands.group()` decorator (:issue:`2881`)
|
||||
- **Core - Modlog** - Some generic modlog casetypes are now pre-registered for cog creator use (:issue:`2897`)
|
||||
|
||||
@@ -2876,10 +3680,10 @@ Fixes
|
||||
*****
|
||||
|
||||
- **Core - Bank** - 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 (:issue:`2923`)
|
||||
- **Core - Bot Class** - Fixed `Red.remove_command() <RedBase.remove_command()>` throwing an error when trying to remove a non-existent command (:issue:`2888`)
|
||||
- **Core - Bot Class** - Fixed `Red.remove_command()` throwing an error when trying to remove a non-existent command (:issue:`2888`)
|
||||
- **Core - Bot Class** - Fixed ``is_automod_immune``'s handling of the guild check and added support for checking webhooks (:issue:`3100`)
|
||||
- **Core - Bot Class** - ``Red.owner_id`` is now set in the post connection startup (:issue:`3273`)
|
||||
- **Core - Bot Class** - `Red.send_to_owners() <RedBase.send_to_owners()>` and `Red.get_owner_notification_destinations() <RedBase.get_owner_notification_destinations()>` now wait until Red is done with post connection startup to ensure owner ID is available (:issue:`3273`)
|
||||
- **Core - Bot Class** - `Red.send_to_owners()` and `Red.get_owner_notification_destinations()` now wait until Red is done with post connection startup to ensure owner ID is available (:issue:`3273`)
|
||||
- **Core - Commands Package** - `Command.can_see()` now works as intended for disabled commands (:issue:`2892`)
|
||||
- **Core - Commands Package** - Fixed ``Context.clean_prefix`` issues resulting from undocumented changes from discord (:issue:`3249`)
|
||||
- **Core - Utils Package** - Fixed `MessagePredicate.greater()` and `MessagePredicate.less()` allowing any valid int instead of only valid ints/floats that are greater/less than the given value (:issue:`3004`)
|
||||
@@ -3144,7 +3948,7 @@ Developer changelog
|
||||
Additions
|
||||
*********
|
||||
|
||||
- **Core - Bot Class** - Added `Red.send_to_owners() <RedBase.send_to_owners()>` and `Red.get_owner_notification_destinations() <RedBase.get_owner_notification_destinations()>` (:issue:`2665`, :issue:`2738`)
|
||||
- **Core - Bot Class** - Added `Red.send_to_owners()` and `Red.get_owner_notification_destinations()` (:issue:`2665`, :issue:`2738`)
|
||||
- **Core - Commands Package** - Added `DictConverter` (:issue:`2692`)
|
||||
- **Core - Commands Package** - Added `TimedeltaConverter` and `parse_timedelta()` (:issue:`2736`)
|
||||
- **Core - Commands Package** - Added ``assume_yes`` attribute to `redbot.core.commands.Context` (:issue:`2746`)
|
||||
|
||||
12
LICENSE
12
LICENSE
@@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
Red - A fully customizable Discord bot
|
||||
Copyright (C) 2017-2021 Cog Creators
|
||||
Copyright (C) 2017-present Cog Creators
|
||||
Copyright (C) 2015-2017 Twentysix
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -653,7 +653,7 @@ Also add information on how to contact you by electronic and paper mail.
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
Red-DiscordBot Copyright (C) 2017-2021 Cog Creators
|
||||
Red-DiscordBot Copyright (C) 2017-present Cog Creators
|
||||
Red-DiscordBot Copyright (C) 2015-2017 Twentysix
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
@@ -675,10 +675,10 @@ the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
The Red-DiscordBot project contains subcomponents in audio.py that have a
|
||||
separate copyright notice and license terms. Your use of the source code for
|
||||
these subcomponents is subject to the terms and conditions of the following
|
||||
licenses.
|
||||
The Red-DiscordBot project contains subcomponents in the Audio module that
|
||||
have a separate copyright notice and license terms. Your use of the source
|
||||
code for these subcomponents is subject to the terms and conditions of the
|
||||
following licenses.
|
||||
|
||||
This product bundles methods from https://github.com/Just-Some-Bots/MusicBot/
|
||||
blob/master/musicbot/spotify.py which are available under an MIT license.
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
include LICENSE
|
||||
recursive-include redbot *.LICENSE
|
||||
|
||||
# include requirements files
|
||||
include requirements/base.in
|
||||
include requirements/base.txt
|
||||
include requirements/extra-*.in
|
||||
include requirements/extra-*.txt
|
||||
|
||||
# include locale files
|
||||
recursive-include redbot locales/*.po
|
||||
|
||||
@@ -15,7 +21,7 @@ recursive-include redbot *.export
|
||||
recursive-include redbot py.typed
|
||||
|
||||
# include *.sql files from postgres driver
|
||||
recursive-include redbot/core/drivers/postgres *.sql
|
||||
recursive-include redbot/core/_drivers/postgres *.sql
|
||||
|
||||
# include tests
|
||||
graft tests
|
||||
|
||||
2
Makefile
2
Makefile
@@ -52,7 +52,7 @@ bumpdeps:
|
||||
# Development environment
|
||||
newenv:
|
||||
$(PYTHON) -m venv --clear .venv
|
||||
.venv/bin/pip install -U pip setuptools wheel
|
||||
.venv/bin/pip install -U pip wheel
|
||||
$(MAKE) syncenv
|
||||
syncenv:
|
||||
.venv/bin/pip install -Ur ./tools/dev-requirements.txt
|
||||
|
||||
14
README.md
14
README.md
@@ -27,9 +27,9 @@
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://github.com/Cog-Creators/Red-DiscordBot/actions">
|
||||
<img src="https://img.shields.io/github/workflow/status/Cog-Creators/Red-Discordbot/Tests?label=tests" alt="GitHub Actions">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/Cog-Creators/Red-Discordbot/tests.yml?label=tests" alt="GitHub Actions">
|
||||
</a>
|
||||
<a href="http://red-discordbot.readthedocs.io/en/stable/?badge=stable">
|
||||
<a href="http://docs.discord.red/en/stable/?badge=stable">
|
||||
<img src="https://readthedocs.org/projects/red-discordbot/badge/?version=stable" alt="Red on readthedocs.org">
|
||||
</a>
|
||||
<a href="https://github.com/psf/black">
|
||||
@@ -48,7 +48,7 @@
|
||||
•
|
||||
<a href="#installation">Installation</a>
|
||||
•
|
||||
<a href="http://red-discordbot.readthedocs.io/en/stable/index.html">Documentation</a>
|
||||
<a href="http://docs.discord.red/en/stable/index.html">Documentation</a>
|
||||
•
|
||||
<a href="#plugins">Plugins</a>
|
||||
•
|
||||
@@ -86,9 +86,9 @@ community of cog repositories.**
|
||||
|
||||
**The following platforms are officially supported:**
|
||||
|
||||
- [Windows](https://red-discordbot.readthedocs.io/en/stable/install_windows.html)
|
||||
- [MacOS](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
|
||||
- [Most major linux distributions](https://red-discordbot.readthedocs.io/en/stable/install_linux_mac.html)
|
||||
- [Windows](https://docs.discord.red/en/stable/install_guides/windows.html)
|
||||
- [MacOS](https://docs.discord.red/en/stable/install_guides/mac.html)
|
||||
- [Most major linux distributions](https://docs.discord.red/en/stable/install_guides/index.html)
|
||||
|
||||
If after reading the guide you are still experiencing issues, feel free to join the
|
||||
[Official Discord Server](https://discord.gg/red) and ask in the **#support** channel for help.
|
||||
@@ -115,7 +115,7 @@ available 3rd party cogs!
|
||||
**Red** is in continuous development, and it’s supported by an active community which produces new
|
||||
content (cogs/plugins) for everyone to enjoy. New features are constantly added. If you can’t
|
||||
[find](https://index.discord.red) the cog you’re looking for,
|
||||
consult our [guide](https://red-discordbot.readthedocs.io/en/stable/guide_cog_creation.html) on
|
||||
consult our [guide](https://docs.discord.red/en/stable/guide_cog_creation.html) on
|
||||
building your own cogs!
|
||||
|
||||
Join us on our [Official Discord Server](https://discord.gg/red)!
|
||||
|
||||
38
SECURITY.md
Normal file
38
SECURITY.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
The table below explains the current state of our versions. Currently, only version
|
||||
3.5 and higher are supported and receive security updates. Versions lower than 3.5
|
||||
are considered End of Life and will not receive any security updates.
|
||||
|
||||
| Version | Branch | Security Updates | End of Life |
|
||||
|---------------|------------|--------------------|--------------------|
|
||||
| < 2.0 | master | :x: | :white_check_mark: |
|
||||
| >= 2.0, < 3.0 | develop | :x: | :white_check_mark: |
|
||||
| >= 3.0, < 3.5 | V3/develop | :x: | :white_check_mark: |
|
||||
| >= 3.5 | V3/develop | :white_check_mark: | :x: |
|
||||
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
For reporting vulnerabilities within Red-DiscordBot we make use of GitHub's
|
||||
private vulnerability reporting feature (More information can be found
|
||||
[here](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability)).
|
||||
This ensures that all maintainers and key members have access to the reported
|
||||
vulnerability.
|
||||
|
||||
### Opening a Vulnerability Report
|
||||
|
||||
To open a vulnerability report please fill out [this form](https://github.com/Cog-Creators/Red-DiscordBot/security/advisories/new)
|
||||
|
||||
You will be asked to provide a summary, details and proof of concept for your vulnerability report.
|
||||
We ask that you fill out this form to the best of your ability, with as many details as possible.
|
||||
Furthermore, you'll be asked to provide affected products and severity.
|
||||
These fields are optional and will be filled appropriately by the maintainers if not provided.
|
||||
|
||||
### Timeline
|
||||
|
||||
We will try to answer your report within 7 days. If you haven't received an answer by then, we suggest you reach
|
||||
out to us privately. This can best be done via our [Discord server](https://discord.gg/red), and contacting
|
||||
a member who has the Staff role.
|
||||
@@ -1,5 +1,5 @@
|
||||
api_key_env: CROWDIN_API_KEY
|
||||
project_identifier_env: CROWDIN_PROJECT_ID
|
||||
project_id_env: CROWDIN_PROJECT_ID
|
||||
api_token_env: CROWDIN_PERSONAL_TOKEN
|
||||
base_path: ./redbot/
|
||||
preserve_hierarchy: true
|
||||
files:
|
||||
|
||||
@@ -28,10 +28,6 @@ Next, your python :code:`path` can be fetched with the following commands:
|
||||
$ source ~/redenv/bin/activate
|
||||
(redenv) $ /usr/bin/which python
|
||||
|
||||
# If redbot is installed in a pyenv virtualenv
|
||||
$ pyenv shell <virtualenv_name>
|
||||
(redenv) $ pyenv which python
|
||||
|
||||
Then create the new service file:
|
||||
|
||||
:code:`sudo nano /etc/systemd/system/red@.service`
|
||||
@@ -52,9 +48,10 @@ Paste the following in the file, and replace all instances of :code:`username` w
|
||||
User=username
|
||||
Group=username
|
||||
Type=idle
|
||||
Restart=always
|
||||
Restart=on-abnormal
|
||||
RestartSec=15
|
||||
RestartPreventExitStatus=0
|
||||
RestartForceExitStatus=1
|
||||
RestartForceExitStatus=26
|
||||
TimeoutStopSec=10
|
||||
|
||||
[Install]
|
||||
|
||||
@@ -21,10 +21,13 @@ Open that document in Notepad, and paste the following text in it:
|
||||
CALL "%userprofile%\redenv\Scripts\activate.bat"
|
||||
python -O -m redbot <your instance name>
|
||||
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
ECHO Restarting Red...
|
||||
GOTO RED
|
||||
)
|
||||
IF %ERRORLEVEL% == 1 GOTO RESTART_RED
|
||||
IF %ERRORLEVEL% == 26 GOTO RESTART_RED
|
||||
EXIT /B %ERRORLEVEL%
|
||||
|
||||
:RESTART_RED
|
||||
ECHO Restarting Red...
|
||||
GOTO RED
|
||||
|
||||
Replace ``<your instance name>`` with the instance name of your bot.
|
||||
If you created your VENV at a location other than the recommended one, replace ``%userprofile%\redenv\Scripts\activate.bat`` with the path to your VENV.
|
||||
@@ -45,4 +48,4 @@ Open the "Run" dialogue box using Windows Key + R.
|
||||
|
||||
Enter ``shell:startup`` if you want the bot to launch only when the current user logs in, or ``shell:common startup`` if you want the bot to launch when any user logs in.
|
||||
|
||||
Drag the shortcut into the folder that is opened. The bot will now launch on startup.
|
||||
Drag the shortcut into the folder that is opened. The bot will now launch on startup.
|
||||
|
||||
@@ -19,7 +19,7 @@ Cooldowns
|
||||
|
||||
You can set cooldowns for your custom commands. If a command is on cooldown, it will not be triggered.
|
||||
|
||||
You can set cooldowns per member or per channel, or set a cooldown guild-wide. You can also set multiple types of cooldown on a single custom command. All cooldowns must pass before the command will trigger.
|
||||
You can set cooldowns per member or per thread/channel, or set a cooldown guild-wide. You can also set multiple types of cooldown on a single custom command. All cooldowns must pass before the command will trigger.
|
||||
|
||||
------------------
|
||||
Context Parameters
|
||||
@@ -27,19 +27,19 @@ Context Parameters
|
||||
|
||||
You can enhance your custom command's response by leaving spaces for the bot to substitute.
|
||||
|
||||
+-----------+----------------------------------------+
|
||||
| Argument | Substitute |
|
||||
+===========+========================================+
|
||||
| {message} | The message the bot is responding to. |
|
||||
+-----------+----------------------------------------+
|
||||
| {author} | The user who called the command. |
|
||||
+-----------+----------------------------------------+
|
||||
| {channel} | The channel the command was called in. |
|
||||
+-----------+----------------------------------------+
|
||||
| {server} | The server the command was called in. |
|
||||
+-----------+----------------------------------------+
|
||||
| {guild} | Same as with {server}. |
|
||||
+-----------+----------------------------------------+
|
||||
+-----------+--------------------------------------------------+
|
||||
| Argument | Substitute |
|
||||
+===========+==================================================+
|
||||
| {message} | The message the bot is responding to. |
|
||||
+-----------+--------------------------------------------------+
|
||||
| {author} | The user who called the command. |
|
||||
+-----------+--------------------------------------------------+
|
||||
| {channel} | The channel or thread the command was called in. |
|
||||
+-----------+--------------------------------------------------+
|
||||
| {server} | The server the command was called in. |
|
||||
+-----------+--------------------------------------------------+
|
||||
| {guild} | Same as with {server}. |
|
||||
+-----------+--------------------------------------------------+
|
||||
|
||||
You can further refine the response with dot notation. For example, {author.mention} will mention the user who called the command.
|
||||
|
||||
@@ -81,7 +81,7 @@ Showing your own avatar
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom add simple avatar {author.avatar_url}
|
||||
[p]customcom add simple avatar {author.display_avatar}
|
||||
[p]avatar
|
||||
https://cdn.discordapp.com/avatars/133801473317404673/be4c4a4fe47cb3e74c31a0504e7a295e.webp?size=1024
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ announceset channel
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]announceset channel [channel]
|
||||
[p]announceset channel <channel>
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -397,8 +397,8 @@ Sets the channel where the bot owner announcements will be sent.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[channel]``: The channel that will be used for bot announcements.
|
||||
|channel-input| Defaults to where you typed the command.
|
||||
* ``<channel>``: The channel that will be used for bot announcements.
|
||||
|channel-input|
|
||||
|
||||
.. _admin-command-announceset-clearchannel:
|
||||
|
||||
|
||||
3766
docs/cog_guides/audio.rst
Normal file
3766
docs/cog_guides/audio.rst
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,186 +0,0 @@
|
||||
.. _bank:
|
||||
|
||||
====
|
||||
Bank
|
||||
====
|
||||
|
||||
This is the cog guide for the bank cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load bank
|
||||
|
||||
.. _bank-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog manages the bank. It won't be used often by
|
||||
users but this is what makes any interaction with the
|
||||
money possible.
|
||||
|
||||
You will be able to switch between a global and a server-
|
||||
wide bank and choose the bank/currency name.
|
||||
|
||||
.. _bank-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _bank-command-bankset:
|
||||
|
||||
^^^^^^^
|
||||
bankset
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for configuring bank settings.
|
||||
|
||||
.. _bank-command-bankset-toggleglobal:
|
||||
|
||||
""""""""""""""""""""
|
||||
bankset toggleglobal
|
||||
""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset toggleglobal [confirm=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Makes the bank global instead of server-wide. If it
|
||||
is already global, the command will switch it back
|
||||
to the server-wide bank.
|
||||
|
||||
.. warning:: Using this command will reset **all** accounts.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[confirm=False]``: Put ``yes`` to confirm.
|
||||
|
||||
.. _bank-command-bankset-creditsname:
|
||||
|
||||
"""""""""""""""""""
|
||||
bankset creditsname
|
||||
"""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock| However, if the bank is server-wide, the
|
||||
server owner or an administrator can use this command.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset creditsname <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Change the credits name of the bank. It is ``credits`` by default.
|
||||
|
||||
For example, if you switch it to ``dollars``, the payday
|
||||
command will show this:
|
||||
|
||||
.. TODO reference the payday command
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
Here, take some dollars. Enjoy! (+120 dollars!)
|
||||
|
||||
You currently have 220 dollars.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The new credits name.
|
||||
|
||||
.. _bank-command-bankset-bankname:
|
||||
|
||||
""""""""""""""""
|
||||
bankset bankname
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock| However, if the bank is server-wide, the
|
||||
server owner or an administrator can use this command.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset bankname <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Set bank's name.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The new bank's name.
|
||||
|
||||
.. _bank-command-bankset-maxbal:
|
||||
|
||||
""""""""""""""
|
||||
bankset maxbal
|
||||
""""""""""""""
|
||||
|
||||
.. note:: |owner-lock| However, if the bank is server-wide, the
|
||||
server owner or an administrator can use this command.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset maxbal <amount>
|
||||
|
||||
**Description**
|
||||
|
||||
Defines the maximum amount of money a user can have with the bot.
|
||||
|
||||
If 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
|
||||
@@ -171,17 +171,17 @@ removepath
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]removepath <path_number>
|
||||
[p]removepath <path_numbers...>
|
||||
|
||||
**Description**
|
||||
|
||||
Removes a path from the list of available paths. Its cogs won't be accessible
|
||||
anymore.
|
||||
Removes one or more paths from the list of available paths. Its cogs won't be
|
||||
accessible anymore.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<path_number>``: The number of the path to remove. You can get it with
|
||||
the :ref:`paths <cogmanagerui>` command.
|
||||
* ``<path_numbers>``: The number of the path(s) to remove. You can get it with
|
||||
the :ref:`paths <cogmanagerui-command-paths>` command.
|
||||
|
||||
.. _cogmanagerui-command-reorderpath:
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -68,7 +68,7 @@ customcom cooldown
|
||||
|
||||
Set, edit, or view the cooldown for a custom command.
|
||||
|
||||
You may set cooldowns per member, channel, or guild. Multiple
|
||||
You may set cooldowns per member, thread/channel, or guild. Multiple
|
||||
cooldowns may be set. All cooldowns must be cooled to call the
|
||||
custom command.
|
||||
|
||||
@@ -267,7 +267,7 @@ customcom search
|
||||
|
||||
Searches through custom commands, according to the query.
|
||||
|
||||
Uses fuzzywuzzy searching to find close matches.
|
||||
Uses fuzzy searching to find close matches.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
|
||||
@@ -68,133 +68,6 @@ Example:
|
||||
|
||||
- ``<user>`` The user to check the balance of. If omitted, defaults to your own balance.
|
||||
|
||||
.. _economy-command-bank-prune:
|
||||
|
||||
""""""""""
|
||||
bank prune
|
||||
""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank prune
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for pruning bank accounts.
|
||||
|
||||
.. _economy-command-bank-prune-global:
|
||||
|
||||
"""""""""""""""""
|
||||
bank prune global
|
||||
"""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank prune global [confirmation=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Prune bank accounts for users who no longer share a server with the bot.
|
||||
|
||||
Cannot be used without a global bank. See ``[p]bank prune server``.
|
||||
|
||||
Examples:
|
||||
- ``[p]bank prune global`` - Did not confirm. Shows the help message.
|
||||
- ``[p]bank prune global yes``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<confirmation>`` This will default to false unless specified.
|
||||
|
||||
.. _economy-command-bank-prune-server:
|
||||
|
||||
"""""""""""""""""
|
||||
bank prune server
|
||||
"""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank prune server [confirmation=False]
|
||||
|
||||
.. tip:: Aliases: ``bank prune guild``, ``bank prune local``
|
||||
|
||||
**Description**
|
||||
|
||||
Prune bank accounts for users no longer in the server.
|
||||
|
||||
Cannot be used with a global bank. See ``[p]bank prune global``.
|
||||
|
||||
Examples:
|
||||
- ``[p]bank prune server`` - Did not confirm. Shows the help message.
|
||||
- ``[p]bank prune server yes``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<confirmation>`` This will default to false unless specified.
|
||||
|
||||
.. _economy-command-bank-prune-user:
|
||||
|
||||
"""""""""""""""
|
||||
bank prune user
|
||||
"""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank prune user <user> [confirmation=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the bank account of a specified user.
|
||||
|
||||
Examples:
|
||||
- ``[p]bank prune user @TwentySix`` - Did not confirm. Shows the help message.
|
||||
- ``[p]bank prune user @TwentySix yes``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<user>`` The user to delete the bank of. Takes mentions, names, and user ids.
|
||||
- ``<confirmation>`` This will default to false unless specified.
|
||||
|
||||
.. _economy-command-bank-reset:
|
||||
|
||||
""""""""""
|
||||
bank reset
|
||||
""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank reset [confirmation=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete all bank accounts.
|
||||
|
||||
Examples:
|
||||
- ``[p]bank reset`` - Did not confirm. Shows the help message.
|
||||
- ``[p]bank reset yes``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<confirmation>`` This will default to false unless specified.
|
||||
|
||||
.. _economy-command-bank-set:
|
||||
|
||||
""""""""
|
||||
@@ -317,29 +190,6 @@ Examples:
|
||||
- | ``<duration>`` The new duration to wait in between uses of payday. Default is 5 minutes.
|
||||
| Accepts: seconds, minutes, hours, days, weeks (if no unit is specified, the duration is assumed to be given in seconds)
|
||||
|
||||
.. _economy-command-economyset-registeramount:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
economyset registeramount
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset registeramount <creds>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the initial balance for new bank accounts.
|
||||
|
||||
Example:
|
||||
- ``[p]economyset registeramount 5000``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<creds>`` The new initial balance amount. Default is 0.
|
||||
|
||||
.. _economy-command-economyset-rolepaydayamount:
|
||||
|
||||
"""""""""""""""""""""""""""
|
||||
|
||||
@@ -115,11 +115,12 @@ Add words to the filter.
|
||||
Use double quotes to add sentences.
|
||||
|
||||
Examples:
|
||||
- ``[p]filter channel add word1 word2 word3``
|
||||
- ``[p]filter channel add "This is a sentence"``
|
||||
- ``[p]filter channel add #channel word1 word2 word3``
|
||||
- ``[p]filter channel add #channel "This is a sentence"``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<channel>`` The text, voice, stage, or forum channel to add filtered words to.
|
||||
- ``[words...]`` The words or sentences to filter.
|
||||
|
||||
.. _filter-command-filter-channel-clear:
|
||||
@@ -164,7 +165,7 @@ filter channel remove
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter channel remove [words...]
|
||||
[p]filter channel remove <channel> [words...]
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -173,11 +174,12 @@ Remove words from the filter.
|
||||
Use double quotes to remove sentences.
|
||||
|
||||
Examples:
|
||||
- ``[p]filter channel remove word1 word2 word3``
|
||||
- ``[p]filter channel remove "This is a sentence"``
|
||||
- ``[p]filter channel remove #channel word1 word2 word3``
|
||||
- ``[p]filter channel remove #channel "This is a sentence"``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<channel>`` The text, voice, stage, or forum channel to add filtered words to.
|
||||
- ``[words...]`` The words or sentences to no longer filter.
|
||||
|
||||
.. _filter-command-filter-clear:
|
||||
|
||||
@@ -215,11 +215,11 @@ modset deletenames
|
||||
|
||||
**Description**
|
||||
|
||||
Delete all stored usernames and nicknames.
|
||||
Delete all stored usernames, global display names, and server nicknames.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<confirmation>``: Whether to delete all stored usernames and nicknames. |bool-input|
|
||||
- ``<confirmation>``: Whether to delete all stored usernames, global display names, and server nicknames. |bool-input|
|
||||
|
||||
.. _mod-command-modset-deleterepeats:
|
||||
|
||||
@@ -469,7 +469,7 @@ modset tracknicknames
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether nickname changes should be tracked.
|
||||
Toggle whether server nickname changes should be tracked.
|
||||
|
||||
This setting will be overridden if trackallnames is disabled.
|
||||
|
||||
@@ -527,7 +527,7 @@ names
|
||||
|
||||
**Description**
|
||||
|
||||
Show previous names and nicknames of a member.
|
||||
Show previous usernames, global display names, and server nicknames of a member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
@@ -549,14 +549,14 @@ rename
|
||||
|
||||
**Description**
|
||||
|
||||
Change a member's nickname.
|
||||
Change a member's server nickname.
|
||||
|
||||
Leaving the nickname empty will remove it.
|
||||
Leaving the nickname argument empty will remove it.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: |member-input|
|
||||
* ``[nickname]``: The new nickname for the member.
|
||||
* ``[nickname]``: The new server nickname for the member.
|
||||
|
||||
.. _mod-command-slowmode:
|
||||
|
||||
@@ -574,14 +574,14 @@ slowmode
|
||||
|
||||
**Description**
|
||||
|
||||
Changes channel's slowmode setting.
|
||||
Changes thread's or channel's slowmode setting.
|
||||
|
||||
Interval can be anything from 0 seconds to 6 hours.
|
||||
Use without parameters to disable.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[interval=0:00:00]``: The time for the channel's slowmode settings.
|
||||
* ``[interval=0:00:00]``: The time for the thread's/channel's slowmode settings.
|
||||
|
||||
.. note::
|
||||
Interval can be anything from 0 seconds to 6 hours.
|
||||
@@ -684,9 +684,9 @@ userinfo
|
||||
Show information about a user.
|
||||
|
||||
This includes fields for status, discord join date, server
|
||||
join date, voice state and previous names/nicknames.
|
||||
join date, voice state and previous usernames/global display names/nicknames.
|
||||
|
||||
If the user has no roles, previous names or previous nicknames,
|
||||
If the user has no roles, previous usernames, global display names, or server nicknames,
|
||||
these fields will be omitted.
|
||||
|
||||
**Arguments**
|
||||
|
||||
@@ -19,7 +19,7 @@ find detailed docs about usage and commands.
|
||||
Usage
|
||||
-----
|
||||
|
||||
Manage log channels for moderation actions.
|
||||
Browse and manage modlog cases. To manage modlog settings, use ``[p]modlogset``.
|
||||
|
||||
|
||||
.. _modlog-commands:
|
||||
@@ -88,85 +88,6 @@ List cases for the specified member.
|
||||
|
||||
* ``<member>``: The member to get cases for. |member-input|
|
||||
|
||||
.. _modlog-command-modlogset:
|
||||
|
||||
^^^^^^^^^
|
||||
modlogset
|
||||
^^^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modlogset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage modlog settings.
|
||||
|
||||
.. _modlog-command-modlogset-cases:
|
||||
|
||||
"""""""""""""""
|
||||
modlogset cases
|
||||
"""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modlogset cases [action]
|
||||
|
||||
**Description**
|
||||
|
||||
Enable or disable case creation for a mod action, 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:
|
||||
|
||||
^^^^^^
|
||||
|
||||
@@ -91,7 +91,7 @@ mutechannel
|
||||
|
||||
**Description**
|
||||
|
||||
Mute a user in the current text channel.
|
||||
Mute a user in the current text channel (or in the parent of the current thread).
|
||||
|
||||
Examples:
|
||||
|
||||
@@ -145,28 +145,6 @@ If no time interval is provided this will be cleared.
|
||||
|
||||
* ``[time]``: The length of time for a default mute.
|
||||
|
||||
.. _mutes-command-muteset-forcerole:
|
||||
|
||||
"""""""""""""""""
|
||||
muteset forcerole
|
||||
"""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset forcerole <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Whether or not to force role only mutes on the bot.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
|
||||
|
||||
.. _mutes-command-muteset-makerole:
|
||||
|
||||
""""""""""""""""
|
||||
@@ -238,8 +216,8 @@ muteset role
|
||||
|
||||
Sets the role to be applied when muting a user.
|
||||
|
||||
If no role is setup the bot will attempt to mute a user by setting
|
||||
channel overwrites in all channels to prevent the user from sending messages.
|
||||
If no role is setup the bot will attempt to mute a user
|
||||
by utilizing server timeouts.
|
||||
|
||||
.. Note::
|
||||
|
||||
@@ -355,13 +333,41 @@ unmutechannel
|
||||
|
||||
**Description**
|
||||
|
||||
Unmute a user in this channel.
|
||||
Unmute a user in this channel (or in the parent of this thread).
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[reason]``: The reason for the unmute.
|
||||
|
||||
.. _mutes-command-timeout:
|
||||
|
||||
^^^^^^^
|
||||
timeout
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]timeout <users...> [time_and_reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Timeout users.
|
||||
|
||||
Examples:
|
||||
|
||||
* ``[p]timeout @member1 @member2 spam 5 hours``
|
||||
* ``[p]timeout @member1 3 days``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[time_and_reason]``: The time and reason. If no time is provided, the mute will use the default set time or give an error if this hasn't been configured.
|
||||
|
||||
.. _mutes-command-voicemute:
|
||||
|
||||
^^^^^^^^^
|
||||
@@ -372,7 +378,7 @@ voicemute
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voicemute <users...> [reason]
|
||||
[p]voicemute <users...> [time_and_reason]
|
||||
|
||||
**Description**
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Global rules (set by the owner) are checked first, then rules set for servers. I
|
||||
|
||||
1. Rules about a user.
|
||||
2. Rules about the voice channel a user is in.
|
||||
3. Rules about the text channel a command was issued in.
|
||||
3. Rules about the text channel or a parent of the thread a command was issued in.
|
||||
4. Rules about a role the user has (The highest role they have with a rule will be used).
|
||||
5. Rules about the server a user is in (Global rules only).
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ report interact
|
||||
|
||||
Open a message tunnel.
|
||||
|
||||
This tunnel will forward things you say in this channel
|
||||
This tunnel will forward things you say in this channel or thread
|
||||
to the ticket opener's direct messages.
|
||||
|
||||
Tunnels do not persist across bot restarts.
|
||||
|
||||
@@ -338,6 +338,22 @@ To set the Twitch API tokens, follow these steps:
|
||||
.. attention:: These tokens are sensitive and should only be
|
||||
used in a private channel or in DM with the bot.
|
||||
|
||||
.. _streams-command-streamset-usebuttons:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
streamset usebuttons
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset usebuttons
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether to use buttons for stream alerts.
|
||||
|
||||
.. _streams-command-picarto:
|
||||
|
||||
^^^^^^^
|
||||
|
||||
@@ -334,6 +334,26 @@ will use all of the specified lists to select questions from.
|
||||
|
||||
- ``<categories...>`` The category to play. Can be multiple.
|
||||
|
||||
.. _trivia-command-trivia-info:
|
||||
|
||||
^^^^^^^^^^^
|
||||
trivia info
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia info <category>
|
||||
|
||||
**Description**
|
||||
|
||||
Get information about a trivia category.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<category>``: The category to get the information for.
|
||||
|
||||
.. _trivia-command-trivia-leaderboard:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -31,8 +31,8 @@ In terms of scope, global rules will be checked first, then server rules.
|
||||
For each of those, the first rule pertaining to one of the following models will be used:
|
||||
|
||||
1. User
|
||||
2. Voice channel
|
||||
3. Text channel
|
||||
2. Voice/stage channel a user is connected to
|
||||
3. The channel command was issued in (parent channel in case of invocations in threads)
|
||||
4. Channel category
|
||||
5. Roles, highest to lowest
|
||||
6. Server (can only be in global rules)
|
||||
|
||||
45
docs/conf.py
45
docs/conf.py
@@ -19,6 +19,7 @@
|
||||
#
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
sys.path.insert(0, os.path.abspath(".."))
|
||||
sys.path.insert(0, os.path.abspath("_ext"))
|
||||
@@ -61,7 +62,7 @@ master_doc = "index"
|
||||
|
||||
# General information about the project.
|
||||
project = "Red - Discord Bot"
|
||||
copyright = "2018-2021, Cog Creators"
|
||||
copyright = f"2018-{time.strftime('%Y')}, Cog Creators"
|
||||
author = "Cog Creators"
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
@@ -69,7 +70,7 @@ author = "Cog Creators"
|
||||
# built documents.
|
||||
#
|
||||
from redbot.core import __version__
|
||||
from discord import __version__ as dpy_version
|
||||
from discord import __version__ as dpy_version, version_info as dpy_version_info
|
||||
|
||||
# The short X.Y version.
|
||||
version = __version__
|
||||
@@ -81,7 +82,7 @@ release = __version__
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
language = "en"
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
@@ -137,7 +138,7 @@ html_context = {
|
||||
"display_github": True,
|
||||
"github_user": "Cog-Creators",
|
||||
"github_repo": "Red-DiscordBot",
|
||||
"github_version": "V3/develop/docs/",
|
||||
"github_version": "V3/develop",
|
||||
}
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
@@ -227,10 +228,17 @@ linkcheck_retries = 3
|
||||
|
||||
# -- Options for extensions -----------------------------------------------
|
||||
|
||||
if dpy_version_info.releaselevel == "final":
|
||||
# final release - versioned docs should be available
|
||||
dpy_docs_url = f"https://discordpy.readthedocs.io/en/v{dpy_version}/"
|
||||
else:
|
||||
# alpha release - `latest` version of docs should be used
|
||||
dpy_docs_url = "https://discordpy.readthedocs.io/en/latest/"
|
||||
|
||||
# Intersphinx
|
||||
intersphinx_mapping = {
|
||||
"python": ("https://docs.python.org/3", None),
|
||||
"dpy": (f"https://discordpy.readthedocs.io/en/v{dpy_version}/", None),
|
||||
"dpy": (dpy_docs_url, None),
|
||||
"motor": ("https://motor.readthedocs.io/en/stable/", None),
|
||||
"babel": ("http://babel.pocoo.org/en/stable/", None),
|
||||
"dateutil": ("https://dateutil.readthedocs.io/en/stable/", None),
|
||||
@@ -240,9 +248,12 @@ intersphinx_mapping = {
|
||||
# This allows to create links to d.py docs with
|
||||
# :dpy_docs:`link text <site_name.html>`
|
||||
extlinks = {
|
||||
"dpy_docs": (f"https://discordpy.readthedocs.io/en/v{dpy_version}/%s", None),
|
||||
"issue": ("https://github.com/Cog-Creators/Red-DiscordBot/issues/%s", "#"),
|
||||
"ghuser": ("https://github.com/%s", "@"),
|
||||
"dpy_docs": (f"{dpy_docs_url}%s", None),
|
||||
"issue": ("https://github.com/Cog-Creators/Red-DiscordBot/issues/%s", "#%s"),
|
||||
# below URL redirects to user page, if they don't have GH Sponsors set up,
|
||||
# while allowing us to direct readers directly at a sponsorship opportunity,
|
||||
# if they do
|
||||
"ghuser": ("https://github.com/sponsors/%s", "@%s"),
|
||||
}
|
||||
|
||||
# Doctest
|
||||
@@ -253,3 +264,21 @@ doctest_test_doctest_blocks = ""
|
||||
# Autodoc options
|
||||
autodoc_default_options = {"show-inheritance": True}
|
||||
autodoc_typehints = "none"
|
||||
|
||||
|
||||
from docutils import nodes
|
||||
from sphinx.transforms import SphinxTransform
|
||||
|
||||
|
||||
# d.py's |coro| substitution leaks into our docs because we don't replace some of the docstrings
|
||||
class IgnoreCoroSubstitution(SphinxTransform):
|
||||
default_priority = 210
|
||||
|
||||
def apply(self, **kwargs) -> None:
|
||||
for ref in self.document.traverse(nodes.substitution_reference):
|
||||
if ref["refname"] == "coro":
|
||||
ref.replace_self(nodes.Text(""))
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_transform(IgnoreCoroSubstitution)
|
||||
|
||||
@@ -69,9 +69,13 @@ Additional References
|
||||
.. py:currentmodule:: redbot.core.bot
|
||||
|
||||
.. automethod:: Red.get_shared_api_tokens
|
||||
:noindex:
|
||||
|
||||
.. automethod:: Red.set_shared_api_tokens
|
||||
:noindex:
|
||||
|
||||
.. automethod:: Red.remove_shared_api_tokens
|
||||
:noindex:
|
||||
|
||||
.. automethod:: Red.remove_shared_api_services
|
||||
:noindex:
|
||||
|
||||
@@ -21,9 +21,7 @@ Basic Usage
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
@commands.command()
|
||||
async def balance(self, ctx, user: discord.Member = None):
|
||||
if user is None:
|
||||
user = ctx.author
|
||||
async def balance(self, ctx, user: discord.Member = commands.Author):
|
||||
bal = await bank.get_balance(user)
|
||||
currency = await bank.get_currency_name(ctx.guild)
|
||||
await ctx.send(
|
||||
|
||||
@@ -6,18 +6,12 @@ Bot
|
||||
|
||||
.. automodule:: redbot.core.bot
|
||||
|
||||
RedBase
|
||||
^^^^^^^
|
||||
|
||||
.. autoclass:: RedBase
|
||||
:members:
|
||||
:exclude-members: get_context
|
||||
|
||||
.. automethod:: register_rpc_handler
|
||||
.. automethod:: unregister_rpc_handler
|
||||
|
||||
Red
|
||||
^^^
|
||||
|
||||
.. autoclass:: Red
|
||||
:members:
|
||||
:exclude-members: get_context, get_embed_color
|
||||
|
||||
.. automethod:: register_rpc_handler
|
||||
.. automethod:: unregister_rpc_handler
|
||||
|
||||
@@ -8,4 +8,4 @@ The following are all decorators for commands, which add restrictions to where a
|
||||
run.
|
||||
|
||||
.. automodule:: redbot.core.commands
|
||||
:members: permissions_check, bot_has_permissions, bot_in_a_guild, has_permissions, has_guild_permissions, is_owner, guildowner, guildowner_or_permissions, admin, admin_or_permissions, mod, mod_or_permissions
|
||||
:members: permissions_check, bot_has_permissions, bot_in_a_guild, bot_can_manage_channel, bot_can_react, has_permissions, can_manage_channel, has_guild_permissions, is_owner, guildowner, guildowner_or_can_manage_channel, guildowner_or_permissions, admin, admin_or_can_manage_channel, admin_or_permissions, mod, mod_or_can_manage_channel, mod_or_permissions
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
.. cog manager docs
|
||||
|
||||
===========
|
||||
Cog Manager
|
||||
===========
|
||||
|
||||
.. automodule:: redbot.core.cog_manager
|
||||
:members:
|
||||
@@ -11,8 +11,12 @@ extend functionalities used throughout the bot, as outlined below.
|
||||
|
||||
.. autofunction:: redbot.core.commands.command
|
||||
|
||||
.. autofunction:: redbot.core.commands.hybrid_command
|
||||
|
||||
.. autofunction:: redbot.core.commands.group
|
||||
|
||||
.. autofunction:: redbot.core.commands.hybrid_group
|
||||
|
||||
.. autoclass:: redbot.core.commands.Cog
|
||||
|
||||
.. automethod:: format_help_for_context
|
||||
@@ -21,13 +25,21 @@ extend functionalities used throughout the bot, as outlined below.
|
||||
|
||||
.. automethod:: red_delete_data_for_user
|
||||
|
||||
.. autoclass:: redbot.core.commands.GroupCog
|
||||
|
||||
.. autoclass:: redbot.core.commands.Command
|
||||
:members:
|
||||
:inherited-members: format_help_for_context
|
||||
|
||||
.. autoclass:: redbot.core.commands.HybridCommand
|
||||
:members:
|
||||
|
||||
.. autoclass:: redbot.core.commands.Group
|
||||
:members:
|
||||
|
||||
.. autoclass:: redbot.core.commands.HybridGroup
|
||||
:members:
|
||||
|
||||
.. autoclass:: redbot.core.commands.Context
|
||||
:members:
|
||||
|
||||
@@ -54,7 +66,7 @@ Help Functionality
|
||||
|
||||
.. warning::
|
||||
|
||||
The content in this section is provisional and may change
|
||||
The content in this section is `provisional <developer-guarantees-exclusions>` and may change
|
||||
without prior notice or warning. Updates to this will be communicated
|
||||
on `this issue <https://github.com/Cog-Creators/Red-DiscordBot/issues/4084>`_
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Basic Usage
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
|
||||
self.config.register_global(
|
||||
foo=True
|
||||
@@ -55,15 +55,19 @@ Then, in the class's :code:`__init__` function, you need to get a config instanc
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
|
||||
The ``identifier`` in :py:meth:`Config.get_conf` is used to keep your cog's data separate
|
||||
from that of another cog, and thus should be unique to your cog. For example: if we
|
||||
have two cogs named :code:`MyCog` and their identifier is different, each will have
|
||||
its own data without overwriting the other's data. Note that it is also possible
|
||||
to force registration of a data key before allowing you to get and set data for
|
||||
that key by adding :code:`force_registration=True` after identifier (that defaults
|
||||
to :code:`False` though)
|
||||
its own data without overwriting the other's data.
|
||||
|
||||
Note that, as shown by most of the examples in this document, it is also possible to
|
||||
force registration of a data key before allowing you to get and set data for that key
|
||||
by adding :code:`force_registration=True` after identifier.
|
||||
When this is set to :code:`False` (the default), the default value for any key that isn't registered
|
||||
will be :code:`None`. When this is set to :code:`True` (as shown in this document), attempting
|
||||
to read from or write to any key that isn't registered will raise an :exc:`AttributeError`.
|
||||
|
||||
After we've gotten that, we need to register default values:
|
||||
|
||||
@@ -71,7 +75,7 @@ After we've gotten that, we need to register default values:
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
default_global = {
|
||||
"foobar": True,
|
||||
"foo": {
|
||||
@@ -98,13 +102,13 @@ in various ways:
|
||||
.. code-block:: python
|
||||
|
||||
@commands.command()
|
||||
@checks.admin_or_permissions(manage_guild=True)
|
||||
@commands.admin_or_permissions(manage_guild=True)
|
||||
async def setbaz(self, ctx, new_value):
|
||||
await self.config.guild(ctx.guild).baz.set(new_value)
|
||||
await ctx.send("Value of baz has been changed!")
|
||||
|
||||
@commands.command()
|
||||
@checks.is_owner()
|
||||
@commands.is_owner()
|
||||
async def setfoobar(self, ctx, new_value):
|
||||
await self.config.foobar.set(new_value)
|
||||
|
||||
@@ -161,7 +165,7 @@ Here is an example of the :code:`async with` syntax:
|
||||
* :py:meth:`Config.member` which takes :py:class:`discord.Member`.
|
||||
* :py:meth:`Config.user` which takes :py:class:`discord.User`.
|
||||
* :py:meth:`Config.role` which takes :py:class:`discord.Role`.
|
||||
* :py:meth:`Config.channel` which takes :py:class:`discord.TextChannel`.
|
||||
* :py:meth:`Config.channel` which takes :py:class:`discord.abc.GuildChannel` or :py:class:`discord.Thread`.
|
||||
|
||||
If you need to wipe data from the config, you want to look at :py:meth:`Group.clear`, or :py:meth:`Config.clear_all`
|
||||
and similar methods, such as :py:meth:`Config.clear_all_guilds`.
|
||||
@@ -213,7 +217,7 @@ Tutorial example.
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
default_guild = {
|
||||
"blah": [],
|
||||
"baz": 1234567890
|
||||
@@ -259,12 +263,12 @@ Now let's see an example that uses multiple identifiers:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from redbot.core import Config, commands, checks
|
||||
from redbot.core import Config, commands
|
||||
|
||||
|
||||
class ChannelAccess(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
default_access = {
|
||||
"allowed": False
|
||||
}
|
||||
@@ -273,7 +277,7 @@ Now let's see an example that uses multiple identifiers:
|
||||
self.config.register_custom("ChannelAccess", **default_access)
|
||||
|
||||
@commands.command()
|
||||
@checks.is_owner()
|
||||
@commands.is_owner()
|
||||
async def grantaccess(self, ctx, channel: discord.TextChannel, member: discord.Member):
|
||||
await self.config.custom("ChannelAccess", channel.id, member.id).allowed.set(True)
|
||||
await ctx.send("Member has been granted access to that channel")
|
||||
@@ -304,7 +308,7 @@ the built-in Economy credits::
|
||||
|
||||
class Pets(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, 1234567890)
|
||||
self.config = Config.get_conf(self, 1234567890, force_registration=True)
|
||||
|
||||
# Here we'll assign some default costs for the pets
|
||||
self.config.register_global(
|
||||
@@ -467,7 +471,7 @@ much the same way they would in V2. The following examples will demonstrate how
|
||||
async def setup(bot):
|
||||
cog = ExampleCog()
|
||||
await cog.load_data()
|
||||
bot.add_cog(cog)
|
||||
await bot.add_cog(cog)
|
||||
|
||||
************************************
|
||||
Best practices and performance notes
|
||||
@@ -509,7 +513,7 @@ API Reference
|
||||
includes keys within a `dict` when one is being set, as well as keys in nested dictionaries
|
||||
within that `dict`. For example::
|
||||
|
||||
>>> config = Config.get_conf(self, identifier=999)
|
||||
>>> config = Config.get_conf(self, identifier=999, force_registration=True)
|
||||
>>> config.register_global(foo={})
|
||||
>>> await config.foo.set_raw(123, value=True)
|
||||
>>> await config.foo()
|
||||
@@ -540,30 +544,14 @@ Value
|
||||
:members:
|
||||
:special-members: __call__
|
||||
|
||||
IdentifierData
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
****************
|
||||
Driver Reference
|
||||
****************
|
||||
|
||||
.. autofunction:: redbot.core.drivers.get_driver
|
||||
|
||||
.. autoclass:: redbot.core.drivers.BackendType
|
||||
.. autoclass:: IdentifierData
|
||||
:members:
|
||||
|
||||
.. autoclass:: redbot.core.drivers.ConfigCategory
|
||||
:members:
|
||||
ConfigCategory
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
Base Driver
|
||||
^^^^^^^^^^^
|
||||
.. autoclass:: redbot.core.drivers.BaseDriver
|
||||
:members:
|
||||
|
||||
JSON Driver
|
||||
^^^^^^^^^^^
|
||||
.. autoclass:: redbot.core.drivers.JsonDriver
|
||||
:members:
|
||||
|
||||
Postgres Driver
|
||||
^^^^^^^^^^^^^^^
|
||||
.. autoclass:: redbot.core.drivers.PostgresDriver
|
||||
.. autoclass:: ConfigCategory
|
||||
:members:
|
||||
|
||||
@@ -21,7 +21,7 @@ Basic Usage
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
@commands.command()
|
||||
@checks.admin_or_permissions(ban_members=True)
|
||||
@commands.admin_or_permissions(ban_members=True)
|
||||
async def ban(self, ctx, user: discord.Member, reason: str = None):
|
||||
await ctx.guild.ban(user)
|
||||
case = await modlog.create_case(
|
||||
@@ -35,8 +35,7 @@ Basic Usage
|
||||
Registering Case types
|
||||
**********************
|
||||
|
||||
To register case types, use an asynchronous ``initialize()`` method and call
|
||||
it from your setup function:
|
||||
To register case types, use a special ``cog_load()`` method which is called when you add a cog:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@@ -46,7 +45,7 @@ it from your setup function:
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
|
||||
async def initialize(self):
|
||||
async def cog_load(self):
|
||||
await self.register_casetypes()
|
||||
|
||||
@staticmethod
|
||||
@@ -87,8 +86,7 @@ it from your setup function:
|
||||
|
||||
async def setup(bot):
|
||||
cog = MyCog()
|
||||
await cog.initialize()
|
||||
bot.add_cog(cog)
|
||||
await bot.add_cog(cog)
|
||||
|
||||
.. important::
|
||||
Image should be the emoji you want to represent your case type with.
|
||||
|
||||
@@ -6,7 +6,8 @@ RPC
|
||||
|
||||
.. important::
|
||||
|
||||
RPC support is included in Red on a provisional basis. Backwards incompatible changes (up to and including removal of the RPC) may occur if deemed necessary.
|
||||
RPC support is included in Red on a `provisional <developer-guarantees-exclusions>` basis.
|
||||
Backwards incompatible changes (up to and including removal of the RPC) may occur if deemed necessary.
|
||||
|
||||
V3 comes default with an internal RPC server that may be used to remotely control the bot in various ways.
|
||||
Cogs must register functions to be exposed to RPC clients.
|
||||
@@ -20,9 +21,9 @@ Examples
|
||||
|
||||
.. code-block:: Python
|
||||
|
||||
def setup(bot):
|
||||
async def setup(bot):
|
||||
c = Cog()
|
||||
bot.add_cog(c)
|
||||
await bot.add_cog(c)
|
||||
bot.register_rpc_handler(c.rpc_method)
|
||||
|
||||
*******************************
|
||||
@@ -64,4 +65,4 @@ All cog-based methods expect their parameter list to take one argument, a JSON o
|
||||
API Reference
|
||||
*************
|
||||
|
||||
Please see the :class:`redbot.core.bot.RedBase` class for details on the RPC handler register and unregister methods.
|
||||
Please see the :class:`redbot.core.bot.Red` class for details on the RPC handler register and unregister methods.
|
||||
|
||||
21
docs/framework_tree.rst
Normal file
21
docs/framework_tree.rst
Normal file
@@ -0,0 +1,21 @@
|
||||
.. tree module docs
|
||||
|
||||
====
|
||||
Tree
|
||||
====
|
||||
|
||||
Red uses a subclass of discord.py's ``CommandTree`` object in order to allow Cog Creators to add application commands to their cogs without worrying about the command count limit and to support caching ``AppCommand`` objects. When an app command is added to the bot's tree, it will not show up in ``tree.get_commands`` or other similar methods unless the command is "enabled" with ``[p]slash enable`` (similar to "load"ing a cog) and ``tree.red_check_enabled`` has been run since the command was added to the tree.
|
||||
|
||||
.. note::
|
||||
|
||||
If you are adding app commands to the tree during load time, the loading process will call ``tree.red_check_enabled`` for your cog and its app commands. If you are adding app commands to the bot **outside of load time**, a call to ``tree.red_check_enabled`` after adding the commands is required to ensure the commands will appear properly.
|
||||
|
||||
If application commands from your cog show up in ``[p]slash list`` as enabled from an ``(unknown)`` cog and disabled from your cog at the same time, you did not follow the instructions above. You must manually call ``tree.red_check_enabled`` **after** adding the commands to the tree.
|
||||
|
||||
.. automodule:: redbot.core.tree
|
||||
|
||||
RedTree
|
||||
^^^^^^^
|
||||
|
||||
.. autoclass:: RedTree
|
||||
:members:
|
||||
@@ -8,7 +8,7 @@ General Utility
|
||||
===============
|
||||
|
||||
.. automodule:: redbot.core.utils
|
||||
:members: deduplicate_iterables, bounded_gather, bounded_gather_iter, get_end_user_data_statement, get_end_user_data_statement_or_raise
|
||||
:members: deduplicate_iterables, bounded_gather, bounded_gather_iter, get_end_user_data_statement, get_end_user_data_statement_or_raise, can_user_send_messages_in, can_user_manage_channel, can_user_react_in
|
||||
|
||||
.. autoclass:: AsyncIter
|
||||
:members:
|
||||
@@ -27,6 +27,10 @@ Chat Formatting
|
||||
|
||||
.. automodule:: redbot.core.utils.chat_formatting
|
||||
:members:
|
||||
:exclude-members: pagify
|
||||
|
||||
.. autofunction:: pagify(text, delims=('\n',), *, priority=False, escape_mass_mentions=True, shorten_by=8, page_length=2000)
|
||||
:for:
|
||||
|
||||
Embed Helpers
|
||||
=============
|
||||
@@ -35,8 +39,8 @@ Embed Helpers
|
||||
:members:
|
||||
:exclude-members: randomize_color
|
||||
|
||||
Reaction Menus
|
||||
==============
|
||||
Menus
|
||||
=====
|
||||
|
||||
.. automodule:: redbot.core.utils.menus
|
||||
:members:
|
||||
@@ -67,9 +71,81 @@ Tunnel
|
||||
|
||||
.. automodule:: redbot.core.utils.tunnel
|
||||
:members: Tunnel
|
||||
:exclude-members: files_from_attatch
|
||||
|
||||
Common Filters
|
||||
==============
|
||||
|
||||
.. automodule:: redbot.core.utils.common_filters
|
||||
:members:
|
||||
|
||||
Utility UI
|
||||
==========
|
||||
|
||||
.. automodule:: redbot.core.utils.views
|
||||
:members:
|
||||
:exclude-members: ConfirmView
|
||||
|
||||
.. autoclass:: ConfirmView
|
||||
:members:
|
||||
:exclude-members: confirm_button, dismiss_button
|
||||
|
||||
.. autoattribute:: confirm_button
|
||||
:no-value:
|
||||
|
||||
A `discord.ui.Button` to confirm the message.
|
||||
|
||||
The button's callback will set `result` to ``True``, defer the response,
|
||||
and call `on_timeout()` to clean up the view.
|
||||
|
||||
.. rubric:: Example
|
||||
|
||||
Changing the style and label of this `discord.ui.Button`::
|
||||
|
||||
view = ConfirmView(ctx.author)
|
||||
view.confirm_button.style = discord.ButtonStyle.red
|
||||
view.confirm_button.label = "Delete"
|
||||
view.dismiss_button.label = "Cancel"
|
||||
view.message = await ctx.send(
|
||||
"Are you sure you want to remove #very-important-channel?", view=view
|
||||
)
|
||||
await view.wait()
|
||||
if view.result:
|
||||
await ctx.send("Channel #very-important-channel deleted.")
|
||||
else:
|
||||
await ctx.send("Canceled.")
|
||||
|
||||
:type: discord.ui.Button
|
||||
|
||||
.. autoattribute:: dismiss_button
|
||||
:no-value:
|
||||
|
||||
A `discord.ui.Button` to dismiss the message.
|
||||
|
||||
The button's callback will set `result` to ``False``, defer the response,
|
||||
and call `on_timeout()` to clean up the view.
|
||||
|
||||
.. rubric:: Example
|
||||
|
||||
Changing the style and label of this `discord.ui.Button`::
|
||||
|
||||
view = ConfirmView(ctx.author)
|
||||
view.confirm_button.style = discord.ButtonStyle.red
|
||||
view.confirm_button.label = "Delete"
|
||||
view.dismiss_button.label = "Cancel"
|
||||
view.message = await ctx.send(
|
||||
"Are you sure you want to remove #very-important-channel?", view=view
|
||||
)
|
||||
await view.wait()
|
||||
if view.result:
|
||||
await ctx.send("Channel #very-important-channel deleted.")
|
||||
else:
|
||||
await ctx.send("Canceled.")
|
||||
|
||||
:type: discord.ui.Button
|
||||
|
||||
AntiSpam
|
||||
========
|
||||
|
||||
.. automodule:: redbot.core.utils.antispam
|
||||
:members:
|
||||
|
||||
@@ -134,7 +134,7 @@ Red is built with cogs, a fancy term for plugins. They are
|
||||
modules that add functionality to Red. They contain
|
||||
commands to use.
|
||||
|
||||
Red comes with 19 cogs containing the basic features, such
|
||||
Red comes with 18 cogs containing the basic features, such
|
||||
as moderation, utility, music, streams...
|
||||
|
||||
You can see your loaded and unloaded cogs with the ``[p]cogs``
|
||||
@@ -225,7 +225,7 @@ Administrator
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
The administrator is defined by its roles. You can set multiple admin roles
|
||||
with the ``[p]set addadminrole`` and ``[p]set removeadminrole`` commands.
|
||||
with the ``[p]set roles addadminrole`` and ``[p]set roles removeadminrole`` commands.
|
||||
|
||||
For example, in the mod cog, an admin can use the ``[p]modset`` command
|
||||
which defines the cog settings.
|
||||
@@ -235,7 +235,7 @@ Moderator
|
||||
~~~~~~~~~
|
||||
|
||||
A moderator is a step above the average users. You can set multiple moderator
|
||||
roles with the ``[p]set addmodrole`` and ``[p]set removemodrole`` commands.
|
||||
roles with the ``[p]set roles addmodrole`` and ``[p]set roles removemodrole`` commands.
|
||||
|
||||
For example, in the filter cog, a mod will be able to use the various commands
|
||||
under ``[p]filter`` (such as adding and removing filtered words), but they will
|
||||
@@ -282,7 +282,7 @@ If you want to do it, follow these steps.
|
||||
2. **Install Linux**
|
||||
|
||||
Most of the VPS providers have tools for installing Linux automatically. If
|
||||
you're a beginner, we recommend **Ubuntu 22.04 LTS**.
|
||||
you're a beginner, we recommend **Ubuntu 24.04 LTS**.
|
||||
|
||||
For Raspberry Pi users, just install `Raspbian
|
||||
<https://www.raspberrypi.org/software/>`_ on a micro-SD card.
|
||||
|
||||
@@ -55,7 +55,7 @@ the purposes of this example, we'll call this :code:`mycog`).
|
||||
In this folder, create three files: :code:`__init__.py`,
|
||||
:code:`mycog.py`, and :code:`info.json`. Open the folder in
|
||||
a text editor or IDE (examples include `Sublime Text 3 <https://www.sublimetext.com/>`_,
|
||||
`Visual Studio Code <https://code.visualstudio.com/>`_, `Atom <https://atom.io/>`_, and
|
||||
`Visual Studio Code <https://code.visualstudio.com/>`_, and
|
||||
`PyCharm <http://www.jetbrains.com/pycharm/>`_).
|
||||
|
||||
.. attention::
|
||||
@@ -102,8 +102,8 @@ Open :code:`__init__.py`. In that file, place the following:
|
||||
from .mycog import MyCog
|
||||
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(MyCog(bot))
|
||||
async def setup(bot):
|
||||
await bot.add_cog(MyCog(bot))
|
||||
|
||||
Make sure that both files are saved.
|
||||
|
||||
@@ -147,7 +147,7 @@ have successfully created a cog!
|
||||
------ __init__.py
|
||||
------ coolcog.py
|
||||
|
||||
You would then use :code:`[p]addpath D:\red-cogs` to add the path
|
||||
You would then use :code:`[p]addpath D:\\red-cogs` to add the path
|
||||
and then you can use :code:`[p]load mycog` or :code:`[p]load coolcog`
|
||||
to load them
|
||||
|
||||
|
||||
@@ -41,17 +41,16 @@ Any Cog Creator that does not follow these requirements will have their repo rem
|
||||
- Repo-wide ``info.json`` file with the keys
|
||||
|
||||
- ``author``
|
||||
- ``name``
|
||||
- ``short``
|
||||
- ``description``
|
||||
|
||||
- Cog ``info.json`` files with the keys
|
||||
|
||||
- ``author``
|
||||
- ``name``
|
||||
- ``short``
|
||||
- ``requirements`` (if applicable)
|
||||
- ``description``
|
||||
- ``min_python_version`` (if applicable)
|
||||
|
||||
See `info-json-format` for more information on how to set up ``info.json`` files.
|
||||
|
||||
@@ -73,7 +72,7 @@ Any Cog Creator that does not follow these requirements will have their repo rem
|
||||
|
||||
- Cogs that are more than what is able to be run in a simple eval.
|
||||
- Cogs that are more than just a simple API access request.
|
||||
- Cogs that properly use Red utilities, including Config, checks, and any other utility functions.
|
||||
- Cogs that properly use Red utilities, for example Config, or any other utility functions.
|
||||
- Cogs that use event listeners (bot.wait_for or cog-wide listeners) or custom tasks that are efficient and handle exceptions appropriately.
|
||||
- Cogs that handle errors properly.
|
||||
- Cogs that handle permissions properly.
|
||||
@@ -84,7 +83,7 @@ Any Cog Creator that does not follow these requirements will have their repo rem
|
||||
- The default locale must be English.
|
||||
- The main cog class and every command must have a doc-string.
|
||||
- No cog allows for escalation of permissions. (e.g., sending a mass ping through the bot without having permission to do so)
|
||||
- Respect the role hierarchy. Don’t let a lower role have a way to grant a higher role.
|
||||
- Respect the role hierarchy. Don't let a lower role have a way to grant a higher role.
|
||||
- If your cog install comes with any pre-packaged data, use `bundled_data_path()` to access it.
|
||||
- If your cog install creates any non-config data, use `cog_data_path()` to store it.
|
||||
- Unless the cog is intentionally designed to listen to certain input from bots, cogs should ignore input from bots.
|
||||
@@ -94,8 +93,6 @@ Any Cog Creator that does not follow these requirements will have their repo rem
|
||||
- If that's not possible, don't break anything in core or any other cog with your code.
|
||||
- If you have to use private methods, lock the cog to specific Red versions you can guarantee it works on without breaking anything using the ``min_bot_version`` and ``max_bot_version`` keys in that cog's ``info.json`` file.
|
||||
|
||||
- Cog Creators must keep their cogs up-to-date with core Red or be delisted until cogs meet Red API changes. Repositories must be kept up to date with the latest version of Red within 3 months of its release.
|
||||
|
||||
.. _recommendations-for-cog-creators:
|
||||
|
||||
--------------------------------
|
||||
@@ -138,14 +135,15 @@ While not required for approved Cog Creators, they are still recommended in orde
|
||||
- ``ctx.embed_color``
|
||||
- ``bot.is_automod_immune``
|
||||
|
||||
- Use checks to limit command use when the bot needs special permissions.
|
||||
- Use decorators to limit command use, restrict usage, or define whether the bot needs special permissions.
|
||||
You can find all of the permission and cooldown related decorators under the ``redbot.core.commands`` namespace.
|
||||
- Check against user input before doing things. Common things to check:
|
||||
|
||||
- Resulting output is safe.
|
||||
- Values provided make sense. (eg. no negative numbers for payday)
|
||||
- Don't unsafely use user input for things like database input.
|
||||
|
||||
- Check events against `bot.cog_disabled_in_guild() <RedBase.cog_disabled_in_guild()>`\
|
||||
- Check events against `bot.cog_disabled_in_guild() <Red.cog_disabled_in_guild()>`\
|
||||
|
||||
- Not all events need to be checked, only those that interact with a guild.
|
||||
- Some discretion may apply, for example,
|
||||
@@ -195,7 +193,12 @@ Other Details
|
||||
- The reviewer of your application has the final word.
|
||||
- Hidden cogs will not be explicitly reviewed, however they are not allowed to contain malicious or ToS breaking code.
|
||||
- QA reserves the right to revoke these roles and all privileges if you are found to be in gross negligence, malicious intent, or reckless abandonment of your repository.
|
||||
- If a Cog Creator's repository is not maintained and kept up to date, that repo will be removed from the approved repo listings until such issues are addressed.
|
||||
- Cogs must be functionally working to the quality of an approved cog on the latest minor version of Red to be listed on the Red Index. Cogs that are not updated within 1 month of initial breakage will be delisted from the index until they are updated. Examples of potential breakage include, but are not limited to:
|
||||
|
||||
- A dependency without version constraints receiving a breaking update
|
||||
- An API changing the schema of its endpoints
|
||||
- Red itself releasing a new minor version
|
||||
|
||||
- Only 1 person is allowed to be the Cog Creator for a particular repo. Multiple people are allowed to maintain the repo, however the "main" owner (and the Cog Creator) is responsible for any code on the repo.
|
||||
- The Cog Creator status for a repo can be transferred to another user if the Cog Creator requests it.
|
||||
- An approved Cog Creator can ask QA to add additional repos they have created to the approved pool.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
Migrating cogs from Red V2
|
||||
==========================
|
||||
|
||||
First, be sure to read :dpy_docs:`discord.py's migration guide <migrating.html>`
|
||||
First, be sure to read :dpy_docs:`discord.py's migration guide <migrating_to_v1.html>`
|
||||
as that covers all of the changes to discord.py that will affect the migration process
|
||||
|
||||
----------------
|
||||
|
||||
339
docs/guide_slash_and_interactions.rst
Normal file
339
docs/guide_slash_and_interactions.rst
Normal file
@@ -0,0 +1,339 @@
|
||||
.. Slash Commands and Interactions
|
||||
|
||||
.. role:: python(code)
|
||||
:language: python
|
||||
|
||||
===============================
|
||||
Slash Commands and Interactions
|
||||
===============================
|
||||
|
||||
This guide is going to cover on how to write a simple slash command into a Red cog.
|
||||
This guide will assume that you have a working basic cog.
|
||||
If you do not have a basic cog, please refer to the :ref:`getting started <getting-started>` guide.
|
||||
It is also adviced to make yourself familiar with `Application Commands <https://discord.com/developers/docs/interactions/application-commands>`__ from Discord's documentation.
|
||||
|
||||
---------------
|
||||
Getting Started
|
||||
---------------
|
||||
|
||||
To start off, we will have to import some additional modules to our cog file.
|
||||
We will be using the ``redbot.core.app_commands`` module to create our slash commands.
|
||||
Once we have imported the module, we can start creating our slash commands in our cog class.
|
||||
For this example we will use a basic hello world command.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import discord
|
||||
|
||||
from redbot.core import commands, app_commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@app_commands.command()
|
||||
async def hello(self, interaction: discord.Interaction):
|
||||
await interaction.response.send_message("Hello World!", ephemeral=True)
|
||||
|
||||
Go ahead and load your cog. Once it is loaded, we will have to enable and sync our slash commands.
|
||||
We can do this by using the :ref:`[p]slash<core-command-slash>` command to manage our slash commands.
|
||||
Once you have registered your slash commands, you can test them out by typing ``/hello`` in your server.
|
||||
|
||||
.. tip::
|
||||
|
||||
You may need to restart your Discord client with ``Ctrl + R`` (or your device's equivalent) to force
|
||||
your client to see the new command after syncing.
|
||||
|
||||
----------------------------
|
||||
Slash Commands and Arguments
|
||||
----------------------------
|
||||
|
||||
There is a lot of flexibility when it comes to slash commands.
|
||||
Below we will go over some of the different stuff you can do with slash commands.
|
||||
|
||||
Decorators
|
||||
----------
|
||||
Just like with text commands, we can use decorators to modify the behaviour of our slash commands.
|
||||
For example, we can use the `app_commands.guild_only() <discord.app_commands.guild_only>` decorator to make our slash command only work in guilds.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import discord
|
||||
|
||||
from redbot.core import commands, app_commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@app_commands.command()
|
||||
@app_commands.guild_only()
|
||||
async def hello(self, interaction: discord.Interaction):
|
||||
await interaction.response.send_message("Hello World!", ephemeral=True)
|
||||
|
||||
One of the more useful decorators is the `app_commands.choices() <discord.app_commands.choices>` decorator.
|
||||
This decorator allows us to specify a list of choices for a specific argument.
|
||||
This is useful for arguments that have a limited number of options.
|
||||
For example, we can use this to create a command that allows us to choose between two different colors.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from redbot.core import commands, app_commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@app_commands.command()
|
||||
@app_commands.describe(color="The color you want to choose")
|
||||
@app_commands.choices(color=[
|
||||
app_commands.Choice(name="Red", value="red"),
|
||||
app_commands.Choice(name="Blue", value="blue"),
|
||||
])
|
||||
async def color(self, interaction: discord.Interaction, color: app_commands.Choice[str]):
|
||||
await interaction.response.send_message(f"Your color is {color.value}", ephemeral=True)
|
||||
|
||||
The user will be shown the ``name`` of the choice, and the argument will be passed a
|
||||
`app_commands.Choice <discord.app_commands.Choice>` object with the ``name`` and ``value`` associated with that choice.
|
||||
This allows user-facing names to be prettier than what is actually processed by the command.
|
||||
|
||||
Alternatively, ``Literal`` can be used if the argument does not need a different
|
||||
user-facing label. When done this way, the resulting parameter will be one of
|
||||
the literal values listed.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from redbot.core import commands, app_commands
|
||||
from typing import Literal
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@app_commands.command()
|
||||
@app_commands.describe(color="The color you want to choose")
|
||||
async def color(self, interaction: discord.Interaction, color: Literal["Red", "Blue"]):
|
||||
await interaction.response.send_message(f"Your color is {color}", ephemeral=True)
|
||||
|
||||
Finally, an `enum.Enum` subclass can be used to specify choices. When done this way, the
|
||||
resulting parameter will be an instance of that enum, rather than `app_commands.Choice <discord.app_commands.Choice>`.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from enum import Enum
|
||||
from redbot.core import commands, app_commands
|
||||
|
||||
class Color(Enum):
|
||||
Red = "red"
|
||||
Blue = "blue"
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@app_commands.command()
|
||||
@app_commands.describe(color="The color you want to choose")
|
||||
async def color(self, interaction: discord.Interaction, color: Color):
|
||||
await interaction.response.send_message(f"Your color is {color.value}", ephemeral=True)
|
||||
|
||||
Check out :dpy_docs:`the full reference of decorators at Discord.py's documentation <interactions/api.html#decorators>`.
|
||||
|
||||
|
||||
Groups & Subcommands
|
||||
--------------------
|
||||
Slash commands can also be grouped together into groups and subcommands.
|
||||
These can be used to create a more complex command structure.
|
||||
|
||||
.. note::
|
||||
Unlike text command groups, top level slash command groups **cannot** be invoked.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import discord
|
||||
|
||||
from redbot.core import commands, app_commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
zoo = app_commands.Group(name="zoo", description="Zoo related commands")
|
||||
|
||||
@zoo.command(name="add", description="Add an animal to the zoo")
|
||||
@app_commands.describe(animal="The animal you want to add")
|
||||
async def zoo_add(self, interaction: discord.Interaction, animal: str):
|
||||
await interaction.response.send_message(f"Added {animal} to the zoo", ephemeral=True)
|
||||
|
||||
@zoo.command(name="remove", description="Remove an animal from the zoo")
|
||||
@app_commands.describe(animal="The animal you want to remove")
|
||||
async def zoo_remove(self, interaction: discord.Interaction, animal: str):
|
||||
await interaction.response.send_message(f"Removed {animal} from the zoo", ephemeral=True)
|
||||
|
||||
Arguments
|
||||
---------
|
||||
As shown in some of the above examples, we can amplify our slash commands with arguments.
|
||||
However with slash commands Discord allows us to do a few more things.
|
||||
Such as specifically select a channel that we'd like to use in our commands,
|
||||
we can do the same with roles and members.
|
||||
Let's take a look at how we can do that.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import discord
|
||||
|
||||
from redbot.core import commands, app_commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@app_commands.command()
|
||||
@app_commands.describe(channel="The channel you want to mention")
|
||||
async def mentionchannel(self, interaction: discord.Interaction, channel: discord.abc.GuildChannel):
|
||||
await interaction.response.send_message(f"That channel is {channel.mention}", ephemeral=True)
|
||||
|
||||
@app_commands.command()
|
||||
@app_commands.describe(role="The role you want to mention")
|
||||
async def mentionrole(self, interaction: discord.Interaction, role: discord.Role):
|
||||
await interaction.response.send_message(f"That role is {role.mention}", ephemeral=True)
|
||||
|
||||
@app_commands.command()
|
||||
@app_commands.describe(member="The member you want to mention")
|
||||
async def mentionmember(self, interaction: discord.Interaction, member: discord.Member):
|
||||
await interaction.response.send_message(f"That member is {member.mention}", ephemeral=True)
|
||||
|
||||
If you try out the mentionchannel command, you will see that it currently accepts any type of channel,
|
||||
however let's say we want to limit this to voice channels only.
|
||||
We can do so by adjusting our type hint to :class:`discord.VoiceChannel` instead of :class:`discord.abc.GuildChannel`.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import discord
|
||||
|
||||
from redbot.core import commands, app_commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@app_commands.command()
|
||||
@app_commands.describe(channel="The channel you want to mention")
|
||||
async def mentionchannel(self, interaction: discord.Interaction, channel: discord.VoiceChannel):
|
||||
await interaction.response.send_message(f"That channel is {channel.mention}", ephemeral=True)
|
||||
|
||||
With integer and float arguments, we can also specify a minimum and maximum value.
|
||||
This can also be done to strings to set a minimum and maximum length.
|
||||
These limits will be reflected within Discord when the user is filling out the command.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import discord
|
||||
|
||||
from redbot.core import commands, app_commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@app_commands.command()
|
||||
@app_commands.describe(number="The number you want to say, max 10")
|
||||
async def saynumber(self, interaction: discord.Interaction, number: app_commands.Range[int, None, 10]):
|
||||
await interaction.response.send_message(f"Your number is {number}", ephemeral=True)
|
||||
|
||||
See the `Discord.py documentation <https://discordpy.readthedocs.io/en/stable/interactions/api.html#range>`__ for more information on this.
|
||||
|
||||
|
||||
---------------
|
||||
Hybrid Commands
|
||||
---------------
|
||||
Hybrid commands are a way to bridge the gap between text commands and slash commands.
|
||||
These types of commands allow you to write a text and slash command simultaneously using the same function.
|
||||
This is useful for commands that you want to be able to use in both text and slash commands.
|
||||
|
||||
.. note::
|
||||
As with slash command groups, top level hybrid command groups **cannot** be invoked as a slash command. They can however be invoked as a text command.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from redbot.core import commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@commands.hybrid_command(name="cat")
|
||||
async def cat(self, ctx: commands.Context):
|
||||
await ctx.send("Meow")
|
||||
|
||||
@commands.hybrid_group(name="dog")
|
||||
async def dog(self, ctx: commands.Context):
|
||||
await ctx.send("Woof")
|
||||
# As discussed above, top level hybrid command groups cannot be invoked as a slash command.
|
||||
# Thus, this will not work as a slash command.
|
||||
|
||||
@dog.command(name="bark")
|
||||
async def bark(self, ctx: commands.Context):
|
||||
await ctx.send("Bark", ephemeral=True)
|
||||
|
||||
After syncing your cog via the :ref:`[p]slash<core-command-slash>` command, you'll be able to use the commands as both a slash and text command.
|
||||
|
||||
---------------------
|
||||
Context Menu Commands
|
||||
---------------------
|
||||
Context menu commands are a way to provide a interaction via the context menu.
|
||||
These are seen under ``Apps`` in the Discord client when you right click on a message or user.
|
||||
Context menu commands are a great way to provide a quick way to interact with your bot.
|
||||
These commands accept one arguement, the contextual ``user`` or ``message`` that was right clicked.
|
||||
|
||||
Setting up context commands is a bit more involved then setting up slash commands.
|
||||
First lets setup our context commands in our cog.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import discord
|
||||
|
||||
from redbot.core import commands, app_commands
|
||||
|
||||
|
||||
# Important: we're building the commands outside of our cog class.
|
||||
@app_commands.context_menu(name="Get message ID")
|
||||
async def get_message_id(interaction: discord.Interaction, message: discord.Message):
|
||||
await interaction.response.send_message(f"Message ID: {message.id}", ephemeral=True)
|
||||
|
||||
@app_commands.context_menu(name="Get user ID")
|
||||
async def get_user_id(interaction: discord.Interaction, user: discord.User):
|
||||
await interaction.response.send_message(f"User ID: {user.id}", ephemeral=True)
|
||||
|
||||
Once we've prepared our main cog file, we have to add a small bit of code to our ``__init__.py`` file.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from .my_cog import get_message_id, get_user_id
|
||||
|
||||
async def setup(bot):
|
||||
bot.tree.add_command(get_message_id)
|
||||
bot.tree.add_command(get_user_id)
|
||||
|
||||
async def teardown(bot):
|
||||
# We're removing the commands here to ensure they get unloaded properly when the cog is unloaded.
|
||||
bot.tree.remove_command("Get message ID", type=discord.AppCommandType.message)
|
||||
bot.tree.remove_command("Get user ID", type=discord.AppCommandType.user)
|
||||
|
||||
Now we're ready to sync our commands to Discord.
|
||||
We can do this by using the :ref:`[p]slash<core-command-slash>` command.
|
||||
Take note of the specific arguments you have to use to sync a context command.
|
||||
|
||||
---------------------------------
|
||||
Closing Words and Further Reading
|
||||
---------------------------------
|
||||
If you're reading this, it means that you've made it to the end of this guide.
|
||||
Congratulations! You are now prepared with the basics of slash commands for Red.
|
||||
However there is a lot we didn't touch on in this guide.
|
||||
Below this paragraph you'll find a list of resources that you can use to learn more about slash commands.
|
||||
As always, if you have any questions, feel free to ask in the `Red support server <https://discord.gg/red>`__.
|
||||
|
||||
For more information on `Application Commands <https://discord.com/developers/docs/interactions/application-commands>`__ as a whole, please refer to the official Discord documentation.
|
||||
Discord.py also offers documentation regarding everything discussed on this page.
|
||||
You can find the documentation `here <https://discordpy.readthedocs.io/en/stable/interactions/api.html>`__.
|
||||
And lastly, AbstractUmbra has a great write up of `examples <https://gist.github.com/AbstractUmbra/a9c188797ae194e592efe05fa129c57f>`__.
|
||||
|
||||
@@ -41,12 +41,33 @@ If there are multiple authors, we can separate them with commas.
|
||||
|
||||
AUTHOR: Red, Rojo, Rouge
|
||||
|
||||
-----------------
|
||||
Description Field
|
||||
-----------------
|
||||
|
||||
We can also add an optional ``DESCRIPTION`` to our trivia list, which
|
||||
will show from the output of ``[p]trivia info <category>``. The
|
||||
description should indicate to the user what the trivia list is
|
||||
about and what kind of questions they can expect to face.
|
||||
|
||||
For example, if you were writing a logo quiz trivia list, you could
|
||||
create a description like this:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
AUTHOR: Kreusada
|
||||
DESCRIPTION: >-
|
||||
A quiz to test your logo knowledge to the limit. This trivia
|
||||
will send image URLs and ask you to identify the company's name
|
||||
from the logo that is sent.
|
||||
|
||||
---------------------
|
||||
Questions and Answers
|
||||
---------------------
|
||||
|
||||
Writing questions and answers is simple. Once you've finished your
|
||||
``AUTHOR`` field, you can move on to your questions just below.
|
||||
``AUTHOR`` field and ``DESCRIPTION`` field, you can move on to your questions
|
||||
just below.
|
||||
|
||||
Questions should consist of at least one answer, with other
|
||||
possible answers included if necessary. You must put a colon at the end
|
||||
@@ -98,6 +119,7 @@ As you've added more questions, your file should look something like this:
|
||||
.. code-block:: yaml
|
||||
|
||||
AUTHOR: Red
|
||||
DESCRIPTION: A general quiz to test your knowledge.
|
||||
How many days are there in a regular year?:
|
||||
- 365
|
||||
- three hundred and sixty five
|
||||
|
||||
810
docs/incompatible_changes/3.5.rst
Normal file
810
docs/incompatible_changes/3.5.rst
Normal file
@@ -0,0 +1,810 @@
|
||||
.. _incompatible-changes-3.5:
|
||||
|
||||
========================================
|
||||
Backward incompatible changes in Red 3.5
|
||||
========================================
|
||||
|
||||
.. include:: _includes/preamble.rst
|
||||
|
||||
.. contents::
|
||||
:depth: 4
|
||||
:local:
|
||||
|
||||
For Users
|
||||
*********
|
||||
|
||||
Removals
|
||||
~~~~~~~~
|
||||
|
||||
redbot-launcher
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
.. deprecated:: 3.2.0
|
||||
|
||||
The vast majority of functionality provided by ``redbot-launcher`` can already be
|
||||
achieved through other means.
|
||||
|
||||
In Red 3.2.0, ``redbot-launcher`` has been stripped most of its functionality
|
||||
as it can already be done through other (better supported) means:
|
||||
|
||||
- Updating Red (a proper way to update Red is now documented in `../update_red`)
|
||||
- Creating instances (as documented in install guides, it should be done through ``redbot-setup``)
|
||||
- Removing instances (available under ``redbot-setup delete``)
|
||||
- Removing all instances (no direct alternative, can be done through ``redbot-setup delete``)
|
||||
- Debug information (available under ``redbot --debuginfo`` and ``[p]debuginfo`` bot command)
|
||||
|
||||
Currently, ``redbot-launcher`` only provides auto-restart functionality
|
||||
which we now document how to do properly on each of the supported systems.
|
||||
|
||||
If you wish to continue using auto-restart functionality, we recommend following the instructions for setting up a service dedicated to your operating system:
|
||||
|
||||
- `../autostart_windows`
|
||||
- `../autostart_mac`
|
||||
- `../autostart_systemd`
|
||||
|
||||
Behavior changes
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
x86-64 CPUs are now only supported if they support x86-64-v2 instruction set
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
On x86-64 systems, we now require that your CPU supports x86-64-v2 instruction set.
|
||||
This roughly translates to us dropping support for Intel CPUs that have been released before 2009
|
||||
and AMD CPUs that have been releasesd before 2012.
|
||||
|
||||
This has been mostly dictated by one of our dependencies but some Linux distributions
|
||||
are already dropping support for it in their latest versions as well.
|
||||
|
||||
Thread-related changes
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
While many of these aren't breaking, we thought it is important to make it clear
|
||||
how Red approaches its features in regard to threads:
|
||||
|
||||
- Red's command permission system doesn't have dedicated rules for threads and instead uses
|
||||
that thread's parent channel rules
|
||||
- Channel embed settings (``[p]embedset``) cannot be set for threads and usage of embeds is based
|
||||
on that thread's parent channel embed settings
|
||||
|
||||
- This also means that a forum channel can have its own embed settings
|
||||
- Using channel mute/unmute commands (e.g. ``[p]mutechannel`` from Mutes cog) in a thread
|
||||
will mute that user in the thread's parent channel
|
||||
- Filter cog doesn't have a dedicated word list for threads and uses server's and parent channel's word lists
|
||||
|
||||
- This also means that a word list can now also be added for a forum channel
|
||||
- CustomCom's ``{channel}`` substitution parameter will now be a thread when the command is used in a thread
|
||||
- CustomCom's channel cooldowns are applied per thread
|
||||
- When used in a thread, ``[p]slowmode`` command from Mod cog will apply the slowmode to that thread
|
||||
- The logic for the ``[p]ignore``-related checks has changed for threads:
|
||||
|
||||
- ``[p]ignore channel`` accepts ignoring command in a specific thread
|
||||
- When the command is sent in a thread, it first checks server-wide ignore settings and then runs if:
|
||||
|
||||
- the user has Manage Channel permission in the parent channel, or
|
||||
- the parent channel is not ignored *and* the user has Manage Threads permission in the parent channel, or
|
||||
- the thread channel and its parent aren't ignored
|
||||
- This also means that a forum channel can now also be ignored
|
||||
- The Mutes cog now denies Send Messages in Threads, Create Public Threads,
|
||||
and Create Private Threads permissions
|
||||
|
||||
Commands for changing Bank and Modlog settings are now core commands
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
These commands allow users to change settings of core APIs that are always available
|
||||
(similarly to ``[p]autoimmune``, ``[p]allowlist``, or ``[p]blocklist``)
|
||||
so it makes sense to allow using them without having to load anything.
|
||||
|
||||
The following commands have been moved to Core:
|
||||
|
||||
- ``[p]modlogset``
|
||||
- ``[p]bankset``
|
||||
- ``[p]economyset registeramount`` (now named ``[p]bankset registeramount``)
|
||||
- ``[p]bank reset`` (now named ``[p]bankset reset``)
|
||||
- ``[p]bank prune`` (now named ``[p]bankset prune``)
|
||||
|
||||
This has also resulted in the removal of the ``bank`` cog
|
||||
as it no longer contained any commands.
|
||||
|
||||
If you have any custom settings for this cog or these commands,
|
||||
you may need to readd them with the new command names.
|
||||
|
||||
Commands in the ``[p]set`` group have been reorganized
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The list of commands in the ``[p]set`` group has gotten quite long over the years
|
||||
so we decided to reorganize it.
|
||||
|
||||
The following changes have been made:
|
||||
|
||||
- Commands related to metadata about the bot have been moved to the ``[p]set bot`` subgroup:
|
||||
|
||||
- ``[p]set avatar`` is now ``[p]set bot avatar``
|
||||
- ``[p]set custominfo`` is now ``[p]set bot custominfo``
|
||||
- ``[p]set description`` is now ``[p]set bot description``
|
||||
- ``[p]set nickname`` is now ``[p]set bot nickname``
|
||||
- ``[p]set username`` is now ``[p]set bot username``
|
||||
- Commands related to server's admin and mod roles have been moved to the ``[p]set roles`` subgroup:
|
||||
|
||||
- ``[p]set addadminrole`` is now ``[p]set roles addadminrole``
|
||||
- ``[p]set removeadminrole`` is now ``[p]set roles removeadminrole``
|
||||
- ``[p]set addmodrole`` is now ``[p]set roles addmodrole``
|
||||
- ``[p]set removemodrole`` is now ``[p]set roles removemodrole``
|
||||
- Commands related to bot user's activity and status have been moved to the ``[p]set status`` subgroup:
|
||||
|
||||
- ``[p]set status`` has been split into ``[p]set status online/idle/dnd/invisible`` subcommands
|
||||
- ``[p]set competing`` is now ``[p]set status competing``
|
||||
- ``[p]set listening`` is now ``[p]set status listening``
|
||||
- ``[p]set playing`` is now ``[p]set status playing``
|
||||
- ``[p]set streaming`` is now ``[p]set status streaming``
|
||||
- ``[p]set watching`` is now ``[p]set status watching``
|
||||
- ``[p]set globallocale`` has been renamed to ``[p]set locale global``
|
||||
- ``[p]set locale`` is now also available under ``[p]set locale server``
|
||||
- ``[p]set globalregionalformat`` has been renamed to ``[p]set regionalformat global``
|
||||
- ``[p]set regionalformat`` is now also available under ``[p]set regionalformat server``
|
||||
|
||||
If you have any custom settings for these commands,
|
||||
you may need to readd them with the new command names.
|
||||
|
||||
Red requires to have at least one owner
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
There was never a reason to allow users to run the bot without having an owner set
|
||||
and it had been a point of confusion for new users that are trying to set up Red
|
||||
using a team application which, by default, doesn't have any owners set.
|
||||
|
||||
If your instance does not have any owner set, Red will print an error message on startup
|
||||
and exit before connecting to Discord. This error message contains all
|
||||
the needed information on how to set a bot owner and the security implications of it.
|
||||
|
||||
If, for some reason, you intentionally are running Red without any owner set,
|
||||
please make a feature request with your use case on
|
||||
`our issue tracker <https://github.com/Cog-Creators/Red-DiscordBot/issues/new/choose>`__.
|
||||
|
||||
|
||||
For Developers
|
||||
**************
|
||||
|
||||
Removals
|
||||
~~~~~~~~
|
||||
|
||||
``Config.driver`` and ``redbot.core.drivers`` package
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
These are Red's internal implementation details and as such they have been privatized.
|
||||
|
||||
``redbot.core.data_manager.load_bundled_data()`` function
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. deprecated:: 3.0.0rc3
|
||||
|
||||
This function has been deprecated basically forever and we have somehow never removed it.
|
||||
|
||||
Use the `redbot.core.data_manager.bundled_data_path()` function directly instead.
|
||||
|
||||
``is_mod_or_superior()``, ``is_admin_or_superior()``, and ``check_permissions()`` functions in ``redbot.core.checks``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. deprecated:: 3.0.0rc1
|
||||
|
||||
These functions have been deprecated basically forever and we have somehow never removed them.
|
||||
|
||||
Use the `redbot.core.utils.mod.is_mod_or_superior()`, `redbot.core.utils.mod.is_admin_or_superior()`,
|
||||
and `redbot.core.utils.mod.check_permissions()` functions instead.
|
||||
|
||||
``bordered()`` function
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This function was primarily used in Red's command-line code and had very limited use
|
||||
for 3rd-party cogs. Since we no longer use this function, it has been removed.
|
||||
|
||||
``commands.DM_PERMS`` constant
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This was mostly used by the internal implementation and it isn't anymore now. Since this constant
|
||||
was a maintenance burden and hasn't really seen any usage in 3rd-party code, we decided to just
|
||||
remove it.
|
||||
|
||||
``redbot.core.utils.caching`` and ``redbot.core.utils.safety`` modules
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
These modules contain utilities that were only really useful in Red's own code.
|
||||
We no longer use them for anything and have not seen any 3rd-party usage
|
||||
and as such we have removed these modules.
|
||||
|
||||
``guild_id`` parameter to ``Red.allowed_by_whitelist_blacklist()``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. deprecated:: 3.4.8
|
||||
|
||||
``guild_id`` parameter to `Red.allowed_by_whitelist_blacklist()` has been removed as
|
||||
it is not possible to properly handle the local allowlist/blocklist logic with just
|
||||
the guild ID. Part of the local allowlist/blocklist handling is to check
|
||||
whether the provided user is a guild owner.
|
||||
|
||||
Use the ``guild`` parameter instead.
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
if await bot.allowed_by_whitelist(who_id=user_id, guild_id=guild.id, role_ids=role_ids):
|
||||
...
|
||||
|
||||
Becomes:
|
||||
|
||||
.. code:: python
|
||||
|
||||
if await bot.allowed_by_whitelist(who_id=user_id, guild=guild, role_ids=role_ids):
|
||||
...
|
||||
|
||||
``redbot.core.commands.converter.GuildConverter``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. deprecated:: 3.4.8
|
||||
|
||||
This is now included in the upstream discord.py library.
|
||||
|
||||
Use `discord.Guild`/``redbot.core.commands.GuildConverter`` instead.
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
from redbot.core import commands
|
||||
from redbot.core.commands.converter import GuildConverter
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
@commands.command()
|
||||
async def command(self, ctx, server: GuildConverter):
|
||||
await ctx.send(f"You chose {server.name}!")
|
||||
|
||||
Becomes:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import discord
|
||||
from redbot.core import commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
@commands.command()
|
||||
async def command(self, ctx, server: discord.Guild):
|
||||
await ctx.send(f"You chose {server.name}!")
|
||||
|
||||
``redbot.core.utils.mod.is_allowed_by_hierarchy()``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. deprecated:: 3.4.1
|
||||
|
||||
This was an internal function that was never meant to be part of the public API.
|
||||
It was also not really possible to use it in a supported way as it required
|
||||
internal objects to be passed as parameters.
|
||||
|
||||
If you have a use case for this function, you should be able to achieve the same result
|
||||
with this code:
|
||||
|
||||
.. code:: python
|
||||
|
||||
async def is_allowed_by_hierarchy(guild, moderator, member):
|
||||
is_special = moderator == guild.owner or await self.bot.is_owner(moderator)
|
||||
return moderator.top_role > member.top_role or is_special
|
||||
|
||||
|
||||
Behavior changes
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Update to version guarantees and privatization of many APIs
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
With this release, we're limiting what changes we will consider breaking.
|
||||
`The new Developer Guarantees <developer-guarantees>` describe this in detail
|
||||
but the gist of it is that we will now only consider names included in ``__all__``
|
||||
of ``redbot`` and ``redbot.core`` modules and ``__all__`` of public submodules
|
||||
of ``redbot.core`` to be part of the public API that shouldn't be broken without notice.
|
||||
|
||||
With this change, we introduced or updated ``__all__`` in all of those modules
|
||||
and added ``_`` prefix to private modules to specify what is actually part of the public API.
|
||||
This has resulted in the following being removed/privatized:
|
||||
|
||||
- ``create_temp_config()``, ``load_basic_configuration()``, and ``core_data_path()`` in the ``redbot.core.data_manager`` module
|
||||
- ``set_locale()`` and ``reload_locales()`` in the ``redbot.core.i18n`` module
|
||||
- ``MIN_PYTHON_VERSION`` in the ``redbot`` module
|
||||
- ``redbot.core.cog_manager``, ``redbot.core.settings_caches``, ``redbot.core.global_checks``, ``redbot.core.events``, ``redbot.core.cli``, and ``redbot.core.rpc`` modules
|
||||
|
||||
``redbot.core.data_manager.storage_details()`` returns a deep copy of underlying dict now
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Changing storage details during Red's runtime is not supported and as such,
|
||||
this function now returns a deep copy of the underlying dictionary to prevent changes.
|
||||
|
||||
Changed the version order of final dev releases and dev pre-releases
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To be consistent with :pep:`440`, we've changed the order between final dev releases (e.g.
|
||||
``3.5.0.dev1``) and dev pre-releases (e.g. ``3.5.0a1.dev1``, ``3.5.0b1.dev1``, ``3.5.0rc1.dev1``).
|
||||
|
||||
Here's an example of a list of versions sorted using the new order (oldest version first):
|
||||
|
||||
- 3.5.0.dev1
|
||||
- 3.5.0.dev2
|
||||
- 3.5.0a1.dev1
|
||||
- 3.5.0a1
|
||||
- 3.5.0a2.dev1
|
||||
- 3.5.0b1.dev1
|
||||
- 3.5.0
|
||||
- 3.5.0.post1.dev1
|
||||
- 3.5.0.post1
|
||||
- 3.5.1
|
||||
|
||||
``Red.get_owner_notification_destinations()`` may now return instances of ``discord.Voice/StageChannel``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
With the introduction of Text in Voice feature, we added the ability to add a voice/stage channel
|
||||
as an owner notifications destination. This means that `redbot.core.modlog.get_modlog_channel()`
|
||||
may now return instances of `discord.VoiceChannel` and `discord.StageChannel`.
|
||||
|
||||
``modlog.get_modlog_channel()`` may now return instances of ``discord.Voice/StageChannel``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
With the introduction of Text in Voice feature, we added the ability to set a modlog
|
||||
channel to a voice/stage channel. This means that `redbot.core.modlog.get_modlog_channel()`
|
||||
may now return instances of `discord.VoiceChannel` and `discord.StageChannel`.
|
||||
|
||||
``menus.DEFAULT_CONTROLS`` and ``ReactionPredicate.*_EMOJIS`` use immutable types now
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The type of `redbot.core.utils.menus.DEFAULT_CONTROLS` has been changed from `dict`
|
||||
to a `collections.abc.Mapping` while the type of `ReactionPredicate.ALPHABET_EMOJIS`
|
||||
and `ReactionPredicate.NUMBER_EMOJIS` has been changed from `list` to a `tuple`.
|
||||
|
||||
This should prevent the developers from accidentally changing the provided constants
|
||||
instead of making a copy and changing that copy.
|
||||
|
||||
This should be a transparent change in most cases but here is an example usage that is affected:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import copy
|
||||
from redbot.core.utils import menus
|
||||
|
||||
# somewhere in your code...
|
||||
|
||||
controls = copy.copy(menus.DEFAULT_CONTROLS)
|
||||
controls["\N{SMILING FACE WITH OPEN MOUTH}"] = custom_function
|
||||
await menu(ctx, ["page 1", "page 2"], controls)
|
||||
|
||||
To make this code work on Red 3.5 and higher, you can replace it with any of the following:
|
||||
|
||||
.. code:: python
|
||||
|
||||
from redbot.core.utils import menus
|
||||
|
||||
# example 1
|
||||
|
||||
controls = {
|
||||
**menus.DEFAULT_CONTROLS,
|
||||
"\N{SMILING FACE WITH OPEN MOUTH}": custom_function,
|
||||
}
|
||||
await menu(ctx, ["page 1", "page 2"], controls)
|
||||
|
||||
# example 2
|
||||
|
||||
controls = menus.DEFAULT_CONTROLS.copy()
|
||||
controls["\N{SMILING FACE WITH OPEN MOUTH}"] = custom_function
|
||||
await menu(ctx, ["page 1", "page 2"], controls)
|
||||
|
||||
# example 3
|
||||
|
||||
controls = dict(menus.DEFAULT_CONTROLS)
|
||||
controls["\N{SMILING FACE WITH OPEN MOUTH}"] = custom_function
|
||||
await menu(ctx, ["page 1", "page 2"], controls)
|
||||
|
||||
Similarly, if you copied lists before:
|
||||
|
||||
.. code:: python
|
||||
|
||||
emojis = ReactionPredicate.NUMBER_EMOJIS.copy()
|
||||
emojis.insert(0, "\N{DOG}")
|
||||
emojis.append("\N{CAT}")
|
||||
|
||||
You could use sequence unpacking instead:
|
||||
|
||||
.. code:: python
|
||||
|
||||
emojis = ["\N{DOG}", *ReactionPredicate.NUMBER_EMOJIS, "\N{CAT}"]
|
||||
|
||||
Permissions defined in ``@commands.*_permissions()`` decorators are always merged now
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This is mostly a bugfix but it means that the permissions in stacked decorators are now
|
||||
always merged instead of being *sometimes* overridden and *sometimes* merged.
|
||||
|
||||
For example, this code has only checked for ``embed_links`` permission on 3.4
|
||||
but now checks for both ``add_reactions`` and ``embed_links`` permissions:
|
||||
|
||||
.. code:: python
|
||||
|
||||
from redbot.core import commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
@commands.command()
|
||||
@commands.bot_has_permissions(embed_links=True)
|
||||
@commands.bot_has_permissions(add_reactions=True)
|
||||
async def example(self, ctx):
|
||||
msg = await ctx.send(embed=discord.Embed(description="Hello!"))
|
||||
await msg.add_reaction("\N{SMILING FACE WITH OPEN MOUTH}")
|
||||
|
||||
Note that stacking `@commands.has_permissions() <redbot.core.commands.has_permissions()>`
|
||||
with ``@commands.*_or_permissions()`` decorators still behaves differently depending on
|
||||
the decorator order.
|
||||
|
||||
Some of the primary dependencies have been removed or replaced
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
While this may not technically fall under `our version guarantees <../version_guarantees>`,
|
||||
we recognize that this may affect some people.
|
||||
As such, below we list the noteworthy dependency replacements and removals (package names
|
||||
are PyPI distribution names):
|
||||
|
||||
- ``appdirs`` package has been replaced with ``platformdirs``
|
||||
- ``chardet`` package has been replaced with ``charset-normalizer``
|
||||
- ``fuzzywuzzy`` package has been replaced with ``rapidfuzz``
|
||||
- Red no longers depends on ``aiosqlite``, ``PyNaCl``, and ``python-Levenshtein-wheels``
|
||||
|
||||
discord.py version has been updated to 2.2.3
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To allow Red to continue operating *and* use the newer features (threads, text in voice/stage channels,
|
||||
buttons, application commands, and AutoMod, to name a few), we've updated discord.py from version
|
||||
1.7.3 to 2.2.3. Since this is a major upgrade, it will require you to update your code accordingly.
|
||||
discord.py's documentation has :dpy_docs:`a migration guide <migrating.html>` that you can follow in order to
|
||||
update your cogs.
|
||||
|
||||
Red itself has already been updated to support all of these changes that happened over the years.
|
||||
In order to do so, we've also had to make a few breaking changes of our own. Those changes are
|
||||
normal sections in the current document so be sure to follow it in full and you should be able to
|
||||
perform all the necessary changes.
|
||||
|
||||
To help support some of the newer features, we've also added a few things:
|
||||
|
||||
- Utilities that allow to **properly** check whether a member can do something in threads (or channels)
|
||||
for cases where it isn't as simple as checking permissions:
|
||||
|
||||
- Command check decorators: `bot_can_manage_channel()`, `bot_can_react()`
|
||||
- Permission check decorators: `can_manage_channel()`, `guildowner_or_can_manage_channel()`,
|
||||
`admin_or_can_manage_channel()`, `mod_or_can_manage_channel()`
|
||||
- Functions: `can_user_send_messages_in()`, `can_user_manage_channel()`, `can_user_react_in()`
|
||||
|
||||
- New module (`redbot.core.utils.views`) with useful `discord.ui.View` subclasses
|
||||
|
||||
- `SetApiModal`, `SetApiView`, `SimpleMenu`
|
||||
|
||||
``Case.channel`` can now be a ``discord.Thread``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
In order to properly support threads, `Case.channel` can now also be an instance of `discord.Thread`.
|
||||
New `Case.parent_channel` attribute will be set to the thread's parent text or forum channel,
|
||||
if the case's channel is a thread.
|
||||
|
||||
``commands.BadArgument`` is no longer wrapped in ``commands.ConversionFailure`` containing parameter and its value
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
We used to wrap `commands.BadArgument <discord.ext.commands.BadArgument>` exceptions
|
||||
in a ``commands.ConversionFailure`` containing, in addition to the actual exception,
|
||||
the `inspect.Parameter` instance and the passed value for the argument
|
||||
that failed the conversion.
|
||||
|
||||
With discord.py 2.x, these are now exposed through the
|
||||
`commands.Context.current_parameter <discord.ext.commands.Context.current_parameter>`
|
||||
and `commands.Context.current_argument <discord.ext.commands.Context.current_argument>`
|
||||
making this wrapping no longer necessary.
|
||||
|
||||
Some of the method arguments in the bot class and ``commands`` package have been made positional-only
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The following arguments have been positional-only to be consistent with the upstream discord.py package:
|
||||
|
||||
- ``name`` in `Red.get_command()`
|
||||
- ``name`` in `Red.get_cog()`
|
||||
- ``coro`` in `Red.before_invoke()`
|
||||
- ``user`` in `Red.is_owner()`
|
||||
- ``message`` in ``Red.get_context()``
|
||||
- ``message`` in `Red.process_commands()`
|
||||
- ``cogname`` in `Red.remove_cog()`
|
||||
- ``cog`` in `Red.add_cog()`
|
||||
- ``command`` in `Red.add_command()`
|
||||
- ``command`` in `Red.remove_command()`
|
||||
- ``ctx`` in `redbot.core.commands.Command.can_run()`
|
||||
- ``ctx`` in ``redbot.core.commands.CogMixin.can_run()``
|
||||
- ``ctx`` in ``redbot.core.commands.CogMixin.can_see()``
|
||||
- ``error`` in `redbot.core.commands.Command.error()`
|
||||
|
||||
``bot.add_cog()`` will now raise ``discord.ClientException`` instead of ``RuntimeError`` when cog is already loaded
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To make Red's bot class more consistent with the discord.py implementation that it overrides,
|
||||
the `discord.ClientException` is now being raised instead of `RuntimeError` when a cog
|
||||
with the same name is already loaded.
|
||||
|
||||
Many functions and methods do not support ``discord.PartialMessageable`` objects
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This isn't technically breaking since they never did *but* since those objects may appear now,
|
||||
we think it is important to mention that due to the limited information that `discord.PartialMessageable`
|
||||
objects provide, they cannot be passed to the following methods directly:
|
||||
|
||||
- `Red.ignored_channel_or_guild()`
|
||||
- `Red.embed_requested()`
|
||||
- `redbot.core.modlog.create_case()`
|
||||
- `redbot.core.modlog.Case.edit()`
|
||||
|
||||
Additionally, the `Red.message_eligible_as_command()` will return ``False``
|
||||
if a `discord.PartialMessageable` object for a channel that isn't a DM is passed.
|
||||
|
||||
If you *have to* use these, you should try fetching the full messageable object first
|
||||
or looking at the documentation to see whether there are any alternative solutions.
|
||||
|
||||
Cog package (extension) and cog loading / unloading is now asynchronous
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This follows the changes that discord.py 2.x has introduced - we now **require** for
|
||||
the ``setup()`` and ``teardown()`` functions to be asynchronous and have made
|
||||
the `Red.add_cog()` and `Red.remove_cog()` methods asynchronous as well.
|
||||
|
||||
``Red.embed_requested()``'s parameters and their default values have changed
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
We have made a bunch of changes to the signature of `Red.embed_requested()`. This method now
|
||||
accepts only a single **positional** argument called ``channel``, making the ``command``
|
||||
keyword-only. The ``user`` argument has been removed as the ``channel`` argument now supports
|
||||
the `discord.abc.User` objects directly, dropping the support for `discord.DMChannel`
|
||||
in the process.
|
||||
|
||||
These changes together allowed us to support checking whether an embed should be sent in a DM
|
||||
using only the `discord.abc.User` object - without the `discord.DMChannel` which is often
|
||||
not present in the cache. Furthermore, it means that a `discord.abc.User` object no longer needs
|
||||
to be passed unnecessarily when the method is used with a guild channel.
|
||||
|
||||
We've also changed the default value of ``check_permissions`` to ``True``
|
||||
as it makes the typical usage of this method more ergonomic.
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import discord
|
||||
from redbot.core import commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
@commands.guild_only()
|
||||
@commands.command()
|
||||
async def sayhello(self, ctx, recipient: discord.Member):
|
||||
content = "Hello world!"
|
||||
embed = discord.Embed(title="Message for you!", description=content)
|
||||
try:
|
||||
# try sending the message in DMs
|
||||
if await ctx.bot.embed_requested(
|
||||
await recipient.create_dm(), recipient, ctx.command, check_permissions=True
|
||||
):
|
||||
await recipient.send(embed=embed)
|
||||
else:
|
||||
await recipient.send(content)
|
||||
except discord.Forbidden:
|
||||
# DMs are closed, send a message in a moderator or current channel
|
||||
channel = ctx.guild.public_updates_channel or ctx
|
||||
if await ctx.bot.embed_requested(
|
||||
channel, ctx.author, ctx.command, check_permissions=True
|
||||
):
|
||||
await channel.send(embed=embed)
|
||||
else:
|
||||
await channel.send(content)
|
||||
|
||||
After:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import discord
|
||||
from redbot.core import commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
@commands.guild_only()
|
||||
@commands.command()
|
||||
async def sayhello(self, ctx, recipient: discord.Member):
|
||||
content = "Hello world!"
|
||||
embed = discord.Embed(title="Message for you!", description=content)
|
||||
try:
|
||||
# try sending the message in DMs
|
||||
if await ctx.bot.embed_requested(recipient, command=ctx.command):
|
||||
await recipient.send(embed=embed)
|
||||
else:
|
||||
await recipient.send(content)
|
||||
except discord.Forbidden:
|
||||
# DMs are closed, send a message in a moderator or current channel
|
||||
channel = ctx.guild.public_updates_channel or ctx
|
||||
if await ctx.bot.embed_requested(channel, command=ctx.command):
|
||||
await channel.send(embed=embed)
|
||||
else:
|
||||
await channel.send(content)
|
||||
|
||||
``modlog.create_case()`` now raises instead of silently returning on error
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To help avoid passing invalid arguments, `modlog.create_case()` now raises:
|
||||
|
||||
- `ValueError` when the ``action_type`` argument is not a valid action type
|
||||
- `RuntimeError` when the ``user`` argument is passed with the bot's user object/ID
|
||||
|
||||
Proper usage of these methods is unlikely to be affected
|
||||
and this should mostly just help detect bugs earlier.
|
||||
|
||||
.. _config-register-1:
|
||||
|
||||
``Config``'s register methods now only accept JSON-castable types
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. seealso:: `config-register-2`
|
||||
|
||||
This change has fixed the inconsistencies between what can be registered as a default value
|
||||
and what can be set through `Value.set()`. It mostly resulted in confusion when it was not
|
||||
possible to use the registered type in `Value.set()`.
|
||||
|
||||
If you need to use custom types, you'll have to manually construct them *after* getting the
|
||||
"raw" value from `Config`.
|
||||
|
||||
.. _config-register-2:
|
||||
|
||||
``Config`` now always returns base JSON types, never subclasses
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. seealso:: `config-register-1`
|
||||
|
||||
It used to be possible to register an instance of a subclass of `dict` such as
|
||||
`collections.Counter` and have the `redbot.core.config.Group` cast the returned value to that type
|
||||
before returning it. With this change, `redbot.core.config.Group` will now always return an instance of
|
||||
`dict` containing only base JSON types, without subclasses.
|
||||
|
||||
``Config.*_from_id/*_from_ids()`` methods now raise when ``int`` is not passed
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To help avoid setting values under non-integer keys, we now raise an error
|
||||
when the passed argument is not an ``int``.
|
||||
|
||||
We're not expecting any **proper** usage of these methods to be affected
|
||||
and this should only help detect bugs earlier.
|
||||
|
||||
``Case.message`` can now be ``discord.PartialMessage``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This change allowed to us to make enormous performance improvements (subsecond durations
|
||||
compared to many minutes) to `modlog.get_all_cases()` and commands that use it
|
||||
such as the commonly used ``[p]casesfor`` command.
|
||||
|
||||
With this change, we no longer fetch the whole `discord.Message` object for case's message
|
||||
and instead only construct a `discord.PartialMessage` object for it. This object is rarely if ever needed so it is unlikely to affect a lot of code. Additionally, this change doesn't apply to `modlog.create_case()` which will still return a `Case` object with `message <Case.message>` attribute set to an instance of `discord.Message` or ``None``.
|
||||
|
||||
If you have a reason to use a full message object, you can use :meth:`discord.PartialMessage.fetch()`
|
||||
to fetch it.
|
||||
|
||||
Example:
|
||||
|
||||
.. code:: python
|
||||
|
||||
from redbot.core import commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
@commands.guild_only()
|
||||
@commands.command()
|
||||
async def command(self, ctx, case_number: int):
|
||||
case = await modlog.get_case(case_number, ctx.guild, ctx.bot)
|
||||
if case.message is None:
|
||||
await ctx.send("No message is available for this case.")
|
||||
return
|
||||
|
||||
await ctx.send(
|
||||
"People reacted to this modlog case with: "
|
||||
+ ", ".join(case.message.reactions)
|
||||
)
|
||||
|
||||
After:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import discord
|
||||
from redbot.core import commands
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
@commands.guild_only()
|
||||
@commands.command()
|
||||
async def command(self, ctx, case_number: int):
|
||||
case = await modlog.get_case(case_number, ctx.guild, ctx.bot)
|
||||
if case.message is None:
|
||||
await ctx.send("No message is available for this case.")
|
||||
return
|
||||
|
||||
try:
|
||||
msg = await case.message.fetch()
|
||||
except discord.NotFound:
|
||||
await ctx.send("No message is available for this case.")
|
||||
else:
|
||||
await ctx.send(
|
||||
"People reacted to this modlog case with: "
|
||||
+ ", ".join(msg.reactions)
|
||||
)
|
||||
|
||||
``redbot.core.bot.RedBase`` has been merged into ``redbot.core.bot.Red``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Historically, ``RedBase`` existed to allow using Red for self/user bots back when
|
||||
it was not against Discord's Terms of Service. Since this is no longer a concern,
|
||||
everything from ``RedBase`` have been moved directly to `Red` and ``RedBase`` class
|
||||
has been removed.
|
||||
|
||||
If you were using ``RedBase`` for runtime type checking or type annotations,
|
||||
you should now use `Red` instead. Since both of these classes resided in the same
|
||||
module, it should be a matter of simple find&replace.
|
||||
|
||||
``Context.maybe_send_embed()`` requires content with length of 1-2000 characters
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
`Context.maybe_send_embed()` now requires the message's length to be
|
||||
between 1 and 2000 characters.
|
||||
|
||||
Since the length limits for regular message content and embed's description are
|
||||
different, it is easy to miss an issue with inappropriate handling of length limits
|
||||
during development. This change should aid with early detection of such issue by
|
||||
consistently rejecting messages with length that can't be used with
|
||||
both embed and non-embed messages.
|
||||
|
||||
This change only affects code that is already not guaranteed to work.
|
||||
You should make sure that your code properly handles message length limits.
|
||||
|
||||
``menu()`` listens to both reaction add and remove
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Listening only to reaction add results in bad user experience.
|
||||
If the bot had Manage Messages permission, it removed the user's reaction
|
||||
so that they don't have to click twice but this comes with a noticeable delay.
|
||||
This issue is even more noticeable under load, when the bot ended up hitting
|
||||
Discord-imposed rate limits.
|
||||
|
||||
If your calls to `menu()` are using the default controls (``redbot.core.utils.menus.DEFAULT_CONTROLS``),
|
||||
you don't have to do anything.
|
||||
|
||||
Otherwise, you should ensure that your custom functions used for the menu controls
|
||||
do not depend on this behavior in some way. In particular, you should make sure that
|
||||
your functions do not automatically remove the author's reaction.
|
||||
|
||||
Here's an example code that needs to be updated:
|
||||
|
||||
.. code:: python
|
||||
|
||||
import contextlib
|
||||
|
||||
import discord
|
||||
from redbot.core.utils.menus import close_menu, menu
|
||||
|
||||
CUSTOM_CONTROLS = {
|
||||
"\N{CROSS MARK}": close_menu,
|
||||
"\N{WAVING HAND SIGN}": custom_control,
|
||||
}
|
||||
|
||||
|
||||
async def custom_control(ctx, pages, controls, message, page, timeout, emoji):
|
||||
perms = message.channel.permissions_for(ctx.me)
|
||||
if perms.manage_messages: # Can manage messages, so remove react
|
||||
with contextlib.suppress(discord.NotFound):
|
||||
await message.remove_reaction(emoji, ctx.author)
|
||||
|
||||
await ctx.send("Hello world!")
|
||||
return await menu(ctx, pages, controls, message=message, page=page, timeout=timeout)
|
||||
|
||||
|
||||
async def show_menu(ctx):
|
||||
await menu(ctx, ["Click :wave: to say hi!"], CUSTOM_CONTROLS)
|
||||
|
||||
To make this code work on Red 3.5 and higher, you need to update ``custom_control()`` function:
|
||||
|
||||
.. code:: python
|
||||
|
||||
async def custom_control(ctx, pages, controls, message, page, timeout, emoji):
|
||||
await ctx.send("Hello world!")
|
||||
return await menu(ctx, pages, controls, message=message, page=page, timeout=timeout)
|
||||
3
docs/incompatible_changes/_includes/preamble.rst
Normal file
3
docs/incompatible_changes/_includes/preamble.rst
Normal file
@@ -0,0 +1,3 @@
|
||||
This page lists all functionalities that are currently deprecated, features that have been removed in past minor releases, and any other backward incompatible changes that are planned or have been removed in past minor releases. The objective is to give users a clear rationale why a certain change has been made, and what alternatives (if any) should be used instead.
|
||||
|
||||
These changes are sorted (in their respective sections) in a reverse chronological order.
|
||||
31
docs/incompatible_changes/future.rst
Normal file
31
docs/incompatible_changes/future.rst
Normal file
@@ -0,0 +1,31 @@
|
||||
.. _deprecated-functionality:
|
||||
|
||||
===================================================
|
||||
Future changes (currently deprecated functionality)
|
||||
===================================================
|
||||
|
||||
.. include:: _includes/preamble.rst
|
||||
|
||||
.. contents::
|
||||
:depth: 4
|
||||
:local:
|
||||
|
||||
For Developers
|
||||
**************
|
||||
|
||||
Removals
|
||||
~~~~~~~~
|
||||
|
||||
Downloader's shared libraries
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. deprecated:: 3.2.0
|
||||
|
||||
Shared libraries have been deprecated in favor of pip-installable libraries.
|
||||
Shared libraries do not provide any functionality that can't already be achieved
|
||||
with pip requirements *and* as such don't provide much value in return for
|
||||
the added complexity.
|
||||
|
||||
Known issues, especially those related to hot-reload, were not handled automatically
|
||||
for shared libraries, same as they are not handled for the libraries installed
|
||||
through pip.
|
||||
12
docs/incompatible_changes/index.rst
Normal file
12
docs/incompatible_changes/index.rst
Normal file
@@ -0,0 +1,12 @@
|
||||
.. Backward incompatible changes list
|
||||
|
||||
Backward incompatible changes
|
||||
=============================
|
||||
|
||||
.. include:: _includes/preamble.rst
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
future
|
||||
3.5
|
||||
@@ -36,7 +36,7 @@ Welcome to Red - Discord Bot's documentation!
|
||||
intents
|
||||
cog_guides/admin
|
||||
cog_guides/alias
|
||||
cog_guides/bank
|
||||
cog_guides/audio
|
||||
cog_guides/cleanup
|
||||
cog_guides/cog_manager_ui
|
||||
cog_guides/core
|
||||
@@ -63,13 +63,13 @@ Welcome to Red - Discord Bot's documentation!
|
||||
|
||||
guide_migration
|
||||
guide_cog_creation
|
||||
guide_slash_and_interactions
|
||||
guide_publish_cogs
|
||||
guide_cog_creators
|
||||
framework_apikeys
|
||||
framework_bank
|
||||
framework_bot
|
||||
framework_checks
|
||||
framework_cogmanager
|
||||
framework_commands
|
||||
framework_config
|
||||
framework_datamanager
|
||||
@@ -77,6 +77,7 @@ Welcome to Red - Discord Bot's documentation!
|
||||
framework_i18n
|
||||
framework_modlog
|
||||
framework_rpc
|
||||
framework_tree
|
||||
framework_utils
|
||||
version_guarantees
|
||||
|
||||
@@ -85,6 +86,7 @@ Welcome to Red - Discord Bot's documentation!
|
||||
:caption: Others
|
||||
|
||||
changelog
|
||||
incompatible_changes/index
|
||||
host-list
|
||||
|
||||
|
||||
|
||||
@@ -21,18 +21,3 @@ to keep it in a location which is easy to type out the path to. From now, we'll
|
||||
``redenv`` and it will be located in your home directory.
|
||||
|
||||
Create your virtual environment with the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
python3.9 -m venv ~/redenv
|
||||
|
||||
And activate it with the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
source ~/redenv/bin/activate
|
||||
|
||||
.. important::
|
||||
|
||||
You must activate the virtual environment with the above command every time you open a new
|
||||
shell to run, install or update Red.
|
||||
@@ -0,0 +1,10 @@
|
||||
And activate it with the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
source ~/redenv/bin/activate
|
||||
|
||||
.. important::
|
||||
|
||||
You must activate the virtual environment with the above command every time you open a new
|
||||
shell to run, install or update Red.
|
||||
@@ -1,19 +0,0 @@
|
||||
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:
|
||||
@@ -1,44 +0,0 @@
|
||||
------------------------------
|
||||
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.
|
||||
@@ -0,0 +1,7 @@
|
||||
.. include:: _includes/_create-env-with-venv-intro.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
python3.10 -m venv ~/redenv
|
||||
|
||||
.. include:: _includes/_create-env-with-venv-outro.rst
|
||||
@@ -0,0 +1,7 @@
|
||||
.. include:: _includes/_create-env-with-venv-intro.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
python3.11 -m venv ~/redenv
|
||||
|
||||
.. include:: _includes/_create-env-with-venv-outro.rst
|
||||
@@ -0,0 +1,7 @@
|
||||
.. include:: _includes/_create-env-with-venv-intro.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
python3.9 -m venv ~/redenv
|
||||
|
||||
.. include:: _includes/_create-env-with-venv-outro.rst
|
||||
@@ -9,7 +9,7 @@ To install without additional config backend support:
|
||||
.. prompt:: bash
|
||||
:prompts: (redenv) $
|
||||
|
||||
python -m pip install -U pip setuptools wheel
|
||||
python -m pip install -U pip wheel
|
||||
python -m pip install -U Red-DiscordBot
|
||||
|
||||
Or, to install with PostgreSQL support:
|
||||
@@ -17,7 +17,7 @@ Or, to install with PostgreSQL support:
|
||||
.. prompt:: bash
|
||||
:prompts: (redenv) $
|
||||
|
||||
python -m pip install -U pip setuptools wheel
|
||||
python -m pip install -U pip wheel
|
||||
python -m pip install -U "Red-DiscordBot[postgres]"
|
||||
|
||||
|
||||
|
||||
@@ -1,26 +1,28 @@
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Red Hat Enterprise Linux (RHEL) 8.4-8.x and its derivatives have all required packages available in official repositories.
|
||||
Red Hat Enterprise Linux (RHEL) 8.8-8.x and its derivatives have all required packages available in official repositories.
|
||||
Install them with dnf:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo dnf -y update
|
||||
sudo dnf -y group install development
|
||||
sudo dnf -y install python39 python39-pip python39-devel java-11-openjdk-headless nano git
|
||||
sudo dnf -y install python3.11 python3.11-devel java-17-openjdk-headless nano git
|
||||
|
||||
Set ``java`` executable to point to Java 11:
|
||||
Set ``java`` executable to point to Java 17:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo alternatives --set java "java-11-openjdk.$(uname -i)"
|
||||
sudo alternatives --set java "java-17-openjdk.$(uname -i)"
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Red Hat Enterprise Linux (RHEL) 9 and its derivatives have all required packages available in official repositories.
|
||||
Red Hat Enterprise Linux (RHEL) 9.2-9.x and its derivatives have all required packages available in official repositories.
|
||||
Install them with dnf:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo dnf -y install python39 git java-11-openjdk-headless @development nano
|
||||
sudo dnf -y install python3.11 python3.11-devel git java-17-openjdk-headless @development nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
----------------------------
|
||||
Installing Python with pyenv
|
||||
----------------------------
|
||||
|
||||
On distributions where Python 3.9 needs to be compiled from source, we recommend the use of pyenv.
|
||||
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
|
||||
virtual environment.
|
||||
|
||||
.. include:: _includes/_install-pyenv-and-setup-path.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.9.16 -v
|
||||
|
||||
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
|
||||
drastically reduce the install time. However, be aware that this will make Python run about 10%
|
||||
slower.
|
||||
|
||||
After that is finished, run:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv global 3.9.16
|
||||
|
||||
Pyenv is now installed and your system should be configured to run Python 3.9.
|
||||
@@ -1,27 +0,0 @@
|
||||
----------------------------
|
||||
Installing Python with pyenv
|
||||
----------------------------
|
||||
|
||||
On distributions where Python 3.8 needs to be compiled from source, we recommend the use of pyenv.
|
||||
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
|
||||
virtual environment.
|
||||
|
||||
.. include:: _includes/_install-pyenv-and-setup-path.rst
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.8.16 -v
|
||||
|
||||
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
|
||||
drastically reduce the install time. However, be aware that this will make Python run about 10%
|
||||
slower.
|
||||
|
||||
After that is finished, run:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
pyenv global 3.8.16
|
||||
|
||||
Pyenv is now installed and your system should be configured to run Python 3.8.
|
||||
@@ -0,0 +1,2 @@
|
||||
| We support hosting Red on computers running an **aarch64** or **armv7l** version of this system.
|
||||
| You can read more about systems and processor architectures we support in our `end-user-guarantees`.
|
||||
2
docs/install_guides/_includes/supported-arch-armv7l.rst
Normal file
2
docs/install_guides/_includes/supported-arch-armv7l.rst
Normal file
@@ -0,0 +1,2 @@
|
||||
| We support hosting Red on computers running an **armv7l** version of this system.
|
||||
| You can read more about systems and processor architectures we support in our `end-user-guarantees`.
|
||||
@@ -0,0 +1,2 @@
|
||||
| We support hosting Red on computers running an **x86-64**, **aarch64**, or **armv7l** version of this system.
|
||||
| You can read more about systems and processor architectures we support in our `end-user-guarantees`.
|
||||
@@ -0,0 +1,2 @@
|
||||
| We support hosting Red on computers running an **x86-64** or **aarch64** version of this system.
|
||||
| You can read more about systems and processor architectures we support in our `end-user-guarantees`.
|
||||
2
docs/install_guides/_includes/supported-arch-x64.rst
Normal file
2
docs/install_guides/_includes/supported-arch-x64.rst
Normal file
@@ -0,0 +1,2 @@
|
||||
| We support hosting Red on computers running an **x86-64** version of this system.
|
||||
| You can read more about systems and processor architectures we support in our `end-user-guarantees`.
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _install-alma-linux-8:
|
||||
|
||||
====================================
|
||||
Installing Red on Alma Linux 8.4-8.x
|
||||
Installing Red on Alma Linux 8.6-8.x
|
||||
====================================
|
||||
|
||||
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||
|
||||
26
docs/install_guides/amazon-linux-2023.rst
Normal file
26
docs/install_guides/amazon-linux-2023.rst
Normal file
@@ -0,0 +1,26 @@
|
||||
.. _install-amazon-linux-2023:
|
||||
|
||||
===================================
|
||||
Installing Red on Amazon Linux 2023
|
||||
===================================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Amazon Linux 2023 has all required packages available in official repositories. Install
|
||||
them with dnf:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo dnf -y install python3.11 python3.11-devel git java-17-amazon-corretto-headless @development nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
@@ -4,6 +4,8 @@
|
||||
Installing Red on Arch Linux
|
||||
============================
|
||||
|
||||
.. include:: _includes/supported-arch-x64.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
@@ -14,22 +16,22 @@ Install the pre-requirements with pacman:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo pacman -Syu git jre11-openjdk-headless base-devel nano
|
||||
sudo pacman -Syu git jre17-openjdk-headless base-devel nano
|
||||
|
||||
On Arch Linux, Python 3.9 can be installed from the Arch User Repository (AUR) from the ``python39`` package.
|
||||
On Arch Linux, Python 3.11 can be installed from the Arch User Repository (AUR) from the ``python311`` package.
|
||||
|
||||
The manual build process is the Arch-supported install method for AUR packages. You can install ``python39`` package with the following commands:
|
||||
The manual build process is the Arch-supported install method for AUR packages. You can install ``python311`` package with the following commands:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
git clone https://aur.archlinux.org/python39.git /tmp/python39
|
||||
cd /tmp/python39
|
||||
git clone https://aur.archlinux.org/python311.git /tmp/python311
|
||||
cd /tmp/python311
|
||||
makepkg -sicL
|
||||
cd -
|
||||
rm -rf /tmp/python39
|
||||
rm -rf /tmp/python311
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
.. _install-centos-7:
|
||||
|
||||
==========================
|
||||
Installing Red on CentOS 7
|
||||
==========================
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Install the pre-requirements with yum:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo yum -y groupinstall development
|
||||
sudo yum -y install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel xz-devel java-11-openjdk-headless nano git
|
||||
|
||||
In order to install gcc 8, we'll use SCL repository:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo yum -y install centos-release-scl
|
||||
sudo yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++
|
||||
echo "source scl_source enable devtoolset-8" >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
|
||||
In order to install Git 2.11 or greater, we recommend adding the IUS repository:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo yum -y install https://repo.ius.io/ius-release-el7.rpm
|
||||
sudo yum -y swap git git236
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/install-python-pyenv.rst
|
||||
|
||||
.. include:: _includes/create-env-with-pyenv-virtualenv.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
@@ -1,7 +0,0 @@
|
||||
.. _install-centos-stream-8:
|
||||
|
||||
=================================
|
||||
Installing Red on CentOS Stream 8
|
||||
=================================
|
||||
|
||||
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||
@@ -1,28 +0,0 @@
|
||||
.. _install-debian-10:
|
||||
|
||||
==================================
|
||||
Installing Red on Debian 10 Buster
|
||||
==================================
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
We recommend installing pyenv as a method of installing non-native versions of Python on
|
||||
Debian Buster. This guide will tell you how. First, run the following commands:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless nano
|
||||
CXX=/usr/bin/g++
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/install-python-pyenv.rst
|
||||
|
||||
.. include:: _includes/create-env-with-pyenv-virtualenv.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
@@ -4,6 +4,8 @@
|
||||
Installing Red on Debian 11 Bullseye
|
||||
====================================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64+armv7l.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
@@ -16,10 +18,10 @@ with apt:
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install python3 python3-dev python3-venv python3-pip git openjdk-11-jre-headless build-essential nano
|
||||
sudo apt -y install python3 python3-dev python3-venv git openjdk-17-jre-headless build-essential nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv.rst
|
||||
.. include:: _includes/create-env-with-venv3.9.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
27
docs/install_guides/debian-12.rst
Normal file
27
docs/install_guides/debian-12.rst
Normal file
@@ -0,0 +1,27 @@
|
||||
.. _install-debian-12:
|
||||
|
||||
====================================
|
||||
Installing Red on Debian 12 Bookworm
|
||||
====================================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64+armv7l.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Debian 12 "Bookworm" has all required packages available in official repositories. Install them
|
||||
with apt:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt -y install python3 python3-dev python3-venv git openjdk-17-jre-headless build-essential nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
@@ -4,21 +4,23 @@
|
||||
Installing Red on Fedora Linux
|
||||
==============================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
Fedora Linux 35 and above has all required packages available in official repositories. Install
|
||||
Fedora Linux 39 and above has all required packages available in official repositories. Install
|
||||
them with dnf:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo dnf -y install python39 git java-11-openjdk-headless @development-tools nano
|
||||
sudo dnf -y install python3.11 python3.11-devel git java-17-openjdk-headless @development-tools nano
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -6,7 +6,7 @@ Installing Red
|
||||
The list below shows the installation guides available based on the operating system being used.
|
||||
|
||||
If you want to host Red on a VPS and are unsure what operating system you should choose,
|
||||
we recommend **Ubuntu 22.04 LTS**.
|
||||
we recommend **Ubuntu 24.04 LTS**.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
@@ -15,24 +15,23 @@ we recommend **Ubuntu 22.04 LTS**.
|
||||
mac
|
||||
alma-linux-8
|
||||
alma-linux-9
|
||||
amazon-linux-2023
|
||||
arch
|
||||
centos-7
|
||||
centos-stream-8
|
||||
centos-stream-9
|
||||
debian-10
|
||||
debian-11
|
||||
debian-12
|
||||
fedora
|
||||
opensuse-leap-15
|
||||
opensuse-tumbleweed
|
||||
oracle-linux-8
|
||||
oracle-linux-9
|
||||
raspberry-pi-os-10
|
||||
raspberry-pi-os-11
|
||||
raspberry-pi-os-12
|
||||
rhel-8
|
||||
rhel-9
|
||||
rocky-linux-8
|
||||
rocky-linux-9
|
||||
ubuntu-1804
|
||||
ubuntu-2004
|
||||
ubuntu-2204
|
||||
ubuntu-2404
|
||||
ubuntu-non-lts
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
Installing Red on macOS
|
||||
=======================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
@@ -24,21 +26,20 @@ one-by-one:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
brew install python@3.9
|
||||
brew install python@3.11
|
||||
brew install git
|
||||
brew tap homebrew/cask-versions
|
||||
brew install --cask temurin11
|
||||
brew install temurin@17
|
||||
|
||||
By default, Python installed through Homebrew is not added to the load path.
|
||||
To fix this, you should run these commands:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
echo 'export PATH="$(brew --prefix)/opt/python@3.9/bin:$PATH"' >> "$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))"
|
||||
export PATH="$(brew --prefix)/opt/python@3.9/bin:$PATH"
|
||||
echo 'export PATH="$(brew --prefix)/opt/python@3.11/bin:$PATH"' >> "$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))"
|
||||
export PATH="$(brew --prefix)/opt/python@3.11/bin:$PATH"
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
.. _install-opensuse-leap-15:
|
||||
|
||||
=====================================
|
||||
Installing Red on openSUSE Leap 15.3+
|
||||
Installing Red on openSUSE Leap 15.5+
|
||||
=====================================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
Installing the pre-requirements
|
||||
-------------------------------
|
||||
|
||||
openSUSE Leap 15.3+ has all required dependencies available in official repositories. Install them
|
||||
openSUSE Leap 15.5+ has all required dependencies available in official repositories. Install them
|
||||
with zypper:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo zypper -n install python39-base python39-pip git-core java-11-openjdk-headless nano
|
||||
sudo zypper -n install python311 python311-devel git-core java-17-openjdk-headless nano
|
||||
sudo zypper -n install -t pattern devel_basis
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
Installing Red on openSUSE Tumbleweed
|
||||
=====================================
|
||||
|
||||
.. include:: _includes/supported-arch-x64+aarch64.rst
|
||||
|
||||
.. include:: _includes/linux-preamble.rst
|
||||
|
||||
-------------------------------
|
||||
@@ -15,11 +17,11 @@ with zypper:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo zypper -n install python39-base python39-pip git-core java-11-openjdk-headless nano
|
||||
sudo zypper -n install python311 python311-devel git-core java-17-openjdk-headless nano
|
||||
sudo zypper -n install -t pattern devel_basis
|
||||
|
||||
.. Include common instructions:
|
||||
|
||||
.. include:: _includes/create-env-with-venv.rst
|
||||
.. include:: _includes/create-env-with-venv3.11.rst
|
||||
|
||||
.. include:: _includes/install-and-setup-red-unix.rst
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.. _install-oracle-linux-8:
|
||||
|
||||
======================================
|
||||
Installing Red on Oracle Linux 8.4-8.x
|
||||
Installing Red on Oracle Linux 8.6-8.x
|
||||
======================================
|
||||
|
||||
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user