Compare commits
1028 Commits
3.4.1
...
8d8918b3c6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d8918b3c6 | ||
|
|
550cf49bc8 | ||
|
|
313eeffc84 | ||
|
|
88e1f72467 | ||
|
|
3c6146d6ca | ||
|
|
bfab9cc5f8 | ||
|
|
07ee31a88f | ||
|
|
bd61c105e0 | ||
|
|
db0e831a2e | ||
|
|
d7a56f1518 | ||
|
|
5f2c6d19d1 | ||
|
|
7b3600ecb1 | ||
|
|
6f5f34c80a | ||
|
|
2e902b067e | ||
|
|
61695daded | ||
|
|
10889642ce | ||
|
|
a3b254fe8e | ||
|
|
71554c981d | ||
|
|
e1225029b0 | ||
|
|
85923d4c0f | ||
|
|
19b34c63b2 | ||
|
|
60e819159f | ||
|
|
0f4c7b0fe6 | ||
|
|
3bf7c64d01 | ||
|
|
4558b72082 | ||
|
|
73958d87f1 | ||
|
|
d6054412f4 | ||
|
|
5cf69bdc51 | ||
|
|
2fd6ea88d9 | ||
|
|
50ad59a6c8 | ||
|
|
dfc1e742f8 | ||
|
|
769c319ffd | ||
|
|
3c1f2cddfd | ||
|
|
1299db0f3a | ||
|
|
c58d208ca2 | ||
|
|
c308ea0184 | ||
|
|
8e0948d560 | ||
|
|
952a372652 | ||
|
|
a0c1713e78 | ||
|
|
8b1daf1ad0 | ||
|
|
dcdef9d798 | ||
|
|
f962aeb7b8 | ||
|
|
b13b1f8f16 | ||
|
|
6bf2a88995 | ||
|
|
22888f8014 | ||
|
|
ba44370020 | ||
|
|
cd0e8750c1 | ||
|
|
679289fd1c | ||
|
|
ce6489325e | ||
|
|
d64cbdf83e | ||
|
|
66d1c87b5a | ||
|
|
3888f09cfa | ||
|
|
8ad9c55d50 | ||
|
|
3aac07a4d7 | ||
|
|
bd26e7d5af | ||
|
|
9392077434 | ||
|
|
1f48919005 | ||
|
|
fdaa869130 | ||
|
|
18614b1604 | ||
|
|
016684bcce | ||
|
|
5cfb8edab8 | ||
|
|
150692538f | ||
|
|
f4ffc6bc80 | ||
|
|
9419f2642a | ||
|
|
f0a29e9815 | ||
|
|
d29ae723c1 | ||
|
|
9920628948 | ||
|
|
48b2fe77c0 | ||
|
|
33e0eac741 | ||
|
|
2871992772 | ||
|
|
30058c0f73 | ||
|
|
4134881fae | ||
|
|
4396323205 | ||
|
|
4e27059209 | ||
|
|
d3887b595f | ||
|
|
005b8af10a | ||
|
|
d304da7a16 | ||
|
|
f3c89ad8bd | ||
|
|
05cf9b7f39 | ||
|
|
907a3f7561 | ||
|
|
2595c9de10 | ||
|
|
8be7b0850c | ||
|
|
61ec913789 | ||
|
|
88b11f2b9c | ||
|
|
9ca0ced2d8 | ||
|
|
a5a178bfaf | ||
|
|
eeb90aaa45 | ||
|
|
b7a59b5e4c | ||
|
|
2769ea025f | ||
|
|
818420a641 | ||
|
|
3c49a77e34 | ||
|
|
90691ba2b9 | ||
|
|
68f2806204 | ||
|
|
903992f48a | ||
|
|
e4b75f5333 | ||
|
|
254d5a91d6 | ||
|
|
b979a7c4d1 | ||
|
|
54a29174ea | ||
|
|
5bbced5b0d | ||
|
|
5b21c89505 | ||
|
|
04d856cfb0 | ||
|
|
701339f8a1 | ||
|
|
3d04d696c1 | ||
|
|
0b8bcef86c | ||
|
|
2d47d75919 | ||
|
|
7eb26da647 | ||
|
|
699471f27a | ||
|
|
2c2080df12 | ||
|
|
fa7236af63 | ||
|
|
601816abc0 | ||
|
|
bf8c0d03b5 | ||
|
|
2e40ec4a1a | ||
|
|
9b9fdf555b | ||
|
|
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 | ||
|
|
52f96e043b | ||
|
|
5b58cdb449 | ||
|
|
8a6aa41d86 | ||
|
|
e52fb2c086 | ||
|
|
86c4d953a8 | ||
|
|
539a475706 | ||
|
|
36968a4bf0 | ||
|
|
a99240f7c3 | ||
|
|
be04ec1c86 | ||
|
|
c3362f6eaa | ||
|
|
b2db0674d5 | ||
|
|
5ead38c284 | ||
|
|
8dffebbb34 | ||
|
|
5b03f04790 | ||
|
|
8e6cf0be81 | ||
|
|
5f0b4403bc | ||
|
|
c23100eaca | ||
|
|
1b6745549e | ||
|
|
faf1ad4846 | ||
|
|
dafffd969f | ||
|
|
a428e42f1f | ||
|
|
ded5aff08c | ||
|
|
8f390147c1 | ||
|
|
0ce2634bb3 | ||
|
|
1ee4156ac6 | ||
|
|
1471ead0ce | ||
|
|
d011b1f9af | ||
|
|
fc4a995540 | ||
|
|
ce4fd6cca8 | ||
|
|
305161110e | ||
|
|
f0dab50097 | ||
|
|
b630e71d08 | ||
|
|
db86de3a7a | ||
|
|
dd40f00279 | ||
|
|
177bd7f84e | ||
|
|
210c07d5a7 | ||
|
|
23997d7a71 | ||
|
|
c0f17c2155 | ||
|
|
631adc282f | ||
|
|
b8b8a38fbd | ||
|
|
2d8dbad63b | ||
|
|
137713d9ca | ||
|
|
0f4c409e84 | ||
|
|
ac0c5cc4c8 | ||
|
|
ca373052c5 | ||
|
|
f8ecc32dbc | ||
|
|
982feda858 | ||
|
|
2f7376169e | ||
|
|
7459af25ba | ||
|
|
820b21dccb | ||
|
|
c4a9d97a4b | ||
|
|
b89c43eb0f | ||
|
|
a6c438e486 | ||
|
|
994137426f | ||
|
|
f3231682b0 | ||
|
|
d5fbc0b01c | ||
|
|
1c32186d0b | ||
|
|
8a7c4aa48c | ||
|
|
3a9edd9434 | ||
|
|
439033ea28 | ||
|
|
e124ae3c11 | ||
|
|
3ff2132570 | ||
|
|
3f39a93e59 | ||
|
|
356922f4de | ||
|
|
e2f0ac582b | ||
|
|
9b66d19369 | ||
|
|
01f86091ab | ||
|
|
56099d6b50 | ||
|
|
fa4990f327 | ||
|
|
606c2f50ba | ||
|
|
53276ea12a | ||
|
|
c40efd479b | ||
|
|
a58ac7cd2e | ||
|
|
31cb4c0604 | ||
|
|
700802c303 | ||
|
|
00d2d62f1b | ||
|
|
c36665e755 | ||
|
|
75ce67837a | ||
|
|
c83eae931b | ||
|
|
ea82119605 | ||
|
|
42101275d5 | ||
|
|
38da7370ec | ||
|
|
c9431f7d90 | ||
|
|
cb45ef6c42 | ||
|
|
410b2419dd | ||
|
|
5d905a93ac | ||
|
|
99b29d0b8e | ||
|
|
4bcfa8e486 | ||
|
|
48ed6c253e | ||
|
|
9986cbe6b5 | ||
|
|
e467833cee | ||
|
|
1efcabada1 | ||
|
|
54e5307307 | ||
|
|
737e4cc399 | ||
|
|
4bdc828670 | ||
|
|
c04c2efeff | ||
|
|
2374b4af59 | ||
|
|
d666c24bd4 | ||
|
|
1697d90c53 | ||
|
|
7f05841b96 | ||
|
|
01561fbe07 | ||
|
|
f89223bc74 | ||
|
|
336abcfbba | ||
|
|
925ae870ba | ||
|
|
0447b5648a | ||
|
|
5de65a74b5 | ||
|
|
7434a7c8e2 | ||
|
|
f21addb0f5 | ||
|
|
39144ed7cd | ||
|
|
aea0db4ef6 | ||
|
|
0eaa0f494c | ||
|
|
19dcc52fb1 | ||
|
|
1c7b1e0358 | ||
|
|
82edaeeb81 | ||
|
|
2f16d33971 | ||
|
|
6a99becdb2 | ||
|
|
062211d099 | ||
|
|
84f1699b8f | ||
|
|
6cf54db308 | ||
|
|
fa25033be1 | ||
|
|
36c9d9aaee | ||
|
|
2c82a4ba2b | ||
|
|
6cae1c0204 | ||
|
|
1b6fc00039 | ||
|
|
e2c0f2aca8 | ||
|
|
83deb7c563 | ||
|
|
c574271cee | ||
|
|
a6d15dc385 | ||
|
|
07099dd1dd | ||
|
|
d1ed41c46b | ||
|
|
3c742e39d2 | ||
|
|
9a7c178db5 | ||
|
|
67fa735555 | ||
|
|
c25095ba2d | ||
|
|
adda30cbee | ||
|
|
9008410fa4 | ||
|
|
b7d8b0552e | ||
|
|
1199f160d0 | ||
|
|
5ddc6d2ea8 | ||
|
|
6e764c7e04 | ||
|
|
18a23813c8 | ||
|
|
560e1dfc3d | ||
|
|
03d72dd5fa | ||
|
|
847444eab1 | ||
|
|
6c338f175b | ||
|
|
363a2e8a17 | ||
|
|
edbd31413b | ||
|
|
4813c68185 | ||
|
|
0becf70b05 | ||
|
|
0144cbf88b | ||
|
|
76bb65912e | ||
|
|
01637a9798 | ||
|
|
7c853db9f4 | ||
|
|
a919610588 | ||
|
|
49da854eb7 | ||
|
|
c168e55be9 | ||
|
|
35dfb04066 | ||
|
|
fb701d8c72 | ||
|
|
24fadad4cf | ||
|
|
f30772a7bd | ||
|
|
b71d278ae5 | ||
|
|
be00a59ab3 | ||
|
|
d45a02166d | ||
|
|
a4db7a1028 | ||
|
|
ef803072fa | ||
|
|
e5ffe86c4e | ||
|
|
d1bc4b4302 | ||
|
|
6c903aacff | ||
|
|
1b3958515b | ||
|
|
fef56427ae | ||
|
|
18fea4e4a7 | ||
|
|
f82d613a11 | ||
|
|
0c3e772135 | ||
|
|
c78ee14617 | ||
|
|
3782e9c1b9 | ||
|
|
8d03fef566 | ||
|
|
77896494c4 | ||
|
|
aad34f2b08 | ||
|
|
85dc6f4cc9 | ||
|
|
7126482449 | ||
|
|
9bb61ba882 | ||
|
|
1ff976b3d0 | ||
|
|
53c069a636 | ||
|
|
bb90444979 | ||
|
|
19fc5a090c | ||
|
|
0d53b2ab73 | ||
|
|
d3b448d50c | ||
|
|
02667ef65d | ||
|
|
51b73fdd1a | ||
|
|
f926fab431 | ||
|
|
dbbaa88e8e | ||
|
|
df5926b51a | ||
|
|
7d42c4c6c3 | ||
|
|
dfe84f9936 | ||
|
|
649b4ebb15 | ||
|
|
f476b842d5 | ||
|
|
92ea92b617 | ||
|
|
ae2bae058c | ||
|
|
b20fc9f6af | ||
|
|
fc5eadd0cc | ||
|
|
c5fbf5fb94 | ||
|
|
54bbdd61e1 | ||
|
|
512ff7a4b5 | ||
|
|
6881b20c20 | ||
|
|
e80a00ec1b | ||
|
|
7b04c04551 | ||
|
|
62411bc2a5 | ||
|
|
bee022d1bb | ||
|
|
1be7435fb5 | ||
|
|
9b4363eff3 | ||
|
|
dc68bc5d37 | ||
|
|
5b670c074f | ||
|
|
1a9ce2040a | ||
|
|
4fa8a51ea1 | ||
|
|
acec5c6efe | ||
|
|
d64944d5c3 | ||
|
|
6cfaffb8a8 | ||
|
|
3122eb0447 | ||
|
|
bf30f2078c | ||
|
|
33850a2c35 | ||
|
|
40368cc379 | ||
|
|
a9e572d55a | ||
|
|
4ca2fe0872 | ||
|
|
dd9e60b15f | ||
|
|
ee33d46732 | ||
|
|
4c58dcedfe | ||
|
|
82595df730 | ||
|
|
1920212eda | ||
|
|
7df1570d51 | ||
|
|
663876fba3 | ||
|
|
ae87aa396a | ||
|
|
bf624da51b | ||
|
|
0f8f33fed2 | ||
|
|
f9848a69b7 | ||
|
|
082106eb21 | ||
|
|
45f22404d4 | ||
|
|
9737c1b5eb | ||
|
|
7c86071a5d | ||
|
|
86fbead609 | ||
|
|
8139587e5e | ||
|
|
d6de9c1b94 | ||
|
|
e24379973c | ||
|
|
2bffbd9001 | ||
|
|
51c17110ad | ||
|
|
577dbfddb6 | ||
|
|
c11e9afec7 | ||
|
|
991cd46ea3 | ||
|
|
ad48ef6efd | ||
|
|
69c8781cec | ||
|
|
db20cad395 | ||
|
|
e106dfaece | ||
|
|
aa0ee3385d | ||
|
|
2ce4a275fc | ||
|
|
e23d21ec08 | ||
|
|
cc885090e6 | ||
|
|
9b97244f9f | ||
|
|
7630e24822 | ||
|
|
8dbabe24e0 | ||
|
|
5b21d37571 | ||
|
|
676f34185d | ||
|
|
edbbd76b3c | ||
|
|
315b3e5c98 | ||
|
|
41e980c517 | ||
|
|
0358055cce | ||
|
|
dcf7368e54 | ||
|
|
4138410d33 | ||
|
|
537656c365 | ||
|
|
d7a3da49f0 | ||
|
|
2b5d72c7a4 | ||
|
|
e4d24578b5 | ||
|
|
2b72f9bb99 | ||
|
|
8d512e206a | ||
|
|
19711d35b2 | ||
|
|
1e1fff0d49 | ||
|
|
21f75c0711 | ||
|
|
a2d0a364fe | ||
|
|
b76b6305d1 | ||
|
|
beedc6d2c7 | ||
|
|
ecf912bc4b | ||
|
|
d0a0b3fc53 | ||
|
|
6133075fd6 | ||
|
|
e218e092b0 | ||
|
|
7208cdb804 | ||
|
|
13cd751932 | ||
|
|
1bdaa9d95e | ||
|
|
67e776a640 | ||
|
|
dc5f025e02 | ||
|
|
2add689729 | ||
|
|
3716bf25a7 | ||
|
|
2f18133a93 | ||
|
|
e8aef1e923 | ||
|
|
30dc6fe171 | ||
|
|
8ae84b7c81 | ||
|
|
d01bca2314 | ||
|
|
300346dcd4 | ||
|
|
ab80f46d2e | ||
|
|
afae84fa6b | ||
|
|
d53ff57794 | ||
|
|
d3ffb22e86 | ||
|
|
b36a702e62 | ||
|
|
59e1e31634 | ||
|
|
8280067b7e | ||
|
|
7f587ea46b | ||
|
|
92788a90c1 | ||
|
|
3a12a9b47f | ||
|
|
d22ea2dd11 | ||
|
|
e519286f5c | ||
|
|
06ba425159 | ||
|
|
6038ef5550 | ||
|
|
b04610b457 | ||
|
|
140693b171 | ||
|
|
63cc83c81b | ||
|
|
e2a6d451c3 | ||
|
|
e2adb29cf3 | ||
|
|
1ca422a636 | ||
|
|
04cb1befe6 | ||
|
|
da8705fb8f | ||
|
|
395c184eef | ||
|
|
c7fd561cd5 | ||
|
|
bc8f2311d9 | ||
|
|
f129dcd1a9 | ||
|
|
f1d2be58c1 | ||
|
|
6060da0f87 | ||
|
|
13ca9a6c2e | ||
|
|
f1c5f4a8e4 | ||
|
|
b7b21a06c8 | ||
|
|
dc82ef758f | ||
|
|
e50b32cc27 | ||
|
|
224d89c6ff | ||
|
|
866728371b | ||
|
|
1747d901d1 | ||
|
|
e87896815c | ||
|
|
0f7a3bf6f8 | ||
|
|
0a040ad8e3 | ||
|
|
a97cd64f48 | ||
|
|
a1a44bf1cc | ||
|
|
48ec2dfee0 | ||
|
|
91f7f9ebf4 | ||
|
|
a7ec40664e | ||
|
|
0089380bfd | ||
|
|
ffcf104dfc | ||
|
|
08c29d780b | ||
|
|
7c36709f76 | ||
|
|
80f0a297a9 | ||
|
|
a94f0d03dd | ||
|
|
ac9149870e | ||
|
|
f850ded822 | ||
|
|
06b87368f6 | ||
|
|
af65b73fb2 | ||
|
|
0feacee7f2 | ||
|
|
4aa84a5d22 | ||
|
|
c95d526bc6 | ||
|
|
b77afeed34 | ||
|
|
7db2ba556d | ||
|
|
bd0955ac44 | ||
|
|
0d650f6765 | ||
|
|
8b2c6226f6 | ||
|
|
252951c706 | ||
|
|
532ac6cfa9 | ||
|
|
868059f062 |
5
.cherry_picker.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
team = "Cog-Creators"
|
||||
repo = "Red-DiscordBot"
|
||||
check_sha = "6251c585e4ec0a53813a9993ede3ab5309024579"
|
||||
fix_commit_msg = false
|
||||
default_branch = "V3/develop"
|
||||
40
.git-blame-ignore-revs
Normal file
@@ -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
@@ -0,0 +1,2 @@
|
||||
$Format:%h$
|
||||
$Format:%(describe:tags=true)$
|
||||
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
|
||||
|
||||
17
.github/CODEOWNERS
vendored
@@ -1,18 +1,25 @@
|
||||
# Cogs
|
||||
/redbot/cogs/audio/** @aikaterna @Drapersniper
|
||||
/redbot/cogs/downloader/* @jack1142
|
||||
/redbot/cogs/audio/** @aikaterna @PredaaA
|
||||
/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
|
||||
|
||||
86
.github/ISSUE_TEMPLATE/01_command_bug.yml
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
name: Bug reports for commands
|
||||
description: For bugs that involve commands found within Red.
|
||||
labels: 'Type: Bug'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to fill out an issue. This template is meant for any issues related to commands.
|
||||
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
|
||||
- type: input
|
||||
id: red-version
|
||||
attributes:
|
||||
label: "What Red version are you using?"
|
||||
placeholder: 3.4.5
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: cog-name
|
||||
attributes:
|
||||
label: "Cog name"
|
||||
description: "From which cog does the command come from?"
|
||||
options:
|
||||
- Admin
|
||||
- Alias
|
||||
- Audio
|
||||
- Bank
|
||||
- Cleanup
|
||||
- CogManagerUI
|
||||
- Core
|
||||
- Customcom
|
||||
- Dev
|
||||
- Downloader
|
||||
- Economy
|
||||
- Filter
|
||||
- General
|
||||
- Image
|
||||
- Mod
|
||||
- Modlog
|
||||
- Mutes
|
||||
- Permissions
|
||||
- Reports
|
||||
- Streams
|
||||
- Trivia
|
||||
- Warnings
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: command-name
|
||||
attributes:
|
||||
label: "Command name"
|
||||
description: "What is the command that caused the error?"
|
||||
placeholder: "play"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: weh
|
||||
attributes:
|
||||
label: "What did you expect to happen?"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: wah
|
||||
attributes:
|
||||
label: "What actually happened?"
|
||||
description: |
|
||||
A clear and concise description of what the bug is.
|
||||
If the issue is visual in nature, consider posting a screenshot.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction-steps
|
||||
attributes:
|
||||
label: "How can we reproduce this error?"
|
||||
description: "List of steps required to reproduce this error."
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything-else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: Let us know if you have anything else to share.
|
||||
54
.github/ISSUE_TEMPLATE/02_other_bugs.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Bug report
|
||||
description: "For bugs that don't involve a command."
|
||||
labels: 'Type: Bug'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to fill out an issue. This template is meant for any issues not related to any existing command.
|
||||
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
|
||||
- type: input
|
||||
id: red-version
|
||||
attributes:
|
||||
label: "What Red version are you using?"
|
||||
placeholder: 3.4.5
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: "What were you trying to do?"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: weh
|
||||
attributes:
|
||||
label: "What did you expect to happen?"
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: wah
|
||||
attributes:
|
||||
label: "What actually happened?"
|
||||
description: |
|
||||
If the issue is visual in nature, consider posting a screenshot.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: reproduction-steps
|
||||
attributes:
|
||||
label: "How can we reproduce this error?"
|
||||
description: |
|
||||
List of steps required to reproduce the error. If the bug is code related, a minimal code example that reproduces the problem would be a big help.
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything-else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: Let us know if you have anything else to share.
|
||||
29
.github/ISSUE_TEMPLATE/03_enhancements.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Enhancement proposal
|
||||
description: For feature requests and improvements related to already existing functionality.
|
||||
labels: 'Type: Enhancement'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to fill out an issue. This template is meant for feature requests and improvements to already existing functionality.
|
||||
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
|
||||
- type: input
|
||||
id: component-name
|
||||
attributes:
|
||||
label: "What component of Red (cog, command, API) would you like to see improvements on?"
|
||||
placeholder: Audio
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: "Describe the enhancement you're suggesting."
|
||||
description: |
|
||||
Feel free to describe in as much detail as you wish.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything-else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: Let us know if you have anything else to share.
|
||||
52
.github/ISSUE_TEMPLATE/04_feature_request.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Feature request
|
||||
description: For feature requests regarding Red itself.
|
||||
labels: 'Type: Feature'
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for taking the time to fill out an issue, this template is meant for any feature suggestions.
|
||||
If you require help with installing Red we ask that you join our [Discord server](https://discord.gg/red)
|
||||
- type: dropdown
|
||||
id: feature-name
|
||||
attributes:
|
||||
label: "Type of feature request"
|
||||
description: "What type of feature would you like to request?"
|
||||
multiple: true
|
||||
options:
|
||||
- API functionality
|
||||
- Cog
|
||||
- Command
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: "Description of the feature you're suggesting"
|
||||
description: |
|
||||
Feel free to describe in as much detail as you wish.
|
||||
|
||||
If you are requesting API functionality:
|
||||
- Describe what it should do
|
||||
- Note whether it is to extend existing functionality or introduce new functionality
|
||||
|
||||
If you are requesting a cog to be included in core:
|
||||
- Describe the functionality in as much detail as possible
|
||||
- Include the command structure, if possible
|
||||
- Please note that unless it's something that should be core functionality,
|
||||
we reserve the right to reject your suggestion and point you to our cog
|
||||
board to request it for a third-party cog
|
||||
|
||||
If you are requesting a command:
|
||||
- Include what cog it should be in and a name for the command
|
||||
- Describe the intended functionality for the command
|
||||
- Note any restrictions on who can use the command or where it can be used
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: anything-else
|
||||
attributes:
|
||||
label: Anything else?
|
||||
description: Let us know if you have anything else to share.
|
||||
|
||||
20
.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE.md
vendored
@@ -1,20 +0,0 @@
|
||||
Please be sure to read through other issues as well to make sure what you are suggesting/reporting has not already
|
||||
been suggested/reported
|
||||
|
||||
### Type:
|
||||
|
||||
- [ ] Suggestion
|
||||
- [ ] Bug
|
||||
|
||||
### Brief description of the problem
|
||||
|
||||
### Expected behavior
|
||||
|
||||
### Actual behavior
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
4.
|
||||
34
.github/ISSUE_TEMPLATE/command_bug.md
vendored
@@ -1,34 +0,0 @@
|
||||
---
|
||||
name: Bug reports for commands
|
||||
about: For bugs that involve commands found within Red
|
||||
title: ''
|
||||
labels: 'Type: Bug'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Command bugs
|
||||
|
||||
<!--
|
||||
Did you find a bug with a command? Fill out the following:
|
||||
-->
|
||||
|
||||
#### Command name
|
||||
|
||||
<!-- Replace this line with the name of the command -->
|
||||
|
||||
#### What cog is this command from?
|
||||
|
||||
<!-- Replace this line with the name of the cog -->
|
||||
|
||||
#### What were you expecting to happen?
|
||||
|
||||
<!-- Replace this line with a description of what you were expecting to happen -->
|
||||
|
||||
#### What actually happened?
|
||||
|
||||
<!-- Replace this line with a description of what actually happened. Include any error messages -->
|
||||
|
||||
#### How can we reproduce this issue?
|
||||
|
||||
<!-- Replace with numbered steps to reproduce the issue -->
|
||||
44
.github/ISSUE_TEMPLATE/feature_req.md
vendored
@@ -1,44 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: For feature requests regarding Red itself.
|
||||
title: ''
|
||||
labels: 'Type: Feature'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Feature request
|
||||
|
||||
<!-- This template is for feature requests. Please fill out the following: -->
|
||||
|
||||
|
||||
#### Select the type of feature you are requesting:
|
||||
|
||||
<!-- To check a box, replace the space between the [] with a x -->
|
||||
|
||||
- [ ] Cog
|
||||
- [ ] Command
|
||||
- [ ] API functionality
|
||||
|
||||
#### Describe your requested feature
|
||||
|
||||
<!--
|
||||
Feel free to describe in as much detail as you wish.
|
||||
|
||||
If you are requesting a cog to be included in core:
|
||||
- Describe the functionality in as much detail as possible
|
||||
- Include the command structure, if possible
|
||||
- Please note that unless it's something that should be core functionality,
|
||||
we reserve the right to reject your suggestion and point you to our cog
|
||||
board to request it for a third-party cog
|
||||
|
||||
If you are requesting a command:
|
||||
- Include what cog it should be in and a name for the command
|
||||
- Describe the intended functionality for the command
|
||||
- Note any restrictions on who can use the command or where it can be used
|
||||
|
||||
If you are requesting API functionality:
|
||||
- Describe what it should do
|
||||
- Note whether it is to extend existing functionality or introduce new functionality
|
||||
|
||||
-->
|
||||
30
.github/ISSUE_TEMPLATE/other_bug.md
vendored
@@ -1,30 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: For bugs that don't involve a command.
|
||||
title: ''
|
||||
labels: 'Type: Bug'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Other bugs
|
||||
|
||||
<!--
|
||||
Did you find a bug with something other than a command? Fill out the following:
|
||||
-->
|
||||
|
||||
#### What were you trying to do?
|
||||
|
||||
<!-- Replace this line with a description of what you were trying to do -->
|
||||
|
||||
#### What were you expecting to happen?
|
||||
|
||||
<!-- Replace this line with a description of what you were expecting to happen -->
|
||||
|
||||
#### What actually happened?
|
||||
|
||||
<!-- Replace this line with a description of what actually happened. Include any error messages -->
|
||||
|
||||
#### How can we reproduce this issue?
|
||||
|
||||
<!-- Replace with numbered steps to reproduce the issue -->
|
||||
22
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,7 +1,17 @@
|
||||
### Type
|
||||
|
||||
- [ ] Bugfix
|
||||
- [ ] Enhancement
|
||||
- [ ] New feature
|
||||
|
||||
### 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.
|
||||
-->
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
### Type
|
||||
|
||||
- [ ] Bugfix
|
||||
- [ ] Enhancement
|
||||
- [ ] New feature
|
||||
|
||||
### Description of the changes
|
||||
332
.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,332 @@
|
||||
"Category: CI":
|
||||
- .github/workflows/**/*
|
||||
|
||||
|
||||
"Category: Cogs - Admin":
|
||||
# Source
|
||||
- redbot/cogs/admin/*
|
||||
# Docs
|
||||
- docs/cog_guides/admin.rst
|
||||
- docs/.resources/admin/**/*
|
||||
"Category: Cogs - Alias":
|
||||
# Source
|
||||
- redbot/cogs/alias/*
|
||||
# Docs
|
||||
- docs/cog_guides/alias.rst
|
||||
# Tests
|
||||
- redbot/pytest/alias.py
|
||||
- tests/cogs/test_alias.py
|
||||
- docs/.resources/alias/**/*
|
||||
"Category: Cogs - Audio":
|
||||
# Source
|
||||
- any:
|
||||
- redbot/cogs/audio/**/*
|
||||
- "!redbot/cogs/audio/**/locales/*"
|
||||
# Docs
|
||||
- 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: Cogs - CustomCommands":
|
||||
# Source
|
||||
- redbot/cogs/customcom/*
|
||||
# Docs
|
||||
- docs/cog_customcom.rst
|
||||
- docs/cog_guides/customcommands.rst
|
||||
"Category: Cogs - Dev":
|
||||
# Source
|
||||
- redbot/core/dev_commands.py
|
||||
# Docs
|
||||
- docs/cog_guides/dev.rst
|
||||
# Tests
|
||||
- tests/core/test_dev_commands.py
|
||||
"Category: Cogs - Downloader":
|
||||
# Source
|
||||
- redbot/cogs/downloader/*
|
||||
# Docs
|
||||
- docs/cog_guides/downloader.rst
|
||||
# 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
|
||||
# Tests
|
||||
- redbot/pytest/economy.py
|
||||
- tests/cogs/test_economy.py
|
||||
"Category: Cogs - Filter":
|
||||
# Source
|
||||
- redbot/cogs/filter/*
|
||||
# Docs
|
||||
- docs/cog_guides/filter.rst
|
||||
"Category: Cogs - General":
|
||||
# Source
|
||||
- redbot/cogs/general/*
|
||||
# Docs
|
||||
- docs/cog_guides/general.rst
|
||||
"Category: Cogs - Image":
|
||||
# Source
|
||||
- redbot/cogs/image/*
|
||||
# Docs
|
||||
- docs/cog_guides/image.rst
|
||||
"Category: Cogs - Mod":
|
||||
# Source
|
||||
- redbot/cogs/mod/*
|
||||
# Docs
|
||||
- docs/cog_guides/mod.rst
|
||||
# Tests
|
||||
- redbot/pytest/mod.py
|
||||
- tests/cogs/test_mod.py
|
||||
"Category: Cogs - Modlog":
|
||||
# Source
|
||||
- redbot/cogs/modlog/*
|
||||
# Docs
|
||||
- docs/cog_guides/modlog.rst
|
||||
"Category: Cogs - Mutes":
|
||||
# Source
|
||||
- redbot/cogs/mutes/*
|
||||
# Docs
|
||||
- docs/cog_guides/mutes.rst
|
||||
"Category: Cogs - Permissions":
|
||||
# Source
|
||||
- redbot/cogs/permissions/*
|
||||
# Docs
|
||||
- docs/cog_guides/permissions.rst
|
||||
- docs/cog_permissions.rst
|
||||
# Tests
|
||||
- redbot/pytest/permissions.py
|
||||
- tests/cogs/test_permissions.py
|
||||
"Category: Cogs - Reports":
|
||||
# Source
|
||||
- redbot/cogs/reports/*
|
||||
# Docs
|
||||
- docs/cog_guides/reports.rst
|
||||
"Category: Cogs - Streams":
|
||||
# Source
|
||||
- redbot/cogs/streams/*
|
||||
# Docs
|
||||
- docs/cog_guides/streams.rst
|
||||
"Category: Cogs - Trivia":
|
||||
# Source
|
||||
- redbot/cogs/trivia/*
|
||||
# Docs
|
||||
- docs/cog_guides/trivia.rst
|
||||
- docs/guide_trivia_list_creation.rst
|
||||
- docs/.resources/trivia/**/*
|
||||
# Tests
|
||||
- tests/cogs/test_trivia.py
|
||||
"Category: Cogs - Trivia - Lists":
|
||||
- redbot/cogs/trivia/data/lists/*
|
||||
"Category: Cogs - Warnings":
|
||||
# Source
|
||||
- redbot/cogs/warnings/*
|
||||
# Docs
|
||||
- docs/cog_guides/warnings.rst
|
||||
|
||||
|
||||
"Category: Core - API - Audio": [] # potential future feature
|
||||
"Category: Core - API - Bank":
|
||||
# Source
|
||||
- redbot/core/bank.py
|
||||
# Docs
|
||||
- docs/framework_bank.rst
|
||||
"Category: Core - API - App Commands Package":
|
||||
# Source
|
||||
- redbot/core/app_commands/*
|
||||
# Docs
|
||||
- docs/framework_app_commands.rst
|
||||
# Tests
|
||||
- tests/core/test_app_commands.py
|
||||
"Category: Core - API - Commands Package":
|
||||
# Source
|
||||
- any:
|
||||
- redbot/core/commands/*
|
||||
- "!redbot/core/commands/help.py"
|
||||
# this isn't in commands package but it just re-exports things from it
|
||||
- redbot/core/checks.py
|
||||
# Docs
|
||||
- docs/framework_checks.rst
|
||||
- docs/framework_commands.rst
|
||||
# Tests
|
||||
- tests/core/test_commands.py
|
||||
"Category: Core - API - Config":
|
||||
# Source
|
||||
- any:
|
||||
- redbot/core/_drivers/**/*
|
||||
- "!redbot/core/_drivers/**/locales/*"
|
||||
- redbot/core/_config.py
|
||||
- redbot/core/config.py
|
||||
# Docs
|
||||
- docs/framework_config.rst
|
||||
# Tests
|
||||
- tests/core/test_config.py
|
||||
"Category: Core - API - Other":
|
||||
# Source
|
||||
- redbot/__init__.py
|
||||
- redbot/core/__init__.py
|
||||
- redbot/core/data_manager.py
|
||||
- redbot/core/errors.py
|
||||
- redbot/core/tree.py
|
||||
# Docs
|
||||
- docs/framework_datamanager.rst
|
||||
- docs/framework_tree.rst
|
||||
# Tests
|
||||
- redbot/pytest/data_manager.py
|
||||
- tests/core/test_cog_manager.py
|
||||
- tests/core/test_data_manager.py
|
||||
- tests/core/test_version.py
|
||||
"Category: Core - API - Utils Package":
|
||||
# Source
|
||||
- any:
|
||||
- redbot/core/utils/*
|
||||
- "!redbot/core/utils/_internal_utils.py"
|
||||
# Docs
|
||||
- docs/framework_utils.rst
|
||||
# Tests
|
||||
- tests/core/test_utils.py
|
||||
"Category: Core - Bot Class":
|
||||
# Source
|
||||
- redbot/core/bot.py
|
||||
# Docs
|
||||
- docs/framework_apikeys.rst
|
||||
- docs/framework_bot.rst
|
||||
"Category: Core - Bot Commands":
|
||||
# Source
|
||||
- redbot/core/core_commands.py
|
||||
- redbot/core/_diagnoser.py
|
||||
# Docs
|
||||
- docs/.resources/cog_manager_ui/**/*
|
||||
- docs/cog_guides/cog_manager_ui.rst
|
||||
- docs/cog_guides/core.rst
|
||||
"Category: Core - Command-line Interfaces":
|
||||
- redbot/__main__.py
|
||||
- redbot/logging.py
|
||||
- redbot/core/_cli.py
|
||||
- redbot/core/_debuginfo.py
|
||||
- redbot/setup.py
|
||||
"Category: Core - Help":
|
||||
- redbot/core/commands/help.py
|
||||
"Category: Core - i18n":
|
||||
# Source
|
||||
- redbot/core/_i18n.py
|
||||
- redbot/core/i18n.py
|
||||
# Locale files
|
||||
- redbot/**/locales/*
|
||||
# Docs
|
||||
- docs/framework_i18n.rst
|
||||
"Category: Core - Modlog":
|
||||
# Source
|
||||
- redbot/core/generic_casetypes.py
|
||||
- redbot/core/modlog.py
|
||||
# Docs
|
||||
- docs/framework_modlog.rst
|
||||
"Category: Core - Other Internals":
|
||||
# Source
|
||||
- redbot/core/_cog_manager.py
|
||||
- redbot/core/_events.py
|
||||
- redbot/core/_global_checks.py
|
||||
- redbot/core/_settings_caches.py
|
||||
- redbot/core/_sharedlibdeprecation.py
|
||||
- redbot/core/utils/_internal_utils.py
|
||||
# Tests
|
||||
- redbot/pytest/__init__.py
|
||||
- redbot/pytest/cog_manager.py
|
||||
- redbot/pytest/core.py
|
||||
- tests/core/test_installation.py
|
||||
"Category: Core - RPC/ZMQ":
|
||||
# Source
|
||||
- redbot/core/_rpc.py
|
||||
# Docs
|
||||
- docs/framework_rpc.rst
|
||||
# Tests
|
||||
- redbot/pytest/rpc.py
|
||||
- tests/core/test_rpc.py
|
||||
- tests/rpc_test.html
|
||||
|
||||
|
||||
"Category: Docker": [] # potential future feature
|
||||
|
||||
|
||||
"Category: Docs - Changelogs":
|
||||
- CHANGES.rst
|
||||
- docs/changelog.rst
|
||||
- docs/incompatible_changes/**/*
|
||||
"Category: Docs - For Developers":
|
||||
- docs/framework_events.rst
|
||||
- docs/guide_cog_creation.rst
|
||||
- docs/guide_cog_creators.rst
|
||||
- docs/guide_migration.rst
|
||||
- docs/guide_publish_cogs.rst
|
||||
- docs/guide_slash_and_interactions.rst
|
||||
"Category: Docs - Install Guides":
|
||||
- docs/about_venv.rst
|
||||
- docs/autostart_*.rst
|
||||
- docs/.resources/bot-guide/**/*
|
||||
- docs/bot_application_guide.rst
|
||||
- docs/install_guides/**/*
|
||||
- docs/update_red.rst
|
||||
"Category: Docs - Other":
|
||||
- docs/host-list.rst
|
||||
- docs/index.rst
|
||||
- docs/version_guarantees.rst
|
||||
- README.md
|
||||
"Category: Docs - User Guides":
|
||||
- docs/getting_started.rst
|
||||
- docs/intents.rst
|
||||
- docs/red_core_data_statement.rst
|
||||
# TODO: move these to `docs/.resources/getting_started` subfolder
|
||||
- docs/.resources/red-console.png
|
||||
- docs/.resources/code-grant.png
|
||||
- docs/.resources/instances-ssh-button.png
|
||||
- docs/.resources/ssh-output.png
|
||||
|
||||
|
||||
"Category: Meta":
|
||||
# top-level files
|
||||
- any:
|
||||
- '*'
|
||||
- '!README.md'
|
||||
- '!CHANGES.rst'
|
||||
# .gitattributes files
|
||||
- '**/.gitattributes'
|
||||
# GitHub configuration files, with the exception of CI configuration
|
||||
- .github/*
|
||||
- .github/ISSUE_TEMPLATE/*
|
||||
- .github/PULL_REQUEST_TEMPLATE/*
|
||||
# documentation configuration, extensions, scripts, templates, etc.
|
||||
- docs/conf.py
|
||||
- docs/_ext/**/*
|
||||
- docs/_html/**/*
|
||||
- docs/make.bat
|
||||
- docs/Makefile
|
||||
- docs/prolog.txt
|
||||
- docs/_templates/**/*
|
||||
# empty file
|
||||
- redbot/cogs/__init__.py
|
||||
# py.typed file
|
||||
- redbot/py.typed
|
||||
# requirements files
|
||||
- requirements/*
|
||||
# schema files
|
||||
- schema/*
|
||||
# tests configuration, global fixtures, etc.
|
||||
- tests/conftest.py
|
||||
- tests/__init__.py
|
||||
- tests/*/__init__.py
|
||||
# repository tools
|
||||
- tools/*
|
||||
|
||||
|
||||
# "Category: RPC/ZMQ methods": [] # can't be matched by file patterns
|
||||
|
||||
|
||||
"Category: Vendored Packages":
|
||||
- redbot/vendored/**/*
|
||||
@@ -1,15 +1,17 @@
|
||||
name: Auto Labeler
|
||||
name: Auto Labeler - Issues
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
apply_triage_label_to_issues:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Apply Triage Label
|
||||
uses: actions/github-script@0.4.0
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
@@ -18,7 +20,7 @@ jobs:
|
||||
console.log('Issue already has Status label, skipping...');
|
||||
return;
|
||||
}
|
||||
github.issues.addLabels({
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
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
@@ -0,0 +1,23 @@
|
||||
name: Check label pattern exhaustiveness
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
check_label_pattern_exhaustiveness:
|
||||
name: Check label pattern exhaustiveness
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- name: Install script's pre-requirements
|
||||
run: |
|
||||
python -m pip install -U pip
|
||||
python -m pip install -U pathspec pyyaml rich
|
||||
- name: Check label pattern exhaustiveness
|
||||
run: |
|
||||
python .github/workflows/scripts/check_label_pattern_exhaustiveness.py
|
||||
37
.github/workflows/codeql-analysis.yml
vendored
@@ -2,9 +2,7 @@ name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [V3/develop]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
schedule:
|
||||
- cron: '0 14 * * 4'
|
||||
workflow_dispatch:
|
||||
@@ -13,29 +11,36 @@ jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
actions: read
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.8"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U pip wheel
|
||||
python -m pip install -e .[all]
|
||||
# Set the `CODEQL-PYTHON` environment variable to the Python executable
|
||||
# that includes the dependencies
|
||||
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: 'python'
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
# Override the default behavior so that the action doesn't attempt
|
||||
# to auto-install Python dependencies
|
||||
# Learn more...
|
||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#analyzing-python-dependencies
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -49,4 +54,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v3
|
||||
|
||||
32
.github/workflows/crowdin_upload_strings.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Crowdin - Upload strings
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- V3/develop
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: github.repository == 'Cog-Creators/Red-DiscordBot'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y crowdin3
|
||||
pip install redgettext==3.4.2
|
||||
- name: Generate source files
|
||||
run: |
|
||||
make gettext
|
||||
- name: Upload source files
|
||||
run: |
|
||||
make upload_translations
|
||||
env:
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}
|
||||
10
.github/workflows/lint_python.yaml
vendored
@@ -14,13 +14,17 @@ jobs:
|
||||
name: Lint Python
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.ref }}
|
||||
- uses: actions/setup-python@v1
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- run: "python -m pip install git+https://github.com/pycqa/pyflakes@1911c20#egg=pyflakes git+https://github.com/pycqa/pycodestyle@d219c68#egg=pycodestyle git+https://gitlab.com/pycqa/flake8@3.7.9#egg=flake8"
|
||||
- run: >
|
||||
python -m pip install
|
||||
'pyflakes @ https://github.com/pycqa/pyflakes/tarball/1911c20'
|
||||
'pycodestyle @ https://github.com/pycqa/pycodestyle/tarball/d219c68'
|
||||
'flake8 @ https://github.com/pycqa/flake8/tarball/3.7.9'
|
||||
name: Install Flake8
|
||||
- run: "python -m flake8 . --count --select=E9,F7,F82 --show-source"
|
||||
name: Flake8 Linting
|
||||
|
||||
130
.github/workflows/prepare_release.yml
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
name: Prepare Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
new_stable_version:
|
||||
description: Version number for the new stable release (leave empty to just strip `.dev1`)
|
||||
required: false
|
||||
default: 'auto'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
crowdin_download_translations:
|
||||
needs: pr_stable_bump
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y crowdin3
|
||||
pip install redgettext==3.4.2
|
||||
|
||||
- name: Generate source files
|
||||
run: |
|
||||
make gettext
|
||||
- name: Download translations
|
||||
run: |
|
||||
make download_translations
|
||||
env:
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}
|
||||
|
||||
- name: Create Pull Request
|
||||
id: cpr_crowdin
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Automated Crowdin downstream
|
||||
title: "Automated Crowdin downstream"
|
||||
body: |
|
||||
This is an automated PR that is part of Prepare Release automated workflow (2 out of 2).
|
||||
Please ensure that there are no errors or invalid files are in the PR.
|
||||
labels: "Automated PR, Changelog Entry: Skipped"
|
||||
branch: "automated/i18n"
|
||||
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||
milestone: ${{ needs.pr_stable_bump.outputs.milestone_number }}
|
||||
|
||||
- name: Close and reopen the PR with different token to trigger CI
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.cpr_crowdin.outputs.pull-request-number }}
|
||||
PR_OPERATION: ${{ steps.cpr_crowdin.outputs.pull-request-operation }}
|
||||
with:
|
||||
github-token: ${{ secrets.cogcreators_bot_repo_scoped }}
|
||||
script: |
|
||||
const script = require(
|
||||
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/close_and_reopen_pr.js`
|
||||
);
|
||||
console.log(script({github, context}));
|
||||
|
||||
pr_stable_bump:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
milestone_number: ${{ steps.get_milestone_number.outputs.result }}
|
||||
steps:
|
||||
# Checkout repository and install Python
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
# Create PR for stable version bump
|
||||
- name: Update Red version number from input
|
||||
id: bump_version_stable
|
||||
run: |
|
||||
python .github/workflows/scripts/bump_version.py
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}:${{ env.PYTHONPATH }}
|
||||
NEW_STABLE_VERSION: ${{ github.event.inputs.new_stable_version }}
|
||||
|
||||
# Get milestone number of the milestone for the new stable version
|
||||
- name: Get milestone number
|
||||
id: get_milestone_number
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
MILESTONE_TITLE: ${{ steps.bump_version_stable.outputs.new_version }}
|
||||
with:
|
||||
script: |
|
||||
const script = require(
|
||||
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/get_milestone_number_by_exact_title.js`
|
||||
);
|
||||
return await script({github, context});
|
||||
|
||||
- name: Create Pull Request
|
||||
id: cpr_bump_stable
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Version bump to ${{ steps.bump_version_stable.outputs.new_version }}
|
||||
title: Version bump to ${{ steps.bump_version_stable.outputs.new_version }}
|
||||
body: |
|
||||
This is an automated PR that is part of Prepare Release automated workflow (1 out of 2).
|
||||
Please ensure that there are no errors or invalid files are in the PR.
|
||||
labels: "Automated PR, Changelog Entry: Skipped"
|
||||
branch: "automated/pr_bumps/${{ steps.bump_version_stable.outputs.new_version }}"
|
||||
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||
milestone: ${{ steps.get_milestone_number.outputs.result }}
|
||||
|
||||
- name: Close and reopen the PR with different token to trigger CI
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.cpr_bump_stable.outputs.pull-request-number }}
|
||||
PR_OPERATION: ${{ steps.cpr_bump_stable.outputs.pull-request-operation }}
|
||||
with:
|
||||
github-token: ${{ secrets.cogcreators_bot_repo_scoped }}
|
||||
script: |
|
||||
const script = require(
|
||||
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/close_and_reopen_pr.js`
|
||||
);
|
||||
console.log(await script({github, context}));
|
||||
49
.github/workflows/publish_crowdin.yml
vendored
@@ -1,49 +0,0 @@
|
||||
name: Publish to Crowdin
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 12 * * THU'
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
types: crowdin
|
||||
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: github.repository == 'Cog-Creators/Red-DiscordBot'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y crowdin
|
||||
pip install redgettext==3.1
|
||||
- name: Generate source files
|
||||
run: |
|
||||
make gettext
|
||||
- name: Upload source files
|
||||
run: |
|
||||
make upload_translations
|
||||
- name: Download translations
|
||||
run: |
|
||||
make download_translations
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Automated Crowdin downstream
|
||||
title: "[i18n] Automated Crowdin downstream"
|
||||
body: |
|
||||
This is an automated PR.
|
||||
Please ensure that there are no errors or invalid files are in the PR.
|
||||
labels: "Automated PR, Category: i18n, Changelog Entry: Skipped"
|
||||
branch: "automated/i18n"
|
||||
27
.github/workflows/publish_pypi.yml
vendored
@@ -1,27 +0,0 @@
|
||||
name: Publish to PyPI
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: github.repository == 'Cog-Creators/Red-DiscordBot'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install setuptools wheel twine
|
||||
- name: Build and publish
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.pypi_token }}
|
||||
run: |
|
||||
python setup.py sdist bdist_wheel
|
||||
twine upload dist/*
|
||||
220
.github/workflows/publish_release.yml
vendored
Normal file
@@ -0,0 +1,220 @@
|
||||
name: Publish Release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "3.[0-9]+.[0-9]+"
|
||||
|
||||
jobs:
|
||||
release_information:
|
||||
if: github.repository == 'Cog-Creators/Red-DiscordBot'
|
||||
name: GO HERE BEFORE APPROVING
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checkout repository and install Python
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
# Get version to release
|
||||
- name: Get version to release
|
||||
id: version_to_release
|
||||
run: |
|
||||
python .github/workflows/scripts/bump_version.py
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}:${{ env.PYTHONPATH }}
|
||||
JUST_RETURN_VERSION: '1'
|
||||
|
||||
# Print release information
|
||||
- name: REVIEW OUTPUT OF THIS STEP BEFORE APPROVING
|
||||
env:
|
||||
TAG_BASE_BRANCH: ${{ github.event.base_ref }}
|
||||
TAG_REF_NAME: ${{ github.ref }}
|
||||
RELEASE_VERSION: ${{ steps.version_to_release.outputs.version }}
|
||||
run: |
|
||||
echo 'Release information:'
|
||||
echo "- Branch the tag was based off: ${TAG_BASE_BRANCH#'refs/heads/'}"
|
||||
echo "- Tag name: ${TAG_REF_NAME#'refs/tags/'}"
|
||||
echo "- Release version: $RELEASE_VERSION"
|
||||
|
||||
echo "TAG_NAME=${TAG_REF_NAME#'refs/tags/'}" >> $GITHUB_ENV
|
||||
|
||||
- name: Ensure the tag name corresponds to the released version
|
||||
env:
|
||||
RELEASE_VERSION: ${{ steps.version_to_release.outputs.version }}
|
||||
run: |
|
||||
if [[ "$TAG_NAME" != "$RELEASE_VERSION" ]]; then
|
||||
echo -n "The tag name ($TAG_NAME) is not the same as"
|
||||
echo " the release version ($RELEASE_VERSION)!"
|
||||
exit 1
|
||||
else
|
||||
echo "The tag name and the release version are the same ($TAG_NAME)."
|
||||
echo 'Continuing...'
|
||||
fi
|
||||
|
||||
build:
|
||||
name: Build package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install --upgrade build twine
|
||||
|
||||
- name: Build
|
||||
run: python -m build
|
||||
- name: Check built distributions
|
||||
run: python -m twine check dist/*
|
||||
|
||||
- name: Upload packaged distributions
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-output
|
||||
path: ./dist
|
||||
|
||||
generate_default_ll_server_config:
|
||||
name: Generate default application.yml
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
- name: Install script's dependencies
|
||||
run: python -m pip install PyYAML
|
||||
|
||||
- name: Generate default application.yml
|
||||
env:
|
||||
APP_YML_FILE: "Red-DiscordBot-${{ github.ref_name }}-default-lavalink-application.yml"
|
||||
run: |
|
||||
mkdir -p release_assets
|
||||
python .github/workflows/scripts/get_default_ll_server_config.py "release_assets/$APP_YML_FILE"
|
||||
|
||||
- name: Upload default application.yml
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ll-default-server-config
|
||||
path: ./release_assets
|
||||
|
||||
release_to_pypi:
|
||||
needs:
|
||||
- release_information
|
||||
- build
|
||||
- generate_default_ll_server_config
|
||||
environment: Release
|
||||
name: Release to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Download packaged distributions
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-output
|
||||
path: dist/
|
||||
|
||||
- name: Download default application.yml
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ll-default-server-config
|
||||
path: release_assets/
|
||||
|
||||
- name: Upload dists to GitHub Release
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ github.token }}"
|
||||
run: |
|
||||
gh release upload "$GITHUB_REF_NAME" dist/* release_assets/* --repo "$GITHUB_REPOSITORY"
|
||||
|
||||
- name: Publish package distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
# This is already checked during the build.
|
||||
verify-metadata: false
|
||||
# Allow security-minded people to verify whether the files on PyPI
|
||||
# were automatically uploaded by a CI script.
|
||||
print-hash: true
|
||||
|
||||
pr_dev_bump:
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
needs: release_to_pypi
|
||||
name: Update Red version number to dev
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get base branch
|
||||
env:
|
||||
TAG_BASE_BRANCH: ${{ github.event.base_ref }}
|
||||
run: |
|
||||
echo "BASE_BRANCH=${TAG_BASE_BRANCH#'refs/heads/'}" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.BASE_BRANCH }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
# Version bump to development version
|
||||
- name: Update Red version number to dev
|
||||
id: bump_version_dev
|
||||
run: |
|
||||
python .github/workflows/scripts/bump_version.py
|
||||
env:
|
||||
PYTHONPATH: ${{ github.workspace }}:${{ env.PYTHONPATH }}
|
||||
DEV_BUMP: '1'
|
||||
|
||||
# Get milestone number of the milestone for the old version
|
||||
- name: Get milestone number
|
||||
id: get_milestone_number
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
MILESTONE_TITLE: ${{ steps.bump_version_dev.outputs.old_version }}
|
||||
with:
|
||||
script: |
|
||||
const script = require(
|
||||
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/get_milestone_number_by_exact_title.js`
|
||||
);
|
||||
return await script({github, context});
|
||||
|
||||
- name: Create Pull Request
|
||||
id: cpr_bump_dev
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Version bump to ${{ steps.bump_version_dev.outputs.new_version }}
|
||||
title: Version bump to ${{ steps.bump_version_dev.outputs.new_version }}
|
||||
body: |
|
||||
This is an automated PR.
|
||||
Please ensure that there are no errors or invalid files are in the PR.
|
||||
labels: "Automated PR, Changelog Entry: Skipped"
|
||||
branch: "automated/pr_bumps/${{ steps.bump_version_dev.outputs.new_version }}"
|
||||
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||
milestone: ${{ steps.get_milestone_number.outputs.result }}
|
||||
base: ${{ env.BASE_BRANCH }}
|
||||
|
||||
- name: Close and reopen the PR with different token to trigger CI
|
||||
uses: actions/github-script@v6
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.cpr_bump_dev.outputs.pull-request-number }}
|
||||
PR_OPERATION: ${{ steps.cpr_bump_dev.outputs.pull-request-operation }}
|
||||
with:
|
||||
github-token: ${{ secrets.cogcreators_bot_repo_scoped }}
|
||||
script: |
|
||||
const script = require(
|
||||
`${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/close_and_reopen_pr.js`
|
||||
);
|
||||
console.log(await script({github, context}));
|
||||
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@v4
|
||||
|
||||
- name: Set up Python 3.8.
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: |
|
||||
3.11
|
||||
3.10
|
||||
3.9
|
||||
3.8
|
||||
|
||||
- name: Install dependencies on Linux/macOS
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: |
|
||||
python3.11 -m pip install -U pip pip-tools
|
||||
python3.10 -m pip install -U pip pip-tools
|
||||
python3.9 -m pip install -U pip pip-tools
|
||||
python3.8 -m pip install -U pip pip-tools
|
||||
|
||||
- name: Install dependencies on Windows
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
py -3.11 -m pip install -U pip pip-tools
|
||||
py -3.10 -m pip install -U pip pip-tools
|
||||
py -3.9 -m pip install -U pip pip-tools
|
||||
py -3.8 -m pip install -U pip pip-tools
|
||||
|
||||
- name: Generate requirements files.
|
||||
id: compile_requirements
|
||||
run: |
|
||||
python .github/workflows/scripts/compile_requirements.py
|
||||
|
||||
- name: Upload requirements files.
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ steps.compile_requirements.outputs.sys_platform }}
|
||||
path: requirements/${{ steps.compile_requirements.outputs.sys_platform }}-*.txt
|
||||
|
||||
merge_requirements:
|
||||
name: Merge requirements files.
|
||||
needs: generate_requirements
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository.
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.8.
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install -U "packaging>=22.0"
|
||||
|
||||
- name: Download Windows requirements.
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: win32
|
||||
path: requirements
|
||||
- name: Download Linux requirements.
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: linux
|
||||
path: requirements
|
||||
- name: Download macOS requirements.
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: darwin
|
||||
path: requirements
|
||||
|
||||
- name: Merge requirements files.
|
||||
run: |
|
||||
python .github/workflows/scripts/merge_requirements.py
|
||||
|
||||
- name: Upload merged requirements files.
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: merged
|
||||
path: |
|
||||
requirements/base.txt
|
||||
requirements/extra-*.txt
|
||||
59
.github/workflows/scripts/bump_version.py
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from typing import Any, Match
|
||||
|
||||
import redbot
|
||||
|
||||
GITHUB_OUTPUT = os.environ["GITHUB_OUTPUT"]
|
||||
|
||||
|
||||
def set_output(name: str, value: Any) -> None:
|
||||
with open(GITHUB_OUTPUT, "a", encoding="utf-8") as fp:
|
||||
fp.write(f"{name}={value}\n")
|
||||
|
||||
|
||||
if int(os.environ.get("JUST_RETURN_VERSION", 0)):
|
||||
set_output("version", redbot._VERSION)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
version_info = None
|
||||
|
||||
|
||||
def repl(match: Match[str]) -> str:
|
||||
global version_info
|
||||
|
||||
set_output("old_version", match.group("version"))
|
||||
|
||||
new_stable_version = os.environ.get("NEW_STABLE_VERSION", "auto")
|
||||
if new_stable_version == "auto":
|
||||
version_info = redbot.VersionInfo.from_str(match.group("version"))
|
||||
version_info.dev_release = None
|
||||
else:
|
||||
version_info = redbot.VersionInfo.from_str(new_stable_version)
|
||||
|
||||
if int(os.environ.get("DEV_BUMP", 0)):
|
||||
version_info.micro += 1
|
||||
version_info.dev_release = 1
|
||||
|
||||
return f'_VERSION = "{version_info}"'
|
||||
|
||||
|
||||
with open("redbot/__init__.py", encoding="utf-8") as fp:
|
||||
new_contents, found = re.subn(
|
||||
pattern=r'^_VERSION = "(?P<version>[^"]*)"$',
|
||||
repl=repl,
|
||||
string=fp.read(),
|
||||
count=1,
|
||||
flags=re.MULTILINE,
|
||||
)
|
||||
|
||||
if not found:
|
||||
print("Couldn't find `_VERSION` line!")
|
||||
sys.exit(1)
|
||||
|
||||
with open("redbot/__init__.py", "w", encoding="utf-8", newline="\n") as fp:
|
||||
fp.write(new_contents)
|
||||
|
||||
set_output("new_version", version_info)
|
||||
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())
|
||||
25
.github/workflows/scripts/close_and_reopen_pr.js
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
module.exports = (async function ({github, context}) {
|
||||
const pr_number = process.env.PR_NUMBER;
|
||||
const pr_operation = process.env.PR_OPERATION;
|
||||
let sleep_time = 0;
|
||||
|
||||
if (!['created', 'updated'].includes(pr_operation)) {
|
||||
console.log('PR was not created as there were no changes.')
|
||||
return;
|
||||
}
|
||||
|
||||
for (const new_state of ['closed', 'open']) {
|
||||
// some sleep time needed to make sure API handles open after close
|
||||
if (sleep_time)
|
||||
await new Promise(r => setTimeout(r, sleep_time));
|
||||
|
||||
github.rest.issues.update({
|
||||
issue_number: pr_number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: new_state
|
||||
});
|
||||
|
||||
sleep_time = 2000;
|
||||
}
|
||||
})
|
||||
52
.github/workflows/scripts/compile_requirements.py
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
EXCLUDE_STEM_RE = re.compile(r".*-3\.(?!8-)(\d+)-extra-(doc|style)")
|
||||
GITHUB_OUTPUT = os.environ["GITHUB_OUTPUT"]
|
||||
REQUIREMENTS_FOLDER = Path(__file__).parents[3].absolute() / "requirements"
|
||||
os.chdir(REQUIREMENTS_FOLDER)
|
||||
|
||||
|
||||
def pip_compile(version: str, name: str) -> None:
|
||||
stem = f"{sys.platform}-{version}-{name}"
|
||||
if EXCLUDE_STEM_RE.fullmatch(stem):
|
||||
return
|
||||
|
||||
constraint_flags = [
|
||||
arg
|
||||
for file in REQUIREMENTS_FOLDER.glob(f"{sys.platform}-3.8-*.txt")
|
||||
for arg in ("-c", file.name)
|
||||
]
|
||||
|
||||
executable = ("py", f"-{version}") if sys.platform == "win32" else (f"python{version}",)
|
||||
subprocess.check_call(
|
||||
(
|
||||
*executable,
|
||||
"-m",
|
||||
"piptools",
|
||||
"compile",
|
||||
"--upgrade",
|
||||
"--resolver=backtracking",
|
||||
"--verbose",
|
||||
f"{name}.in",
|
||||
"--output-file",
|
||||
f"{stem}.txt",
|
||||
*constraint_flags,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
for minor in range(8, 11 + 1):
|
||||
version = f"3.{minor}"
|
||||
pip_compile(version, "base")
|
||||
shutil.copyfile(f"{sys.platform}-{version}-base.txt", "base.txt")
|
||||
for file in REQUIREMENTS_FOLDER.glob("extra-*.in"):
|
||||
pip_compile(version, file.stem)
|
||||
|
||||
with open(GITHUB_OUTPUT, "a", encoding="utf-8") as fp:
|
||||
fp.write(f"sys_platform={sys.platform}\n")
|
||||
31
.github/workflows/scripts/get_default_ll_server_config.py
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
ROOT_FOLDER = Path(__file__).parents[3].absolute()
|
||||
AUDIO_FOLDER = ROOT_FOLDER / "redbot/cogs/audio"
|
||||
|
||||
# We want to import `redbot.cogs.audio.managed_node` package as if it were top-level package
|
||||
# so we have to the `redbot/cogs/audio` directory to Python's path.
|
||||
sys.path.insert(0, str(AUDIO_FOLDER))
|
||||
|
||||
|
||||
def main() -> int:
|
||||
try:
|
||||
output_file = sys.argv[1]
|
||||
except IndexError:
|
||||
print("Usage:", sys.argv[0], "<output_file>", file=sys.stderr)
|
||||
return 2
|
||||
|
||||
import managed_node
|
||||
|
||||
server_config = managed_node.get_default_server_config()
|
||||
with open(output_file, "w", encoding="utf-8") as fp:
|
||||
yaml.safe_dump(server_config, fp)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
49
.github/workflows/scripts/get_milestone_number_by_exact_title.js
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
module.exports = (async function ({github, context}) {
|
||||
const milestone_title = process.env.MILESTONE_TITLE;
|
||||
const [repo_owner, repo_name] = process.env.GITHUB_REPOSITORY.split('/');
|
||||
|
||||
const {
|
||||
repository: {
|
||||
milestones: {
|
||||
nodes: milestones,
|
||||
pageInfo: {hasNextPage}
|
||||
}
|
||||
}
|
||||
} = await github.graphql({
|
||||
query: `
|
||||
query getMilestoneNumberByTitle(
|
||||
$repo_owner: String!
|
||||
$repo_name: String!
|
||||
$milestone_title: String!
|
||||
) {
|
||||
repository(owner:$repo_owner name:$repo_name) {
|
||||
milestones(query:$milestone_title states:OPEN first:100) {
|
||||
nodes {
|
||||
number
|
||||
title
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
repo_owner: repo_owner,
|
||||
repo_name: repo_name,
|
||||
milestone_title: milestone_title,
|
||||
});
|
||||
|
||||
if (hasNextPage) {
|
||||
// this should realistically never happen so let's just error
|
||||
core.setFailed('Impossible happened! :)');
|
||||
return;
|
||||
}
|
||||
|
||||
for (const milestone of milestones)
|
||||
if (milestone.title === milestone_title)
|
||||
return milestone.number;
|
||||
|
||||
// if no exact match is found, assume the milestone doesn't exist
|
||||
console.log('The milestone was not found. API returned the array: %o', milestones);
|
||||
return null;
|
||||
})
|
||||
207
.github/workflows/scripts/merge_requirements.py
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import Dict, Iterable, List, TextIO, Tuple
|
||||
|
||||
from packaging.markers import Marker
|
||||
from packaging.requirements import Requirement
|
||||
|
||||
|
||||
REQUIREMENTS_FOLDER = Path(__file__).parents[3].absolute() / "requirements"
|
||||
os.chdir(REQUIREMENTS_FOLDER)
|
||||
|
||||
|
||||
class RequirementData:
|
||||
def __init__(self, requirement_string: str) -> None:
|
||||
self.req = Requirement(requirement_string)
|
||||
self.comments = set()
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash(self.req)
|
||||
|
||||
def __eq__(self, other: RequirementData) -> bool:
|
||||
return self.req == other.req
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return self.req.name
|
||||
|
||||
@property
|
||||
def marker(self) -> Marker:
|
||||
return self.req.marker
|
||||
|
||||
@marker.setter
|
||||
def marker(self, value: Marker) -> None:
|
||||
self.req.marker = value
|
||||
|
||||
|
||||
def get_requirements(fp: TextIO) -> List[RequirementData]:
|
||||
requirements = []
|
||||
|
||||
current = None
|
||||
for line in fp.read().splitlines():
|
||||
annotation_prefix = " # "
|
||||
if line.startswith(annotation_prefix) and current is not None:
|
||||
source = line[len(annotation_prefix) :].strip()
|
||||
if source == "via":
|
||||
continue
|
||||
via_prefix = "via "
|
||||
if source.startswith(via_prefix):
|
||||
source = source[len(via_prefix) :]
|
||||
if source.startswith("-c ") and source != "-c base.txt":
|
||||
continue
|
||||
current.comments.add(source)
|
||||
elif line and not line.startswith(("#", " ")):
|
||||
current = RequirementData(line)
|
||||
requirements.append(current)
|
||||
|
||||
return requirements
|
||||
|
||||
|
||||
def iter_envs(envs: Iterable[str]) -> Iterable[Tuple[str, str]]:
|
||||
for env_name in envs:
|
||||
platform, python_version = env_name.split("-", maxsplit=1)
|
||||
yield (platform, python_version)
|
||||
|
||||
|
||||
names = ["base"]
|
||||
names.extend(file.stem for file in REQUIREMENTS_FOLDER.glob("extra-*.in"))
|
||||
base_requirements: List[RequirementData] = []
|
||||
|
||||
for name in names:
|
||||
# {req_data: {sys_platform: RequirementData}
|
||||
input_data: Dict[RequirementData, Dict[str, RequirementData]] = {}
|
||||
all_envs = set()
|
||||
all_platforms = set()
|
||||
all_python_versions = set()
|
||||
for file in REQUIREMENTS_FOLDER.glob(f"*-{name}.txt"):
|
||||
platform_name, python_version, _ = file.stem.split("-", maxsplit=2)
|
||||
env_name = f"{platform_name}-{python_version}"
|
||||
all_envs.add(env_name)
|
||||
all_platforms.add(platform_name)
|
||||
all_python_versions.add(python_version)
|
||||
with file.open(encoding="utf-8") as fp:
|
||||
requirements = get_requirements(fp)
|
||||
|
||||
for req in requirements:
|
||||
envs = input_data.setdefault(req, {})
|
||||
envs[env_name] = req
|
||||
|
||||
output = base_requirements if name == "base" else []
|
||||
for req, envs in input_data.items():
|
||||
# {platform: [python_versions...]}
|
||||
python_versions_per_platform: Dict[str, List[str]] = {}
|
||||
# {python_version: [platforms...]}
|
||||
platforms_per_python_version: Dict[str, List[str]] = {}
|
||||
platforms = python_versions_per_platform.keys()
|
||||
python_versions = platforms_per_python_version.keys()
|
||||
for env_name, other_req in envs.items():
|
||||
platform_name, python_version = env_name.split("-", maxsplit=1)
|
||||
python_versions_per_platform.setdefault(platform_name, []).append(python_version)
|
||||
platforms_per_python_version.setdefault(python_version, []).append(platform_name)
|
||||
|
||||
req.comments.update(other_req.comments)
|
||||
|
||||
base_req = next(
|
||||
(base_req for base_req in base_requirements if base_req.name == req.name), None
|
||||
)
|
||||
if base_req is not None:
|
||||
old_base_marker = base_req.marker
|
||||
old_req_marker = req.marker
|
||||
req.marker = base_req.marker = None
|
||||
if base_req.req != req.req:
|
||||
raise RuntimeError(f"Incompatible requirements for {req.name}.")
|
||||
|
||||
base_req.marker = old_base_marker
|
||||
req.marker = old_req_marker
|
||||
if base_req.marker is None or base_req.marker == req.marker:
|
||||
continue
|
||||
|
||||
if len(envs) == len(all_envs):
|
||||
output.append(req)
|
||||
continue
|
||||
|
||||
# At this point I'm wondering why I didn't just go for
|
||||
# a more generic boolean algebra simplification (sympy.simplify_logic())...
|
||||
if (
|
||||
len(set(map(frozenset, python_versions_per_platform.values()))) == 1
|
||||
or len(set(map(frozenset, platforms_per_python_version.values()))) == 1
|
||||
):
|
||||
# Either all platforms have the same Python version set
|
||||
# or all Python versions have the same platform set.
|
||||
# We can generate markers for platform (platform_marker) and Python
|
||||
# (python_version_marker) version sets separately and then simply require
|
||||
# that both markers are fulfilled at the same time (env_marker).
|
||||
|
||||
python_version_marker = (
|
||||
# Requirement present on less Python versions than not.
|
||||
" or ".join(
|
||||
f"python_version == '{python_version}'"
|
||||
for python_version in sorted(python_versions)
|
||||
)
|
||||
if len(python_versions) < len(all_python_versions - python_versions)
|
||||
# Requirement present on more Python versions than not
|
||||
# This may generate an empty string when Python version is irrelevant.
|
||||
else " and ".join(
|
||||
f"python_version != '{python_version}'"
|
||||
for python_version in sorted(all_python_versions - python_versions)
|
||||
)
|
||||
)
|
||||
|
||||
platform_marker = (
|
||||
# Requirement present on less platforms than not.
|
||||
" or ".join(f"sys_platform == '{platform}'" for platform in sorted(platforms))
|
||||
if len(platforms) < len(all_platforms - platforms)
|
||||
# Requirement present on more platforms than not
|
||||
# This may generate an empty string when platform is irrelevant.
|
||||
else " and ".join(
|
||||
f"sys_platform != '{platform}'"
|
||||
for platform in sorted(all_platforms - platforms)
|
||||
)
|
||||
)
|
||||
|
||||
if python_version_marker and platform_marker:
|
||||
env_marker = f"({python_version_marker}) and ({platform_marker})"
|
||||
else:
|
||||
env_marker = python_version_marker or platform_marker
|
||||
else:
|
||||
# Fallback to generic case.
|
||||
env_marker = (
|
||||
# Requirement present on less envs than not.
|
||||
" or ".join(
|
||||
f"(sys_platform == '{platform}' and python_version == '{python_version}')"
|
||||
for platform, python_version in iter_envs(sorted(envs))
|
||||
)
|
||||
if len(envs) < len(all_envs - envs.keys())
|
||||
else " and ".join(
|
||||
f"(sys_platform != '{platform}' and python_version != '{python_version}')"
|
||||
for platform, python_version in iter_envs(sorted(all_envs - envs.keys()))
|
||||
)
|
||||
)
|
||||
|
||||
new_marker = f"({req.marker}) and ({env_marker})" if req.marker is not None else env_marker
|
||||
req.marker = Marker(new_marker)
|
||||
if base_req is not None and base_req.marker == req.marker:
|
||||
continue
|
||||
|
||||
output.append(req)
|
||||
|
||||
output.sort(key=lambda req: (req.marker is not None, req.name))
|
||||
with open(f"{name}.txt", "w+", encoding="utf-8") as fp:
|
||||
for req in output:
|
||||
fp.write(str(req.req))
|
||||
fp.write("\n")
|
||||
comments = sorted(req.comments)
|
||||
|
||||
if len(comments) == 1:
|
||||
source = comments[0]
|
||||
fp.write(" # via ")
|
||||
fp.write(source)
|
||||
fp.write("\n")
|
||||
else:
|
||||
fp.write(" # via\n")
|
||||
for source in comments:
|
||||
fp.write(" # ")
|
||||
fp.write(source)
|
||||
fp.write("\n")
|
||||
36
.github/workflows/tests.yml
vendored
@@ -17,12 +17,21 @@ jobs:
|
||||
python_version:
|
||||
- "3.8"
|
||||
tox_env:
|
||||
- py
|
||||
- style
|
||||
- docs
|
||||
include:
|
||||
- tox_env: py
|
||||
friendly_name: Tests
|
||||
- tox_env: py38
|
||||
python_version: "3.8"
|
||||
friendly_name: Python 3.8 - Tests
|
||||
- tox_env: py39
|
||||
python_version: "3.9"
|
||||
friendly_name: Python 3.9 - Tests
|
||||
- tox_env: py310
|
||||
python_version: "3.10"
|
||||
friendly_name: Python 3.10 - Tests
|
||||
- tox_env: py311
|
||||
python_version: "3.11"
|
||||
friendly_name: Python 3.11 - Tests
|
||||
- tox_env: style
|
||||
friendly_name: Style
|
||||
- tox_env: docs
|
||||
@@ -30,11 +39,11 @@ jobs:
|
||||
fail-fast: false
|
||||
name: Tox - ${{ matrix.friendly_name }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.ref }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python_version }}
|
||||
- name: Install tox
|
||||
@@ -52,6 +61,9 @@ jobs:
|
||||
matrix:
|
||||
python_version:
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
fail-fast: false
|
||||
name: Tox - Postgres
|
||||
services:
|
||||
@@ -64,11 +76,11 @@ jobs:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_USER: postgres
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.ref }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v1
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python_version }}
|
||||
- name: Install tox
|
||||
@@ -83,3 +95,13 @@ jobs:
|
||||
PGPASSWORD: postgres
|
||||
PGPORT: 5432
|
||||
run: tox
|
||||
- name: Verify no errors in PostgreSQL logs.
|
||||
run: |
|
||||
logs="$(docker logs "${{ job.services.postgresql.id }}" 2>&1)"
|
||||
echo "---- PostgreSQL logs ----"
|
||||
echo "$logs"
|
||||
echo "---- PostgreSQL logs ----"
|
||||
error_count="$(echo "$logs" | { grep -c 'ERROR: ' || true; })"
|
||||
if [[ $error_count -gt 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
85
.gitignore
vendored
@@ -15,6 +15,8 @@ Pipfile.lock
|
||||
.idea/
|
||||
*.iws
|
||||
.vscode/
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
@@ -141,3 +143,86 @@ ENV/
|
||||
|
||||
# Pre-commit hooks
|
||||
/.pre-commit-config.yaml
|
||||
|
||||
### macOS template
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
### Windows template
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
### SublimeText template
|
||||
# Cache files for Sublime Text
|
||||
*.tmlanguage.cache
|
||||
*.tmPreferences.cache
|
||||
*.stTheme.cache
|
||||
|
||||
# Workspace files are user-specific
|
||||
|
||||
# SFTP configuration file
|
||||
sftp-config.json
|
||||
sftp-config-alt*.json
|
||||
|
||||
# Package control specific files
|
||||
Package Control.last-run
|
||||
Package Control.ca-list
|
||||
Package Control.ca-bundle
|
||||
Package Control.system-ca-bundle
|
||||
Package Control.cache/
|
||||
Package Control.ca-certs/
|
||||
Package Control.merged-ca-bundle
|
||||
Package Control.user-ca-bundle
|
||||
oscrypto-ca-bundle.crt
|
||||
bh_unicode_properties.cache
|
||||
|
||||
# Sublime-github package stores a github token in this file
|
||||
# https://packagecontrol.io/packages/sublime-github
|
||||
GitHub.sublime-settings
|
||||
|
||||
|
||||
@@ -26,14 +26,6 @@ unsafe-load-any-extension=no
|
||||
# run arbitrary code
|
||||
extension-pkg-whitelist=
|
||||
|
||||
# Allow optimization of some AST trees. This will activate a peephole AST
|
||||
# optimizer, which will apply various small optimizations. For instance, it can
|
||||
# be used to obtain the result of joining multiple strings with the addition
|
||||
# operator. Joining a lot of strings can lead to a maximum recursion error in
|
||||
# Pylint and this flag can prevent that. It has one side effect, the resulting
|
||||
# AST will be different than the one from reality.
|
||||
optimize-ast=no
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
||||
@@ -66,7 +58,6 @@ disable=C, # black is enforcing this for us already, incompatibly
|
||||
[REPORTS]
|
||||
|
||||
output-format=parseable
|
||||
files-output=no
|
||||
reports=no
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
version: 2
|
||||
|
||||
formats:
|
||||
- pdf
|
||||
|
||||
build:
|
||||
image: latest
|
||||
os: "ubuntu-22.04"
|
||||
tools:
|
||||
python: "3.8"
|
||||
jobs:
|
||||
install:
|
||||
- pip install .[doc]
|
||||
|
||||
sphinx:
|
||||
configuration: docs/conf.py
|
||||
|
||||
python:
|
||||
version: 3.8
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
- method: pip
|
||||
path: .
|
||||
extra_requirements:
|
||||
- docs
|
||||
- doc
|
||||
|
||||
65
.travis.yml
@@ -1,65 +0,0 @@
|
||||
dist: xenial
|
||||
language: python
|
||||
cache: pip
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
python:
|
||||
- 3.8.1
|
||||
env:
|
||||
global:
|
||||
- PIPENV_IGNORE_VIRTUALENVS=1
|
||||
|
||||
install:
|
||||
- pip install --upgrade pip tox
|
||||
|
||||
script:
|
||||
- tox
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- env: TOXENV=py
|
||||
- env: TOXENV=docs
|
||||
- env: TOXENV=style
|
||||
- env: TOXENV=postgres
|
||||
services: postgresql
|
||||
addons:
|
||||
postgresql: "10"
|
||||
before_script:
|
||||
- psql -c 'create database red_db;' -U postgres
|
||||
# These jobs only occur on tag creation if the prior ones succeed
|
||||
- stage: PyPi Deployment
|
||||
if: tag IS present
|
||||
python: 3.8.1
|
||||
env:
|
||||
- DEPLOYING=true
|
||||
- TOXENV=py38
|
||||
deploy:
|
||||
- provider: pypi
|
||||
distributions: sdist bdist_wheel
|
||||
user: Red-DiscordBot
|
||||
password:
|
||||
secure: Ty9vYnd/wCuQkVC/OsS4E2jT9LVDVfzsFrQc4U2hMYcTJnYbl/3omyObdCWCOBC40vUDkVHAQU8ULHzoCA+2KX9Ds/7/P5zCumAA0uJRR9Smw7OlRzSMxJI+/lGq4CwXKzxDZKuo5rsxXEbW5qmYjtO8Mk6KuLkvieb1vyr2DcqWEFzg/7TZNDfD1oP8et8ITQ26lLP1dtQx/jlAiIBzgK9wziuwj1Divb9A///VsGz43N8maZ+jfsDjYqrfUVWTy3ar7JPUplletenYCR1PmQ5C46XfV0kitKd1aITJ48YPAKyYgKy8AIT+Uz1JArTnqdzLSFRNELS57qS00lzgllbteCyWQ8Uzy0Zpxb/5DDH8/mL1n0MyJrF8qjZd2hLNAXg3z/k9bGXeiMLGwoxRlGXkL2XpiVgI93UKKyVyooGNMgPTc/QdSc7krjAWcOtX/HgLR34jxeLPFEdzJNAFIimfDD8N+XTFcNBw6EvOYm/n5MXkckNoX/G+ThNobHZ7VKSASltZ9zBRAJ2dDh35G3CYmVEk33U77RKbL9le/Za9QVBcAO8i6rqVGYkdO7thHHKHc/1CB1jNnjsFSDt0bURtNfAqfwKCurQC8487zbEzT+2fog3Wygv7g3cklaRg4guY8UjZuFWStYGqbroTsOCd9ATNqeO5B13pNhllSzU=
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: Cog-Creators/Red-DiscordBot
|
||||
tags: true
|
||||
- stage: Crowdin Deployment
|
||||
if: tag IS present OR ENV(BUILD_CROWDIN)
|
||||
python: 3.8.1
|
||||
env:
|
||||
- DEPLOYING=true
|
||||
- TOXENV=py38
|
||||
before_deploy:
|
||||
- curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||
- echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -y crowdin
|
||||
- pip install redgettext==3.1
|
||||
deploy:
|
||||
- provider: script
|
||||
script: make upload_translations
|
||||
skip_cleanup: true
|
||||
on:
|
||||
repo: Cog-Creators/Red-DiscordBot
|
||||
tags: true
|
||||
4541
CHANGES.rst
Normal file
@@ -42,7 +42,7 @@ Unsure of how to get started contributing to Red? Please take a look at the Issu
|
||||
* beginner - issues that can normally be fixed in just a few lines of code and maybe a test or two.
|
||||
* help-wanted - issues that are currently unassigned to anyone and may be a bit more involved/complex than issues tagged with beginner.
|
||||
|
||||
**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
|
||||
**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github)
|
||||
|
||||
At this point you're ready to start making changes. Feel free to ask for help; everyone was a beginner at some point!
|
||||
|
||||
@@ -83,7 +83,7 @@ We're using [tox](https://github.com/tox-dev/tox) to run all of our tests. It's
|
||||
Currently, tox does the following, creating its own virtual environments for each stage:
|
||||
- Runs all of our unit tests with [pytest](https://github.com/pytest-dev/pytest) on python 3.8 (test environment `py38`)
|
||||
- Ensures documentation builds without warnings, and all hyperlinks have a valid destination (test environment `docs`)
|
||||
- Ensures that the code meets our style guide with [black](https://github.com/ambv/black) (test environment `style`)
|
||||
- Ensures that the code meets our style guide with [black](https://github.com/psf/black) (test environment `style`)
|
||||
|
||||
To run all of these tests, just run the command `tox` in the project directory.
|
||||
|
||||
@@ -92,9 +92,9 @@ To run a subset of these tests, use the command `tox -e <env>`, where `<env>` is
|
||||
Your PR will not be merged until all of these tests pass.
|
||||
|
||||
### 4.3 Style
|
||||
Our style checker of choice, [black](https://github.com/ambv/black), actually happens to be an auto-formatter. The checking functionality simply detects whether or not it would try to reformat something in your code, should you run the formatter on it. For this reason, we recommend using this tool as a formatter, regardless of any disagreements you might have with the style it enforces.
|
||||
Our style checker of choice, [black](https://github.com/psf/black), actually happens to be an auto-formatter. The checking functionality simply detects whether or not it would try to reformat something in your code, should you run the formatter on it. For this reason, we recommend using this tool as a formatter, regardless of any disagreements you might have with the style it enforces.
|
||||
|
||||
Use the command `black --help` to see how to use this tool. The full style guide is explained in detail on [black's GitHub repository](https://github.com/ambv/black). **There is one exception to this**, however, which is that we set the line length to 99, instead of black's default 88. This is already set in `pyproject.toml` configuration file in the repo so you can simply format code with Black like so: `black <src>`.
|
||||
Use the command `black --help` to see how to use this tool. The full style guide is explained in detail on [black's GitHub repository](https://github.com/psf/black). **There is one exception to this**, however, which is that we set the line length to 99, instead of black's default 88. This is already set in `pyproject.toml` configuration file in the repo so you can simply format code with Black like so: `black <src>`.
|
||||
|
||||
### 4.4 Make
|
||||
You may have noticed we have a `Makefile` and a `make.bat` in the top-level directory. For now, you can do a few things with them:
|
||||
|
||||
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-2020 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-2020 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.
|
||||
|
||||
33
MANIFEST.in
Normal file
@@ -0,0 +1,33 @@
|
||||
# include license files
|
||||
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
|
||||
|
||||
# include data folders for cogs
|
||||
recursive-include redbot/**/data *
|
||||
|
||||
# include *.export files from the test fixtures
|
||||
recursive-include redbot *.export
|
||||
|
||||
# include the py.typed file informing about Red being typed
|
||||
recursive-include redbot py.typed
|
||||
|
||||
# include *.sql files from postgres driver
|
||||
recursive-include redbot/core/_drivers/postgres *.sql
|
||||
|
||||
# include tests
|
||||
graft tests
|
||||
|
||||
# include tox configuration
|
||||
include tox.ini
|
||||
|
||||
# exclude files containing byte-code and compiled libs
|
||||
global-exclude *.py[cod]
|
||||
39
Makefile
@@ -1,14 +1,41 @@
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
PYTHON ?= python3.8
|
||||
|
||||
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
ifneq ($(wildcard $(ROOT_DIR)/.venv/.),)
|
||||
VENV_PYTHON = $(ROOT_DIR)/.venv/bin/python
|
||||
else
|
||||
VENV_PYTHON = $(PYTHON)
|
||||
endif
|
||||
|
||||
define HELP_BODY
|
||||
Usage:
|
||||
make <command>
|
||||
|
||||
Commands:
|
||||
reformat Reformat all .py files being tracked by git.
|
||||
stylecheck Check which tracked .py files need reformatting.
|
||||
stylediff Show the post-reformat diff of the tracked .py files
|
||||
without modifying them.
|
||||
gettext Generate pot files.
|
||||
upload_translations Upload pot files to Crowdin.
|
||||
download_translations Download translations from Crowdin.
|
||||
bumpdeps Run script bumping dependencies.
|
||||
newenv Create or replace this project's virtual environment.
|
||||
syncenv Sync this project's virtual environment to Red's latest
|
||||
dependencies.
|
||||
endef
|
||||
export HELP_BODY
|
||||
|
||||
# Python Code Style
|
||||
reformat:
|
||||
$(PYTHON) -m black $(ROOT_DIR)
|
||||
$(VENV_PYTHON) -m black $(ROOT_DIR)
|
||||
stylecheck:
|
||||
$(PYTHON) -m black --check $(ROOT_DIR)
|
||||
$(VENV_PYTHON) -m black --check $(ROOT_DIR)
|
||||
stylediff:
|
||||
$(PYTHON) -m black --check --diff $(ROOT_DIR)
|
||||
$(VENV_PYTHON) -m black --check --diff $(ROOT_DIR)
|
||||
|
||||
# Translations
|
||||
gettext:
|
||||
@@ -25,7 +52,11 @@ 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
|
||||
|
||||
# Help
|
||||
help:
|
||||
@echo "$$HELP_BODY"
|
||||
|
||||
22
README.md
@@ -27,12 +27,12 @@
|
||||
</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/ambv/black">
|
||||
<a href="https://github.com/psf/black">
|
||||
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code Style: Black">
|
||||
</a>
|
||||
<a href="http://makeapullrequest.com">
|
||||
@@ -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>
|
||||
•
|
||||
@@ -72,7 +72,7 @@ from installing and updating, every part of the bot can be controlled from withi
|
||||
- Moderation features (kick/ban/softban/hackban, mod-log, filter, chat cleanup)
|
||||
- Trivia (lists are included and can be easily added)
|
||||
- Music features (YouTube, SoundCloud, local files, playlists, queues)
|
||||
- Stream alerts (Twitch, Youtube, Hitbox, Picarto)
|
||||
- Stream alerts (Twitch, Youtube, Picarto)
|
||||
- Bank (slot machine, user credits)
|
||||
- Custom commands
|
||||
- Imgur/gif search
|
||||
@@ -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.
|
||||
@@ -114,8 +114,8 @@ 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://cogboard.red/t/approved-repositories/210) the cog you’re looking for,
|
||||
consult our [guide](https://red-discordbot.readthedocs.io/en/stable/guide_cog_creation.html) on
|
||||
[find](https://index.discord.red) the cog you’re looking for,
|
||||
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)!
|
||||
@@ -131,4 +131,4 @@ Artwork created by [Sinlaire](https://sinlaire.deviantart.com/) on Deviant Art f
|
||||
Bot Project.
|
||||
|
||||
This project vendors [discord.ext.menus](https://github.com/Rapptz/discord-ext-menus) package made by Danny Y. (Rapptz) which is distributed under MIT License.
|
||||
Copy of this license can be found in [discord-ext-menus.LICENSE](redbot/vendored/discord-ext-menus.LICENSE) file in [redbot/vendored](redbot/vendored) folder of this repository.
|
||||
A copy of this license can be found in the [discord-ext-menus.LICENSE](redbot/vendored/discord-ext-menus.LICENSE) file in the [redbot/vendored](redbot/vendored) folder of this repository.
|
||||
|
||||
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:
|
||||
|
||||
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 77 KiB |
BIN
docs/.resources/cog_manager_ui/cog-path.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
docs/.resources/cog_manager_ui/custom-cog-example.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 16 KiB |
BIN
docs/.resources/trivia/trivia_author.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
129
docs/_ext/deprecated_removed.py
Normal file
@@ -0,0 +1,129 @@
|
||||
"""
|
||||
A Sphinx extension adding a ``deprecated-removed`` directive that works
|
||||
similarly to CPython's directive with the same name.
|
||||
|
||||
The key difference is that instead of passing the version of planned removal,
|
||||
the writer must provide the minimum amount of days that must pass
|
||||
since the date of the release it was deprecated in.
|
||||
|
||||
Due to lack of a concrete release schedule for Red, this ensures that
|
||||
we give enough time to people affected by the changes no matter
|
||||
when the releases actually happen.
|
||||
|
||||
`DeprecatedRemoved` class is heavily based on
|
||||
`sphinx.domains.changeset.VersionChange` class that is available at:
|
||||
https://github.com/sphinx-doc/sphinx/blob/0949735210abaa05b6448e531984f159403053f4/sphinx/domains/changeset.py
|
||||
|
||||
Copyright 2007-2020 by the Sphinx team, see AUTHORS:
|
||||
https://github.com/sphinx-doc/sphinx/blob/82f495fed386c798735adf675f867b95d61ee0e1/AUTHORS
|
||||
|
||||
The original copy was distributed under BSD License and this derivative work
|
||||
is distributed under GNU GPL Version 3.
|
||||
"""
|
||||
|
||||
import datetime
|
||||
import multiprocessing
|
||||
import subprocess
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from docutils import nodes
|
||||
from sphinx import addnodes
|
||||
from sphinx.application import Sphinx
|
||||
from sphinx.util.docutils import SphinxDirective
|
||||
|
||||
|
||||
class TagDateCache:
|
||||
def __init__(self) -> None:
|
||||
self._tags: Dict[str, datetime.date] = {}
|
||||
|
||||
def _populate_tags(self) -> None:
|
||||
with _LOCK:
|
||||
if self._tags:
|
||||
return
|
||||
out = subprocess.check_output(
|
||||
("git", "tag", "-l", "--format", "%(creatordate:raw)\t%(refname:short)"),
|
||||
text=True,
|
||||
)
|
||||
lines = out.splitlines(False)
|
||||
for line in lines:
|
||||
creator_date, tag_name = line.split("\t", maxsplit=1)
|
||||
timestamp = int(creator_date.split(" ", maxsplit=1)[0])
|
||||
self._tags[tag_name] = datetime.datetime.fromtimestamp(
|
||||
timestamp, tz=datetime.timezone.utc
|
||||
).date()
|
||||
|
||||
def get_tag_date(self, tag_name: str) -> Optional[datetime.date]:
|
||||
self._populate_tags()
|
||||
return self._tags.get(tag_name)
|
||||
|
||||
|
||||
_LOCK = multiprocessing.Manager().Lock()
|
||||
_TAGS = TagDateCache()
|
||||
|
||||
|
||||
class DeprecatedRemoved(SphinxDirective):
|
||||
has_content = True
|
||||
required_arguments = 2
|
||||
optional_arguments = 1
|
||||
final_argument_whitespace = True
|
||||
|
||||
def run(self) -> List[nodes.Node]:
|
||||
# Some Sphinx stuff
|
||||
node = addnodes.versionmodified()
|
||||
node.document = self.state.document
|
||||
self.set_source_info(node)
|
||||
node["type"] = self.name
|
||||
node["version"] = tuple(self.arguments)
|
||||
if len(self.arguments) == 3:
|
||||
inodes, messages = self.state.inline_text(self.arguments[2], self.lineno + 1)
|
||||
para = nodes.paragraph(self.arguments[2], "", *inodes, translatable=False)
|
||||
self.set_source_info(para)
|
||||
node.append(para)
|
||||
else:
|
||||
messages = []
|
||||
|
||||
# Text generation
|
||||
deprecation_version = self.arguments[0]
|
||||
minimum_days = int(self.arguments[1])
|
||||
tag_date = _TAGS.get_tag_date(deprecation_version)
|
||||
text = (
|
||||
f"Will be deprecated in version {deprecation_version},"
|
||||
" and removed in the first minor version that gets released"
|
||||
f" after {minimum_days} days since deprecation"
|
||||
if tag_date is None
|
||||
else f"Deprecated since version {deprecation_version},"
|
||||
" will be removed in the first minor version that gets released"
|
||||
f" after {tag_date + datetime.timedelta(days=minimum_days)}"
|
||||
)
|
||||
|
||||
# More Sphinx stuff
|
||||
if self.content:
|
||||
self.state.nested_parse(self.content, self.content_offset, node)
|
||||
classes = ["versionmodified"]
|
||||
if len(node):
|
||||
if isinstance(node[0], nodes.paragraph) and node[0].rawsource:
|
||||
content = nodes.inline(node[0].rawsource, translatable=True)
|
||||
content.source = node[0].source
|
||||
content.line = node[0].line
|
||||
content += node[0].children
|
||||
node[0].replace_self(nodes.paragraph("", "", content, translatable=False))
|
||||
|
||||
node[0].insert(0, nodes.inline("", f"{text}: ", classes=classes))
|
||||
else:
|
||||
para = nodes.paragraph(
|
||||
"", "", nodes.inline("", f"{text}.", classes=classes), translatable=False
|
||||
)
|
||||
node.append(para)
|
||||
|
||||
ret = [node]
|
||||
ret += messages
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
def setup(app: Sphinx) -> Dict[str, Any]:
|
||||
app.add_directive("deprecated-removed", DeprecatedRemoved)
|
||||
return {
|
||||
"version": "1.0",
|
||||
"parallel_read_safe": True,
|
||||
}
|
||||
6
docs/_html/robots.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
Allow: /en/stable
|
||||
Allow: /en/latest
|
||||
|
||||
Sitemap: https://docs.discord.red/sitemap.xml
|
||||
2
docs/_templates/layout.html
vendored
@@ -5,7 +5,7 @@
|
||||
<p class="first admonition-title">Warning</p>
|
||||
<p class="last">
|
||||
This document is for Red's development version, which can be significantly different from previous releases.
|
||||
If you're a regular user, you should read the <a href="{{ dict(versions)['stable'] }}">Red documentation for the current stable release</a>.
|
||||
If you're a regular user, you should read the <a href="/{{ rtd_language }}/stable/">Red documentation for the current stable release</a>.
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
112
docs/autostart_mac.rst
Normal file
@@ -0,0 +1,112 @@
|
||||
.. launchd guide
|
||||
|
||||
==============================
|
||||
Setting up auto-restart on Mac
|
||||
==============================
|
||||
|
||||
-----------------------
|
||||
Creating the plist file
|
||||
-----------------------
|
||||
|
||||
Start by activating your venv. Then run the following command:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
which python
|
||||
|
||||
Copy the output of that command.
|
||||
|
||||
Now run :code:`sudo nano /Library/LaunchDaemons/red.plist`
|
||||
|
||||
Paste the following and replace the following:
|
||||
|
||||
- :code:`username` (but not :code:`UserName`) with your Mac username
|
||||
- :code:`path` with the path you copied earlier
|
||||
- :code:`instance-name` with your instance name:
|
||||
|
||||
.. code-block:: none
|
||||
:emphasize-lines: 9, 13, 28
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>red</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>path</string>
|
||||
<string>-O</string>
|
||||
<string>-m</string>
|
||||
<string>redbot</string>
|
||||
<string>instance-name</string>
|
||||
<string>--no-prompt</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
<dict>
|
||||
<key>SuccessfulExit</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/tmp/red_out.log</string>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/tmp/red_err.log</string>
|
||||
<key>UserName</key>
|
||||
<string>username</string>
|
||||
<key>InitGroups</key>
|
||||
<true/>
|
||||
<key>ProcessType</key>
|
||||
<string>Interactive</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
.. note::
|
||||
|
||||
You may add any additional arguments you need to add to the :code:`redbot` command by
|
||||
adding them to the end of the array under :code:`ProgramArguments`
|
||||
|
||||
.. note::
|
||||
|
||||
Should you need to set up auto-restart for additional bots, create a :code:`.plist` file for
|
||||
each bot under a different file name, and use the respective file names for the commands below.
|
||||
|
||||
Save and exit :code:`ctrl + O; enter; ctrl + x`
|
||||
|
||||
-------------------------------
|
||||
Starting and loading the plist
|
||||
-------------------------------
|
||||
|
||||
To start the bot and set it to start on boot, you must run the following command:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo launchctl load -w /Library/LaunchDaemons/red.plist
|
||||
|
||||
If you need to shutdown the bot, you can use the ``[p]shutdown`` command or
|
||||
type the following command in the terminal:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo launchctl stop red
|
||||
|
||||
To start the bot again after a shutdown, run the following:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo launchctl start red
|
||||
|
||||
To stop the bot and set it to not start on boot anymore, run the following:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo launchctl unload -w /Library/LaunchDaemons/red.plist
|
||||
|
||||
To view Red's log, run the following (:code:`red_out.log` is for the console output, and
|
||||
:code:`red_err.log` for the error logs):
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
nano /tmp/red_out.log
|
||||
nano /tmp/red_err.log
|
||||
@@ -1,44 +0,0 @@
|
||||
.. pm2 service guide
|
||||
|
||||
==============================================
|
||||
Setting up auto-restart using pm2 on Linux
|
||||
==============================================
|
||||
|
||||
.. note:: This guide is for setting up PM2 on a Linux environment. This guide assumes that you already have a working Red instance.
|
||||
|
||||
--------------
|
||||
Installing PM2
|
||||
--------------
|
||||
|
||||
Start by installing Node.JS and NPM via your favorite package distributor. From there run the following command:
|
||||
|
||||
:code:`npm install pm2 -g`
|
||||
|
||||
After PM2 is installed, run the following command to enable your Red instance to be managed by PM2. Replace the brackets with the required information.
|
||||
You can add additional Red based arguments after the instance, such as :code:`--dev`.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
pm2 start redbot --name "<Insert a name here>" --interpreter "<Location to your Python Interpreter>" --interpreter-args "-O" -- <Red Instance> --no-prompt
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
Arguments to replace.
|
||||
|
||||
<Insert a name here>
|
||||
A name to identify the bot within pm2, this is not your Red instance.
|
||||
|
||||
<Location to your Python Interpreter>
|
||||
The location of your Python interpreter, to find out where that is use the following command inside activated venv:
|
||||
which python
|
||||
|
||||
<Red Instance>
|
||||
The name of your Red instance.
|
||||
|
||||
------------------------------
|
||||
Ensuring that PM2 stays online
|
||||
------------------------------
|
||||
|
||||
To make sure that PM2 stays online and persistence between machine restarts, run the following commands:
|
||||
|
||||
:code:`pm2 save` & :code:`pm2 startup`
|
||||
@@ -4,6 +4,8 @@
|
||||
Setting up auto-restart using systemd on Linux
|
||||
==============================================
|
||||
|
||||
.. note:: This guide is for setting up systemd on a Linux environment. This guide assumes that you already have a working Red instance.
|
||||
|
||||
-------------------------
|
||||
Creating the service file
|
||||
-------------------------
|
||||
@@ -12,29 +14,28 @@ In order to create the service file, you will first need to know two things, you
|
||||
|
||||
First, your Linux :code:`username` can be fetched with the following command:
|
||||
|
||||
.. code-block:: bash
|
||||
.. prompt:: bash
|
||||
|
||||
whoami
|
||||
|
||||
Next, your python :code:`path` can be fetched with the following commands:
|
||||
|
||||
.. code-block:: bash
|
||||
.. prompt:: bash
|
||||
:prompts: $,(redenv) $
|
||||
:modifiers: auto
|
||||
|
||||
# If redbot is installed in a venv
|
||||
source ~/redenv/bin/activate
|
||||
which python
|
||||
|
||||
# If redbot is installed in a pyenv virtualenv
|
||||
pyenv shell <virtualenv_name>
|
||||
pyenv which python
|
||||
$ source ~/redenv/bin/activate
|
||||
(redenv) $ /usr/bin/which python
|
||||
|
||||
Then create the new service file:
|
||||
|
||||
:code:`sudo -e /etc/systemd/system/red@.service`
|
||||
:code:`sudo nano /etc/systemd/system/red@.service`
|
||||
|
||||
Paste the following in the file, and replace all instances of :code:`username` with the Linux username you retrieved above, and :code:`path` with the python path you retrieved above.
|
||||
|
||||
.. code-block:: none
|
||||
:emphasize-lines: 8-10
|
||||
|
||||
[Unit]
|
||||
Description=%I redbot
|
||||
@@ -47,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]
|
||||
@@ -65,20 +67,34 @@ Starting and enabling the service
|
||||
|
||||
To start the bot, run the service and add the instance name after the **@**:
|
||||
|
||||
:code:`sudo systemctl start red@instancename`
|
||||
.. prompt:: bash
|
||||
|
||||
sudo systemctl start red@instancename
|
||||
|
||||
To set the bot to start on boot, you must enable the service, again adding the instance name after the **@**:
|
||||
|
||||
:code:`sudo systemctl enable red@instancename`
|
||||
.. prompt:: bash
|
||||
|
||||
sudo systemctl enable red@instancename
|
||||
|
||||
If you need to shutdown the bot, you can use the ``[p]shutdown`` command or
|
||||
type the following command in the terminal, still by adding the instance name after the **@**:
|
||||
|
||||
:code:`sudo systemctl stop red@instancename`
|
||||
.. prompt:: bash
|
||||
|
||||
sudo systemctl stop red@instancename
|
||||
|
||||
.. warning:: If the service doesn't stop in the next 10 seconds, the process is killed.
|
||||
Check your logs to know the cause of the error that prevents the shutdown.
|
||||
|
||||
To view Red’s log, you can acccess through journalctl:
|
||||
To set the bot to not start on boot anymore, you must disable the service by running the following command, adding the instance name after the **@**:
|
||||
|
||||
:code:`sudo journalctl -eu red@instancename`
|
||||
.. prompt:: bash
|
||||
|
||||
sudo systemctl disable red@instancename
|
||||
|
||||
You can access Red's log through journalctl:
|
||||
|
||||
.. prompt:: bash
|
||||
|
||||
sudo journalctl -eu red@instancename
|
||||
|
||||
51
docs/autostart_windows.rst
Normal file
@@ -0,0 +1,51 @@
|
||||
.. _autostart-windows:
|
||||
|
||||
==============================================
|
||||
Setting up auto-restart using batch on Windows
|
||||
==============================================
|
||||
|
||||
.. note:: This guide assumes that you already have a working Red instance.
|
||||
|
||||
-----------------------
|
||||
Creating the batch file
|
||||
-----------------------
|
||||
|
||||
Create a new text document anywhere you want to. This file will be used to launch the bot, so you may want to put it somewhere convenient, like Documents or Desktop.
|
||||
|
||||
Open that document in Notepad, and paste the following text in it:
|
||||
|
||||
.. code-block:: batch
|
||||
|
||||
@ECHO OFF
|
||||
:RED
|
||||
CALL "%userprofile%\redenv\Scripts\activate.bat"
|
||||
python -O -m redbot <your instance name>
|
||||
|
||||
IF %ERRORLEVEL% == 1 GOTO RESTART_RED
|
||||
IF %ERRORLEVEL% == 26 GOTO RESTART_RED
|
||||
EXIT /B %ERRORLEVEL%
|
||||
|
||||
:RESTART_RED
|
||||
ECHO Restarting Red...
|
||||
GOTO RED
|
||||
|
||||
Replace ``<your instance name>`` with the instance name of your bot.
|
||||
If you created your VENV at a location other than the recommended one, replace ``%userprofile%\redenv\Scripts\activate.bat`` with the path to your VENV.
|
||||
|
||||
Click "File", "Save as". Change the dropdown "Save as type" to "All Files (*.*)". Set the filename to ``start_redbot.bat``, and click save.
|
||||
|
||||
There should now be a new file in the location you created the text document in. You can delete that text document as it is no longer needed.
|
||||
You can now use the ``start_redbot.bat`` batch file to launch Red by double clicking it.
|
||||
This script will automatically restart red when the ``[p]restart`` command is used or when the bot shuts down abnormally.
|
||||
|
||||
-------------------------
|
||||
Launch the bot on startup
|
||||
-------------------------
|
||||
|
||||
Create a shortcut of your ``start_redbot.bat`` file.
|
||||
|
||||
Open the "Run" dialogue box using Windows Key + R.
|
||||
|
||||
Enter ``shell:startup`` if you want the bot to launch only when the current user logs in, or ``shell:common startup`` if you want the bot to launch when any user logs in.
|
||||
|
||||
Drag the shortcut into the folder that is opened. The bot will now launch on startup.
|
||||
@@ -56,7 +56,7 @@ Continue to the next section to enable privileged intents.
|
||||
Enabling Privileged Intents
|
||||
-------------------------------
|
||||
.. warning::
|
||||
Due to Discord API changes, Red Bot requires all intents.
|
||||
:ref:`Red Bot requires all intents. <intents>`
|
||||
\This section is required.
|
||||
|
||||
1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
|
||||
@@ -67,7 +67,7 @@ Enabling Privileged Intents
|
||||
.. image:: /.resources/bot-guide/discord_bot_tab.png
|
||||
:alt: The bot tab in the application page.
|
||||
|
||||
5. Scroll down to the "Privileged Gateway Intents" section, enable both privileged intents and save your changes.
|
||||
5. Scroll down to the "Privileged Gateway Intents" section, enable all three privileged intents and save your changes.
|
||||
|
||||
.. image:: /.resources/bot-guide/discord_privileged_intents.png
|
||||
:alt: The privileged gateway intents selector.
|
||||
@@ -75,5 +75,6 @@ Enabling Privileged Intents
|
||||
.. warning::
|
||||
|
||||
Red bots with over 100 servers require `bot verification <https://support.discord.com/hc/en-us/articles/360040720412>`_ which is not covered in this guide.
|
||||
Remember that :ref:`we do not support public bots <intents>`. We encourage you to read that page before scaling up your bot.
|
||||
|
||||
*Parts of this guide have been adapted from* `discord.py intro <https://discordpy.readthedocs.io/en/stable/discord.html#discord-intro>`_ *and* `discord.py privileged intents <https://discordpy.readthedocs.io/en/stable/intents.html#privileged-intents>`_.
|
||||
|
||||
5
docs/changelog.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
=========
|
||||
Changelog
|
||||
=========
|
||||
|
||||
.. include:: ../CHANGES.rst
|
||||
@@ -1,232 +0,0 @@
|
||||
.. v3.1.0 Changelog
|
||||
|
||||
####################
|
||||
v3.1.0 Release Notes
|
||||
####################
|
||||
|
||||
----------------------
|
||||
Mongo Driver Migration
|
||||
----------------------
|
||||
|
||||
Due to the required changes of the Mongo driver for Config, all existing Mongo users will need to
|
||||
complete the below instructions to continue to use Mongo after updating to 3.1.
|
||||
This includes **all** users, regardless of any prior migration attempt to a development version of
|
||||
3.1.
|
||||
|
||||
#. Upgrade to 3.1
|
||||
#. Convert all existing Mongo instances to JSON using the new converters
|
||||
#. Start each bot instance while using JSON and load any and all cogs you have in order to successfully preserve data.
|
||||
#. Turn each instance off and convert back to Mongo.
|
||||
**NOTE:** No data is wiped from your Mongo database when converting to JSON.
|
||||
You may want to use a *new* database name when converting back to Mongo in order to not have duplicate data.
|
||||
|
||||
-------------
|
||||
Setup Utility
|
||||
-------------
|
||||
|
||||
New commands were introduced to simplify the conversion/editing/removal process both on our end and the users end.
|
||||
Please use ``redbot-setup --help`` to learn how to use the new features.
|
||||
|
||||
.. HINT::
|
||||
|
||||
Converting to JSON: ``redbot-setup convert <instance_name> json``
|
||||
|
||||
Converting to Mongo: ``redbot-setup convert <instance_name> mongo``
|
||||
|
||||
################
|
||||
v3.1.0 Changelog
|
||||
################
|
||||
|
||||
-----
|
||||
Audio
|
||||
-----
|
||||
|
||||
* Add Spotify support (`#2328`_)
|
||||
* Play local folders via text command (`#2457`_)
|
||||
* Change pause to a toggle (`#2461`_)
|
||||
* Remove aliases (`#2462`_)
|
||||
* Add track length restriction (`#2465`_)
|
||||
* Seek command can now seek to position (`#2470`_)
|
||||
* Add option for dc at queue end (`#2472`_)
|
||||
* Emptydisconnect and status refactor (`#2473`_)
|
||||
* Queue clean and queue clear addition (`#2476`_)
|
||||
* Fix for audioset status (`#2481`_)
|
||||
* Playlist download addition (`#2482`_)
|
||||
* Add songs when search-queuing (`#2513`_)
|
||||
* Match v2 behavior for channel change (`#2521`_)
|
||||
* Bot will no longer complain about permissions when trying to connect to user-limited channel, if it has "Move Members" permission (`#2525`_)
|
||||
* Fix issue on audiostats command when more than 20 servers to display (`#2533`_)
|
||||
* Fix for prev command display (`#2556`_)
|
||||
* Fix for localtrack playing (`#2557`_)
|
||||
* Fix for playlist queue when not playing (`#2586`_)
|
||||
* Track search and append fixes (`#2591`_)
|
||||
* DJ role should ask for a role (`#2606`_)
|
||||
|
||||
----
|
||||
Core
|
||||
----
|
||||
|
||||
* Warn on usage of ``yaml.load`` (`#2326`_)
|
||||
* New Event dispatch: ``on_message_without_command`` (`#2338`_)
|
||||
* Improve output format of cooldown messages (`#2412`_)
|
||||
* Delete cooldown messages when expired (`#2469`_)
|
||||
* Fix local blacklist/whitelist management (`#2531`_)
|
||||
* ``[p]set locale`` now only accepts actual locales (`#2553`_)
|
||||
* ``[p]listlocales`` now displays ``en-US`` (`#2553`_)
|
||||
* ``redbot --version`` will now give you current version of Red (`#2567`_)
|
||||
* Redesign help and related formatter (`#2628`_)
|
||||
* Default locale changed from ``en`` to ``en-US`` (`#2642`_)
|
||||
* New command ``[p]datapath`` that prints the bot's datapath (`#2652`_)
|
||||
|
||||
------
|
||||
Config
|
||||
------
|
||||
|
||||
* Updated Mongo driver to support large guilds (`#2536`_)
|
||||
* Introduced ``init_custom`` method on Config objects (`#2545`_)
|
||||
* We now record custom group primary key lengths in the core config object (`#2550`_)
|
||||
* Migrated internal UUIDs to maintain cross platform consistency (`#2604`_)
|
||||
|
||||
-------------
|
||||
DataConverter
|
||||
-------------
|
||||
|
||||
* It's dead jim (Removal) (`#2554`_)
|
||||
|
||||
----------
|
||||
discord.py
|
||||
----------
|
||||
|
||||
* No longer vendoring discord.py (`#2587`_)
|
||||
* Upgraded discord.py dependency to version 1.0.1 (`#2587`_)
|
||||
|
||||
----------
|
||||
Downloader
|
||||
----------
|
||||
|
||||
* ``[p]cog install`` will now tell user that cog has to be loaded (`#2523`_)
|
||||
* The message when libraries fail to install is now formatted (`#2576`_)
|
||||
* Fixed bug, that caused Downloader to include submodules on cog list (`#2590`_)
|
||||
* ``[p]cog uninstall`` allows to uninstall multiple cogs now (`#2592`_)
|
||||
* ``[p]cog uninstall`` will now remove cog from installed cogs even if it can't find the cog in install path anymore (`#2595`_)
|
||||
* ``[p]cog install`` will not allow to install cogs which aren't suitable for installed version of Red anymore (`#2605`_)
|
||||
* Cog Developers now have to use ``min_bot_version`` in form of version string instead of ``bot_version`` in info.json and they can also use ``max_bot_version`` to specify maximum version of Red, more in :ref:`info-json-format`. (`#2605`_)
|
||||
|
||||
------
|
||||
Filter
|
||||
------
|
||||
|
||||
* Filter performs significantly better on large servers. (`#2509`_)
|
||||
|
||||
--------
|
||||
Launcher
|
||||
--------
|
||||
|
||||
* Fixed extras in the launcher (`#2588`_)
|
||||
|
||||
---
|
||||
Mod
|
||||
---
|
||||
|
||||
* Admins can now decide how many times message has to be repeated before ``deleterepeats`` removes it (`#2437`_)
|
||||
* Fix: make ``[p]ban [days]`` optional as per the doc (`#2602`_)
|
||||
* Added the command ``voicekick`` to kick members from a voice channel with optional mod case. (`#2639`_)
|
||||
|
||||
-----------
|
||||
Permissions
|
||||
-----------
|
||||
|
||||
* Removed: ``p`` alias for ``permissions`` command (`#2467`_)
|
||||
|
||||
-------------
|
||||
Setup Scripts
|
||||
-------------
|
||||
|
||||
* ``redbot-setup`` now uses the click CLI library (`#2579`_)
|
||||
* ``redbot-setup convert`` now used to convert between libraries (`#2579`_)
|
||||
* Backup support for Mongo is currently broken (`#2579`_)
|
||||
|
||||
-------
|
||||
Streams
|
||||
-------
|
||||
|
||||
* Add support for custom stream alert messages per guild (`#2600`_)
|
||||
* Add ability to exclude rerun Twitch streams, and note rerun streams in embed status (`#2620`_)
|
||||
|
||||
-----
|
||||
Tests
|
||||
-----
|
||||
|
||||
* Test for ``trivia`` cog uses explicitly utf-8 encoding for checking yaml files (`#2565`_)
|
||||
|
||||
------
|
||||
Trivia
|
||||
------
|
||||
|
||||
* Fix of dead image link for Sao Tome and Principe in ``worldflags`` trivia (`#2540`_)
|
||||
|
||||
-----------------
|
||||
Utility Functions
|
||||
-----------------
|
||||
|
||||
* New: ``chat_formatting.humanize_timedelta`` (`#2412`_)
|
||||
* ``Tunnel`` - Spelling correction of method name - changed ``files_from_attatch`` to ``files_from_attach`` (old name is left for backwards compatibility) (`#2496`_)
|
||||
* ``Tunnel`` - fixed behavior of ``react_close()``, now when tunnel closes message will be sent to other end (`#2507`_)
|
||||
* ``chat_formatting.humanize_list`` - Improved error handling of empty lists (`#2597`_)
|
||||
|
||||
.. _#2326: https://github.com/Cog-Creators/Red-DiscordBot/pull/2326
|
||||
.. _#2328: https://github.com/Cog-Creators/Red-DiscordBot/pull/2328
|
||||
.. _#2338: https://github.com/Cog-Creators/Red-DiscordBot/pull/2338
|
||||
.. _#2412: https://github.com/Cog-Creators/Red-DiscordBot/pull/2412
|
||||
.. _#2437: https://github.com/Cog-Creators/Red-DiscordBot/pull/2437
|
||||
.. _#2457: https://github.com/Cog-Creators/Red-DiscordBot/pull/2457
|
||||
.. _#2461: https://github.com/Cog-Creators/Red-DiscordBot/pull/2461
|
||||
.. _#2462: https://github.com/Cog-Creators/Red-DiscordBot/pull/2462
|
||||
.. _#2465: https://github.com/Cog-Creators/Red-DiscordBot/pull/2465
|
||||
.. _#2467: https://github.com/Cog-Creators/Red-DiscordBot/pull/2467
|
||||
.. _#2469: https://github.com/Cog-Creators/Red-DiscordBot/pull/2469
|
||||
.. _#2470: https://github.com/Cog-Creators/Red-DiscordBot/pull/2470
|
||||
.. _#2472: https://github.com/Cog-Creators/Red-DiscordBot/pull/2472
|
||||
.. _#2473: https://github.com/Cog-Creators/Red-DiscordBot/pull/2473
|
||||
.. _#2476: https://github.com/Cog-Creators/Red-DiscordBot/pull/2476
|
||||
.. _#2481: https://github.com/Cog-Creators/Red-DiscordBot/pull/2481
|
||||
.. _#2482: https://github.com/Cog-Creators/Red-DiscordBot/pull/2482
|
||||
.. _#2496: https://github.com/Cog-Creators/Red-DiscordBot/pull/2496
|
||||
.. _#2507: https://github.com/Cog-Creators/Red-DiscordBot/pull/2507
|
||||
.. _#2509: https://github.com/Cog-Creators/Red-DiscordBot/pull/2509
|
||||
.. _#2513: https://github.com/Cog-Creators/Red-DiscordBot/pull/2513
|
||||
.. _#2521: https://github.com/Cog-Creators/Red-DiscordBot/pull/2521
|
||||
.. _#2523: https://github.com/Cog-Creators/Red-DiscordBot/pull/2523
|
||||
.. _#2525: https://github.com/Cog-Creators/Red-DiscordBot/pull/2525
|
||||
.. _#2531: https://github.com/Cog-Creators/Red-DiscordBot/pull/2531
|
||||
.. _#2533: https://github.com/Cog-Creators/Red-DiscordBot/pull/2533
|
||||
.. _#2536: https://github.com/Cog-Creators/Red-DiscordBot/pull/2536
|
||||
.. _#2540: https://github.com/Cog-Creators/Red-DiscordBot/pull/2540
|
||||
.. _#2545: https://github.com/Cog-Creators/Red-DiscordBot/pull/2545
|
||||
.. _#2550: https://github.com/Cog-Creators/Red-DiscordBot/pull/2550
|
||||
.. _#2553: https://github.com/Cog-Creators/Red-DiscordBot/pull/2553
|
||||
.. _#2554: https://github.com/Cog-Creators/Red-DiscordBot/pull/2554
|
||||
.. _#2556: https://github.com/Cog-Creators/Red-DiscordBot/pull/2556
|
||||
.. _#2557: https://github.com/Cog-Creators/Red-DiscordBot/pull/2557
|
||||
.. _#2565: https://github.com/Cog-Creators/Red-DiscordBot/pull/2565
|
||||
.. _#2567: https://github.com/Cog-Creators/Red-DiscordBot/pull/2567
|
||||
.. _#2576: https://github.com/Cog-Creators/Red-DiscordBot/pull/2576
|
||||
.. _#2579: https://github.com/Cog-Creators/Red-DiscordBot/pull/2579
|
||||
.. _#2586: https://github.com/Cog-Creators/Red-DiscordBot/pull/2586
|
||||
.. _#2587: https://github.com/Cog-Creators/Red-DiscordBot/pull/2587
|
||||
.. _#2588: https://github.com/Cog-Creators/Red-DiscordBot/pull/2588
|
||||
.. _#2590: https://github.com/Cog-Creators/Red-DiscordBot/pull/2590
|
||||
.. _#2591: https://github.com/Cog-Creators/Red-DiscordBot/pull/2591
|
||||
.. _#2592: https://github.com/Cog-Creators/Red-DiscordBot/pull/2592
|
||||
.. _#2595: https://github.com/Cog-Creators/Red-DiscordBot/pull/2595
|
||||
.. _#2597: https://github.com/Cog-Creators/Red-DiscordBot/pull/2597
|
||||
.. _#2600: https://github.com/Cog-Creators/Red-DiscordBot/pull/2600
|
||||
.. _#2602: https://github.com/Cog-Creators/Red-DiscordBot/pull/2602
|
||||
.. _#2604: https://github.com/Cog-Creators/Red-DiscordBot/pull/2604
|
||||
.. _#2605: https://github.com/Cog-Creators/Red-DiscordBot/pull/2605
|
||||
.. _#2606: https://github.com/Cog-Creators/Red-DiscordBot/pull/2606
|
||||
.. _#2620: https://github.com/Cog-Creators/Red-DiscordBot/pull/2620
|
||||
.. _#2628: https://github.com/Cog-Creators/Red-DiscordBot/pull/2628
|
||||
.. _#2639: https://github.com/Cog-Creators/Red-DiscordBot/pull/2639
|
||||
.. _#2642: https://github.com/Cog-Creators/Red-DiscordBot/pull/2642
|
||||
.. _#2652: https://github.com/Cog-Creators/Red-DiscordBot/pull/2652
|
||||
@@ -1,565 +0,0 @@
|
||||
.. 3.2.x Changelogs
|
||||
|
||||
Redbot 3.2.3 (2020-01-17)
|
||||
=========================
|
||||
|
||||
Core Bot Changes
|
||||
----------------
|
||||
|
||||
- Further improvements have been made to bot startup and shutdown.
|
||||
- Prefixes are now cached for performance.
|
||||
- Added the means for cog creators to use a global preinvoke hook.
|
||||
- The bot now ensures it has at least the bare neccessary permissions before running commands.
|
||||
- Deleting instances works as intended again.
|
||||
- Sinbad stopped fighting it and embraced the entrypoint madness.
|
||||
|
||||
Core Commands
|
||||
-------------
|
||||
|
||||
- The servers command now also shows the ids.
|
||||
|
||||
Admin Cog
|
||||
---------
|
||||
|
||||
- The selfrole command now has reasonable expectations about hierarchy.
|
||||
|
||||
Help Formatter
|
||||
--------------
|
||||
|
||||
- ``[botname]`` is now replaced with the bot's display name in help text.
|
||||
- New features added for cog creators to further customize help behavior.
|
||||
|
||||
- Check out our command reference for details on new ``format_help_for_context`` method.
|
||||
- Embed settings are now consistent.
|
||||
|
||||
Downloader
|
||||
----------
|
||||
|
||||
- Improved a few user facing messages.
|
||||
- Added pagination of output on cog update.
|
||||
- Added logging of failures.
|
||||
|
||||
Docs
|
||||
----
|
||||
|
||||
There's more detail to the below changes, so go read the docs.
|
||||
For some reason, documenting documentation changes is hard.
|
||||
|
||||
- Added instructions about git version.
|
||||
- Clarified instructions for installation and update.
|
||||
- Added more details to the API key reference.
|
||||
- Fixed some typos and versioning mistakes.
|
||||
|
||||
|
||||
Audio
|
||||
-----
|
||||
|
||||
Draper did things.
|
||||
|
||||
- No seriously, Draper did things.
|
||||
- Wait you wanted details? Ok, I guess we can share those.
|
||||
- Audio properly disconnects with autodisconnect, even if notify is being used.
|
||||
- Symbolic links now work as intended for local tracks.
|
||||
- Bump play now shows the correct time till next track.
|
||||
- Multiple user facing messages have been made more correct.
|
||||
|
||||
Redbot 3.2.2 (2020-01-10)
|
||||
=========================
|
||||
|
||||
Hotfixes
|
||||
--------
|
||||
|
||||
- Fix Help Pagination issue
|
||||
|
||||
Docs
|
||||
----
|
||||
|
||||
- Correct venv docs
|
||||
|
||||
|
||||
Redbot 3.2.1 (2020-01-10)
|
||||
=========================
|
||||
|
||||
Hotfixes
|
||||
--------
|
||||
|
||||
- Fix Mongo conversion from being incorrectly blocked
|
||||
- Fix announcer not creating a message for success feedback
|
||||
- Log an error with creating case types rather than crash
|
||||
|
||||
|
||||
Redbot 3.2.0 (2020-01-09)
|
||||
=========================
|
||||
Core Bot Changes
|
||||
----------------
|
||||
|
||||
Breaking Changes
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
- Modlog casetypes no longer have an attribute for auditlog action type. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
|
||||
- Removed ``redbot.core.modlog.get_next_case_number()``. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
|
||||
- Removed ``bank.MAX_BALANCE``, use ``bank.get_max_balance()`` from now on. (`#2926 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2926>`_)
|
||||
- The main bot config is no longer directly accessible to cogs. New methods have been added for use where this is concerned.
|
||||
New methods for this include
|
||||
|
||||
- ``bot.get_shared_api_tokens``
|
||||
- ``bot.set_shared_api_tokens``
|
||||
- ``bot.get_embed_color``
|
||||
- ``bot.get_embed_colour``
|
||||
- ``bot.get_admin_roles``
|
||||
- ``bot.get_admin_role_ids``
|
||||
- ``bot.get_mod_roles``
|
||||
- ``bot.get_mod_role_ids`` (`#2967 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2967>`_)
|
||||
- Reserved some command names for internal Red use. These are available programatically as ``redbot.core.commands.RESERVED_COMMAND_NAMES``. (`#2973 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2973>`_)
|
||||
- Removed ``bot._counter``, Made a few more attrs private (``cog_mgr``, ``main_dir``). (`#2976 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2976>`_)
|
||||
- Extension's ``setup()`` function should no longer assume that we are, or even will be connected to Discord.
|
||||
This also means that cog creators should no longer use ``bot.wait_until_ready()`` inside it. (`#3073 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3073>`_)
|
||||
- Removed the mongo driver. (`#3099 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3099>`_)
|
||||
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Help now properly hides disabled commands. (`#2863 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2863>`_)
|
||||
- Fixed ``bot.remove_command`` throwing an error when trying to remove a non-existent command. (`#2888 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2888>`_)
|
||||
- ``Command.can_see`` now works as intended for disabled commands. (`#2892 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2892>`_)
|
||||
- Modlog entries now show up properly without the mod cog loaded. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
|
||||
- Fixed an error in ``[p]reason`` when setting the reason for a case without a moderator. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
|
||||
- Bank functions now check the recipient balance before transferring and stop the transfer if the recipient's balance will go above the maximum allowed balance. (`#2923 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2923>`_)
|
||||
- Removed potential for additional bad API calls per ban/unban. (`#2945 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2945>`_)
|
||||
- The ``[p]invite`` command no longer errors when a user has the bot blocked or DMs disabled in the server. (`#2948 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2948>`_)
|
||||
- Stopped using the ``:`` character in backup's filename - Windows doesn't accept it. (`#2954 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2954>`_)
|
||||
- ``redbot-setup delete`` no longer errors with "unexpected keyword argument". (`#2955 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2955>`_)
|
||||
- ``redbot-setup delete`` no longer prompts about backup when the user passes the option ``--no-prompt``. (`#2956 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2956>`_)
|
||||
- Cleaned up the ``[p]inviteset public`` and ``[p]inviteset perms`` help strings. (`#2963 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2963>`_)
|
||||
- ```[p]embedset user`` now only affects DM's. (`#2966 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2966>`_)
|
||||
- Fixed an unfriendly error when the provided instance name doesn't exist. (`#2968 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2968>`_)
|
||||
- Fixed the help text and response of ``[p]set usebotcolor`` to accurately reflect what the command is doing. (`#2974 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2974>`_)
|
||||
- Red no longer types infinitely when a command with a cooldown is called within the last second of a cooldown. (`#2985 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2985>`_)
|
||||
- Removed f-string usage in the launcher to prevent our error handling from causing an error. (`#3002 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3002>`_)
|
||||
- Fixed ``MessagePredicate.greater`` and ``MessagePredicate.less`` allowing any valid int instead of only valid ints/floats that are greater/less than the given value. (`#3004 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3004>`_)
|
||||
- Fixed an error in ``[p]uptime`` when the uptime is under a second. (`#3009 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3009>`_)
|
||||
- Added quotation marks to the response of ``[p]helpset tagline`` so that two consecutive full stops do not appear. (`#3010 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3010>`_)
|
||||
- Fixed an issue with clearing rules in permissions. (`#3014 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3014>`_)
|
||||
- Lavalink will now be restarted after an unexpected shutdown. (`#3033 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3033>`_)
|
||||
- Added a 3rd-party lib folder to ``sys.path`` before loading cogs. This prevents issues with 3rd-party cogs failing to load when Downloader is not loaded to install requirements. (`#3036 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3036>`_)
|
||||
- Escaped track descriptions so that they do not break markdown. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
|
||||
- Red will now properly send a message when the invoked command is guild-only. (`#3057 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3057>`_)
|
||||
- Arguments ``--co-owner`` and ``--load-cogs`` now properly require at least one argument to be passed. (`#3060 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3060>`_)
|
||||
- Now always appends the 3rd-party lib folder to the end of ``sys.path`` to avoid shadowing Red's dependencies. (`#3062 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3062>`_)
|
||||
- Fixed ``is_automod_immune``'s handling of the guild check and added support for checking webhooks. (`#3100 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3100>`_)
|
||||
- Fixed the generation of the ``repos.json`` file in the backup process. (`#3114 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3114>`_)
|
||||
- Fixed an issue where calling audio commands when not in a voice channel could result in a crash. (`#3120 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3120>`_)
|
||||
- Added handling for invalid folder names in the data path gracefully in ``redbot-setup`` and ``redbot --edit``. (`#3171 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3171>`_)
|
||||
- ``--owner`` and ``-p`` cli flags now work when added from launcher. (`#3174 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3174>`_)
|
||||
- Red will now prevent users from locking themselves out with localblacklist. (`#3207 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3207>`_)
|
||||
- Fixed help ending up a little too large for discord embed limits. (`#3208 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3208>`_)
|
||||
- Fixed formatting issues in commands that list whitelisted/blacklisted users/roles when the list is empty. (`#3219 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3219>`_)
|
||||
- Red will now prevent users from locking the guild owner out with localblacklist (unless the command caller is bot owner). (`#3221 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3221>`_)
|
||||
- Guild owners are no longer affected by the local whitelist and blacklist. (`#3221 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3221>`_)
|
||||
- Fixed an attribute error that can be raised in ``humanize_timedelta`` if ``seconds = 0``. (`#3231 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3231>`_)
|
||||
- Fixed ``ctx.clean_prefix`` issues resulting from undocumented changes from discord. (`#3249 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3249>`_)
|
||||
- ``redbot.core.bot.Bot.owner_id`` is now set in the post connection startup. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
|
||||
- ``redbot.core.bot.Bot.send_to_owners()`` and ``redbot.core.bot.Bot.get_owner_notification_destinations()`` now wait until Red is done with post connection startup to ensure owner ID is available. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added the option to modify the RPC port with the ``--rpc-port`` flag. (`#2429 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2429>`_)
|
||||
- Slots now has a 62.5% expected payout and will not inflate economy when spammed. (`#2875 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2875>`_)
|
||||
- Allowed passing ``cls`` in the ``redbot.core.commands.group()`` decorator. (`#2881 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2881>`_)
|
||||
- Red's Help Formatter is now considered to have a stable API. (`#2892 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2892>`_)
|
||||
- Modlog no longer generates cases without being told to for actions the bot did. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
|
||||
- Some generic modlog casetypes are now pre-registered for cog creator use. (`#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_)
|
||||
- ModLog is now much faster at creating cases, especially in large servers. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
|
||||
- JSON config files are now stored without indentation, this is to reduce the file size and increase the performance of write operations. (`#2921 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2921>`_)
|
||||
- ``--[no-]backup``, ``--[no-]drop-db`` and ``--[no-]remove-datapath`` in the ``redbot-setup delete`` command are now on/off flags. (`#2958 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2958>`_)
|
||||
- The confirmation prompts in ``redbot-setup`` now have default values for user convenience. (`#2958 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2958>`_)
|
||||
- ``redbot-setup delete`` now has the option to leave Red's data untouched on database backends. (`#2962 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2962>`_)
|
||||
- Red now takes less time to fetch cases, unban members, and list warnings. (`#2964 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2964>`_)
|
||||
- Red now handles more things prior to connecting to discord to reduce issues during the initial load. (`#3045 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3045>`_)
|
||||
- ``bot.send_filtered`` now returns the message that is sent. (`#3052 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3052>`_)
|
||||
- Red will now send a message when the invoked command is DM-only. (`#3057 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3057>`_)
|
||||
- All ``y/n`` confirmations in cli commands are now unified. (`#3060 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3060>`_)
|
||||
- Changed ``[p]info`` to say "This bot is an..." instead of "This is an..." for clarity. (`#3121 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3121>`_)
|
||||
- ``redbot-setup`` will now use the instance name in default data paths to avoid creating a second instance with the same data path. (`#3171 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3171>`_)
|
||||
- Instance names can now only include characters A-z, numbers, underscores, and hyphens. Old instances are unaffected by this change. (`#3171 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3171>`_)
|
||||
- Clarified that ``[p]backup`` saves the **bot's** data in the help text. (`#3172 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3172>`_)
|
||||
- Added ``redbot --debuginfo`` flag which shows useful information for debugging. (`#3183 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3183>`_)
|
||||
- Added the Python executable field to ``[p]debuginfo``. (`#3184 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3184>`_)
|
||||
- When Red prompts for a token, it will now print a link to the guide explaining how to obtain a token. (`#3204 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3204>`_)
|
||||
- ``redbot-setup`` will no longer log to disk. (`#3269 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3269>`_)
|
||||
- ``redbot.core.bot.Bot.send_to_owners()`` and ``redbot.core.bot.Bot.get_owner_notification_destinations()`` now log when they are not able to find the owner notification destination. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
|
||||
- The lib folder is now cleared on minor Python version changes. ``[p]cog reinstallreqs`` in Downloader can be used to regenerate the lib folder for a new Python version. (`#3274 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3274>`_)
|
||||
- If Red detects operating system or architecture change, it will now warn the owner about possible problems with the lib folder. (`#3274 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3274>`_)
|
||||
- ``[p]playlist download`` will now compress playlists larger than the server attachment limit and attempt to send that. (`#3279 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3279>`_)
|
||||
|
||||
|
||||
New Features
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added functions to acquire locks on Config groups and values. These locks are acquired by default when calling a value as a context manager. See ``Value.get_lock`` for details. (`#2654 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2654>`_)
|
||||
- Added a config driver for PostgreSQL. (`#2723 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2723>`_)
|
||||
- Added methods to Config for accessing things by id without mocked objects
|
||||
|
||||
- ``Config.guild_from_id``
|
||||
- ``Config.user_from_id``
|
||||
- ``Config.role_from_id``
|
||||
- ``Config.channel_from_id``
|
||||
- ``Config.member_from_ids``
|
||||
- This one requires multiple ids, one for the guild, one for the user
|
||||
- Consequence of discord's object model (`#2804 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2804>`_)
|
||||
- New method ``humanize_number`` in ``redbot.core.utils.chat_formatting`` to convert numbers into text that respects the current locale. (`#2836 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2836>`_)
|
||||
- Added new commands to Economy
|
||||
|
||||
- ``[p]bank prune user`` - This will delete a user's bank account.
|
||||
- ``[p]bank prune local`` - This will prune the bank of accounts for users who are no longer in the server.
|
||||
- ``[p]bank prune global`` - This will prune the global bank of accounts for users who do not share any servers with the bot. (`#2845 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2845>`_)
|
||||
- Red now uses towncrier for changelog generation. (`#2872 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2872>`_)
|
||||
- Added ``redbot.core.modlog.get_latest_case`` to fetch the case object for the most recent ModLog case. (`#2908 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2908>`_)
|
||||
- Added ``[p]bankset maxbal`` to set the maximum bank balance. (`#2926 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2926>`_)
|
||||
- Added a few methods and classes replacing direct config access (which is no longer supported)
|
||||
|
||||
- ``redbot.core.Red.allowed_by_whitelist_blacklist``
|
||||
- ``redbot.core.Red.get_valid_prefixes``
|
||||
- ``redbot.core.Red.clear_shared_api_tokens``
|
||||
- ``redbot.core.commands.help.HelpSettings`` (`#2976 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2976>`_)
|
||||
- Added the cli flag ``redbot --edit`` which is used to edit the instance name, token, owner, and datapath. (`#3060 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3060>`_)
|
||||
- Added ``[p]licenseinfo``. (`#3090 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3090>`_)
|
||||
- Ensured that people can migrate from MongoDB. (`#3108 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3108>`_)
|
||||
- Added a command to list disabled commands globally or per guild. (`#3118 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3118>`_)
|
||||
- New event ``on_red_api_tokens_update`` is now dispatched when shared api keys for a service are updated. (`#3134 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3134>`_)
|
||||
- Added ``redbot-setup backup``. (`#3235 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3235>`_)
|
||||
- Added the method ``redbot.core.bot.Bot.wait_until_red_ready()`` that waits until Red's post connection startup is done. (`#3273 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3273>`_)
|
||||
|
||||
|
||||
Removals
|
||||
~~~~~~~~
|
||||
|
||||
- ``[p]set owner`` and ``[p]set token`` have been removed in favor of managing server side. (`#2928 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2928>`_)
|
||||
- Shared libraries are marked for removal in Red 3.4. (`#3106 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3106>`_)
|
||||
- Removed ``[p]backup``. Use the cli command ``redbot-setup backup`` instead. (`#3235 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3235>`_)
|
||||
- Removed the functions ``safe_delete``, ``fuzzy_command_search``, ``format_fuzzy_results`` and ``create_backup`` from ``redbot.core.utils``. (`#3240 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3240>`_)
|
||||
- Removed a lot of the launcher's handled behavior. (`#3289 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3289>`_)
|
||||
|
||||
|
||||
Miscellaneous changes
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- `#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_, `#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_, `#2723 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2723>`_, `#2836 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2836>`_, `#2849 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2849>`_, `#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_, `#2885 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2885>`_, `#2890 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2890>`_, `#2897 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2897>`_, `#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_, `#2924 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2924>`_, `#2939 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2939>`_, `#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_, `#2941 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2941>`_, `#2949 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2949>`_, `#2953 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2953>`_, `#2964 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2964>`_, `#2986 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2986>`_, `#2993 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2993>`_, `#2997 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2997>`_, `#3008 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3008>`_, `#3017 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3017>`_, `#3048 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3048>`_, `#3059 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3059>`_, `#3080 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3080>`_, `#3089 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3089>`_, `#3104 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3104>`_, `#3106 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3106>`_, `#3129 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3129>`_, `#3152 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3152>`_, `#3160 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3160>`_, `#3168 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3168>`_, `#3173 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3173>`_, `#3176 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3176>`_, `#3186 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3186>`_, `#3192 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3192>`_, `#3193 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3193>`_, `#3195 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3195>`_, `#3202 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3202>`_, `#3214 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3214>`_, `#3223 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3223>`_, `#3229 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3229>`_, `#3245 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3245>`_, `#3247 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3247>`_, `#3248 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3248>`_, `#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_, `#3254 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3254>`_, `#3255 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3255>`_, `#3256 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3256>`_, `#3258 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3258>`_, `#3261 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3261>`_, `#3275 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3275>`_, `#3276 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3276>`_, `#3293 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3293>`_, `#3278 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3278>`_, `#3285 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3285>`_, `#3296 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3296>`_,
|
||||
|
||||
|
||||
Dependency changes
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Added ``pytest-mock`` requirement to ``tests`` extra. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
|
||||
- Updated the python minimum requirement to 3.8.1, updated JRE to Java 11. (`#3245 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3245>`_)
|
||||
- Bumped dependency versions. (`#3288 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3288>`_)
|
||||
- Bumped red-lavalink version. (`#3290 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3290>`_)
|
||||
|
||||
|
||||
Documentation Changes
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Started the user guides covering cogs and the user interface of the bot. This includes, for now, a "Getting started" guide. (`#1734 <https://github.com/Cog-Creators/Red-DiscordBot/issues/1734>`_)
|
||||
- Added documentation for PM2 support. (`#2105 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2105>`_)
|
||||
- Updated linux install docs, adding sections for Fedora Linux, Debian/Raspbian Buster, and openSUSE. (`#2558 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2558>`_)
|
||||
- Created documentation covering what we consider a developer facing breaking change and the guarantees regarding them. (`#2882 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2882>`_)
|
||||
- Fixed the user parameter being labeled as ``discord.TextChannel`` instead of ``discord.abc.User`` in ``redbot.core.utils.predicates``. (`#2914 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2914>`_)
|
||||
- Updated towncrier info in the contribution guidelines to explain how to create a changelog for a standalone PR. (`#2915 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2915>`_)
|
||||
- Reworded the virtual environment guide to make it sound less scary. (`#2920 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2920>`_)
|
||||
- Driver docs no longer show twice. (`#2972 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2972>`_)
|
||||
- Added more information about ``redbot.core.utils.humanize_timedelta`` into the docs. (`#2986 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2986>`_)
|
||||
- Added a direct link to the "Installing Red" section in "Installing using powershell and chocolatey". (`#2995 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2995>`_)
|
||||
- Updated Git PATH install (Windows), capitalized some words, stopped mentioning the launcher. (`#2998 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2998>`_)
|
||||
- Added autostart documentation for Red users who installed Red inside of a virtual environment. (`#3005 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3005>`_)
|
||||
- Updated the Cog Creation guide with a note regarding the Develop version as well as the folder layout for local cogs. (`#3021 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3021>`_)
|
||||
- Added links to the getting started guide at the end of installation guides. (`#3025 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3025>`_)
|
||||
- Added proper docstrings to enums that show in drivers docs. (`#3035 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3035>`_)
|
||||
- Discord.py doc links will now always use the docs for the currently used version of discord.py. (`#3053 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3053>`_)
|
||||
- Added ``|DPY_VERSION|`` substitution that will automatically get replaced by the current discord.py version. (`#3053 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3053>`_)
|
||||
- Added missing descriptions for function returns. (`#3054 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3054>`_)
|
||||
- Stopped overwriting the ``docs/prolog.txt`` file in ``conf.py``. (`#3082 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3082>`_)
|
||||
- Fixed some typos and wording, added MS Azure to the host list. (`#3083 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3083>`_)
|
||||
- Updated the docs footer copyright to 2019. (`#3105 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3105>`_)
|
||||
- Added a deprecation note about shared libraries in the Downloader Framework docs. (`#3106 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3106>`_)
|
||||
- Updated the apikey framework documentation. Changed ``bot.get_shared_api_keys()`` to ``bot.get_shared_api_tokens()``. (`#3110 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3110>`_)
|
||||
- Added information about ``info.json``'s ``min_python_version`` key in Downloader Framework docs. (`#3124 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3124>`_)
|
||||
- Added an event reference for the ``on_red_api_tokens_update`` event in the Shared API Keys docs. (`#3134 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3134>`_)
|
||||
- Added notes explaining the best practices with config. (`#3149 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3149>`_)
|
||||
- Documented additional attributes in Context. (`#3151 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3151>`_)
|
||||
- Updated Windows docs with up to date dependency instructions. (`#3188 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3188>`_)
|
||||
- Added a "Publishing cogs for V3" document explaining how to make user's cogs work with Downloader. (`#3234 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3234>`_)
|
||||
- Fixed broken docs for ``redbot.core.commands.Context.react_quietly``. (`#3257 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3257>`_)
|
||||
- Updated copyright notices on License and RTD config to 2020. (`#3259 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3259>`_)
|
||||
- Added a line about setuptools and wheel. (`#3262 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3262>`_)
|
||||
- Ensured development builds are not advertised to the wrong audience. (`#3292 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3292>`_)
|
||||
- Clarified the usage intent of some of the chat formatting functions. (`#3292 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3292>`_)
|
||||
|
||||
|
||||
Admin
|
||||
-----
|
||||
|
||||
Breaking Changes
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
- Changed ``[p]announce ignore`` and ``[p]announce channel`` to ``[p]announceset ignore`` and ``[p]announceset channel``. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
- Changed ``[p]selfrole <role>`` to ``[p]selfrole add <role>``, changed ``[p]selfrole add`` to ``[p]selfroleset add`` , and changed ``[p]selfrole delete`` to ``[p]selfroleset remove``. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Fixed ``[p]announce`` failing after encountering an error attempting to message the bot owner. (`#3166 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3166>`_)
|
||||
- Improved the clarity of user facing messages when the user is not allowed to do something due to Discord hierarchy rules. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
- Fixed some role managing commands not properly checking if Red had ``manage_roles`` perms before attempting to manage roles. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
- Fixed ``[p]editrole`` commands not checking if roles to be edited are higher than Red's highest role before trying to edit them. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
- Fixed ``[p]announce ignore`` and ``[p]announce channel`` not being able to be used by guild owners and administrators. (`#3250 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3250>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added custom issue messages for adding and removing roles, this makes it easier to create translations. (`#3016 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3016>`_)
|
||||
|
||||
|
||||
Audio
|
||||
-----
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- ``[p]playlist remove`` now removes the playlist url if the playlist was created through ``[p]playlist save``. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- Users are no longer able to accidentally overwrite existing playlist if a new one with the same name is created/renamed. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- ``[p]audioset settings`` no longer shows lavalink JAR version. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- Fixed a ``KeyError: loadType`` when trying to play tracks. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]audioset settings`` now uses ``ctx.is_owner()`` to check if the context author is the bot owner. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- Fixed track indexs being off by 1 in ``[p]search``. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
|
||||
- Fixed an issue where updating your Spotify and YouTube Data API tokens did not refresh them. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
|
||||
- Fixed an issue where the blacklist was not being applied correctly. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
|
||||
- Fixed an issue in ``[p]audioset restrictions blacklist list`` where it would call the list a ``Whitelist``. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
|
||||
- Red's status is now properly cleared on emptydisconnect. (`#3050 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3050>`_)
|
||||
- Fixed a console spam caused sometimes when auto disconnect and auto pause are used. (`#3123 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3123>`_)
|
||||
- Fixed an error that was thrown when running ``[p]audioset dj``. (`#3165 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3165>`_)
|
||||
- Fixed a crash that could happen when the bot can't connect to the lavalink node. (`#3238 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3238>`_)
|
||||
- Restricted the number of songs shown in the queue to first 500 to avoid heartbeats. (`#3279 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3279>`_)
|
||||
- Added more cooldowns to playlist commands and restricted the queue and playlists to 10k songs to avoid bot errors. (`#3286 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3286>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- ``[p]playlist upload`` will now load playlists generated via ``[p]playlist download`` much faster if the playlist uses the new scheme. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- ``[p]playlist`` commands now can be used by everyone regardless of DJ settings, however it will respect DJ settings when creating/modifying playlists in the server scope. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- Spotify, Youtube Data, and Lavalink API calls can be cached to avoid repeated calls in the future, see ``[p]audioset cache``. (`#2890 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2890>`_)
|
||||
- Playlists will now start playing as soon as first track is loaded. (`#2890 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2890>`_)
|
||||
- ``[p]audioset localpath`` can set a path anywhere in your machine now. Note: This path needs to be visible by ``Lavalink.jar``. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]queue`` now works when there are no tracks in the queue, showing the track currently playing. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]audioset settings`` now reports Red Lavalink version. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- Adding and removing reactions in Audio is no longer a blocking action. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- When shuffle is on, queue now shows the correct play order. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]seek`` and ``[p]skip`` can be used by user if they are the song requester while DJ mode is enabled and votes are disabled. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- Adding a playlist and an album to a saved playlist skips tracks already in the playlist. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- DJ mode is now turned off if the DJ role is deleted. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- When playing a localtrack, ``[p]play`` and ``[p]bumpplay`` no longer require the use of the prefix "localtracks\\".
|
||||
|
||||
Before: ``[p]bumpplay localtracks\\ENM\\501 - Inside The Machine.mp3``
|
||||
Now: ``[p]bumpplay ENM\\501 - Inside The Machine.mp3``
|
||||
Now nested folders: ``[p]bumpplay Parent Folder\\Nested Folder\\track.mp3`` (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- Removed commas in explanations about how to set API keys. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
|
||||
- Expanded local track support to all file formats (m3u, m4a, mp4, etc). (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
|
||||
- Cooldowns are now reset upon failure of commands that have a cooldown timer. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
|
||||
- Improved the explanation in the help string for ``[p]audioset emptydisconnect``. (`#3051 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3051>`_)
|
||||
- Added a typing indicator to playlist dedupe. (`#3058 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3058>`_)
|
||||
- Exposed clearer errors to users in the play commands. (`#3085 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3085>`_)
|
||||
- Better error handling when the player is unable to play multiple tracks in the sequence. (`#3165 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3165>`_)
|
||||
|
||||
|
||||
New Features
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added support for nested folders in the localtrack folder. (`#270 <https://github.com/Cog-Creators/Red-DiscordBot/issues/270>`_)
|
||||
- Now auto pauses the queue when the voice channel is empty. (`#721 <https://github.com/Cog-Creators/Red-DiscordBot/issues/721>`_)
|
||||
- All Playlist commands now accept optional arguments, use ``[p]help playlist <subcommand>`` for more details. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- ``[p]playlist rename`` will now allow users to rename existing playlists. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- ``[p]playlist update`` will now allow users to update non-custom Playlists to the latest available tracks. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- There are now 3 different scopes of playlist. To define them, use the ``--scope`` argument.
|
||||
|
||||
``Global Playlist``
|
||||
|
||||
- These playlists will be available in all servers the bot is in.
|
||||
- These can be managed by the Bot Owner only.
|
||||
|
||||
``Server Playlist``
|
||||
|
||||
- These playlists will only be available in the server they were created in.
|
||||
- These can be managed by the Bot Owner, Guild Owner, Mods, Admins, DJs, and the Creator (if the DJ role is disabled).
|
||||
|
||||
``User Playlist``
|
||||
|
||||
- These playlists will be available in all servers both the bot and the creator are in.
|
||||
- These can be managed by the Bot Owner and Creator only. (`#2861 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2861>`_)
|
||||
- ``[p]audioset cache`` can be used to set the cache level. **It's off by default**. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]genre`` can be used to play spotify playlists. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]audioset cacheage`` can be used to set the maximum age of an entry in the cache. **Default is 365 days**. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]audioset autoplay`` can be used to enable auto play once the queue runs out. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- New events dispatched by Audio.
|
||||
|
||||
- ``on_red_audio_track_start(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
|
||||
- ``on_red_audio_track_end(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
|
||||
- ``on_red_audio_track_enqueue(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
|
||||
- ``on_red_audio_track_auto_play(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
|
||||
- ``on_red_audio_queue_end(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)``
|
||||
- ``on_red_audio_audio_disconnect(guild: discord.Guild)``
|
||||
- ``on_red_audio_skip_track(guild: discord.Guild, track: lavalink.Track, requester: discord.Member)`` (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]queue shuffle`` can be used to shuffle the queue manually. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]queue clean self`` can be used to remove all songs you requested from the queue. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]audioset restrictions`` can be used to add or remove keywords which songs must have or are not allowed to have. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]playlist dedupe`` can be used to remove duplicated tracks from a playlist. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]autoplay`` can be used to play a random song. (`#2904 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2904>`_)
|
||||
- ``[p]bumpplay`` can be used to add a song to the front of the queue. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
|
||||
- ``[p]shuffle`` has an additional argument to tell the bot whether it should shuffle bumped tracks. (`#2940 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2940>`_)
|
||||
- Added global whitelist/blacklist commands. (`#3047 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3047>`_)
|
||||
- Added self-managed daily playlists in the GUILD scope, these are called "Daily playlist - YYYY-MM-DD" and auto delete after 7 days. (`#3199 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3199>`_)
|
||||
|
||||
|
||||
CustomCom
|
||||
---------
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- The group command ``[p]cc create`` can now be used to create simple CCs without specifying "simple". (`#1767 <https://github.com/Cog-Creators/Red-DiscordBot/issues/1767>`_)
|
||||
- Added a query option for CC typehints for URL-based CCs. (`#3228 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3228>`_)
|
||||
- Now uses the ``humanize_list`` utility for iterable parameter results, e.g. ``{#:Role.members}``. (`#3277 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3277>`_)
|
||||
|
||||
|
||||
Downloader
|
||||
----------
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Made the regex for repo names use raw strings to stop causing a ``DeprecationWarning`` for invalid escape sequences. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
|
||||
- Downloader will no longer attempt to install cogs that are already installed. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
|
||||
- Repo names can now only contain the characters listed in the help text (A-Z, 0-9, underscores, and hyphens). (`#2827 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2827>`_)
|
||||
- ``[p]findcog`` no longer attempts to find a cog for commands without a cog. (`#2902 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2902>`_)
|
||||
- Downloader will no longer attempt to install a cog with same name as another cog that is already installed. (`#2927 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2927>`_)
|
||||
- Added error handling for when a remote repository or branch is deleted, now notifies the which repository failed and continues to update the others. (`#2936 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2936>`_)
|
||||
- ``[p]cog install`` will no longer error if a cog has an empty install message. (`#3024 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3024>`_)
|
||||
- Made ``redbot.cogs.downloader.repo_manager.Repo.clean_url`` work with relative urls. This property is ``str`` type now. (`#3141 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3141>`_)
|
||||
- Fixed an error on repo add from empty string values for the ``install_msg`` info.json field. (`#3153 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3153>`_)
|
||||
- Disabled all git auth prompts when adding/updating a repo with Downloader. (`#3159 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3159>`_)
|
||||
- ``[p]findcog`` now properly works for cogs with less typical folder structure. (`#3177 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3177>`_)
|
||||
- ``[p]cog uninstall`` now fully unloads cog - the bot will not try to load it on next startup. (`#3179 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3179>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Downloader will now check if the Python and bot versions match requirements in ``info.json`` during update. (`#1866 <https://github.com/Cog-Creators/Red-DiscordBot/issues/1866>`_)
|
||||
- ``[p]cog install`` now accepts multiple cog names. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- When passing cogs to ``[p]cog update``, it will now only update those cogs, not all cogs from the repo those cogs are from. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added error messages for failures when installing/reinstalling requirements and copying cogs and shared libraries. (`#2571 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2571>`_)
|
||||
- ``[p]findcog`` now uses sanitized urls (without HTTP Basic Auth fragments). (`#3129 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3129>`_)
|
||||
- ``[p]repo info`` will now show the repo's url, branch, and authors. (`#3225 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3225>`_)
|
||||
- ``[p]cog info`` will now show cog authors. (`#3225 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3225>`_)
|
||||
- ``[p]findcog`` will now show the repo's branch. (`#3225 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3225>`_)
|
||||
|
||||
|
||||
New Features
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added ``[p]repo update [repos]`` which updates repos without updating the cogs from them. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog installversion <repo_name> <revision> <cogs>`` which installs cogs from a specified revision (commit, tag) of the given repo. When using this command, the cog will automatically be pinned. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog pin <cogs>`` and ``[p]cog unpin <cogs>`` for pinning cogs. Cogs that are pinned will not be updated when using update commands. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog checkforupdates`` that lists which cogs can be updated (including pinned cog) without updating them. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog updateallfromrepos <repos>`` that updates all cogs from the given repos. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog updatetoversion <repo_name> <revision> [cogs]`` that updates all cogs or ones of user's choosing to chosen revision of the given repo. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Added ``[p]cog reinstallreqs`` that reinstalls cog requirements and shared libraries for all installed cogs. (`#3167 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3167>`_)
|
||||
|
||||
|
||||
Documentation Changes
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Added ``redbot.cogs.downloader.installable.InstalledModule`` to Downloader's framework docs. (`#2527 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2527>`_)
|
||||
- Removed API References for Downloader. (`#3234 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3234>`_)
|
||||
|
||||
|
||||
Image
|
||||
-----
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Updated the giphycreds command to match the formatting of the other API commands. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
|
||||
- Removed commas from explanations about how to set API keys. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
|
||||
|
||||
|
||||
Mod
|
||||
---
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- ``[p]userinfo`` no longer breaks when a user has an absurd numbers of roles. (`#2910 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2910>`_)
|
||||
- Fixed Mod cog not recording username changes for ``[p]names`` and ``[p]userinfo`` commands. (`#2918 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2918>`_)
|
||||
- Fixed ``[p]modset deletedelay`` deleting non-command messages. (`#2924 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2924>`_)
|
||||
- Fixed an error when reloading Mod. (`#2932 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2932>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Slowmode now accepts integer-only inputs as seconds. (`#2884 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2884>`_)
|
||||
|
||||
|
||||
Permissions
|
||||
-----------
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Defaults are now cleared properly when clearing all rules. (`#3037 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3037>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Better explained the usage of commands with the ``<who_or_what>`` argument. (`#2991 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2991>`_)
|
||||
|
||||
|
||||
Streams
|
||||
-------
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Fixed a ``TypeError`` in the ``TwitchStream`` class when calling Twitch client_id from Red shared APIs tokens. (`#3042 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3042>`_)
|
||||
- Changed the ``stream_alert`` function for Twitch alerts to make it work with how the ``TwitchStream`` class works now. (`#3042 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3042>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Removed commas from explanations about how to set API keys. (`#2905 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2905>`_)
|
||||
|
||||
|
||||
Trivia
|
||||
------
|
||||
|
||||
Bug Fixes
|
||||
~~~~~~~~~
|
||||
|
||||
- Fixed a typo in Ahsoka Tano's name in the Starwars trivia list. (`#2909 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2909>`_)
|
||||
- Fixed a bug where ``[p]trivia leaderboard`` failed to run. (`#2911 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2911>`_)
|
||||
- Fixed a typo in the Greek mythology trivia list regarding Hermes' staff. (`#2994 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2994>`_)
|
||||
- Fixed a question in the Overwatch trivia list that accepted blank responses. (`#2996 <https://github.com/Cog-Creators/Red-DiscordBot/issues/2996>`_)
|
||||
- Fixed questions and answers that were incorrect in the Clash Royale trivia list. (`#3236 <https://github.com/Cog-Creators/Red-DiscordBot/issues/3236>`_)
|
||||
|
||||
|
||||
Enhancements
|
||||
~~~~~~~~~~~~
|
||||
|
||||
- Added trivia lists for Prince and Michael Jackson lyrics. (`#12 <https://github.com/Cog-Creators/Red-DiscordBot/issues/12>`_)
|
||||
@@ -1,910 +0,0 @@
|
||||
.. 3.3.x Changelogs
|
||||
|
||||
Redbot 3.3.12 (2020-08-18)
|
||||
==========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`Dav-Git`, :ghuser:`douglas-cpp`, :ghuser:`flaree`, :ghuser:`jack1142`, :ghuser:`Kowlin`, :ghuser:`MeatyChunks`, :ghuser:`PredaaA`, :ghuser:`Predeactor`, :ghuser:`thisisjvgrace`, :ghuser:`Vexed01`, :ghuser:`zephyrkul`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Red now logs clearer error if it can't find package to load in any cog path during bot startup (:issue:`4079`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- ``[p]mute voice`` and ``[p]unmute voice`` now take action instantly if bot has Move Members permission (:issue:`4064`)
|
||||
- Added typing to ``[p](un)mute guild`` to indicate that mute is being processed (:issue:`4066`, :issue:`4172`)
|
||||
|
||||
Streams
|
||||
*******
|
||||
|
||||
- Improve error messages for invalid channel names/IDs (:issue:`4147`, :issue:`4148`)
|
||||
|
||||
Trivia Lists
|
||||
************
|
||||
|
||||
- Added ``whosthatpokemon2`` trivia containing Pokémons from 2nd generation (:issue:`4102`)
|
||||
- Added ``whosthatpokemon3`` trivia containing Pokémons from 3rd generation (:issue:`4141`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Updated features list in ``[p]serverinfo`` with the latest changes from Discord (:issue:`4116`)
|
||||
- Simple version of ``[p]serverinfo`` now shows info about more detailed ``[p]serverinfo 1`` (:issue:`4121`)
|
||||
|
||||
|
||||
Redbot 3.3.11 (2020-08-10)
|
||||
==========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`douglas-cpp`, :ghuser:`Drapersniper`, :ghuser:`Flame`, :ghuser:`jack1142`, :ghuser:`MeatyChunks`, :ghuser:`Vexed01`, :ghuser:`yamikaitou`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Audio should now work again on all voice regions (:issue:`4162`, :issue:`4168`)
|
||||
- Removed an edge case where an unfriendly error message was sent in Audio cog (:issue:`3879`)
|
||||
|
||||
Cleanup
|
||||
*******
|
||||
|
||||
- Fixed a bug causing ``[p]cleanup`` commands to clear all messages within last 2 weeks when ``0`` is passed as the amount of messages to delete (:issue:`4114`, :issue:`4115`)
|
||||
|
||||
CustomCommands
|
||||
**************
|
||||
|
||||
- ``[p]cc show`` now sends an error message when command with the provided name couldn't be found (:issue:`4108`)
|
||||
|
||||
Downloader
|
||||
**********
|
||||
|
||||
- ``[p]findcog`` no longer fails for 3rd-party cogs without any author (:issue:`4032`, :issue:`4042`)
|
||||
- Update commands no longer crash when a different repo is added under a repo name that was once used (:issue:`4086`)
|
||||
|
||||
Permissions
|
||||
***********
|
||||
|
||||
- ``[p]permissions removeserverrule`` and ``[p]permissions removeglobalrule`` no longer error when trying to remove a rule that doesn't exist (:issue:`4028`, :issue:`4036`)
|
||||
|
||||
Warnings
|
||||
********
|
||||
|
||||
- ``[p]warn`` now sends an error message (instead of no feedback) when an unregistered reason is used by someone who doesn't have Administrator permission (:issue:`3839`, :issue:`3840`)
|
||||
|
||||
|
||||
Redbot 3.3.10 (2020-07-09)
|
||||
==========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`bobloy`, :ghuser:`Dav-Git`, :ghuser:`Drapersniper`, :ghuser:`Flame442`, :ghuser:`flaree`, :ghuser:`Injabie3`, :ghuser:`jack1142`, :ghuser:`mikeshardmind`, :ghuser:`MiniJennJenn`, :ghuser:`NeuroAssassin`, :ghuser:`thisisjvgrace`, :ghuser:`Vexed01`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Added information about internally managed jar to ``[p]audioset info`` (:issue:`3915`)
|
||||
- Updated to Lavaplayer 1.3.50
|
||||
- Twitch playback and YouTube searching should be functioning again.
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Fixed delayed help when ``[p]set deletedelay`` is enabled (:issue:`3884`, :issue:`3883`)
|
||||
- Bumped the Discord.py requirement from 1.3.3 to 1.3.4 (:issue:`4053`)
|
||||
- Added settings view commands for nearly all cogs. (:issue:`4041`)
|
||||
- Added more strings to be fully translatable by i18n. (:issue:`4044`)
|
||||
|
||||
Downloader
|
||||
**********
|
||||
|
||||
- Added ``[p]cog listpinned`` subcommand to see currently pinned cogs (:issue:`3974`)
|
||||
- Fixed unnecessary typing when running downloader commands (:issue:`3964`, :issue:`3948`)
|
||||
- Added embed version of ``[p]findcog`` (:issue:`3965`, :issue:`3944`)
|
||||
- Fixed ``[p]findcog`` not differentiating between core cogs and local cogs(:issue:`3969`, :issue:`3966`)
|
||||
|
||||
Filter
|
||||
******
|
||||
|
||||
- Added ``[p]filter list`` to show filtered words, and removed DMs when no subcommand was passed (:issue:`3973`)
|
||||
|
||||
Image
|
||||
*****
|
||||
|
||||
- Updated instructions for obtaining and setting the GIPHY API key (:issue:`3994`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- Added option to delete messages within the passed amount of days with ``[p]tempban`` (:issue:`3958`)
|
||||
- Added the ability to permanently ban a temporary banned user with ``[p]hackban`` (:issue:`4025`)
|
||||
- Fixed the passed reason not being used when using ``[p]tempban`` (:issue:`3958`)
|
||||
- Fixed invite being sent with ``[p]tempban`` even when no invite was set (:issue:`3991`)
|
||||
- Prevented an issue whereby the author may lock him self out of using the bot via whitelists (:issue:`3903`)
|
||||
- Reduced the number of API calls made to the storage APIs (:issue:`3910`)
|
||||
|
||||
Permissions
|
||||
***********
|
||||
|
||||
- Uploaded YAML files now accept integer commands without quotes (:issue:`3987`, :issue:`3185`)
|
||||
- Uploaded YAML files now accept command rules with empty dictionaries (:issue:`3987`, :issue:`3961`)
|
||||
|
||||
Streams
|
||||
*******
|
||||
|
||||
- Fixed streams cog sending multiple owner notifications about twitch secret not set (:issue:`3901`, :issue:`3587`)
|
||||
- Fixed old bearer tokens not being invalidated when the API key is updated (:issue:`3990`, :issue:`3917`)
|
||||
|
||||
Trivia Lists
|
||||
************
|
||||
|
||||
- Fixed URLs in ``whosthatpokemon`` (:issue:`3975`, :issue:`3023`)
|
||||
- Fixed trivia files ``leagueults`` and ``sports`` (:issue:`4026`)
|
||||
- Updated ``greekmyth`` to include more answer variations (:issue:`3970`)
|
||||
- Added new ``lotr`` trivia list (:issue:`3980`)
|
||||
- Added new ``r6seige`` trivia list (:issue:`4026`)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
- Added the utility functions ``map``, ``find``, and ``next`` to ``AsyncIter`` (:issue:`3921`, :issue:`3887`)
|
||||
- Updated deprecation times for ``APIToken``, and loops being passed to various functions to the first minor release (represented by ``X`` in ``3.X.0``) after 2020-08-05 (:issue:`3608`)
|
||||
- Updated deprecation warnings for shared libs to reflect that they have been moved for an undefined time (:issue:`3608`)
|
||||
- Added new ``discord.com`` domain to ``INVITE_URL_RE`` common filter (:issue:`4012`)
|
||||
- Fixed incorrect role mention regex in ``MessagePredicate`` (:issue:`4030`)
|
||||
- Vendor the ``discord.ext.menus`` module (:issue:`4039`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Improved error responses for when Modlog and Autoban on mention spam were already disabled (:issue:`3951`, :issue:`3949`)
|
||||
- Clarified that ``[p]embedset user`` only affects commands executed in DMs (:issue:`3972`, :issue:`3953`)
|
||||
- Added link to Getting Started guide if the bot was not in any guilds (:issue:`3906`)
|
||||
- Fixed exceptions being ignored or not sent to log files in special cases (:issue:`3895`)
|
||||
- Added the option of using dots in the instance name when creating your instances (:issue:`3920`)
|
||||
- Added a confirmation when using hyphens in instance names to discourage the use of them (:issue:`3920`)
|
||||
- Fixed migration owner notifications being sent even when migration was not necessary (:issue:`3911`. :issue:`3909`)
|
||||
- Fixed commands being translated where they should not be (:issue:`3938`, :issue:`3919`)
|
||||
- Fixed grammar errors and added full stopts in ``core_commands.py`` (:issue:`4023`)
|
||||
|
||||
|
||||
Redbot 3.3.9 (2020-06-12)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`Dav-Git`, :ghuser:`Drapersniper`, :ghuser:`Flame442`, :ghuser:`mikeshardmind`, :ghuser:`NeuroAssassin`, :ghuser:`Predeactor`, :ghuser:`Vexed01`
|
||||
|
|
||||
| **Read before updating**:
|
||||
| 1. Bot owners can no longer restrict access to some commands in Permissions cog using global permissions rules. Look at `Permissions changelog <important-339-2>` for full details.
|
||||
| 2. There's been a change in behavior of warning messages. Look at `Warnings changelog <important-339-1>` for full details.
|
||||
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Security
|
||||
********
|
||||
|
||||
**NOTE**: If you can't update immediately, we recommend disabling the affected command until you can.
|
||||
|
||||
- **Mod** - ``[p]tempban`` now properly respects Discord's hierarchy rules (:issue:`3957`)
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- ``[p]info`` command can now be used when bot doesn't have Embed Links permission (:issue:`3907`, :issue:`3102`)
|
||||
- Fixed ungraceful error that happened in ``[p]set custominfo`` when provided text was too long (:issue:`3923`)
|
||||
- Red's start up message now shows storage type (:issue:`3935`)
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Audio now properly ignores streams when max length is enabled (:issue:`3878`, :issue:`3877`)
|
||||
- Commands that should work in DMs no longer error (:issue:`3880`)
|
||||
|
||||
Filter
|
||||
******
|
||||
|
||||
- Fixed behavior of detecting quotes in commands for adding/removing filtered words (:issue:`3925`)
|
||||
|
||||
.. _important-339-2:
|
||||
|
||||
Permissions
|
||||
***********
|
||||
|
||||
- **Both global and server rules** can no longer prevent guild owners from accessing commands for changing server rules. Bot owners can still use ``[p]command disable`` if they wish to completely disable any command in Permissions cog (:issue:`3955`, :issue:`3107`)
|
||||
|
||||
Full list of affected commands:
|
||||
|
||||
- ``[p]permissions acl getserver``
|
||||
- ``[p]permissions acl setserver``
|
||||
- ``[p]permissions acl updateserver``
|
||||
- ``[p]permissions addserverrule``
|
||||
- ``[p]permissions removeserverrule``
|
||||
- ``[p]permissions setdefaultserverrule``
|
||||
- ``[p]permissions clearserverrules``
|
||||
- ``[p]permissions canrun``
|
||||
- ``[p]permissions explain``
|
||||
|
||||
.. _important-339-1:
|
||||
|
||||
Warnings
|
||||
********
|
||||
|
||||
- Warnings sent to users don't show the moderator who warned the user by default now. Newly added ``[p]warningset showmoderators`` command can be used to switch this behaviour (:issue:`3781`)
|
||||
- Warn channel functionality has been fixed (:issue:`3781`)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Added `bot.set_prefixes() <RedBase.set_prefixes()>` method that allows developers to set global/server prefixes (:issue:`3890`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Added Oracle Cloud to free hosting section in :ref:`host-list` (:issue:`3916`)
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Added missing help message for Downloader, Reports and Streams cogs (:issue:`3892`)
|
||||
- **Core Bot** - cooldown in ``[p]contact`` no longer applies when it's used without any arguments (:issue:`3942`)
|
||||
- **Core Bot** - improved instructions on obtaining user ID in help of ``[p]dm`` command (:issue:`3946`)
|
||||
- **Alias** - ``[p]alias global`` group, ``[p]alias help``, and ``[p]alias show`` commands can now be used in DMs (:issue:`3941`, :issue:`3940`)
|
||||
- **Audio** - Typo fix (:issue:`3889`, :issue:`3900`)
|
||||
- **Audio** - Fixed ``[p]audioset autoplay`` being available in DMs (:issue:`3899`)
|
||||
- **Bank** - ``[p]bankset`` now displays bank's scope (:issue:`3954`)
|
||||
- **Mod** - Preemptive fix for d.py 1.4 (:issue:`3891`)
|
||||
|
||||
|
||||
Redbot 3.3.8 (2020-05-29)
|
||||
==================================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`Bakersbakebread`, :ghuser:`DariusStClair`, :ghuser:`Dav-Git`, :ghuser:`Drapersniper`, :ghuser:`Flame442`, :ghuser:`jack1142`, :ghuser:`mikeshardmind`, :ghuser:`NeuroAssassin`, :ghuser:`PredaaA`, :ghuser:`Predeactor`, :ghuser:`qaisjp`, :ghuser:`Tobotimus`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Important fixes to how PostgreSQL data backend saves data in bulks (:issue:`3829`)
|
||||
- Fixed ``[p]localwhitelist`` and ``[p]localblacklist`` commands (:issue:`3857`)
|
||||
- Red now includes information on how to update when sending information about being out of date (:issue:`3744`)
|
||||
- Using backslashes in bot's username/nickname no longer causes issues (:issue:`3826`, :issue:`3825`)
|
||||
|
||||
Admin
|
||||
*****
|
||||
|
||||
- Fixed server lock (:issue:`3815`, :issue:`3814`)
|
||||
|
||||
Alias
|
||||
*****
|
||||
|
||||
- Added pagination to ``[p]alias list`` and ``[p]alias global list`` to avoid errors for users with a lot of aliases (:issue:`3844`, :issue:`3834`)
|
||||
- ``[p]alias help`` should now work more reliably (:issue:`3864`)
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Twitch playback is functional once again (:issue:`3873`)
|
||||
- Recent errors with YouTube playback should be resolved (:issue:`3873`)
|
||||
- Added new option (settable with ``[p]audioset lyrics``) that makes Audio cog prefer (prioritize) tracks with lyrics (:issue:`3519`)
|
||||
- Added global daily (historical) queues (:issue:`3518`)
|
||||
- Added ``[p]audioset countrycode`` that allows to set the country code for spotify searches (:issue:`3528`)
|
||||
- Fixed ``[p]local search`` (:issue:`3528`, :issue:`3501`)
|
||||
- Local folders with special characters should work properly now (:issue:`3528`, :issue:`3467`)
|
||||
- Audio no longer fails to take the last spot in the voice channel with user limit (:issue:`3528`)
|
||||
- ``[p]local play`` no longer enqueues tracks from nested folders (:issue:`3528`)
|
||||
- Fixed ``[p]playlist dedupe`` not removing tracks (:issue:`3518`)
|
||||
- ``[p]disconnect`` now allows to disconnect if both DJ mode and voteskip aren't enabled (:issue:`3502`, :issue:`3485`)
|
||||
- Many UX improvements and fixes, including, among other things:
|
||||
|
||||
- Creating playlists without explicitly passing ``-scope`` no longer causes errors (:issue:`3500`)
|
||||
- ``[p]playlist list`` now shows all accessible playlists if ``--scope`` flag isn't used (:issue:`3518`)
|
||||
- ``[p]remove`` now also accepts a track URL in addition to queue index (:issue:`3201`)
|
||||
- ``[p]playlist upload`` now accepts a playlist file uploaded in the message with a command (:issue:`3251`)
|
||||
- Commands now send friendly error messages for common errors like lost Lavalink connection or bot not connected to voice channel (:issue:`3503`, :issue:`3528`, :issue:`3353`, :issue:`3712`)
|
||||
|
||||
CustomCommands
|
||||
**************
|
||||
|
||||
- ``[p]customcom create`` no longer allows spaces in custom command names (:issue:`3816`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- ``[p]userinfo`` now shows default avatar when no avatar is set (:issue:`3819`)
|
||||
|
||||
Modlog
|
||||
******
|
||||
|
||||
- Fixed (again) ``AttributeError`` for cases whose moderator doesn't share the server with the bot (:issue:`3805`, :issue:`3784`, :issue:`3778`)
|
||||
|
||||
Permissions
|
||||
***********
|
||||
|
||||
- Commands for settings ACL using yaml files now properly works on PostgreSQL data backend (:issue:`3829`, :issue:`3796`)
|
||||
|
||||
Warnings
|
||||
********
|
||||
|
||||
- Warnings cog no longer allows to warn bot users (:issue:`3855`, :issue:`3854`)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
| **Important:**
|
||||
| If you're using RPC, please see the full annoucement about current state of RPC in main Red server
|
||||
`by clicking here <https://discord.com/channels/133049272517001216/411381123101491200/714560168465137694>`_.
|
||||
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Red now inherits from `discord.ext.commands.AutoShardedBot` for better compatibility with code expecting d.py bot (:issue:`3822`)
|
||||
- Libraries using ``pkg_resources`` (like ``humanize`` or ``google-api-python-client``) that were installed through Downloader should now work properly (:issue:`3843`)
|
||||
- All bot owner IDs can now be found under ``bot.owner_ids`` attribute (:issue:`3793`)
|
||||
|
||||
- Note: If you want to use this on bot startup (e.g. in cog's initialisation), you need to await ``bot.wait_until_red_ready()`` first
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Added information about provisional status of RPC (:issue:`3862`)
|
||||
- Revised install instructions (:issue:`3847`)
|
||||
- Improved navigation in `document about updating Red <update_red>` (:issue:`3856`, :issue:`3849`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Few clarifications and typo fixes in few command help docstrings (:issue:`3817`, :issue:`3823`, :issue:`3837`, :issue:`3851`, :issue:`3861`)
|
||||
- **Downloader** - Downloader no longer removes the repo when it fails to load it (:issue:`3867`)
|
||||
|
||||
|
||||
Redbot 3.3.7 (2020-04-28)
|
||||
=========================
|
||||
|
||||
This is a hotfix release fixing issue with generating messages for new cases in Modlog.
|
||||
|
||||
|
||||
Redbot 3.3.6 (2020-04-27)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`Drapersniper`, :ghuser:`jack1142`, :ghuser:`Kowlin`, :ghuser:`MiniJennJenn`, :ghuser:`NeuroAssassin`, :ghuser:`PredaaA`, :ghuser:`TrustyJAID`, :ghuser:`yamikaitou`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Converting from and to Postgres driver with ``redbot-setup convert`` have been fixed (:issue:`3714`, :issue:`3115`)
|
||||
- Fixed big delays in commands that happened when the bot was owner-less (or if it only used co-owners feature) and command caller wasn't the owner (:issue:`3782`)
|
||||
- Various optimizations
|
||||
|
||||
- Reduced calls to data backend when loading bot's commands (:issue:`3764`)
|
||||
- Reduced calls to data backend when showing help for cogs/commands (:issue:`3766`)
|
||||
- Improved performance for bots with big amount of guilds (:issue:`3767`)
|
||||
- Mod cog no longer fetches guild's bans every 60 seconds when handling unbanning for tempbans (:issue:`3783`)
|
||||
- Reduced the bot load for messages starting with a prefix when fuzzy search is disabled (:issue:`3718`)
|
||||
- Aliases in Alias cog are now cached for better performance (:issue:`3788`)
|
||||
|
||||
Core Commands
|
||||
*************
|
||||
|
||||
- ``[p]set avatar`` now supports setting avatar using attachment (:issue:`3747`)
|
||||
- Added ``[p]set avatar remove`` subcommand for removing bot's avatar (:issue:`3757`)
|
||||
- Fixed list of ignored channels that is shown in ``[p]ignore``/``[p]unignore`` (:issue:`3746`)
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Age-restricted tracks, live streams, and mix playlists from YouTube should work in Audio again (:issue:`3791`)
|
||||
- Soundcloud's sets and playlists with more than 50 tracks should work in Audio again (:issue:`3791`)
|
||||
|
||||
CustomCommands
|
||||
**************
|
||||
|
||||
- Added ``[p]cc raw`` command that gives you the raw response of a custom command for ease of copy pasting (:issue:`3795`)
|
||||
|
||||
Modlog
|
||||
******
|
||||
|
||||
- Fixed ``AttributeError`` for cases whose moderator doesn't share the server with the bot (:issue:`3784`, :issue:`3778`)
|
||||
|
||||
Streams
|
||||
*******
|
||||
|
||||
- Fixed incorrect stream URLs for Twitch channels that have localised display name (:issue:`3773`, :issue:`3772`)
|
||||
|
||||
Trivia
|
||||
******
|
||||
|
||||
- Fixed the error in ``[p]trivia stop`` that happened when there was no ongoing trivia session in the channel (:issue:`3774`)
|
||||
|
||||
Trivia Lists
|
||||
************
|
||||
|
||||
- Updated ``leagueoflegends`` list with new changes to League of Legends (`b8ac70e <https://github.com/Cog-Creators/Red-DiscordBot/commit/b8ac70e59aa1328f246784f14f992d6ffe00d778>`_)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Utility Functions
|
||||
*****************
|
||||
|
||||
- Added `redbot.core.utils.AsyncIter` utility class which allows you to wrap regular iterable into async iterator yielding items and sleeping for ``delay`` seconds every ``steps`` items (:issue:`3767`, :issue:`3776`)
|
||||
- `bold()`, `italics()`, `strikethrough()`, and `underline()` now accept ``escape_formatting`` argument that can be used to disable escaping of markdown formatting in passed text (:issue:`3742`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Added `document about updating Red <update_red>` (:issue:`3790`)
|
||||
- ``pyenv`` instructions will now update ``pyenv`` if it's already installed (:issue:`3740`)
|
||||
- Updated Python version in ``pyenv`` instructions (:issue:`3740`)
|
||||
- Updated install docs to include Ubuntu 20.04 (:issue:`3792`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- **Config** - JSON driver will now properly have only one lock per cog name (:issue:`3780`)
|
||||
- **Core Commands** - ``[p]debuginfo`` now shows used storage type (:issue:`3794`)
|
||||
- **Trivia** - Corrected spelling of Compact Disc in ``games`` list (:issue:`3759`, :issue:`3758`)
|
||||
|
||||
|
||||
Redbot 3.3.5 (2020-04-09)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`jack1142`, :ghuser:`Kowlin`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- "Outdated" field no longer shows in ``[p]info`` when Red is up-to-date (:issue:`3730`)
|
||||
|
||||
Alias
|
||||
*****
|
||||
|
||||
- Fixed regression in ``[p]alias add`` that caused it to reject commands containing arguments (:issue:`3734`)
|
||||
|
||||
|
||||
Redbot 3.3.4 (2020-04-05)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`jack1142`, :ghuser:`kennnyshiwa`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Fixed checks related to bank's global state that were used in commands in Bank, Economy and Trivia cogs (:issue:`3707`)
|
||||
|
||||
Alias
|
||||
*****
|
||||
|
||||
- ``[p]alias add`` now sends an error when command user tries to alias doesn't exist (:issue:`3710`, :issue:`3545`)
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Bump dependencies, including update to discord.py 1.3.3 (:issue:`3723`)
|
||||
|
||||
Utility Functions
|
||||
*****************
|
||||
|
||||
- `redbot.core.utils.common_filters.filter_invites` now filters ``discord.io/discord.li`` invites links (:issue:`3717`)
|
||||
- Fixed false-positives in `redbot.core.utils.common_filters.filter_invites` (:issue:`3717`)
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Versions of pre-requirements are now included in Windows install guide (:issue:`3708`)
|
||||
|
||||
|
||||
Redbot 3.3.3 (2020-03-28)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`AnonGuy`, :ghuser:`Dav-Git`, :ghuser:`FancyJesse`, :ghuser:`Ianardo-DiCaprio`, :ghuser:`jack1142`, :ghuser:`kennnyshiwa`, :ghuser:`Kowlin`, :ghuser:`NeuroAssassin`, :ghuser:`PredaaA`, :ghuser:`Stonedestroyer`, :ghuser:`TrustyJAID`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Delete delay for command messages has been moved from Mod cog to Core (:issue:`3638`, :issue:`3636`)
|
||||
- Fixed various bugs with blacklist and whitelist (:issue:`3643`, :issue:`3642`)
|
||||
- Added ``[p]set regionalformat`` command that allows users to set regional formatting that is different from bot's locale (:issue:`3677`, :issue:`3588`)
|
||||
- ``[p]set locale`` allows any valid locale now, not just locales for which Red has translations (:issue:`3676`, :issue:`3596`)
|
||||
- Permissions for commands in Bank, Economy and Trivia cogs can now be overridden by Permissions cog (:issue:`3672`, :issue:`3233`)
|
||||
- Outages of ``pypi.org`` no longer prevent the bot from starting (:issue:`3663`)
|
||||
- Fixed formatting of help strings in fuzzy search results (:issue:`3673`, :issue:`3507`)
|
||||
- Fixed few deprecation warnings related to menus and uvloop (:issue:`3644`, :issue:`3700`)
|
||||
|
||||
Core Commands
|
||||
*************
|
||||
|
||||
- ``[p]set game`` no longer errors when trying to clear the status (:issue:`3630`, :issue:`3628`)
|
||||
- All owner notifcations in Core now use proper prefixes in messages (:issue:`3632`)
|
||||
- Added ``[p]set playing`` and ``[p]set streaming`` aliases for respectively ``[p]set game`` and ``[p]set stream`` (:issue:`3646`, :issue:`3590`)
|
||||
|
||||
ModLog
|
||||
******
|
||||
|
||||
- Modlog's cases now keep last known username to prevent losing that information from case's message on edit (:issue:`3674`, :issue:`3443`)
|
||||
|
||||
CustomCom
|
||||
*********
|
||||
|
||||
- Added ``[p]cc search`` command that allows users to search through created custom commands (:issue:`2573`)
|
||||
|
||||
Cleanup
|
||||
*******
|
||||
|
||||
- Added ``[p]cleanup spam`` command that deletes duplicate messages from the last X messages and keeps only one copy (:issue:`3688`)
|
||||
- Removed regex support in ``[p]cleanup self`` (:issue:`3704`)
|
||||
|
||||
Downloader
|
||||
**********
|
||||
|
||||
- ``[p]cog checkforupdates`` now includes information about cogs that can't be installed due to Red/Python version requirements (:issue:`3678`, :issue:`3448`)
|
||||
|
||||
General
|
||||
*******
|
||||
|
||||
- Added more detailed mode to ``[p]serverinfo`` command that can be accessed with ``[p]serverinfo 1`` (:issue:`2382`, :issue:`3659`)
|
||||
|
||||
Image
|
||||
*****
|
||||
|
||||
- Users can now specify how many images should be returned in ``[p]imgur search`` and ``[p]imgur subreddit`` using ``[count]`` argument (:issue:`3667`, :issue:`3044`)
|
||||
- ``[p]imgur search`` and ``[p]imgur subreddit`` now return one image by default (:issue:`3667`, :issue:`3044`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- ``[p]userinfo`` now shows user's activities (:issue:`3669`)
|
||||
- ``[p]userinfo`` now shows status icon near the username (:issue:`3669`)
|
||||
- Muting no longer fails if user leaves while applying overwrite (:issue:`3627`)
|
||||
- Fixed error that happened when Mod cog was loaded for the first time during bot startup (:issue:`3632`, :issue:`3626`)
|
||||
|
||||
Permissions
|
||||
***********
|
||||
|
||||
- Commands for setting default rules now error when user tries to deny access to command designated as being always available (:issue:`3504`, :issue:`3465`)
|
||||
|
||||
Streams
|
||||
*******
|
||||
|
||||
- Fixed an error that happened when no game was set on Twitch stream (:issue:`3631`)
|
||||
- Preview picture for YouTube stream alerts is now bigger (:issue:`3689`, :issue:`3685`)
|
||||
- YouTube channels with a livestream that doesn't have any current viewer are now properly showing as streaming (:issue:`3690`)
|
||||
- Failures in Twitch API authentication are now logged (:issue:`3657`)
|
||||
|
||||
Trivia
|
||||
******
|
||||
|
||||
- Added ``[p]triviaset custom upload/delete/list`` commands for managing custom trivia lists from Discord (:issue:`3420`, :issue:`3307`)
|
||||
- Trivia sessions no longer error on payout when winner's balance would exceed max balance (:issue:`3666`, :issue:`3584`)
|
||||
|
||||
Warnings
|
||||
********
|
||||
|
||||
- Sending warnings to warned user can now be disabled with ``[p]warnset toggledm`` command (:issue:`2929`, :issue:`2800`)
|
||||
- Added ``[p]warnset warnchannel`` command that allows to set a channel where warnings should be sent to instead of the channel command was called in (:issue:`2929`, :issue:`2800`)
|
||||
- Added ``[p]warnset togglechannel`` command that allows to disable sending warn message in guild channel (:issue:`2929`, :issue:`2800`)
|
||||
- ``[p]warn`` now tells the moderator when bot wasn't able to send the warning to the user (:issue:`3653`, :issue:`3633`)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Deprecation warnings issued by Red now use correct stack level so that the cog developers can find the cause of them (:issue:`3644`)
|
||||
|
||||
Dev Cog
|
||||
*******
|
||||
|
||||
- Add ``__name__`` to environment's globals (:issue:`3649`, :issue:`3648`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Fixed install instructions for Mac in `install_linux_mac` (:issue:`3675`, :issue:`3436`)
|
||||
- Windows install instructions now use ``choco upgrade`` commands instead of ``choco install`` to ensure up-to-date packages (:issue:`3684`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- **Core Bot** - Command errors (i.e. command on cooldown, dm-only and guild-only commands, etc) can now be translated (:issue:`3665`, :issue:`2988`)
|
||||
- **Core Bot** - ``redbot-setup`` now prints link to Getting started guide at the end of the setup (:issue:`3027`)
|
||||
- **Core Bot** - Whitelist and blacklist commands now properly require passing at least one user (or role in case of local whitelist/blacklist) (:issue:`3652`, :issue:`3645`)
|
||||
- **Downloader** - Fix misleading error appearing when repo name is already taken in ``[p]repo add`` (:issue:`3695`)
|
||||
- **Downloader** - Improved error messages for unexpected errors in ``[p]repo add`` (:issue:`3656`)
|
||||
- **Downloader** - Prevent encoding errors from crashing ``[p]cog update`` (:issue:`3639`, :issue:`3637`)
|
||||
- **Trivia** - Non-finite numbers can no longer be passed to ``[p]triviaset timelimit``, ``[p]triviaset stopafter`` and ``[p]triviaset payout`` (:issue:`3668`, :issue:`3583`)
|
||||
- **Utility Functions** - `redbot.core.utils.menus.menu()` now checks permissions *before* trying to clear reactions (:issue:`3589`, :issue:`3145`)
|
||||
|
||||
|
||||
Redbot 3.3.2 (2020-02-28)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`aikaterna`, :ghuser:`chasehult`, :ghuser:`Dav-Git`, :ghuser:`DiscordLiz`, :ghuser:`Drapersniper`, :ghuser:`fixator10`, :ghuser:`Flame442`, :ghuser:`Hedlund01`, :ghuser:`jack1142`, :ghuser:`Kowlin`, :ghuser:`mikeshardmind`, :ghuser:`PredaaA`, :ghuser:`Stonedestroyer`, :ghuser:`trundleroo`, :ghuser:`TrustyJAID`, :ghuser:`zephyrkul`
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Ignored guilds/channels and whitelist/blacklist are now cached for performance (:issue:`3472`)
|
||||
- Ignored guilds/channels have been moved from Mod cog to Core (:issue:`3472`)
|
||||
- ``[p]ignore channel`` command can now also ignore channel categories (:issue:`3472`)
|
||||
|
||||
Core Commands
|
||||
*************
|
||||
|
||||
- Core cogs will now send bot mention prefix properly in places where discord doesn't render mentions (:issue:`3579`, :issue:`3591`, :issue:`3499`)
|
||||
- Fix a bug with ``[p]blacklist add`` that made it impossible to blacklist users that bot doesn't share a server with (:issue:`3472`, :issue:`3220`)
|
||||
- Improve user experience of ``[p]set game/listening/watching/`` commands (:issue:`3562`)
|
||||
- Add ``[p]licenceinfo`` alias for ``[p]licenseinfo`` command to conform with non-American English (:issue:`3460`)
|
||||
|
||||
Admin
|
||||
*****
|
||||
|
||||
- ``[p]announce`` will now only send error message if an actual errors occurs (:issue:`3514`, :issue:`3513`)
|
||||
|
||||
Alias
|
||||
*****
|
||||
|
||||
- ``[p]alias help`` will now properly work in non-English locales (:issue:`3546`)
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Users should be able to play age-restricted tracks from YouTube again (:issue:`3620`)
|
||||
|
||||
Economy
|
||||
*******
|
||||
|
||||
- Next payday time will now be adjusted for users when payday time is changed (:issue:`3496`, :issue:`3438`)
|
||||
|
||||
Downloader
|
||||
**********
|
||||
|
||||
- Downloader will no longer fail because of invalid ``info.json`` files (:issue:`3533`, :issue:`3456`)
|
||||
- Add better logging of errors when Downloader fails to add a repo (:issue:`3558`)
|
||||
|
||||
Image
|
||||
*****
|
||||
|
||||
- Fix load error for users that updated Red from version lower than 3.1 to version 3.2 or newer (:issue:`3617`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- ``[p]hackban`` and ``[p]unban`` commands support user mentions now (:issue:`3524`)
|
||||
- Ignored guilds/channels have been moved from Mod cog to Core (:issue:`3472`)
|
||||
|
||||
Streams
|
||||
*******
|
||||
|
||||
- Fix stream alerts for Twitch (:issue:`3487`)
|
||||
- Significantly reduce the quota usage for YouTube stream alerts (:issue:`3237`)
|
||||
- Add ``[p]streamset timer`` command which can be used to control how often the cog checks for live streams (:issue:`3237`)
|
||||
|
||||
Trivia
|
||||
******
|
||||
|
||||
- Add better handling for errors in trivia session (:issue:`3606`)
|
||||
|
||||
Trivia Lists
|
||||
************
|
||||
|
||||
- Remove empty answers in trivia lists (:issue:`3581`)
|
||||
|
||||
Warnings
|
||||
********
|
||||
|
||||
- Users can now pass a reason to ``[p]unwarn`` command (:issue:`3490`, :issue:`3093`)
|
||||
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Updated all our dependencies - we're using discord.py 1.3.2 now (:issue:`3609`)
|
||||
- Add traceback logging to task exception handling (:issue:`3517`)
|
||||
- Developers can now create a command from an async function wrapped in `functools.partial` (:issue:`3542`)
|
||||
- Bot will now show deprecation warnings in logs (:issue:`3527`, :issue:`3615`)
|
||||
- Subcommands of command group with ``invoke_without_command=True`` will again inherit this group's checks (:issue:`3614`)
|
||||
|
||||
Config
|
||||
******
|
||||
|
||||
- Fix Config's singletons (:issue:`3137`, :issue:`3136`)
|
||||
|
||||
Utility Functions
|
||||
*****************
|
||||
|
||||
- Add clearer error when page is of a wrong type in `redbot.core.utils.menus.menu()` (:issue:`3571`)
|
||||
|
||||
Dev Cog
|
||||
*******
|
||||
|
||||
- Allow for top-level `await`, `async for` and `async with` in ``[p]debug`` and ``[p]repl`` commands (:issue:`3508`)
|
||||
|
||||
Downloader
|
||||
**********
|
||||
|
||||
- Downloader will now replace ``[p]`` with clean prefix same as it does in help command (:issue:`3592`)
|
||||
- Add schema validation to ``info.json`` file processing - it should now be easier to notice any issues with those files (:issue:`3533`, :issue:`3442`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Add guidelines for Cog Creators in `guide_cog_creation` document (:issue:`3568`)
|
||||
- Restructure virtual environment instructions to improve user experience (:issue:`3495`, :issue:`3411`, :issue:`3412`)
|
||||
- Getting started guide now explain use of quotes for arguments with spaces (:issue:`3555`, :issue:`3111`)
|
||||
- ``latest`` version of docs now displays a warning about possible differences from current stable release (:issue:`3570`)
|
||||
- Make systemd guide clearer on obtaining username and python path (:issue:`3537`, :issue:`3462`)
|
||||
- Indicate instructions for different venv types in systemd guide better (:issue:`3538`)
|
||||
- Service file in `autostart_systemd` now also waits for network connection to be ready (:issue:`3549`)
|
||||
- Hide alias of ``randomize_colour`` in docs (:issue:`3491`)
|
||||
- Add separate headers for each event predicate class for better navigation (:issue:`3595`, :issue:`3164`)
|
||||
- Improve wording of explanation for ``required_cogs`` key in `guide_publish_cogs` (:issue:`3520`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Use more reliant way of checking if command is bot owner only in ``[p]warnaction`` (Warnings cog) (:issue:`3516`, :issue:`3515`)
|
||||
- Update PyPI domain in ``[p]info`` and update checker (:issue:`3607`)
|
||||
- Stop using deprecated code in core (:issue:`3610`)
|
||||
|
||||
|
||||
Redbot 3.3.1 (2020-02-05)
|
||||
=========================
|
||||
|
||||
|
||||
Core Bot
|
||||
--------
|
||||
|
||||
- Add a cli flag for setting a max size of message cache
|
||||
- Allow to edit prefix from command line using ``redbot --edit``.
|
||||
- Some functions have been changed to no longer use deprecated asyncio functions
|
||||
|
||||
Core Commands
|
||||
-------------
|
||||
|
||||
- The short help text for dm has been made more useful
|
||||
- dm no longer allows owners to have the bot attempt to DM itself
|
||||
|
||||
Utils
|
||||
-----
|
||||
|
||||
- Passing the event loop explicitly in utils is deprecated (Removal in 3.4)
|
||||
|
||||
Mod Cog
|
||||
-------
|
||||
|
||||
- Hackban now works properly without being provided a number of days
|
||||
|
||||
Documentation Changes
|
||||
---------------------
|
||||
|
||||
- Add ``-e`` flag to ``journalctl`` command in systemd guide so that it takes the user to the end of logs automatically.
|
||||
- Added section to install docs for CentOS 8
|
||||
- Improve usage of apt update in docs
|
||||
|
||||
Redbot 3.3.0 (2020-01-26)
|
||||
=========================
|
||||
|
||||
Core Bot
|
||||
--------
|
||||
|
||||
- The bot's description is now configurable.
|
||||
- We now use discord.py 1.3.1, this comes with added teams support.
|
||||
- The commands module has been slightly restructured to provide more useful data to developers.
|
||||
- Help is now self consistent in the extra formatting used.
|
||||
|
||||
Core Commands
|
||||
-------------
|
||||
|
||||
- Slowmode should no longer error on nonsensical time quantities.
|
||||
- Embed use can be configured per channel as well.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
- We've made some small fixes to inaccurate instructions about installing with pyenv.
|
||||
- Notes about deprecating in 3.3 have been altered to 3.4 to match the intended timeframe.
|
||||
|
||||
Admin
|
||||
-----
|
||||
|
||||
- Gives feedback when adding or removing a role doesn't make sense.
|
||||
|
||||
Audio
|
||||
-----
|
||||
|
||||
- Playlist finding is more intuitive.
|
||||
- disconnect and repeat commands no longer interfere with eachother.
|
||||
|
||||
CustomCom
|
||||
---------
|
||||
|
||||
- No longer errors when exiting an interactive menu.
|
||||
|
||||
Cleanup
|
||||
-------
|
||||
|
||||
- A rare edge case involving messages which are deleted during cleanup and are the only message was fixed.
|
||||
|
||||
Downloader
|
||||
----------
|
||||
|
||||
- Some user facing messages were improved.
|
||||
- Downloader's initialization can no longer time out at startup.
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
- Roll command will no longer attempt to roll obscenely large amounts.
|
||||
|
||||
Mod
|
||||
---
|
||||
|
||||
- You can set a default amount of days to clean up when banning.
|
||||
- Ban and hackban now use that default.
|
||||
- Users can now optionally be DMed their ban reason.
|
||||
|
||||
Permissions
|
||||
-----------
|
||||
|
||||
- Now has stronger enforcement of prioritizing botwide settings.
|
||||
@@ -1,373 +0,0 @@
|
||||
.. 3.4.x Changelogs
|
||||
|
||||
Redbot 3.4.1 (2020-10-27)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`absj30`, :ghuser:`aikaterna`, :ghuser:`bobloy`, :ghuser:`chloecormier`, :ghuser:`Dav-Git`, :ghuser:`Drapersniper`, :ghuser:`fixator10`, :ghuser:`Flame442`, :ghuser:`flaree`, :ghuser:`Generaleoley`, :ghuser:`hisztendahl`, :ghuser:`jack1142`, :ghuser:`KaiGucci`, :ghuser:`Kowlin`, :ghuser:`maxbooiii`, :ghuser:`MeatyChunks`, :ghuser:`NeuroAssassin`, :ghuser:`nfitzen`, :ghuser:`palmtree5`, :ghuser:`phenom4n4n`, :ghuser:`PredaaA`, :ghuser:`Predeactor`, :ghuser:`PythonTryHard`, :ghuser:`SharkyTheKing`, :ghuser:`Stonedestroyer`, :ghuser:`thisisjvgrace`, :ghuser:`TrustyJAID`, :ghuser:`TurnrDev`, :ghuser:`Vexed01`, :ghuser:`Vuks69`, :ghuser:`xBlynd`, :ghuser:`zephyrkul`
|
||||
|
||||
Read before updating
|
||||
--------------------
|
||||
|
||||
1. This release fixes a security issue in Mod cog. See `Security changelog below <important-341-2>` for more information.
|
||||
2. This Red update bumps discord.py to version 1.5.1, which explicitly requests Discord intents. Red requires all Prvileged Intents to be enabled. More information can be found at :ref:`enabling-privileged-intents`.
|
||||
3. Mutes functionality has been moved from the Mod cog to a new separate cog (Mutes) featuring timed and role-based mutes. If you were using it (or want to start now), you can load the new cog with ``[p]load mutes``. You can see the full `Mutes changelog below <important-341-1>`.
|
||||
4. 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 `application.yml file <https://github.com/Cog-Creators/Red-DiscordBot/blob/3.4.1/redbot/cogs/audio/data/application.yml>`_ and you should update your instance's ``application.yml`` appropriately.
|
||||
Please ensure that the WS port in Audio's settings (``[p]llset wsport``) is set to the port from the ``application.yml``.
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
.. _important-341-2:
|
||||
|
||||
Security
|
||||
********
|
||||
|
||||
**NOTE:** If you can't update immediately, we recommend globally disabling the affected command until you can.
|
||||
|
||||
- **Mod** - Fixed unauthorized privilege escalation exploit in ``[p]massban`` (also called ``[p]hackban``) command. Full security advisory `can be found on our GitHub <https://github.com/Cog-Creators/Red-DiscordBot/security/advisories/GHSA-mp9m-g7qj-6vqr>`_.
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Fixed an incorrect error being reported on ``[p]set name`` when the passed name was longer than 32 characters (:issue:`4364`, :issue:`4363`)
|
||||
- Fixed ``[p]set nickname`` erroring when the passed name was longer than 32 characters (:issue:`4364`, :issue:`4363`)
|
||||
- Fixed an ungraceful error being raised when running ``[p]traceback`` with closed DMs (:issue:`4329`)
|
||||
- Fixed errors that could arise from invalid URLs in ``[p]set avatar`` (:issue:`4437`)
|
||||
- Fixed an error being raised with ``[p]set nickname`` when no nickname was provided (:issue:`4451`)
|
||||
- Fixed and clarified errors being raised with ``[p]set username`` (:issue:`4463`)
|
||||
- Fixed an ungraceful error being raised when the output of ``[p]unload`` is larger than 2k characters (:issue:`4469`)
|
||||
- Fixed an ungraceful error being raised when running ``[p]choose`` with empty options (:issue:`4499`)
|
||||
- Fixed an ungraceful error being raised when a bot left a guild while a menu was open (:issue:`3902`)
|
||||
- Fixed info missing on the non-embed version of ``[p]debuginfo`` (:issue:`4524`)
|
||||
- Added ``[p]set api list`` to list all currently set API services, without tokens (:issue:`4370`)
|
||||
- Added ``[p]set api remove`` to remove API services, including tokens (:issue:`4370`)
|
||||
- Added ``[p]helpset usetick``, toggling command message being ticked when help is sent to DM (:issue:`4467`, :issue:`4075`)
|
||||
- Added a default color field to ``[p]set showsettings`` (:issue:`4498`, :issue:`4497`)
|
||||
- Added the datapath and metadata file to ``[p]debuginfo`` (:issue:`4524`)
|
||||
- Added a list of disabled intents to ``[p]debuginfo`` (:issue:`4423`)
|
||||
- Bumped discord.py dependency to version 1.5.1 (:issue:`4423`)
|
||||
- Locales and regional formats can now be set in individual guilds using ``[p]set locale`` and ``[p]set regionalformat`` (:issue:`3896`, :issue:`1970`)
|
||||
|
||||
- Global locale and regional format setters have been renamed to ``[p]set globallocale`` and ``[p]set globalregionalformat``
|
||||
|
||||
Audio
|
||||
*****
|
||||
|
||||
- Scattered grammar and typo fixes (:issue:`4446`)
|
||||
- Fixed Bandcamp playback (:issue:`4504`)
|
||||
- Fixed YouTube playlist playback (:issue:`4504`)
|
||||
- Fixed YouTube searching issues (:issue:`4504`)
|
||||
- Fixed YouTube age restricted track playback (:issue:`4504`)
|
||||
- Fixed the Audio cog not being translated when setting locale (:issue:`4492`, :issue:`4495`)
|
||||
- Fixed tracks getting stuck at 0:00 after long player sessions (:issue:`4529`)
|
||||
- Removed lavalink logs from being added to backup (:issue:`4453`, :issue:`4452`)
|
||||
- Removed stream durations from being in queue duration (:issue:`4513`)
|
||||
- Added the Global Audio API, to cut down on Youtube 429 errors and allow Spotify playback past user's quota. (:issue:`4446`)
|
||||
- Added persistent queues, allowing for queues to be restored on a bot restart or cog reload (:issue:`4446`)
|
||||
- Added ``[p]audioset restart``, allowing for Lavalink connection to be restarted (:issue:`4446`)
|
||||
- Added ``[p]audioset autodeafen``, allowing for bot to auto-deafen itself when entering voice channel (:issue:`4446`)
|
||||
- Added ``[p]audioset mycountrycode``, allowing Spotify search locale per user (:issue:`4446`)
|
||||
- Added ``[p]llsetup java``, allowing for a custom Java executable path (:issue:`4446`)
|
||||
- Added ``[p]llset info`` to show Lavalink settings (:issue:`4527`)
|
||||
- Added ``[p]audioset logs`` to download Lavalink logs if the Lavalink server is set to internal (:issue:`4527`)
|
||||
|
||||
Cleanup
|
||||
*******
|
||||
|
||||
- Allowed ``[p]cleanup self`` to work in DMs for all users (:issue:`4481`)
|
||||
|
||||
Custom Commands
|
||||
***************
|
||||
|
||||
- Fixed an ungraceful error being thrown on ``[p]cc edit`` (:issue:`4325`)
|
||||
|
||||
Dev
|
||||
***
|
||||
|
||||
- Added ``[p]repl pause`` to pause/resume the REPL session in the current channel (:issue:`4366`)
|
||||
|
||||
Economy
|
||||
*******
|
||||
|
||||
- Added an embed option for ``[p]leaderboard`` (:issue:`4184`, :issue:`4104`)
|
||||
|
||||
General
|
||||
*******
|
||||
|
||||
- Fixed issues with text not being properly URL encoded (:issue:`4024`)
|
||||
- Fixed an ungraceful error occurring when a title is longer than 256 characters in ``[p]urban`` (:issue:`4474`)
|
||||
- Changed "boosters" to "boosts" in ``[p]serverinfo`` to clarify what the number represents (:issue:`4507`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- Added ``[p]modset mentionspam strict`` allowing for duplicated mentions to count towards the mention spam cap (:issue:`4359`)
|
||||
- Added an option to ban users not in the guild to ``[p]ban`` (:issue:`4422`, :issue:`4419`)
|
||||
- Added a default tempban duration for ``[p]tempban`` (:issue:`4473`, :issue:`3992`)
|
||||
- Fixed nicknames not being properly stored and logged (:issue:`4131`)
|
||||
- Fixed plural typos in ``[p]userinfo`` (:issue:`4397`, :issue:`4379`)
|
||||
- Renamed ``[p]hackban`` to ``[p]massban``, keeping ``[p]hackban`` as an alias, allowing for multiple users to be banned at once (:issue:`4422`, :issue:`4419`)
|
||||
- Moved mutes to a separate, individual cog (:issue:`3634`)
|
||||
|
||||
.. _important-341-1:
|
||||
|
||||
Mutes
|
||||
*****
|
||||
|
||||
- Added ``[p]muteset forcerole`` to make mutes role based, instead of permission based (:issue:`3634`)
|
||||
- Added an optional time argument to all mutes, to specify when the user should be unmuted (:issue:`3634`)
|
||||
- Changed ``[p]mute`` to only handle serverwide muting, ``[p]mute voice`` and ``[p]mute channel`` have been moved to separate commands called ``[p]mutechannel`` and ``[p]mutevoice`` (:issue:`3634`)
|
||||
- Mute commands can now take multiple user arguments, to mute multiple users at a time (:issue:`3634`)
|
||||
|
||||
Modlog
|
||||
******
|
||||
|
||||
- Fixed an error being raised when running ``[p]casesfor`` and ``[p]case`` (:issue:`4415`)
|
||||
- Long reasons in Modlog are now properly shortened in message content (:issue:`4541`)
|
||||
|
||||
Trivia Lists
|
||||
************
|
||||
|
||||
- Fixed incorrect order of Machamp and Machoke questions (:issue:`4424`)
|
||||
- Added new MLB trivia list (:issue:`4455`)
|
||||
- Added new Who's That Pokémon - Gen. IV trivia list (:issue:`4434`)
|
||||
- Added new Hockey trivia list (:issue:`4384`)
|
||||
|
||||
Warnings
|
||||
********
|
||||
|
||||
- Fixed users being able to warn users above them in hierarchy (:issue:`4100`)
|
||||
- Added bool arguments to toggle commands to improve consistency (:issue:`4409`)
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
| **Important:**
|
||||
| 1. Red now allows users to set locale per guild, which requires 3rd-party cogs to set contextual locale manually in code ran outside of command's context. See the `Core Bot changelog below <important-dev-341-1>` for more information.
|
||||
|
||||
.. _important-dev-341-1:
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Added API for setting contextual locales (:issue:`3896`, :issue:`1970`)
|
||||
|
||||
- New function added: `redbot.core.i18n.set_contextual_locales_from_guild()`
|
||||
- Contextual locale is automatically set for commands and only needs to be done manually for things like event listeners; see `guidelines-for-cog-creators` for more information
|
||||
|
||||
- Added `bot.remove_shared_api_services() <RedBase.remove_shared_api_services()>` to remove all keys and tokens associated with an API service (:issue:`4370`)
|
||||
- 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`)
|
||||
- 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`)
|
||||
- Moved ``redbot.core.checks.bot_in_a_guild()`` to `redbot.core.commands.bot_in_a_guild()` (old name has been left as an alias) (:issue:`4515`, :issue:`4510`)
|
||||
|
||||
Bank
|
||||
****
|
||||
|
||||
- Bank API methods now consistently throw TypeError if a non-integer amount is supplied (:issue:`4376`)
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- Deprecated ``redbot.core.utils.mod.is_allowed_by_hierarchy`` (:issue:`4435`)
|
||||
|
||||
Modlog
|
||||
******
|
||||
|
||||
- Added an option to accept a ``discord.Object`` in case creation (:issue:`4326`)
|
||||
- Added ``last_known_username`` parameter to `modlog.create_case()` function (:issue:`4326`)
|
||||
- Fixed an error being raised with a deleted channel in `Case.message_content()` (:issue:`4415`)
|
||||
|
||||
Utility
|
||||
*******
|
||||
|
||||
- Added `redbot.core.utils.get_end_user_data_statement()` and `redbot.core.utils.get_end_user_data_statement_or_raise()` to attempt to fetch a cog's End User Data Statement (:issue:`4404`)
|
||||
- Added `redbot.core.utils.chat_formatting.quote()` to quote text in a message (:issue:`4425`)
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
Config
|
||||
******
|
||||
|
||||
- Added custom group documentation and tutorial (:issue:`4416`, :issue:`2896`)
|
||||
|
||||
Modlog
|
||||
******
|
||||
|
||||
- Clarified that naive ``datetime`` objects will be treated as local times for parameters ``created_at`` and ``until`` in `modlog.create_case()` (:issue:`4389`)
|
||||
|
||||
Other
|
||||
*****
|
||||
|
||||
- Added guide to creating a Bot Application in Discord Developer Portal, with enabling intents (:issue:`4502`)
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Added JSON schema files for ``info.json`` files (:issue:`4375`)
|
||||
- Added ``[all]`` and ``[dev]`` bundled install extras (:issue:`4443`)
|
||||
- Replaced the link to the approved repository list on CogBoard and references to ``cogs.red`` with a link to new Red Index (:issue:`4439`)
|
||||
- Improved documentation about arguments in command syntax (:issue:`4058`)
|
||||
- Replaced a few instances of Red with the bot name in command docstrings (:issue:`4470`)
|
||||
- Fixed grammar in places scattered throughout bot (:issue:`4500`)
|
||||
- Properly define supported Python versions to be lower than 3.9 (:issue:`4538`)
|
||||
|
||||
|
||||
Redbot 3.4.0 (2020-08-17)
|
||||
=========================
|
||||
|
||||
| Thanks to all these amazing people that contributed to this release:
|
||||
| :ghuser:`Dav-Git`, :ghuser:`DevilXD`, :ghuser:`douglas-cpp`, :ghuser:`Drapersniper`, :ghuser:`flaree`, :ghuser:`jack1142`, :ghuser:`kablekompany`, :ghuser:`Kowlin`, :ghuser:`maxbooiii`, :ghuser:`MeatyChunks`, :ghuser:`mikeshardmind`, :ghuser:`NeuroAssassin`, :ghuser:`PredaaA`, :ghuser:`Predeactor`, :ghuser:`retke`, :ghuser:`SharkyTheKing`, :ghuser:`thisisjvgrace`, :ghuser:`Tinonb`, :ghuser:`TrustyJAID`, :ghuser:`Twentysix26`, :ghuser:`Vexed01`, :ghuser:`zephyrkul`
|
||||
|
|
||||
| **Read before updating**:
|
||||
| 1. Red 3.4 comes with support for data deletion requests. Bot owners should read `red_core_data_statement` to ensure they know what information about their users is stored by the bot.
|
||||
| 2. Debian Stretch, Fedora 30 and lower, and OpenSUSE Leap 15.0 and lower are no longer supported as they have already reached end of life.
|
||||
| 3. There's been a change in behavior of ``[p]tempban``. Look at `Mod changelog <important-340-1>` for full details.
|
||||
| 4. There's been a change in behavior of announcements in Admin cog. Look at `Admin changelog <important-340-2>` for full details.
|
||||
| 5. Red 3.4 comes with breaking changes for cog developers. Look at `Developer changelog <important-340-3>` for full details.
|
||||
|
||||
End-user changelog
|
||||
------------------
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- Added per-guild cog disabling (:issue:`4043`, :issue:`3945`)
|
||||
|
||||
- Bot owners can set the default state for a cog using ``[p]command defaultdisablecog`` and ``[p]command defaultenablecog`` commands
|
||||
- Guild owners can enable/disable cogs for their guild using ``[p]command disablecog`` and ``[p]command enablecog`` commands
|
||||
- Cogs disabled in the guild can be listed with ``[p]command listdisabledcogs``
|
||||
|
||||
- Added support for data deletion requests; see `red_core_data_statement` for more information (:issue:`4045`)
|
||||
- Red now logs clearer error if it can't find package to load in any cog path during bot startup (:issue:`4079`)
|
||||
- ``[p]licenseinfo`` now has a 3 minute cooldown to prevent a single user from spamming channel by using it (:issue:`4110`)
|
||||
- Added ``[p]helpset showsettings`` command (:issue:`4013`, :issue:`4022`)
|
||||
- Updated Red's emoji usage to ensure consistent rendering accross different devices (:issue:`4106`, :issue:`4105`, :issue:`4127`)
|
||||
- Whitelist and blacklist are now called allowlist and blocklist. Old names have been left as aliases (:issue:`4138`)
|
||||
|
||||
.. _important-340-2:
|
||||
|
||||
Admin
|
||||
*****
|
||||
|
||||
- ``[p]announce`` will now only send announcements to guilds that have explicitly configured text channel to send announcements to using ``[p]announceset channel`` command (:issue:`4088`, :issue:`4089`)
|
||||
|
||||
Downloader
|
||||
**********
|
||||
|
||||
- ``[p]cog info`` command now shows end user data statement made by the cog creator (:issue:`4169`)
|
||||
- ``[p]cog update`` command will now notify the user if cog's end user data statement has changed since last update (:issue:`4169`)
|
||||
|
||||
.. _important-340-1:
|
||||
|
||||
Mod
|
||||
***
|
||||
|
||||
- ``[p]tempban`` now respects default days setting (``[p]modset defaultdays``) (:issue:`3993`)
|
||||
- Users can now set mention spam triggers which will warn or kick the user. See ``[p]modset mentionspam`` for more information (:issue:`3786`, :issue:`4038`)
|
||||
- ``[p]mute voice`` and ``[p]unmute voice`` now take action instantly if bot has Move Members permission (:issue:`4064`)
|
||||
- Added typing to ``[p](un)mute guild`` to indicate that mute is being processed (:issue:`4066`, :issue:`4172`)
|
||||
|
||||
ModLog
|
||||
******
|
||||
|
||||
- Added timestamp to text version of ``[p]casesfor`` and ``[p]case`` commands (:issue:`4118`, :issue:`4137`)
|
||||
|
||||
Streams
|
||||
*******
|
||||
|
||||
- Stream alerts will no longer make roles temporarily mentionable if bot has "Mention @everyone, @here, and All Roles" permission in the channel (:issue:`4182`)
|
||||
- Mixer service has been closed and for that reason we've removed support for it from the cog (:issue:`4072`)
|
||||
- Hitbox commands have been renamed to smashcast (:issue:`4161`)
|
||||
- Improve error messages for invalid channel names/IDs (:issue:`4147`, :issue:`4148`)
|
||||
|
||||
Trivia Lists
|
||||
************
|
||||
|
||||
- Added ``whosthatpokemon2`` trivia containing Pokémons from 2nd generation (:issue:`4102`)
|
||||
- Added ``whosthatpokemon3`` trivia containing Pokémons from 3rd generation (:issue:`4141`)
|
||||
|
||||
.. _important-340-3:
|
||||
|
||||
Developer changelog
|
||||
-------------------
|
||||
|
||||
| **Important:**
|
||||
| 1. Red now offers cog disabling API, which should be respected by 3rd-party cogs in guild-related actions happening outside of command's context. See the `Core Bot changelog below <important-dev-340-1>` for more information.
|
||||
| 2. Red now provides data request API, which should be supported by all 3rd-party cogs. See the changelog entries in the `Core Bot changelog below <important-dev-340-1>` for more information.
|
||||
|
||||
Breaking changes
|
||||
****************
|
||||
|
||||
- By default, none of the ``.send()`` methods mention roles or ``@everyone/@here`` (:issue:`3845`)
|
||||
|
||||
- see `discord.AllowedMentions` and ``allowed_mentions`` kwarg of ``.send()`` methods, if your cog requires to mention roles or ``@everyone/@here``
|
||||
|
||||
- `Context.maybe_send_embed()` now supresses all mentions, including user mentions (:issue:`4192`)
|
||||
- The default value of the ``filter`` keyword argument has been changed to ``None`` (:issue:`3845`)
|
||||
- Cog package names (i.e. name of the folder the cog is in and the name used when loading the cog) now have to be `valid Python identifiers <https://docs.python.org/3/reference/lexical_analysis.html#identifiers>`_ (:issue:`3605`, :issue:`3679`)
|
||||
- Method/attribute names starting with ``red_`` or being in the form of ``__red_*__`` are now reserved. See `version_guarantees` for more information (:issue:`4085`)
|
||||
- `humanize_list()` no longer raises `IndexError` for empty sequences (:issue:`2982`)
|
||||
- Removed things past deprecation time: (:issue:`4163`)
|
||||
|
||||
- ``redbot.core.commands.APIToken``
|
||||
- ``loop`` kwarg from `bounded_gather_iter()`, `bounded_gather()`, and `start_adding_reactions()`
|
||||
|
||||
.. _important-dev-340-1:
|
||||
|
||||
Core Bot
|
||||
********
|
||||
|
||||
- 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()>`
|
||||
- Cog disabling is automatically applied for commands and only needs to be done manually for things like event listeners; see `guidelines-for-cog-creators` for more information
|
||||
|
||||
- Added data request API (:issue:`4045`, :issue:`4169`)
|
||||
|
||||
- New special methods added to `commands.Cog`: `red_get_data_for_user()` (documented provisionally), `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 `guidelines-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
|
||||
|
||||
- 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`)
|
||||
- Added a provisional API for replacing the help formatter. See `documentation <framework-commands-help>` for more details (:issue:`4011`)
|
||||
- `bot.ignored_channel_or_guild() <RedBase.ignored_channel_or_guild()>` now accepts `discord.Message` objects (:issue:`4077`)
|
||||
- `commands.NoParseOptional <NoParseOptional>` is no longer provisional and is now fully supported part of API (:issue:`4142`)
|
||||
- Red no longer fails to run subcommands of a command group allowed or denied by permission hook (:issue:`3956`)
|
||||
- Autohelp in group commands is now sent *after* invoking the group, which allows before invoke hooks to prevent autohelp from getting triggered (:issue:`4129`)
|
||||
- RPC functionality no longer makes Red hang for a minute on shutdown (:issue:`4134`, :issue:`4143`)
|
||||
|
||||
Vendored packages
|
||||
*****************
|
||||
|
||||
- Updated ``discord.ext.menus`` vendor (:issue:`4167`)
|
||||
|
||||
Utility Functions
|
||||
*****************
|
||||
|
||||
- `humanize_list()` now accepts ``locale`` and ``style`` keyword arguments. See its documentation for more information (:issue:`2982`)
|
||||
- `humanize_list()` is now properly localized (:issue:`2906`, :issue:`2982`)
|
||||
- `humanize_list()` now accepts empty sequences (:issue:`2982`)
|
||||
|
||||
|
||||
Documentation changes
|
||||
---------------------
|
||||
|
||||
- Removed install instructions for Debian Stretch (:issue:`4099`)
|
||||
- Added admin user guide (:issue:`3081`)
|
||||
- Added alias user guide (:issue:`3084`)
|
||||
- Added bank user guide (:issue:`4149`)
|
||||
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
- Updated features list in ``[p]serverinfo`` with the latest changes from Discord (:issue:`4116`)
|
||||
- Simple version of ``[p]serverinfo`` now shows info about more detailed ``[p]serverinfo 1`` (:issue:`4121`)
|
||||
- ``[p]set nickname``, ``[p]set serverprefix``, ``[p]streamalert``, and ``[p]streamset`` commands now can be run by users with permissions related to the actions they're making (:issue:`4109`)
|
||||
- `bordered()` now uses ``+`` for corners if keyword argument ``ascii_border`` is set to `True` (:issue:`4097`)
|
||||
- Fixed timestamp storage in few places in Red (:issue:`4017`)
|
||||
@@ -1,4 +1,5 @@
|
||||
.. CustomCommands Cog Reference
|
||||
.. _cog_customcom:
|
||||
|
||||
============================
|
||||
CustomCommands Cog Reference
|
||||
@@ -18,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
|
||||
@@ -26,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.
|
||||
|
||||
@@ -80,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
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ It can add or remove a role to a member, edit one or make some available
|
||||
for members so they can self-assign them as they wish.
|
||||
|
||||
It also provides tools for the bot owner such as server locking (once enabled,
|
||||
the bot will instantly leave new servers she joins) and announcements, which
|
||||
will send something in all the servers of the bot.
|
||||
the bot will instantly leave new servers it joins) and announcements, which
|
||||
can send something in all the servers of the bot.
|
||||
|
||||
.. _admin-commands:
|
||||
|
||||
@@ -46,13 +46,16 @@ selfrole
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]selfrole
|
||||
[p]selfrole <selfrole>
|
||||
|
||||
**Description**
|
||||
|
||||
Add or remove roles to yourself. Those roles must have been configured as user
|
||||
settable by admins using the :ref:`selfroleset command
|
||||
<admin-command-selfroleset>`.
|
||||
Add or remove a role from yourself. It must have been configured as user settable
|
||||
by admins using the :ref:`selfroleset command <admin-command-selfroleset>`.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<selfrole>``: The role you want to attribute or remove from yourself. |role-input|
|
||||
|
||||
.. _admin-command-selfrole-add:
|
||||
|
||||
@@ -147,7 +150,7 @@ selfroleset add
|
||||
|
||||
**Description**
|
||||
|
||||
Add a role to the list of selfroles.
|
||||
Add a role, or a selection of roles, to the list of available selfroles.
|
||||
|
||||
.. warning:: Members will be able to assign themselves the role.
|
||||
Make sure it doesn't give extra perms or anything that can break
|
||||
@@ -157,6 +160,22 @@ Add a role to the list of selfroles.
|
||||
|
||||
* ``<role>``: The role to add to the list. |role-input|
|
||||
|
||||
.. _admin-command-selfroleset-clear:
|
||||
|
||||
"""""""""""""""""
|
||||
selfroleset clear
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]selfroleset clear
|
||||
|
||||
**Description**
|
||||
|
||||
Clear the list of available selfroles for this server.
|
||||
|
||||
.. _admin-command-selfroleset-remove:
|
||||
|
||||
""""""""""""""""""
|
||||
@@ -171,7 +190,7 @@ selfroleset remove
|
||||
|
||||
**Description**
|
||||
|
||||
Removes a role from the list of selfroles.
|
||||
Remove a role, or a selection of roles, from the list of available selfroles.
|
||||
|
||||
**Arguments**
|
||||
|
||||
@@ -229,7 +248,7 @@ as yourself, the command author.
|
||||
* ``<role>``: The role to remove. |role-input-quotes|
|
||||
|
||||
* ``[user]``: The member to remove the role from. |member-input| Defaults
|
||||
to the command author.
|
||||
to the command author.
|
||||
|
||||
.. _admin-command-editrole:
|
||||
|
||||
@@ -370,7 +389,7 @@ announceset channel
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]announceset channel [channel]
|
||||
[p]announceset channel <channel>
|
||||
|
||||
**Description**
|
||||
|
||||
@@ -378,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:
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ be replaced by the first argument of your alias:
|
||||
# this alias will execute the following command:
|
||||
[p]ban Slime#3160 7 Spam bot.
|
||||
|
||||
For a more detailed explaination, read :ref:`this <alias-command-alias-add>`.
|
||||
For a more detailed explanation, read :ref:`this <alias-command-alias-add>`.
|
||||
|
||||
.. _alias-commands:
|
||||
|
||||
|
||||
3766
docs/cog_guides/audio.rst
Normal file
@@ -1,186 +0,0 @@
|
||||
.. _bank:
|
||||
|
||||
====
|
||||
Bank
|
||||
====
|
||||
|
||||
This is the cog guide for the bank cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load bank
|
||||
|
||||
.. _bank-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog manages the bank. It won't be used often by
|
||||
users but this is what makes any interaction with the
|
||||
money possible.
|
||||
|
||||
You will be able to switch between a global and a server-
|
||||
wide bank and choose the bank/currency name.
|
||||
|
||||
.. _bank-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _bank-command-bankset:
|
||||
|
||||
^^^^^^^
|
||||
bankset
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for configuring bank settings.
|
||||
|
||||
.. _bank-command-bankset-toggleglobal:
|
||||
|
||||
""""""""""""""""""""
|
||||
bankset toggleglobal
|
||||
""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset toggleglobal [confirm=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Makes the bank global instead of server-wide. If it
|
||||
is already global, the command will switch it back
|
||||
to the server-wide bank.
|
||||
|
||||
.. warning:: Using this command will reset **all** accounts.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[confirm=False]``: Put ``yes`` to confirm.
|
||||
|
||||
.. _bank-command-bankset-creditsname:
|
||||
|
||||
"""""""""""""""""""
|
||||
bankset creditsname
|
||||
"""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock| However, if the bank is server-wide, the
|
||||
server owner or an administrator can use this command.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset creditsname <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Change the credits name of the bank. It is ``credits`` by default.
|
||||
|
||||
For example, if you switch it to ``dollars``, the payday
|
||||
command will show this:
|
||||
|
||||
.. TODO reference the payday command
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
Here, take some dollars. Enjoy! (+120 dollars!)
|
||||
|
||||
You currently have 220 dollars.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The new credits name.
|
||||
|
||||
.. _bank-command-bankset-bankname:
|
||||
|
||||
""""""""""""""""
|
||||
bankset bankname
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock| However, if the bank is server-wide, the
|
||||
server owner or an administrator can use this command.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset bankname <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Set bank's name.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The new bank's name.
|
||||
|
||||
.. _bank-command-bankset-maxbal:
|
||||
|
||||
""""""""""""""
|
||||
bankset maxbal
|
||||
""""""""""""""
|
||||
|
||||
.. note:: |owner-lock| However, if the bank is server-wide, the
|
||||
server owner or an administrator can use this command.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset maxbal <amount>
|
||||
|
||||
**Description**
|
||||
|
||||
Defines the maximum amount of money a user can have with the bot.
|
||||
|
||||
If an user reaches this limit, he will be unable to gain more money.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<amount>``: The maximum amount of money for users.
|
||||
|
||||
.. _bank-command-bankset-showsettings:
|
||||
|
||||
""""""""""""""""""""
|
||||
bankset showsettings
|
||||
""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock| However, if the bank is server-wide, the
|
||||
server owner or an administrator can use this command.
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bankset showsettings
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the current settings of your bank.
|
||||
|
||||
This will display the following information:
|
||||
|
||||
* Name of the bank
|
||||
* Scope of the bank (global or per server)
|
||||
* Currency name
|
||||
* Default balance
|
||||
* Maximum allowed balance
|
||||
333
docs/cog_guides/cleanup.rst
Normal file
@@ -0,0 +1,333 @@
|
||||
.. _cleanup:
|
||||
|
||||
=======
|
||||
Cleanup
|
||||
=======
|
||||
|
||||
This is the cog guide for the cleanup cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load cleanup
|
||||
|
||||
.. _cleanup-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog contains commands used for "cleaning up" (deleting) messages.
|
||||
|
||||
This is designed as a moderator tool and offers many convenient use cases.
|
||||
All cleanup commands only apply to the channel the command is executed in.
|
||||
|
||||
Messages older than two weeks cannot be mass deleted.
|
||||
This is a limitation of the API.
|
||||
|
||||
|
||||
.. _cleanup-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _cleanup-command-cleanup:
|
||||
|
||||
^^^^^^^
|
||||
cleanup
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for deleting messages.
|
||||
|
||||
.. _cleanup-command-cleanup-after:
|
||||
|
||||
"""""""""""""
|
||||
cleanup after
|
||||
"""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup after <message_id> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete all messages after a specified message.
|
||||
|
||||
To get a message id, enable developer mode in Discord's
|
||||
settings, 'appearance' tab. Then right click a message
|
||||
and copy its id.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<message_id>`` The id of the message to cleanup after. This message won't be deleted.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-before:
|
||||
|
||||
""""""""""""""
|
||||
cleanup before
|
||||
""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup before <message_id> <number> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Deletes X messages before the specified message.
|
||||
|
||||
To get a message id, enable developer mode in Discord's
|
||||
settings, 'appearance' tab. Then right click a message
|
||||
and copy its id.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<message_id>`` The id of the message to cleanup before. This message won't be deleted.
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-between:
|
||||
|
||||
"""""""""""""""
|
||||
cleanup between
|
||||
"""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup between <one> <two> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the messages between Message One and Message Two, providing the messages IDs.
|
||||
|
||||
The first message ID should be the older message and the second one the newer.
|
||||
|
||||
Example:
|
||||
- ``[p]cleanup between 123456789123456789 987654321987654321``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<one>`` The id of the message to cleanup after. This message won't be deleted.
|
||||
- ``<two>`` The id of the message to cleanup before. This message won't be deleted.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-bot:
|
||||
|
||||
"""""""""""
|
||||
cleanup bot
|
||||
"""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup bot <number> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Clean up command messages and messages from the bot in the current channel.
|
||||
|
||||
Can only cleanup custom commands and alias commands if those cogs are loaded.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-messages:
|
||||
|
||||
""""""""""""""""
|
||||
cleanup messages
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup messages <number> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the last X messages in the current channel.
|
||||
|
||||
Example:
|
||||
- ``[p]cleanup messages 26``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-self:
|
||||
|
||||
""""""""""""
|
||||
cleanup self
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup self <number> [match_pattern] [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Clean up messages owned by the bot in the current channel.
|
||||
|
||||
By default, all messages are cleaned. If a second argument is specified,
|
||||
it is used for pattern matching - only messages containing the given text will be deleted.
|
||||
|
||||
Examples:
|
||||
- ``[p]cleanup self 6``
|
||||
- ``[p]cleanup self 10 Pong``
|
||||
- ``[p]cleanup self 7 "" True``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<match_pattern>`` The text that messages must contain to be deleted. Use "" to skip this.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-spam:
|
||||
|
||||
""""""""""""
|
||||
cleanup spam
|
||||
""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup spam [number=50]
|
||||
|
||||
**Description**
|
||||
|
||||
Deletes duplicate messages in the channel from the last X messages and keeps only one copy.
|
||||
|
||||
Defaults to 50.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<number>`` The number of messages to check for duplicates. Must be a positive integer.
|
||||
|
||||
.. _cleanup-command-cleanup-text:
|
||||
|
||||
""""""""""""
|
||||
cleanup text
|
||||
""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup text <text> <number> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the last X messages matching the specified text in the current channel.
|
||||
|
||||
Example:
|
||||
- ``[p]cleanup text "test" 5``
|
||||
|
||||
Remember to use double quotes.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanup-user:
|
||||
|
||||
""""""""""""
|
||||
cleanup user
|
||||
""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanup user <user> <number> [delete_pinned=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the last X messages from a specified user in the current channel.
|
||||
|
||||
Examples:
|
||||
- ``[p]cleanup user @Twentysix 2``
|
||||
- ``[p]cleanup user Red 6``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<user>`` The user whose messages are to be cleaned up.
|
||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
||||
- ``<delete_pinned>`` Whether to delete pinned messages or not. Defaults to False
|
||||
|
||||
.. _cleanup-command-cleanupset:
|
||||
|
||||
^^^^^^^^^^
|
||||
cleanupset
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanupset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage the settings for the cleanup command.
|
||||
|
||||
.. _cleanup-command-cleanupset-notify:
|
||||
|
||||
"""""""""""""""""
|
||||
cleanupset notify
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cleanupset notify
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle clean up notification settings.
|
||||
|
||||
When enabled, a message will be sent per cleanup, showing how many messages were deleted.
|
||||
This message will be deleted after 5 seconds.
|
||||
251
docs/cog_guides/cog_manager_ui.rst
Normal file
@@ -0,0 +1,251 @@
|
||||
.. _cogmanagerui:
|
||||
|
||||
==============
|
||||
Cog Manager UI
|
||||
==============
|
||||
|
||||
This is the cog guide for the core cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: This cog is not like the other cogs. It is loaded by default, not
|
||||
included in the cogs paths and it cannot be unloaded. It contains needed
|
||||
commands for cog management.
|
||||
|
||||
.. _cogmanagerui-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog allows you to manage your cogs and where you can install them. Unlike
|
||||
V2, which had a ``cogs`` folder where everything was installed, you can
|
||||
install V3 cogs everywhere, and also make them cross-compatible with other
|
||||
instances!
|
||||
|
||||
If you want to install your cogs using a Github repo (usually what you will
|
||||
always be looking for), you need to use the downloader cog. However, if you
|
||||
have the files of a cog or want to code one, this cog is what you should be
|
||||
looking for.
|
||||
|
||||
The most basic command is :ref:`paths <cogmanagerui-command-paths>`, which
|
||||
will list you all of the currently set paths.
|
||||
|
||||
You can add a path by using the :ref:`addpath <cogmanagerui-command-addpath>`
|
||||
command. All cogs in that path will be available for the bot and listed in
|
||||
the :ref:`cogs <cogmanagerui-command-cogs>`. You can then load
|
||||
or unload them.
|
||||
|
||||
.. TODO add ref to load and unload commands
|
||||
|
||||
.. _cogmanagerui-usage-installation:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
How to install a local package without using downloader
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Let's suppose you made a cog request on the `cog board <https://cogboard.discord.red>`_
|
||||
and now you want to add your own cog to Red. You should have a folder that
|
||||
looks like this:
|
||||
|
||||
.. image:: ../.resources/cog_manager_ui/custom-cog-example.png
|
||||
|
||||
You will first need to add a cog path to your instance. For that, use the
|
||||
:ref:`addpath <cogmanagerui-command-addpath>` command with a new directory.
|
||||
|
||||
Create a folder somewhere (should stay accessible) and copy its path. A path
|
||||
looks like this:
|
||||
|
||||
* Windows: ``C:\Users\username\Documents\MyCogs``
|
||||
* macOS: ``/Users/username/Documents/MyCogs``
|
||||
* Linux: ``/home/username/Documents/MyCogs``
|
||||
|
||||
You can now use the command we talked about before: type ``[p]addpath
|
||||
<your_path>``.
|
||||
|
||||
.. attention:: A path shouldn't have spaces in it. If it does, add quotation
|
||||
marks around the path, or a backslash before the space.
|
||||
|
||||
In that ``MyCogs`` folder, you can drop your cog folder. You should now have
|
||||
something that looks like this:
|
||||
|
||||
.. image:: ../.resources/cog_manager_ui/cog-path.png
|
||||
|
||||
Now if you type ``[p]cogs``, your new cog should be listed, and you will be
|
||||
able to load it!
|
||||
|
||||
.. _cogmanagerui-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. note:: The whole cog is locked to the
|
||||
:ref:`bot owner <getting-started-permissions>`. If you are not the owner
|
||||
of the instance, you can ignore this.
|
||||
|
||||
.. _cogmanagerui-command-cogs:
|
||||
|
||||
^^^^
|
||||
cogs
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cogs
|
||||
|
||||
**Description**
|
||||
|
||||
Returns a list of loaded and unloaded cogs on the bot.
|
||||
|
||||
Cogs are unloaded by default. This is where you can find your cogs if you
|
||||
installed some recently.
|
||||
|
||||
All of the cogs located inside a cog path will be listed here. You can see a
|
||||
list of the paths with the :ref:`paths <cogmanagerui-command-paths>` command.
|
||||
|
||||
.. _cogmanagerui-command-paths:
|
||||
|
||||
^^^^^
|
||||
paths
|
||||
^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]paths
|
||||
|
||||
**Description**
|
||||
|
||||
Lists the registered cog paths, with the install path for the downloader and
|
||||
the core path for the core cogs.
|
||||
|
||||
.. TODO add ref to downloader
|
||||
|
||||
You can use the :ref:`reorderpath <cogmanagerui-command-reorderpath>` command
|
||||
to reorder the listed paths.
|
||||
|
||||
.. tip:: The number before a cog path can be used for the
|
||||
:ref:`removepath <cogmanagerui-command-removepath>` command.
|
||||
|
||||
.. _cogmanagerui-command-addpath:
|
||||
|
||||
^^^^^^^
|
||||
addpath
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]addpath <path>
|
||||
|
||||
**Description**
|
||||
|
||||
Adds a path to the list of available cog paths. This means that all valid cogs
|
||||
under the path will be added to the list of available cogs, listed in
|
||||
:ref:`cogs <cogmanagerui-command-cogs>`.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<path>``: A path that should look like this and point to a folder:
|
||||
|
||||
* Windows: ``C:\Users\username\Documents\MyCogs``
|
||||
* macOS: ``/Users/username/Documents/MyCogs``
|
||||
* Linux: ``/home/username/Documents/MyCogs``
|
||||
|
||||
Try to avoid paths with spaces. If there are spaces, add a backslash before
|
||||
the space on Linux. Add quotation marks around the path if needed.
|
||||
|
||||
.. _cogmanagerui-command-removepath:
|
||||
|
||||
^^^^^^^^^^
|
||||
removepath
|
||||
^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]removepath <path_numbers...>
|
||||
|
||||
**Description**
|
||||
|
||||
Removes one or more paths from the list of available paths. Its cogs won't be
|
||||
accessible anymore.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<path_numbers>``: The number of the path(s) to remove. You can get it with
|
||||
the :ref:`paths <cogmanagerui-command-paths>` command.
|
||||
|
||||
.. _cogmanagerui-command-reorderpath:
|
||||
|
||||
^^^^^^^^^^^
|
||||
reorderpath
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reorderpath <from> <to>
|
||||
|
||||
**Description**
|
||||
|
||||
Reorders the paths listed with the :ref:`paths <cogmanagerui-command-paths>`
|
||||
command. The goal of this command is to allow the discovery of different cogs.
|
||||
If there are multiple packages with the same names, the one that is inside the
|
||||
highest folder in the list will be kept and the other ones will be ignored.
|
||||
|
||||
For example, let's suppose this is the output of
|
||||
:ref:`paths <cogmanagerui-command-paths>`:
|
||||
|
||||
1. ``/usr/local/lib/python3.7/site-packages/redbot/cogs``
|
||||
2. ``/home/laggron/custom_cogs``
|
||||
3. ``/mnt/not_suspicious_usb_drive/not_suspicious_cogs``
|
||||
|
||||
The folders 2 and 3 both have a package named ``leveler`` while being different
|
||||
cogs, and you want to load the one located in the 3rd folder. To do that, you
|
||||
have to put the 3rd path higher than the 2nd path, let's swap them! Type
|
||||
``[p]reorderpath 2 3`` and the output of
|
||||
:ref:`paths <cogmanagerui-command-paths>` will then be the following:
|
||||
|
||||
1. ``/usr/local/lib/python3.7/site-packages/redbot/cogs``
|
||||
2. ``/mnt/not_suspicious_usb_drive/not_suspicious_cogs``
|
||||
3. ``/home/laggron/custom_cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<from>``: The index of the path you want to move.
|
||||
* ``<to>``: The location where you want to insert the path.
|
||||
|
||||
.. _cogmanagerui-command-installpath:
|
||||
|
||||
^^^^^^^^^^^
|
||||
installpath
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]installpath [path]
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the install path, or sets a new one.
|
||||
|
||||
If you want to set a new path, the same rules as for
|
||||
:ref:`addpath <cogmanagerui-command-addpath>` apply
|
||||
|
||||
.. warning:: If you edit the install path, the cogs won't be transferred.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[path]``: The absolute path to set. If omitted, the current path will
|
||||
be returned instead.
|
||||
4429
docs/cog_guides/core.rst
Normal file
294
docs/cog_guides/customcommands.rst
Normal file
@@ -0,0 +1,294 @@
|
||||
.. _customcommands:
|
||||
|
||||
==============
|
||||
CustomCommands
|
||||
==============
|
||||
|
||||
This is the cog guide for the customcommands cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load customcom
|
||||
|
||||
.. _customcommands-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog contains commands for creating and managing custom commands that display text.
|
||||
|
||||
These are useful for storing information members might need, like FAQ answers or invite links.
|
||||
Custom commands can be used by anyone by default, so be careful with pings.
|
||||
Commands can only be lowercase, and will not respond to any uppercase letters.
|
||||
|
||||
|
||||
.. _customcommands-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _customcommands-command-customcom:
|
||||
|
||||
^^^^^^^^^
|
||||
customcom
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom
|
||||
|
||||
.. tip:: Alias: ``cc``
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for Custom Commands management.
|
||||
|
||||
.. _customcommands-command-customcom-cooldown:
|
||||
|
||||
""""""""""""""""""
|
||||
customcom cooldown
|
||||
""""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom cooldown <command> [cooldown] [per=member]
|
||||
|
||||
**Description**
|
||||
|
||||
Set, edit, or view the cooldown for a custom command.
|
||||
|
||||
You may set cooldowns per member, thread/channel, or guild. Multiple
|
||||
cooldowns may be set. All cooldowns must be cooled to call the
|
||||
custom command.
|
||||
|
||||
Examples:
|
||||
- ``[p]customcom cooldown pingrole``
|
||||
- ``[p]customcom cooldown yourcommand 30``
|
||||
- ``[p]cc cooldown mycommand 30 guild``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The custom command to check or set the cooldown.
|
||||
- ``[cooldown]`` The number of seconds to wait before allowing the command to be invoked again. If omitted, will instead return the current cooldown settings.
|
||||
- ``[per]`` The group to apply the cooldown on. Defaults to per member. Valid choices are server / guild, user / member, and channel.
|
||||
|
||||
.. _customcommands-command-customcom-create:
|
||||
|
||||
""""""""""""""""
|
||||
customcom create
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom create <command> <text>
|
||||
|
||||
.. tip:: Alias: ``customcom add``
|
||||
|
||||
**Description**
|
||||
|
||||
Create custom commands.
|
||||
|
||||
If a type is not specified, a simple CC will be created.
|
||||
CCs can be enhanced with arguments, see the guide
|
||||
:ref:`here <cog_customcom>`.
|
||||
|
||||
.. _customcommands-command-customcom-create-random:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
customcom create random
|
||||
"""""""""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom create random <command>
|
||||
|
||||
**Description**
|
||||
|
||||
Create a CC where it will randomly choose a response!
|
||||
|
||||
Note: This command is interactive.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The command executed to return the text. Cast to lowercase.
|
||||
|
||||
.. _customcommands-command-customcom-create-simple:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
customcom create simple
|
||||
"""""""""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom create simple <command> <text>
|
||||
|
||||
**Description**
|
||||
|
||||
Add a simple custom command.
|
||||
|
||||
Example:
|
||||
- ``[p]customcom create simple yourcommand Text you want``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The command executed to return the text. Cast to lowercase.
|
||||
- ``<text>`` The text to return when executing the command. See guide for enhanced usage.
|
||||
|
||||
.. _customcommands-command-customcom-delete:
|
||||
|
||||
""""""""""""""""
|
||||
customcom delete
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom delete <command>
|
||||
|
||||
.. tip:: Aliases: ``customcom del``, ``customcom remove``
|
||||
|
||||
**Description**
|
||||
|
||||
Delete a custom command.
|
||||
|
||||
Example:
|
||||
- ``[p]customcom delete yourcommand``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The custom command to delete.
|
||||
|
||||
.. _customcommands-command-customcom-edit:
|
||||
|
||||
""""""""""""""
|
||||
customcom edit
|
||||
""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom edit <command> [text]
|
||||
|
||||
**Description**
|
||||
|
||||
Edit a custom command.
|
||||
|
||||
Example:
|
||||
- ``[p]customcom edit yourcommand Text you want``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The custom command to edit.
|
||||
- ``<text>`` The new text to return when executing the command.
|
||||
|
||||
.. _customcommands-command-customcom-list:
|
||||
|
||||
""""""""""""""
|
||||
customcom list
|
||||
""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom list
|
||||
|
||||
**Description**
|
||||
|
||||
List all available custom commands.
|
||||
|
||||
The list displays a preview of each command's response, with
|
||||
markdown escaped and newlines replaced with spaces.
|
||||
|
||||
.. _customcommands-command-customcom-raw:
|
||||
|
||||
"""""""""""""
|
||||
customcom raw
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom raw <command>
|
||||
|
||||
**Description**
|
||||
|
||||
Get the raw response of a custom command, to get the proper markdown.
|
||||
|
||||
This is helpful for copy and pasting.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command>`` The custom command to get the raw response of.
|
||||
|
||||
.. _customcommands-command-customcom-search:
|
||||
|
||||
""""""""""""""""
|
||||
customcom search
|
||||
""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom search <query>
|
||||
|
||||
**Description**
|
||||
|
||||
Searches through custom commands, according to the query.
|
||||
|
||||
Uses fuzzy searching to find close matches.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<query>`` The query to search for. Can be multiple words.
|
||||
|
||||
.. _customcommands-command-customcom-show:
|
||||
|
||||
""""""""""""""
|
||||
customcom show
|
||||
""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]customcom show <command_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Shows a custom command's responses and its settings.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<command_name>`` The custom command to show.
|
||||
254
docs/cog_guides/dev.rst
Normal file
@@ -0,0 +1,254 @@
|
||||
.. _dev:
|
||||
|
||||
===
|
||||
Dev
|
||||
===
|
||||
|
||||
This is the cog guide for the dev cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load dev
|
||||
|
||||
.. _dev-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Various development focused utilities. All commands in this cog are
|
||||
restricted to the bot owners.
|
||||
|
||||
.. note::
|
||||
|
||||
Unlike other cogs, the Dev cog is only loaded if the bot is
|
||||
started with the ``--dev`` flag.
|
||||
|
||||
.. warning::
|
||||
|
||||
It is not suggested that you run Dev in production. Many
|
||||
of these cog's commands may cause down-the-line complications if
|
||||
not used appropriately.
|
||||
|
||||
.. _dev-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _dev-command-bypasscooldowns:
|
||||
|
||||
^^^^^^^^^^^^^^^
|
||||
bypasscooldowns
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bypasscooldowns [toggle]
|
||||
|
||||
**Description**
|
||||
|
||||
Give bot owners the ability to bypass cooldowns. Note that this bypass
|
||||
does not persist through restarts/shutdowns.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[toggle]``: |bool-input| Otherwise, defaults to the inverse of the current setting.
|
||||
|
||||
.. _dev-command-debug:
|
||||
|
||||
^^^^^
|
||||
debug
|
||||
^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]debug <code>
|
||||
|
||||
**Description**
|
||||
|
||||
Evaluate a statement of python code.
|
||||
|
||||
The bot will always respond with the return value of the code.
|
||||
If the return value of the code is a coroutine, it will be awaited,
|
||||
and the result of that will be the bot's response.
|
||||
|
||||
Note: Only one statement may be evaluated. Using certain restricted
|
||||
keywords, e.g. yield, will result in a syntax error. For multiple
|
||||
lines or asynchronous code, see [p]repl or [p]eval.
|
||||
|
||||
**Environment Variables**
|
||||
|
||||
* ``ctx``: Command invocation context
|
||||
* ``bot``: The bot object
|
||||
* ``channel``: The current channel object
|
||||
* ``author``: The current author's member object
|
||||
* ``guild``: The current guild object
|
||||
* ``message``: The command's message object
|
||||
* ``aiohttp``: The aiohttp library
|
||||
* ``asyncio``: The asyncio library
|
||||
* ``discord``: The discord.py library
|
||||
* ``commands``: The redbot.core.commands module
|
||||
* ``cf``: The redbot.core.utils.chat_formatting module
|
||||
* ``_``: The result from the last dev command
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<code>``: The statement to run.
|
||||
|
||||
.. _dev-command-eval:
|
||||
|
||||
^^^^
|
||||
eval
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]eval <body>
|
||||
|
||||
**Description**
|
||||
|
||||
Execute asynchronous code.
|
||||
|
||||
This command wraps code into the body of an async function and then
|
||||
calls and awaits it. The bot will respond with anything printed to
|
||||
stdout, as well as the return value of the function.
|
||||
|
||||
The code can be within a codeblock, inline code or neither, as long
|
||||
as they are not mixed and they are formatted correctly.
|
||||
|
||||
**Environment Variables**
|
||||
|
||||
* ``ctx``: Command invocation context
|
||||
* ``bot``: The bot object
|
||||
* ``channel``: The current channel object
|
||||
* ``author``: The current author's member object
|
||||
* ``guild``: The current guild object
|
||||
* ``message``: The command's message object
|
||||
* ``aiohttp``: The aiohttp library
|
||||
* ``asyncio``: The asyncio library
|
||||
* ``discord``: The discord.py library
|
||||
* ``commands``: The redbot.core.commands module
|
||||
* ``cf``: The redbot.core.utils.chat_formatting module
|
||||
* ``_``: The result from the last dev command
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<body>``: The code to evaluate.
|
||||
|
||||
.. _dev-command-mock:
|
||||
|
||||
^^^^
|
||||
mock
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]mock <user> <command>
|
||||
|
||||
**Description**
|
||||
|
||||
Mock another user invoking a command. The prefix must not be entered.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<user>``: The user to mock. |user-input-quotes|
|
||||
* ``<command>``: The command to invoke.
|
||||
|
||||
.. _dev-command-mockmsg:
|
||||
|
||||
^^^^^^^
|
||||
mockmsg
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]mockmsg <user> <content>
|
||||
|
||||
**Description**
|
||||
|
||||
Dispatch a message event as if it were sent by a different user.
|
||||
|
||||
Current message is used as a base (including attachments, embeds, etc.),
|
||||
the content and author of the message are replaced with the given arguments.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<user>``: The member to mock. |user-input-quotes|
|
||||
* ``<content>``: The content used for the message.
|
||||
|
||||
.. note::
|
||||
|
||||
If ``content`` isn't passed, the message needs to contain embeds, attachments,
|
||||
or anything else that makes the message non-empty.
|
||||
|
||||
.. _dev-command-repl:
|
||||
|
||||
^^^^
|
||||
repl
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repl
|
||||
|
||||
**Description**
|
||||
|
||||
Open an interactive REPL.
|
||||
|
||||
The REPL will only recognise code as messages which start with a
|
||||
backtick. This includes codeblocks, and as such multiple lines can be
|
||||
evaluated.
|
||||
|
||||
Use ``exit()`` or ``quit`` to exit the REPL session, prefixed with
|
||||
a backtick so they may be interpreted.
|
||||
|
||||
**Environment Variables**
|
||||
|
||||
* ``ctx``: Command invocation context
|
||||
* ``bot``: The bot object
|
||||
* ``channel``: The current channel object
|
||||
* ``author``: The current author's member object
|
||||
* ``guild``: The current guild object
|
||||
* ``message``: The command's message object
|
||||
* ``aiohttp``: The aiohttp library
|
||||
* ``asyncio``: The asyncio library
|
||||
* ``discord``: The discord.py library
|
||||
* ``commands``: The redbot.core.commands module
|
||||
* ``cf``: The redbot.core.utils.chat_formatting module
|
||||
* ``_``: The result from the last dev command
|
||||
|
||||
.. _dev-command-repl-pause:
|
||||
|
||||
""""""""""
|
||||
repl pause
|
||||
""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repl pause [toggle]
|
||||
|
||||
**Description**
|
||||
|
||||
Pauses/resumes the REPL running in the current channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[toggle]``: |bool-input| Otherwise, defaults to the inverse of the current setting.
|
||||
538
docs/cog_guides/downloader.rst
Normal file
@@ -0,0 +1,538 @@
|
||||
.. _downloader:
|
||||
|
||||
==========
|
||||
Downloader
|
||||
==========
|
||||
|
||||
This is the cog guide for the downloader cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load downloader
|
||||
|
||||
.. _downloader-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Install community cogs made by Cog Creators.
|
||||
|
||||
Community cogs, also called third party cogs, are not included
|
||||
in the default Red install.
|
||||
|
||||
Community cogs come in repositories. Repos are a group of cogs
|
||||
you can install. You always need to add the creator's repository
|
||||
using the ``[p]repo`` command before you can install one or more
|
||||
cogs from the creator.
|
||||
|
||||
|
||||
.. _downloader-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _downloader-command-cog:
|
||||
|
||||
^^^
|
||||
cog
|
||||
^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for cog installation management commands.
|
||||
|
||||
.. _downloader-command-cog-checkforupdates:
|
||||
|
||||
"""""""""""""""""""
|
||||
cog checkforupdates
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog checkforupdates
|
||||
|
||||
**Description**
|
||||
|
||||
Check for available cog updates (including pinned cogs).
|
||||
|
||||
This command doesn't update cogs, it only checks for updates.
|
||||
Use ``[p]cog update`` to update cogs.
|
||||
|
||||
.. _downloader-command-cog-info:
|
||||
|
||||
""""""""
|
||||
cog info
|
||||
""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog info <repo> <cog>
|
||||
|
||||
**Description**
|
||||
|
||||
List information about a single cog.
|
||||
|
||||
Example:
|
||||
- ``[p]cog info 26-Cogs defender``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The repo to get cog info from.
|
||||
- ``<cog>`` The cog to get info on.
|
||||
|
||||
.. _downloader-command-cog-install:
|
||||
|
||||
"""""""""""
|
||||
cog install
|
||||
"""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog install <repo> <cogs...>
|
||||
|
||||
**Description**
|
||||
|
||||
Install a cog from the given repo.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog install 26-Cogs defender``
|
||||
- ``[p]cog install Laggrons-Dumb-Cogs say roleinvite``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The name of the repo to install cogs from.
|
||||
- ``<cogs...>`` The cog or cogs to install.
|
||||
|
||||
.. _downloader-command-cog-installversion:
|
||||
|
||||
""""""""""""""""""
|
||||
cog installversion
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog installversion <repo> <revision> <cogs...>
|
||||
|
||||
**Description**
|
||||
|
||||
Install a cog from the specified revision of given repo.
|
||||
|
||||
Revisions are "commit ids" that point to the point in the code when a specific change was made.
|
||||
The latest revision can be found in the URL bar for any GitHub repo by `pressing "y" on that repo <https://docs.github.com/en/free-pro-team@latest/github/managing-files-in-a-repository/getting-permanent-links-to-files#press-y-to-permalink-to-a-file-in-a-specific-commit>`_.
|
||||
|
||||
Older revisions can be found in the URL bar by `viewing the commit history of any repo <https://cdn.discordapp.com/attachments/133251234164375552/775760247787749406/unknown.png>`_
|
||||
|
||||
Example:
|
||||
- ``[p]cog installversion Broken-Repo e798cc268e199612b1316a3d1f193da0770c7016 cog_name``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The name of the repo to install cogs from.
|
||||
- ``<revision>`` The revision to install from.
|
||||
- ``<cogs...>`` The cog or cogs to install.
|
||||
|
||||
.. _downloader-command-cog-list:
|
||||
|
||||
""""""""
|
||||
cog list
|
||||
""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog list <repo>
|
||||
|
||||
**Description**
|
||||
|
||||
List all available cogs from a single repo.
|
||||
|
||||
Example:
|
||||
- ``[p]cog list 26-Cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The repo to list cogs from.
|
||||
|
||||
.. _downloader-command-cog-listpinned:
|
||||
|
||||
""""""""""""""
|
||||
cog listpinned
|
||||
""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog listpinned
|
||||
|
||||
**Description**
|
||||
|
||||
List currently pinned cogs.
|
||||
|
||||
.. _downloader-command-cog-pin:
|
||||
|
||||
"""""""
|
||||
cog pin
|
||||
"""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog pin <cogs...>
|
||||
|
||||
**Description**
|
||||
|
||||
Pin cogs - this will lock cogs on their current version.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog pin defender``
|
||||
- ``[p]cog pin outdated_cog1 outdated_cog2``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<cogs...>`` The cog or cogs to pin. Must already be installed.
|
||||
|
||||
.. _downloader-command-cog-uninstall:
|
||||
|
||||
"""""""""""""
|
||||
cog uninstall
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog uninstall <cogs...>
|
||||
|
||||
**Description**
|
||||
|
||||
Uninstall cogs.
|
||||
|
||||
You may only uninstall cogs which were previously installed
|
||||
by Downloader.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog uninstall defender``
|
||||
- ``[p]cog uninstall say roleinvite``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<cogs...>`` The cog or cogs to uninstall.
|
||||
|
||||
.. _downloader-command-cog-unpin:
|
||||
|
||||
"""""""""
|
||||
cog unpin
|
||||
"""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog unpin <cogs...>
|
||||
|
||||
**Description**
|
||||
|
||||
Unpin cogs - this will remove the update lock from those cogs.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog unpin defender``
|
||||
- ``[p]cog unpin updated_cog1 updated_cog2``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<cogs...>`` The cog or cogs to unpin. Must already be installed and pinned.
|
||||
|
||||
.. _downloader-command-cog-update:
|
||||
|
||||
""""""""""
|
||||
cog update
|
||||
""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog update [cogs...]
|
||||
|
||||
**Description**
|
||||
|
||||
Update all cogs, or ones of your choosing.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog update``
|
||||
- ``[p]cog update defender``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``[cogs...]`` The cog or cogs to update. If omitted, all cogs are updated.
|
||||
|
||||
.. _downloader-command-cog-updateallfromrepos:
|
||||
|
||||
""""""""""""""""""""""
|
||||
cog updateallfromrepos
|
||||
""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog updateallfromrepos <repos...>
|
||||
|
||||
**Description**
|
||||
|
||||
Update all cogs from repos of your choosing.
|
||||
|
||||
Examples:
|
||||
- ``[p]cog updateallfromrepos 26-Cogs``
|
||||
- ``[p]cog updateallfromrepos Laggrons-Dumb-Cogs 26-Cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repos...>`` The repo or repos to update all cogs from.
|
||||
|
||||
.. _downloader-command-cog-updatetoversion:
|
||||
|
||||
"""""""""""""""""""
|
||||
cog updatetoversion
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]cog updatetoversion <repo> <revision> [cogs...]
|
||||
|
||||
**Description**
|
||||
|
||||
Update all cogs, or ones of your choosing to chosen revision of one repo.
|
||||
|
||||
Note that update doesn't mean downgrade and therefore ``revision``
|
||||
has to be newer than the version that cog currently has installed. If you want to
|
||||
downgrade the cog, uninstall and install it again.
|
||||
|
||||
See ``[p]cog installversion`` for an explanation of ``revision``.
|
||||
|
||||
Example:
|
||||
- ``[p]cog updatetoversion Broken-Repo e798cc268e199612b1316a3d1f193da0770c7016 cog_name``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The repo or repos to update all cogs from.
|
||||
- ``<revision>`` The revision to update to.
|
||||
- ``[cogs...]`` The cog or cogs to update.
|
||||
|
||||
.. _downloader-command-findcog:
|
||||
|
||||
^^^^^^^
|
||||
findcog
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]findcog <command_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Find which cog a command comes from.
|
||||
|
||||
This will only work with loaded cogs.
|
||||
|
||||
Example:
|
||||
- ``[p]findcog ping``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<command_name>`` The command to search for.
|
||||
|
||||
.. _downloader-command-pipinstall:
|
||||
|
||||
^^^^^^^^^^
|
||||
pipinstall
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]pipinstall <deps...>
|
||||
|
||||
**Description**
|
||||
|
||||
Install a group of dependencies using pip.
|
||||
|
||||
Examples:
|
||||
- ``[p]pipinstall bs4``
|
||||
- ``[p]pipinstall py-cpuinfo psutil``
|
||||
|
||||
Improper usage of this command can break your bot, be careful.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<deps...>`` The package or packages you wish to install.
|
||||
|
||||
.. _downloader-command-repo:
|
||||
|
||||
^^^^
|
||||
repo
|
||||
^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo
|
||||
|
||||
**Description**
|
||||
|
||||
Base command for repository management.
|
||||
|
||||
.. _downloader-command-repo-add:
|
||||
|
||||
""""""""
|
||||
repo add
|
||||
""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo add <name> <repo_url> [branch]
|
||||
|
||||
**Description**
|
||||
|
||||
Add a new repo.
|
||||
|
||||
Examples:
|
||||
- ``[p]repo add 26-Cogs https://github.com/Twentysix26/x26-Cogs``
|
||||
- ``[p]repo add Laggrons-Dumb-Cogs https://github.com/retke/Laggrons-Dumb-Cogs v3``
|
||||
|
||||
Repo names can only contain characters A-z, numbers, underscores, and hyphens.
|
||||
The branch will be the default branch if not specified.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<name>`` The name given to the repo.
|
||||
- ``<repo_url>`` URL to the cog branch. Usually GitHub or GitLab.
|
||||
- ``[branch]`` Optional branch to install cogs from.
|
||||
|
||||
.. _downloader-command-repo-delete:
|
||||
|
||||
"""""""""""
|
||||
repo delete
|
||||
"""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo delete <repo>
|
||||
|
||||
.. tip:: Aliases: ``repo remove``, ``repo del``
|
||||
|
||||
**Description**
|
||||
|
||||
Remove repos and their files.
|
||||
|
||||
Examples:
|
||||
- ``[p]repo delete 26-Cogs``
|
||||
- ``[p]repo delete 26-Cogs Laggrons-Dumb-Cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repos...>`` The repo or repos to remove.
|
||||
|
||||
.. _downloader-command-repo-info:
|
||||
|
||||
"""""""""
|
||||
repo info
|
||||
"""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo info <repo>
|
||||
|
||||
**Description**
|
||||
|
||||
Show information about a repo.
|
||||
|
||||
Example:
|
||||
- ``[p]repo info 26-Cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<repo>`` The name of the repo to show info about.
|
||||
|
||||
.. _downloader-command-repo-list:
|
||||
|
||||
"""""""""
|
||||
repo list
|
||||
"""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo list
|
||||
|
||||
**Description**
|
||||
|
||||
List all installed repos.
|
||||
|
||||
.. _downloader-command-repo-update:
|
||||
|
||||
"""""""""""
|
||||
repo update
|
||||
"""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]repo update [repos...]
|
||||
|
||||
**Description**
|
||||
|
||||
Update all repos, or ones of your choosing.
|
||||
|
||||
This will *not* update the cogs installed from those repos.
|
||||
|
||||
Examples:
|
||||
- ``[p]repo update``
|
||||
- ``[p]repo update 26-Cogs``
|
||||
- ``[p]repo update 26-Cogs Laggrons-Dumb-Cogs``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``[repos...]`` The name or names of repos to update. If omitted, all repos are updated.
|
||||
391
docs/cog_guides/economy.rst
Normal file
@@ -0,0 +1,391 @@
|
||||
.. _economy:
|
||||
|
||||
=======
|
||||
Economy
|
||||
=======
|
||||
|
||||
This is the cog guide for the economy cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load economy
|
||||
|
||||
.. _economy-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Get rich and have fun with imaginary currency!
|
||||
|
||||
|
||||
.. _economy-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _economy-command-bank:
|
||||
|
||||
^^^^
|
||||
bank
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank
|
||||
|
||||
**Description**
|
||||
|
||||
Base command to manage the bank.
|
||||
|
||||
.. _economy-command-bank-balance:
|
||||
|
||||
""""""""""""
|
||||
bank balance
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank balance [user]
|
||||
|
||||
**Description**
|
||||
|
||||
Show the user's account balance.
|
||||
|
||||
Example:
|
||||
- ``[p]bank balance``
|
||||
- ``[p]bank balance @Twentysix``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<user>`` The user to check the balance of. If omitted, defaults to your own balance.
|
||||
|
||||
.. _economy-command-bank-set:
|
||||
|
||||
""""""""
|
||||
bank set
|
||||
""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank set <to> <creds>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the balance of a user's bank account.
|
||||
|
||||
Putting + or - signs before the amount will add/remove currency on the user's bank account instead.
|
||||
|
||||
Examples:
|
||||
- ``[p]bank set @Twentysix 26`` - Sets balance to 26
|
||||
- ``[p]bank set @Twentysix +2`` - Increases balance by 2
|
||||
- ``[p]bank set @Twentysix -6`` - Decreases balance by 6
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<to>`` The user to set the currency of.
|
||||
- ``<creds>`` The amount of currency to set their balance to.
|
||||
|
||||
.. _economy-command-bank-transfer:
|
||||
|
||||
"""""""""""""
|
||||
bank transfer
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]bank transfer <to> <amount>
|
||||
|
||||
**Description**
|
||||
|
||||
Transfer currency to other users.
|
||||
|
||||
This will come out of your balance, so make sure you have enough.
|
||||
|
||||
Example:
|
||||
- ``[p]bank transfer @Twentysix 500``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<to>`` The user to give currency to.
|
||||
- ``<amount>`` The amount of currency to give.
|
||||
|
||||
.. _economy-command-economyset:
|
||||
|
||||
^^^^^^^^^^
|
||||
economyset
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset
|
||||
|
||||
**Description**
|
||||
|
||||
Base command to manage Economy settings.
|
||||
|
||||
.. _economy-command-economyset-paydayamount:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
economyset paydayamount
|
||||
"""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset paydayamount <creds>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the amount earned each payday.
|
||||
|
||||
Example:
|
||||
- ``[p]economyset paydayamount 400``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<creds>`` The new amount to give when using the payday command. Default is 120.
|
||||
|
||||
.. _economy-command-economyset-paydaytime:
|
||||
|
||||
"""""""""""""""""""""
|
||||
economyset paydaytime
|
||||
"""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset paydaytime <duration>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the cooldown for the payday command.
|
||||
|
||||
Examples:
|
||||
- ``[p]economyset paydaytime 86400``
|
||||
- ``[p]economyset paydaytime 1d``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- | ``<duration>`` The new duration to wait in between uses of payday. Default is 5 minutes.
|
||||
| Accepts: seconds, minutes, hours, days, weeks (if no unit is specified, the duration is assumed to be given in seconds)
|
||||
|
||||
.. _economy-command-economyset-rolepaydayamount:
|
||||
|
||||
"""""""""""""""""""""""""""
|
||||
economyset rolepaydayamount
|
||||
"""""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset rolepaydayamount <role> <creds>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the amount earned each payday for a role.
|
||||
|
||||
Set to 0 will remove the custom payday for that role instead.
|
||||
|
||||
Only available when not using a global bank.
|
||||
|
||||
Example:
|
||||
- ``[p]economyset rolepaydayamount @Members 400``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<role>`` The role to assign a custom payday amount to.
|
||||
- ``<creds>`` The new amount to give when using the payday command.
|
||||
|
||||
.. _economy-command-economyset-showsettings:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
economyset showsettings
|
||||
"""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset showsettings
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the current economy settings
|
||||
|
||||
.. _economy-command-economyset-slotmax:
|
||||
|
||||
""""""""""""""""""
|
||||
economyset slotmax
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset slotmax <bid>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the maximum slot machine bid.
|
||||
|
||||
Example:
|
||||
- ``[p]economyset slotmax 50``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<bid>`` The new maximum bid for using the slot machine. Default is 100.
|
||||
|
||||
.. _economy-command-economyset-slotmin:
|
||||
|
||||
""""""""""""""""""
|
||||
economyset slotmin
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset slotmin <bid>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the minimum slot machine bid.
|
||||
|
||||
Example:
|
||||
- ``[p]economyset slotmin 10``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<bid>`` The new minimum bid for using the slot machine. Default is 5.
|
||||
|
||||
.. _economy-command-economyset-slottime:
|
||||
|
||||
"""""""""""""""""""
|
||||
economyset slottime
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset slottime <duration>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the cooldown for the slot machine.
|
||||
|
||||
Examples:
|
||||
- ``[p]economyset slottime 10``
|
||||
- ``[p]economyset slottime 10m``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- | ``<duration>`` The new duration to wait in between uses of the slot machine. Default is 5 seconds.
|
||||
| Accepts: seconds, minutes, hours, days, weeks (if no unit is specified, the duration is assumed to be given in seconds)
|
||||
|
||||
.. _economy-command-leaderboard:
|
||||
|
||||
^^^^^^^^^^^
|
||||
leaderboard
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]leaderboard [top=10] [show_global=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Print the leaderboard.
|
||||
|
||||
Defaults to top 10.
|
||||
|
||||
Examples:
|
||||
- ``[p]leaderboard``
|
||||
- ``[p]leaderboard 50`` - Shows the top 50 instead of top 10.
|
||||
- ``[p]leaderboard 100 yes`` - Shows the top 100 from all servers.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<top>`` How many positions on the leaderboard to show. Defaults to 10 if omitted.
|
||||
- ``<show_global>`` Whether to include results from all servers. This will default to false unless specified.
|
||||
|
||||
.. _economy-command-payday:
|
||||
|
||||
^^^^^^
|
||||
payday
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]payday
|
||||
|
||||
**Description**
|
||||
|
||||
Get some free currency.
|
||||
|
||||
The amount awarded and frequency can be configured.
|
||||
|
||||
.. _economy-command-payouts:
|
||||
|
||||
^^^^^^^
|
||||
payouts
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]payouts
|
||||
|
||||
**Description**
|
||||
|
||||
Show the payouts for the slot machine.
|
||||
|
||||
.. _economy-command-slot:
|
||||
|
||||
^^^^
|
||||
slot
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]slot <bid>
|
||||
|
||||
**Description**
|
||||
|
||||
Use the slot machine.
|
||||
|
||||
Example:
|
||||
- ``[p]slot 50``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<bid>`` The amount to bet on the slot machine. Winning payouts are higher when you bet more.
|
||||
337
docs/cog_guides/filter.rst
Normal file
@@ -0,0 +1,337 @@
|
||||
.. _filter:
|
||||
|
||||
======
|
||||
Filter
|
||||
======
|
||||
|
||||
This is the cog guide for the filter cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load filter
|
||||
|
||||
.. _filter-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog is designed for "filtering" unwanted words and phrases from a server.
|
||||
|
||||
It provides tools to manage a list of words or sentences, and to customize automatic actions to be taken against users who use those words in channels or in their name/nickname.
|
||||
|
||||
This can be used to prevent inappropriate language, off-topic discussions, invite links, and more.
|
||||
|
||||
|
||||
.. _filter-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _filter-command-filter:
|
||||
|
||||
^^^^^^
|
||||
filter
|
||||
^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter
|
||||
|
||||
**Description**
|
||||
|
||||
Base command to add or remove words from the server filter.
|
||||
|
||||
Use double quotes to add or remove sentences.
|
||||
|
||||
.. _filter-command-filter-add:
|
||||
|
||||
""""""""""
|
||||
filter add
|
||||
""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter add [words...]
|
||||
|
||||
**Description**
|
||||
|
||||
Add words to the filter.
|
||||
|
||||
Use double quotes to add sentences.
|
||||
|
||||
Examples:
|
||||
- ``[p]filter add word1 word2 word3``
|
||||
- ``[p]filter add "This is a sentence"``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``[words...]`` The words or sentences to filter.
|
||||
|
||||
.. _filter-command-filter-channel:
|
||||
|
||||
""""""""""""""
|
||||
filter channel
|
||||
""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter channel
|
||||
|
||||
**Description**
|
||||
|
||||
Base command to add or remove words from the channel filter.
|
||||
|
||||
Use double quotes to add or remove sentences.
|
||||
|
||||
.. _filter-command-filter-channel-add:
|
||||
|
||||
""""""""""""""""""
|
||||
filter channel add
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter channel add [words...]
|
||||
|
||||
**Description**
|
||||
|
||||
Add words to the filter.
|
||||
|
||||
Use double quotes to add sentences.
|
||||
|
||||
Examples:
|
||||
- ``[p]filter channel add #channel word1 word2 word3``
|
||||
- ``[p]filter channel add #channel "This is a sentence"``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<channel>`` The text, voice, stage, or forum channel to add filtered words to.
|
||||
- ``[words...]`` The words or sentences to filter.
|
||||
|
||||
.. _filter-command-filter-channel-clear:
|
||||
|
||||
""""""""""""""""""""
|
||||
filter channel clear
|
||||
""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter channel clear
|
||||
|
||||
**Description**
|
||||
|
||||
Clears this channel's filter list.
|
||||
|
||||
.. _filter-command-filter-channel-list:
|
||||
|
||||
"""""""""""""""""""
|
||||
filter channel list
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter channel list
|
||||
|
||||
**Description**
|
||||
|
||||
Send a list of the channel's filtered words.
|
||||
|
||||
.. _filter-command-filter-channel-remove:
|
||||
|
||||
"""""""""""""""""""""
|
||||
filter channel remove
|
||||
"""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter channel remove <channel> [words...]
|
||||
|
||||
**Description**
|
||||
|
||||
Remove words from the filter.
|
||||
|
||||
Use double quotes to remove sentences.
|
||||
|
||||
Examples:
|
||||
- ``[p]filter channel remove #channel word1 word2 word3``
|
||||
- ``[p]filter channel remove #channel "This is a sentence"``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<channel>`` The text, voice, stage, or forum channel to add filtered words to.
|
||||
- ``[words...]`` The words or sentences to no longer filter.
|
||||
|
||||
.. _filter-command-filter-clear:
|
||||
|
||||
""""""""""""
|
||||
filter clear
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter clear
|
||||
|
||||
**Description**
|
||||
|
||||
Clears this server's filter list.
|
||||
|
||||
.. _filter-command-filter-delete:
|
||||
|
||||
"""""""""""""
|
||||
filter delete
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter delete [words...]
|
||||
|
||||
.. tip:: Aliases: ``filter remove``, ``filter del``
|
||||
|
||||
**Description**
|
||||
|
||||
Remove words from the filter.
|
||||
|
||||
Use double quotes to remove sentences.
|
||||
|
||||
Examples:
|
||||
- ``[p]filter remove word1 word2 word3``
|
||||
- ``[p]filter remove "This is a sentence"``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``[words...]`` The words or sentences to no longer filter.
|
||||
|
||||
.. _filter-command-filter-list:
|
||||
|
||||
"""""""""""
|
||||
filter list
|
||||
"""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter list
|
||||
|
||||
**Description**
|
||||
|
||||
Send a list of this server's filtered words.
|
||||
|
||||
.. _filter-command-filter-names:
|
||||
|
||||
""""""""""""
|
||||
filter names
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filter names
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle name and nickname filtering.
|
||||
|
||||
This is disabled by default.
|
||||
|
||||
.. _filter-command-filterset:
|
||||
|
||||
^^^^^^^^^
|
||||
filterset
|
||||
^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filterset
|
||||
|
||||
**Description**
|
||||
|
||||
Base command to manage filter settings.
|
||||
|
||||
.. _filter-command-filterset-ban:
|
||||
|
||||
"""""""""""""
|
||||
filterset ban
|
||||
"""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filterset ban <count> <timeframe>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the filter's autoban conditions.
|
||||
|
||||
Users will be banned if they send ``<count>`` filtered words in
|
||||
``<timeframe>`` seconds.
|
||||
|
||||
Set both to zero to disable autoban.
|
||||
|
||||
Examples:
|
||||
- ``[p]filterset ban 5 5`` - Ban users who say 5 filtered words in 5 seconds.
|
||||
- ``[p]filterset ban 2 20`` - Ban users who say 2 filtered words in 20 seconds.
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<count>`` The amount of filtered words required to trigger a ban.
|
||||
- ``<timeframe>`` The period of time in which too many filtered words will trigger a ban.
|
||||
|
||||
.. _filter-command-filterset-defaultname:
|
||||
|
||||
"""""""""""""""""""""
|
||||
filterset defaultname
|
||||
"""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]filterset defaultname <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the nickname for users with a filtered name.
|
||||
|
||||
Note that this has no effect if filtering names is disabled
|
||||
(to toggle, run ``[p]filter names``).
|
||||
|
||||
The default name used is *John Doe*.
|
||||
|
||||
Example:
|
||||
- ``[p]filterset defaultname Missingno``
|
||||
|
||||
**Arguments:**
|
||||
|
||||
- ``<name>`` The new nickname to assign.
|
||||
218
docs/cog_guides/general.rst
Normal file
@@ -0,0 +1,218 @@
|
||||
.. _general:
|
||||
|
||||
=======
|
||||
General
|
||||
=======
|
||||
|
||||
This is the cog guide for the general cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load general
|
||||
|
||||
.. _general-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog includes a miscellaneous group of games, useful
|
||||
tools, and informative commands such as ``serverinfo`` or ``urban``.
|
||||
|
||||
.. _general-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
Here's a list of all commands available for this cog.
|
||||
|
||||
.. _general-command-8:
|
||||
|
||||
^^^^^^^^^
|
||||
8 (8ball)
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]8 <question>
|
||||
|
||||
**Description**
|
||||
|
||||
Ask 8 ball a question.
|
||||
|
||||
.. note:: Your question must end with a question mark.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<question>``: The question you would like to ask 8 ball.
|
||||
|
||||
.. _general-command-choose:
|
||||
|
||||
^^^^^^
|
||||
choose
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]choose <first> <second> [others...]
|
||||
|
||||
**Description**
|
||||
|
||||
Choose between multiple options.
|
||||
Options are separated by spaces.
|
||||
|
||||
.. note:: There must be at least 2 options to pick from.
|
||||
.. note:: To denote options which include whitespace, you should enclose the option in double quotes.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<first>``: The first mandatory option.
|
||||
* ``<second>``: The second mandatory option.
|
||||
* ``[others...]``: Any remaining optional options.
|
||||
|
||||
|
||||
.. _general-command-flip:
|
||||
|
||||
^^^^
|
||||
flip
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]flip [user]
|
||||
|
||||
**Description**
|
||||
|
||||
Flip a coin... or a user.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[user]``: The user to flip. Defaults to flipping a coin if no user is provided.
|
||||
|
||||
.. _general-command-lmgtfy:
|
||||
|
||||
^^^^^^
|
||||
lmgtfy
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]lmgtfy <search_terms>
|
||||
|
||||
**Description**
|
||||
|
||||
Create a lmgtfy link.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<search_terms>``: The terms used to generate the lmgtfy link.
|
||||
|
||||
.. _general-command-roll:
|
||||
|
||||
^^^^
|
||||
roll
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]roll [number=100]
|
||||
|
||||
**Description**
|
||||
|
||||
Roll a random number. The result will be between 1 and ``<number>``.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[number]``: The maximum number that can be rolled. Defaults to 100.
|
||||
|
||||
.. _general-command-rps:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
rps (Rock Paper Scissors)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]rps <your_choice>
|
||||
|
||||
**Description**
|
||||
|
||||
Play Rock Paper Scissors.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<your_choice>``: The choice that you choose.
|
||||
|
||||
.. note:: Choices **must** be between ``rock``, ``paper``, or ``scissors``.
|
||||
|
||||
.. _general-commands-serverinfo:
|
||||
|
||||
^^^^^^^^^^
|
||||
serverinfo
|
||||
^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]serverinfo [details=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Show server information.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[details]``: Show extra details about the server when set to True. Defaults to False.
|
||||
|
||||
.. _general-commands-stopwatch:
|
||||
|
||||
^^^^^^^^^
|
||||
stopwatch
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]stopwatch
|
||||
|
||||
**Description**
|
||||
|
||||
Start or stop the stopwatch.
|
||||
|
||||
.. _general-commands-urban:
|
||||
|
||||
^^^^^
|
||||
urban
|
||||
^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]urban <word>
|
||||
|
||||
**Description**
|
||||
|
||||
Search the Urban Dictionary.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<word>``: The term to search for.
|
||||
205
docs/cog_guides/image.rst
Normal file
@@ -0,0 +1,205 @@
|
||||
.. _image:
|
||||
|
||||
=====
|
||||
Image
|
||||
=====
|
||||
|
||||
This is the cog guide for the image cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load image
|
||||
|
||||
.. _image-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog provides commands for retrieving pictures from
|
||||
websites such as Giphy and Imgur.
|
||||
|
||||
.. _image-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
Here's a list of all commands available for this cog.
|
||||
|
||||
.. _image-command-gif:
|
||||
|
||||
^^^
|
||||
gif
|
||||
^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]gif <keywords...>
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieve the first search result from Giphy. This command requires API tokens
|
||||
to be set via the :ref:`giphycreds <image-command-giphycreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<keywords...>``: The keywords used to search Giphy.
|
||||
|
||||
.. _image-command-gifr:
|
||||
|
||||
^^^^
|
||||
gifr
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]gifr <keywords...>
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieve a random GIF from a Giphy search. This command requires API tokens
|
||||
to be set via the :ref:`giphycreds <image-command-giphycreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<keywords...>``: The keywords used to generate a random GIF.
|
||||
|
||||
.. _image-command-imgur:
|
||||
|
||||
^^^^^
|
||||
imgur
|
||||
^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgur
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieves pictures from Imgur. This command requires API tokens to be set
|
||||
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
|
||||
|
||||
.. _image-command-imgur-search:
|
||||
|
||||
""""""""""""
|
||||
imgur search
|
||||
""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgur search [count=1] <terms...>
|
||||
|
||||
**Description**
|
||||
|
||||
Search for pictures on Imgur. This command requires API tokens to be set
|
||||
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[count]``: How many images should be returned (maximum 5). Defaults to 1.
|
||||
|
||||
* ``<terms...>``: The terms used to search Imgur.
|
||||
|
||||
.. _image-command-imgur-subreddit:
|
||||
|
||||
"""""""""""""""
|
||||
imgur subreddit
|
||||
"""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgur subreddit <subreddit> [count=1] [sort_type=top] [window=day]
|
||||
|
||||
**Description**
|
||||
|
||||
Get images from a subreddit. This command requires API tokens to be set
|
||||
via the :ref:`imgurcreds <image-command-imgurcreds>` command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<subreddit>``: The subreddit to get images from.
|
||||
|
||||
* ``[count]``: The number of images to return (maximum 5). Defaults to 1.
|
||||
|
||||
* ``[sort_type]``: New, or top results. Defaults to top.
|
||||
|
||||
* ``[window]``: The timeframe, can be the past day, week, month, year or all. Defaults to day.
|
||||
|
||||
.. _image-command-giphycreds:
|
||||
|
||||
^^^^^^^^^^
|
||||
giphycreds
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]giphycreds
|
||||
|
||||
**Description**
|
||||
|
||||
Explains how to set GIPHY API tokens.
|
||||
|
||||
**Getting your API key**
|
||||
|
||||
1. Login (or create) a GIPHY account.
|
||||
2. Visit `this page <https://developers.giphy.com/dashboard>`__.
|
||||
3. Press 'Create an App'.
|
||||
4. Click 'Select API', and then 'Next Step'.
|
||||
5. Add an app name, for example 'Red'.
|
||||
6. Add an app description, for example 'Used for Red's image cog'.
|
||||
7. Click 'Create App'. You'll need to agree to the GIPHY API terms.
|
||||
8. Copy the API Key.
|
||||
9. In Discord, run the following command::
|
||||
|
||||
[p]set api GIPHY api_key <your_api_key_here>
|
||||
|
||||
.. _image-command-imgurcreds:
|
||||
|
||||
^^^^^^^^^^
|
||||
imgurcreds
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]imgurcreds
|
||||
|
||||
**Description**
|
||||
|
||||
Explains how to set Imgur API tokens.
|
||||
|
||||
**Getting your API key**
|
||||
|
||||
1. Login to (or create) an Imgur account.
|
||||
2. Visit `this page <https://api.imgur.com/oauth2/addclient>`__.
|
||||
3. Add an app name for your application, for example 'Red'.
|
||||
4. Select 'Anonymous usage without user authorization' for the auth type.
|
||||
5. Set the authorization callback URL to ``https://localhost``
|
||||
6. Leave the app website blank.
|
||||
7. Enter a valid email address and a description.
|
||||
8. Check the captcha box and click next.
|
||||
9. Your Client ID will be on the next page.
|
||||
10. In Discord, run the following command::
|
||||
|
||||
[p]set api imgur client_id <your_client_id_here>
|
||||
785
docs/cog_guides/mod.rst
Normal file
@@ -0,0 +1,785 @@
|
||||
.. _mod:
|
||||
|
||||
===
|
||||
Mod
|
||||
===
|
||||
|
||||
This is the cog guide for the mod cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load mod
|
||||
|
||||
.. _mod-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
A range of highly customizable moderation tools used to protect your
|
||||
guild from users who cannot follow the rules.
|
||||
|
||||
|
||||
.. _mod-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _mod-command-ban:
|
||||
|
||||
^^^
|
||||
ban
|
||||
^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]ban <user> [days] [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Ban a user from this server and optionally delete days of messages.
|
||||
|
||||
``days`` is the amount of days of messages to cleanup on ban.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<user>``: The user to ban. |user-input|
|
||||
* ``[days]``: The amount of days of messages to cleanup on ban. This parameter defaults to the defaultdays setting, or no days if this has not yet been configured.
|
||||
* ``[reason]``: The reason why the user was banned (optional).
|
||||
|
||||
**Example Usage**
|
||||
|
||||
* ``[p]ban 428675506947227648 7 Continued to spam after told to stop.``
|
||||
This will ban the user with ID 428675506947227648 and it will delete 7 days worth of messages.
|
||||
* ``[p]ban @Twentysix 7 Continued to spam after told to stop.``
|
||||
This will ban Twentysix and it will delete 7 days worth of messages.
|
||||
|
||||
A user ID should be provided if the user is not a member of this server.
|
||||
If days is not a number, it's treated as the first word of the reason.
|
||||
Minimum 0 days, maximum 7. If not specified, the defaultdays setting will be used instead.
|
||||
|
||||
.. _mod-command-kick:
|
||||
|
||||
^^^^
|
||||
kick
|
||||
^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]kick <member> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Kick a user.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to kick. |member-input|
|
||||
* ``[reason]``: The reason why the user was kicked (optional).
|
||||
|
||||
**Example Usage**
|
||||
|
||||
* ``[p]kick 428675506947227648 wanted to be kicked.``
|
||||
This will kick the user with ID 428675506947227648 from the server.
|
||||
* ``[p]kick @Twentysix wanted to be kicked.``
|
||||
This will kick Twentysix from the server.
|
||||
|
||||
If a reason is specified, it will be the reason that shows up
|
||||
in the audit log.
|
||||
|
||||
.. _mod-command-massban:
|
||||
|
||||
^^^^^^^
|
||||
massban
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]massban <user_ids...> [days] [reason]
|
||||
|
||||
.. tip:: Alias: ``hackban``
|
||||
|
||||
**Description**
|
||||
|
||||
Mass bans user(s) from the server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<user_ids...>``: The users to ban. This must be a list of user IDs separated by spaces.
|
||||
* ``[days]``: The amount of days of messages to cleanup on massban.
|
||||
* ``[reason]``: The reason why these users were banned.
|
||||
|
||||
**Example Usage**
|
||||
|
||||
* ``[p]massban 345628097929936898 57287406247743488 7 they broke all rules.``
|
||||
This will ban all the added userids and delete 7 days worth of their messages.
|
||||
|
||||
.. _mod-command-modset:
|
||||
|
||||
^^^^^^
|
||||
modset
|
||||
^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage server administration settings.
|
||||
|
||||
.. _mod-command-modset-defaultdays:
|
||||
|
||||
""""""""""""""""""
|
||||
modset defaultdays
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset defaultdays [days=0]
|
||||
|
||||
**Description**
|
||||
|
||||
Set the default number of days worth of messages to be deleted when a user is banned.
|
||||
|
||||
The number of days must be between 0 and 7.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[days=0]``: The default number of days of messages to be deleted when a user is banned.
|
||||
|
||||
.. note:: This value must be between 0 and 7.
|
||||
|
||||
.. _mod-command-modset-defaultduration:
|
||||
|
||||
""""""""""""""""""""""
|
||||
modset defaultduration
|
||||
""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset defaultduration <duration>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the default time to be used when a user is tempbanned.
|
||||
|
||||
Accepts: seconds, minutes, hours, days, weeks
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<duration>``: The default duration for when a user is temporarily banned. Accepts seconds, minutes, hours, days or weeks.
|
||||
|
||||
**Example Usage**
|
||||
|
||||
* ``[p]modset defaultduration 7d12h10m``
|
||||
* ``[p]modset defaultduration 7 days 12 hours 10 minutes``
|
||||
|
||||
.. _mod-command-modset-deletenames:
|
||||
|
||||
""""""""""""""""""
|
||||
modset deletenames
|
||||
""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset deletenames [confirmation=False]
|
||||
|
||||
**Description**
|
||||
|
||||
Delete all stored usernames, global display names, and server nicknames.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<confirmation>``: Whether to delete all stored usernames, global display names, and server nicknames. |bool-input|
|
||||
|
||||
.. _mod-command-modset-deleterepeats:
|
||||
|
||||
""""""""""""""""""""
|
||||
modset deleterepeats
|
||||
""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset deleterepeats [repeats]
|
||||
|
||||
**Description**
|
||||
|
||||
Enable auto-deletion of repeated messages.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[repeats]``: The number of repeated messages needed before further messages are deleted.
|
||||
|
||||
.. note:: Must be between 2 and 20. Set to -1 to disable this feature.
|
||||
|
||||
.. _mod-command-modset-dm:
|
||||
|
||||
"""""""""
|
||||
modset dm
|
||||
"""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset dm [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether a message should be sent to a user when they are kicked/banned.
|
||||
|
||||
If this option is enabled, the bot will attempt to DM the user with the guild name
|
||||
and reason as to why they were kicked/banned.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[enabled]``: Whether a message should be sent to a user when they are kicked/banned. |bool-input|
|
||||
|
||||
.. _mod-command-modset-requirereason:
|
||||
|
||||
""""""""""""""""""""
|
||||
modset requirereason
|
||||
""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset requirereason [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether a reason is required for mod actions.
|
||||
|
||||
If this is enabled, the bot will require a reason to be provided for all mod actions.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[enabled]``: Whether a reason should be required when performing mod actions. |bool-input|
|
||||
|
||||
.. _mod-command-modset-hierarchy:
|
||||
|
||||
""""""""""""""""
|
||||
modset hierarchy
|
||||
""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset hierarchy
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle role hierarchy check for mods and admins.
|
||||
|
||||
.. warning:: Disabling this setting will allow mods to take actions on users above them in the role hierarchy!
|
||||
|
||||
This is enabled by default.
|
||||
|
||||
.. _mod-command-modset-mentionspam:
|
||||
|
||||
""""""""""""""""""
|
||||
modset mentionspam
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset mentionspam
|
||||
|
||||
**Description**
|
||||
|
||||
Manage the automoderation settings for mentionspam.
|
||||
|
||||
.. _mod-command-modset-mentionspam-ban:
|
||||
|
||||
""""""""""""""""""""""
|
||||
modset mentionspam ban
|
||||
""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset mentionspam ban <max_mentions>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the autoban conditions for mention spam.
|
||||
|
||||
Users will be banned if they send any message which contains more than
|
||||
``<max_mentions>`` mentions.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
|
||||
|
||||
.. _mod-command-modset-mentionspam-kick:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
modset mentionspam kick
|
||||
"""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset mentionspam kick <max_mentions>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the autokick conditions for mention spam.
|
||||
|
||||
Users will be kicked if they send any message which contains more than
|
||||
``<max_mentions>`` mentions.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
|
||||
|
||||
.. _mod-command-modset-mentionspam-strict:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
modset mentionspam strict
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset mentionspam strict [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
Setting to account for duplicate mentions.
|
||||
|
||||
If enabled all mentions will count including duplicated mentions.
|
||||
If disabled only unique mentions will count.
|
||||
|
||||
Use this command without any parameter to see the current setting.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[enabled]``: Whether all mentions will count, including duplicated mentions. |bool-input|
|
||||
|
||||
.. _mod-command-modset-mentionspam-warn:
|
||||
|
||||
"""""""""""""""""""""""
|
||||
modset mentionspam warn
|
||||
"""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset mentionspam warn <max_mentions>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the autowarn conditions for mention spam.
|
||||
|
||||
Users will be warned if they send any messages which contain more than
|
||||
``<max_mentions>`` mentions.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
|
||||
|
||||
.. _mod-command-modset-reinvite:
|
||||
|
||||
"""""""""""""""
|
||||
modset reinvite
|
||||
"""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset reinvite
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether an invite will be sent to a user when unbanned.
|
||||
|
||||
If this is True, the bot will attempt to create and send a single-use invite
|
||||
to the newly-unbanned user.
|
||||
|
||||
.. _mod-command-modset-showsettings:
|
||||
|
||||
"""""""""""""""""""
|
||||
modset showsettings
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset showsettings
|
||||
|
||||
**Description**
|
||||
|
||||
Show the current server administration settings.
|
||||
|
||||
.. _mod-command-modset-trackallnames:
|
||||
|
||||
""""""""""""""""""""
|
||||
modset trackallnames
|
||||
""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset trackallnames [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether all name changes should be tracked.
|
||||
|
||||
Toggling this off also overrides the tracknicknames setting.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[enabled]``: Whether all name changes should be tracked. |bool-input|
|
||||
|
||||
.. _mod-command-modset-tracknicknames:
|
||||
|
||||
"""""""""""""""""""""
|
||||
modset tracknicknames
|
||||
"""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]modset tracknicknames [enabled]
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether server nickname changes should be tracked.
|
||||
|
||||
This setting will be overridden if trackallnames is disabled.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[enabled]``: Whether all nickname changes should be tracked. |bool-input|
|
||||
|
||||
.. _mod-command-movedeletedelay:
|
||||
|
||||
^^^^^^^^^^^^^^^
|
||||
movedeletedelay
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]movedeletedelay
|
||||
|
||||
**Description**
|
||||
|
||||
Move deletedelay settings to core
|
||||
|
||||
.. _mod-command-moveignoredchannels:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
moveignoredchannels
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]moveignoredchannels
|
||||
|
||||
**Description**
|
||||
|
||||
Move ignored channels and servers to core
|
||||
|
||||
.. _mod-command-names:
|
||||
|
||||
^^^^^
|
||||
names
|
||||
^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]names <member>
|
||||
|
||||
**Description**
|
||||
|
||||
Show previous usernames, global display names, and server nicknames of a member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: |member-input|
|
||||
|
||||
.. _mod-command-rename:
|
||||
|
||||
^^^^^^
|
||||
rename
|
||||
^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]rename <member> [nickname]
|
||||
|
||||
**Description**
|
||||
|
||||
Change a member's server nickname.
|
||||
|
||||
Leaving the nickname argument empty will remove it.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: |member-input|
|
||||
* ``[nickname]``: The new server nickname for the member.
|
||||
|
||||
.. _mod-command-slowmode:
|
||||
|
||||
^^^^^^^^
|
||||
slowmode
|
||||
^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]slowmode [interval=0:00:00]
|
||||
|
||||
**Description**
|
||||
|
||||
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 thread's/channel's slowmode settings.
|
||||
|
||||
.. note::
|
||||
Interval can be anything from 0 seconds to 6 hours.
|
||||
Use without parameters to disable.
|
||||
|
||||
.. _mod-command-softban:
|
||||
|
||||
^^^^^^^
|
||||
softban
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]softban <member> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Kick a member and delete 1 day's worth of their messages.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to softban. |member-input-quotes|
|
||||
* ``[reason]``: Reason for the kick (optional).
|
||||
|
||||
.. _mod-command-tempban:
|
||||
|
||||
^^^^^^^
|
||||
tempban
|
||||
^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]tempban <member> [duration] [days] [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Temporarily ban a user from this server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to temporarily ban. |member-input-quotes|
|
||||
* ``[duration]``: The amount of time the user should be banned for.
|
||||
* ``[days]``: The amount of days of messages to cleanup on tempban.
|
||||
* ``[reason]``: The reason for the tempban (optional).
|
||||
|
||||
**Example Usage**
|
||||
|
||||
* ``[p]tempban @Twentysix Because I say so``
|
||||
This will ban Twentysix for the default amount of time set by an administrator.
|
||||
* ``[p]tempban @Twentysix 15m You need a timeout``
|
||||
This will ban Twentysix for 15 minutes.
|
||||
* ``[p]tempban 428675506947227648 1d2h15m 5 Evil person``
|
||||
This will ban the user with ID 428675506947227648 for 1 day 2 hours 15 minutes and will delete the last 5 days of their messages.
|
||||
|
||||
.. _mod-command-unban:
|
||||
|
||||
^^^^^
|
||||
unban
|
||||
^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]unban <user_id> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Unban a user from this server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<user_id>``: |user-input|
|
||||
* ``[reason]``: The reason for the unban (optional).
|
||||
|
||||
.. _mod-command-userinfo:
|
||||
|
||||
^^^^^^^^
|
||||
userinfo
|
||||
^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]userinfo [member]
|
||||
|
||||
**Description**
|
||||
|
||||
Show information about a user.
|
||||
|
||||
This includes fields for status, discord join date, server
|
||||
join date, voice state and previous usernames/global display names/nicknames.
|
||||
|
||||
If the user has no roles, previous usernames, global display names, or server nicknames,
|
||||
these fields will be omitted.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[member]``: |member-input|
|
||||
|
||||
.. _mod-command-voiceban:
|
||||
|
||||
^^^^^^^^
|
||||
voiceban
|
||||
^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voiceban <member> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Ban a user from speaking and listening in the server's voice channels.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to ban from voice. |member-input|
|
||||
* ``[reason]``: The reason for the voiceban (optional).
|
||||
|
||||
.. _mod-command-voicekick:
|
||||
|
||||
^^^^^^^^^
|
||||
voicekick
|
||||
^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voicekick <member> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Kick a member from a voice channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: |member-input|
|
||||
* ``[reason]``: The reason for the voicekick (optional).
|
||||
|
||||
.. _mod-command-voiceunban:
|
||||
|
||||
^^^^^^^^^^
|
||||
voiceunban
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voiceunban <member> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Unban a user from speaking and listening in the server's voice channels.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to unban from voice. |member-input-quotes|
|
||||
* ``[reason]``: The reason for the voiceunban (optional).
|
||||
115
docs/cog_guides/modlog.rst
Normal file
@@ -0,0 +1,115 @@
|
||||
.. _modlog:
|
||||
|
||||
======
|
||||
ModLog
|
||||
======
|
||||
|
||||
This is the cog guide for the modlog cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load modlog
|
||||
|
||||
.. _modlog-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Browse and manage modlog cases. To manage modlog settings, use ``[p]modlogset``.
|
||||
|
||||
|
||||
.. _modlog-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _modlog-command-case:
|
||||
|
||||
^^^^
|
||||
case
|
||||
^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]case <number>
|
||||
|
||||
**Description**
|
||||
|
||||
Show the specified case.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<case>``: The case number to get information for.
|
||||
|
||||
.. _modlog-command-casesfor:
|
||||
|
||||
^^^^^^^^
|
||||
casesfor
|
||||
^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]casesfor <member>
|
||||
|
||||
**Description**
|
||||
|
||||
Display cases for the specified member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to get cases for. |member-input|
|
||||
|
||||
.. _modlog-command-listcases:
|
||||
|
||||
^^^^^^^^^
|
||||
listcases
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]listcases <member>
|
||||
|
||||
**Description**
|
||||
|
||||
List cases for the specified member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to get cases for. |member-input|
|
||||
|
||||
.. _modlog-command-reason:
|
||||
|
||||
^^^^^^
|
||||
reason
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reason [case] <reason>
|
||||
|
||||
**Description**
|
||||
|
||||
Specify a reason for a modlog case.
|
||||
|
||||
Please note that you can only edit cases you are
|
||||
the owner of unless you are a mod, admin or server owner.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[case]``: The case number to update the reason for.
|
||||
* ``<reason>``: The new reason for the specified case.
|
||||
|
||||
.. note:: If no case number is specified, the latest case will be used.
|
||||
416
docs/cog_guides/mutes.rst
Normal file
@@ -0,0 +1,416 @@
|
||||
.. _mutes:
|
||||
|
||||
=====
|
||||
Mutes
|
||||
=====
|
||||
|
||||
This is the cog guide for the mutes cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load mutes
|
||||
|
||||
.. _mutes-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Mute users temporarily or indefinitely.
|
||||
|
||||
.. _mutes-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _mutes-command-activemutes:
|
||||
|
||||
^^^^^^^^^^^
|
||||
activemutes
|
||||
^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]activemutes
|
||||
|
||||
**Description**
|
||||
|
||||
Displays active mutes on this server.
|
||||
|
||||
.. _mutes-command-mute:
|
||||
|
||||
^^^^
|
||||
mute
|
||||
^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]mute <users...> [time_and_reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Mute users.
|
||||
|
||||
Examples:
|
||||
|
||||
* ``[p]mute @member1 @member2 spam 5 hours``
|
||||
* ``[p]mute @member1 3 days``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[time_and_reason]``: The time and reason. If no time is provided, the mute will use the default set time or indefinite if this hasn't been configured.
|
||||
|
||||
.. _mutes-command-mutechannel:
|
||||
|
||||
^^^^^^^^^^^
|
||||
mutechannel
|
||||
^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]mutechannel <users...> [time_and_reason]
|
||||
|
||||
.. tip:: Alias: ``channelmute``
|
||||
|
||||
**Description**
|
||||
|
||||
Mute a user in the current text channel (or in the parent of the current thread).
|
||||
|
||||
Examples:
|
||||
|
||||
* ``[p]mutechannel @member1 @member2 spam 5 hours``
|
||||
* ``[p]mutechannel @member1 3 days``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[time_and_reason]``: The time and reason. If no time is provided, the mute will use the default set time or indefinite if this hasn't been configured.
|
||||
|
||||
.. _mutes-command-muteset:
|
||||
|
||||
^^^^^^^
|
||||
muteset
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset
|
||||
|
||||
**Description**
|
||||
|
||||
Mute settings.
|
||||
|
||||
.. _mutes-command-muteset-defaulttime:
|
||||
|
||||
"""""""""""""""""""
|
||||
muteset defaulttime
|
||||
"""""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset defaulttime [time]
|
||||
|
||||
.. tip:: Alias: ``muteset time``
|
||||
|
||||
**Description**
|
||||
|
||||
Set the default mute time for the mute command.
|
||||
|
||||
If no time interval is provided this will be cleared.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[time]``: The length of time for a default mute.
|
||||
|
||||
.. _mutes-command-muteset-makerole:
|
||||
|
||||
""""""""""""""""
|
||||
muteset makerole
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset makerole <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Create a Muted role.
|
||||
|
||||
This will create a role and apply overwrites to all available channels
|
||||
to more easily setup muting a user.
|
||||
|
||||
If you already have a muted role created on the server use
|
||||
``[p]muteset role ROLE_NAME_HERE``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The name of the muted role to create.
|
||||
|
||||
.. _mutes-command-muteset-notification:
|
||||
|
||||
""""""""""""""""""""
|
||||
muteset notification
|
||||
""""""""""""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset notification [channel]
|
||||
|
||||
**Description**
|
||||
|
||||
Set the notification channel for automatic unmute issues.
|
||||
|
||||
If no channel is provided this will be cleared and notifications
|
||||
about issues when unmuting users will not be sent anywhere.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[channel]``: The channel to receive unmute issue updates. |channel-input|
|
||||
|
||||
.. _mutes-command-muteset-role:
|
||||
|
||||
""""""""""""
|
||||
muteset role
|
||||
""""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset role [role]
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the role to be applied when muting a user.
|
||||
|
||||
If no role is setup the bot will attempt to mute a user
|
||||
by utilizing server timeouts.
|
||||
|
||||
.. Note::
|
||||
|
||||
If no role is setup a user may be able to leave the server
|
||||
and rejoin no longer being muted.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[role]``: The role for muted users to receive. |role-input|
|
||||
|
||||
.. _mutes-command-muteset-senddm:
|
||||
|
||||
""""""""""""""
|
||||
muteset senddm
|
||||
""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset senddm <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Set whether mute notifications should be sent to users in DMs.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
|
||||
|
||||
.. _mutes-command-muteset-settings:
|
||||
|
||||
""""""""""""""""
|
||||
muteset settings
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset settings
|
||||
|
||||
.. tip:: Alias: ``muteset showsettings``
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the current mute settings for this guild.
|
||||
|
||||
.. _mutes-command-muteset-showmoderator:
|
||||
|
||||
"""""""""""""""""""""
|
||||
muteset showmoderator
|
||||
"""""""""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]muteset showmoderator <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Decide whether the name of the moderator muting a user should be included in the DM to that user.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
|
||||
|
||||
.. _mutes-command-unmute:
|
||||
|
||||
^^^^^^
|
||||
unmute
|
||||
^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]unmute <users...> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Unmute users.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[reason]``: The reason for the unmute.
|
||||
|
||||
.. _mutes-command-unmutechannel:
|
||||
|
||||
^^^^^^^^^^^^^
|
||||
unmutechannel
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]unmutechannel <users...> [reason]
|
||||
|
||||
.. tip:: Alias: ``channelunmute``
|
||||
|
||||
**Description**
|
||||
|
||||
Unmute a user in this channel (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:
|
||||
|
||||
^^^^^^^^^
|
||||
voicemute
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voicemute <users...> [time_and_reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Mute a user in their current voice channel.
|
||||
|
||||
Examples:
|
||||
|
||||
* ``[p]voicemute @member1 @member2 spam 5 hours``
|
||||
* ``[p]voicemute @member1 3 days``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[time_and_reason]``: The time and reason. If no time is provided, the mute will use the default set time or indefinite if this hasn't been configured.
|
||||
|
||||
.. _mutes-command-voiceunmute:
|
||||
|
||||
^^^^^^^^^^^
|
||||
voiceunmute
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]voiceunmute <users...> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Unmute a user in their current voice channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||
* ``[reason]``: The reason for the unmute.
|
||||
440
docs/cog_guides/permissions.rst
Normal file
@@ -0,0 +1,440 @@
|
||||
.. _permissions:
|
||||
|
||||
===========
|
||||
Permissions
|
||||
===========
|
||||
|
||||
This is the cog guide for the permissions cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load permissions
|
||||
|
||||
.. _permissions-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Customise permissions for commands and cogs.
|
||||
|
||||
This cog extends the default permission model of the bot. By default, many commands are restricted based on what the command can do.
|
||||
This cog allows you to refine some of those restrictions. You can allow wider or narrower access to most commands using it. You cannot, however, change the restrictions on owner-only commands.
|
||||
|
||||
When additional rules are set using this cog, those rules will be checked prior to checking for the default restrictions of the command.
|
||||
Global rules (set by the owner) are checked first, then rules set for servers. If multiple global or server rules apply to the case, the order they are checked in is:
|
||||
|
||||
1. Rules about a user.
|
||||
2. Rules about the voice channel a user is in.
|
||||
3. Rules about the text channel 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).
|
||||
|
||||
|
||||
.. _permissions-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _permissions-command-permissions:
|
||||
|
||||
^^^^^^^^^^^
|
||||
permissions
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions
|
||||
|
||||
**Description**
|
||||
|
||||
Command permission management tools.
|
||||
|
||||
.. _permissions-command-permissions-acl:
|
||||
|
||||
"""""""""""""""
|
||||
permissions acl
|
||||
"""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl
|
||||
|
||||
**Description**
|
||||
|
||||
Manage permissions with YAML files.
|
||||
|
||||
.. tip:: See :ref:`here <cog_permissions>` for more information with configuring these yaml files.
|
||||
|
||||
.. _permissions-command-permissions-acl-getglobal:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions acl getglobal
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl getglobal
|
||||
|
||||
**Description**
|
||||
|
||||
Get a YAML file detailing all global rules.
|
||||
|
||||
.. _permissions-command-permissions-acl-getserver:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions acl getserver
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl getserver
|
||||
|
||||
**Description**
|
||||
|
||||
Get a YAML file detailing all rules in this server.
|
||||
|
||||
.. _permissions-command-permissions-acl-setglobal:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions acl setglobal
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl setglobal
|
||||
|
||||
**Description**
|
||||
|
||||
Set global rules with a YAML file.
|
||||
|
||||
.. warning::
|
||||
This will override reset *all* global rules
|
||||
to the rules specified in the uploaded file.
|
||||
|
||||
This does not validate the names of commands and cogs before
|
||||
setting the new rules.
|
||||
|
||||
.. _permissions-command-permissions-acl-setserver:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions acl setserver
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl setserver
|
||||
|
||||
**Description**
|
||||
|
||||
Set rules for this server with a YAML file.
|
||||
|
||||
.. warning::
|
||||
This will override reset *all* rules in this
|
||||
server to the rules specified in the uploaded file.
|
||||
|
||||
.. _permissions-command-permissions-acl-updateglobal:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions acl updateglobal
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl updateglobal
|
||||
|
||||
**Description**
|
||||
|
||||
Update global rules with a YAML file.
|
||||
|
||||
This won't touch any rules not specified in the YAML
|
||||
file.
|
||||
|
||||
.. _permissions-command-permissions-acl-updateserver:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions acl updateserver
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl updateserver
|
||||
|
||||
**Description**
|
||||
|
||||
Update rules for this server with a YAML file.
|
||||
|
||||
This won't touch any rules not specified in the YAML
|
||||
file.
|
||||
|
||||
.. _permissions-command-permissions-acl-yamlexample:
|
||||
|
||||
"""""""""""""""""""""""""""
|
||||
permissions acl yamlexample
|
||||
"""""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions acl yamlexample
|
||||
|
||||
**Description**
|
||||
|
||||
Sends an example of the yaml layout for permissions
|
||||
|
||||
.. _permissions-command-permissions-addglobalrule:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions addglobalrule
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions addglobalrule <allow_or_deny> <cog_or_command> <who_or_what...>
|
||||
|
||||
**Description**
|
||||
|
||||
Add a global rule to a cog or command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<allow_or_deny>``: This should be one of "allow" or "deny".
|
||||
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
|
||||
.. _permissions-command-permissions-addserverrule:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
permissions addserverrule
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions addserverrule <allow_or_deny> <cog_or_command> <who_or_what...>
|
||||
|
||||
**Description**
|
||||
|
||||
Add a rule to a cog or command in this server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<allow_or_deny>``: This should be one of "allow" or "deny".
|
||||
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
|
||||
.. _permissions-command-permissions-canrun:
|
||||
|
||||
""""""""""""""""""
|
||||
permissions canrun
|
||||
""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions canrun <user> <command>
|
||||
|
||||
**Description**
|
||||
|
||||
Check if a user can run a command.
|
||||
|
||||
This will take the current context into account, such as the
|
||||
server and text channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<user>``: The user to check permissions for.
|
||||
* ``<command>``: The command to check whether the user can run it or not.
|
||||
|
||||
.. _permissions-command-permissions-clearglobalrules:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions clearglobalrules
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions clearglobalrules
|
||||
|
||||
**Description**
|
||||
|
||||
Reset all global rules.
|
||||
|
||||
.. _permissions-command-permissions-clearserverrules:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions clearserverrules
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions clearserverrules
|
||||
|
||||
**Description**
|
||||
|
||||
Reset all rules in this server.
|
||||
|
||||
.. _permissions-command-permissions-explain:
|
||||
|
||||
"""""""""""""""""""
|
||||
permissions explain
|
||||
"""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions explain
|
||||
|
||||
**Description**
|
||||
|
||||
Explain how permissions works.
|
||||
|
||||
.. _permissions-command-permissions-removeglobalrule:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions removeglobalrule
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions removeglobalrule <cog_or_command> <who_or_what...>
|
||||
|
||||
**Description**
|
||||
|
||||
Remove a global rule from a command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<cog_or_command>``: The cog or command to remove the rule from. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
|
||||
.. _permissions-command-permissions-removeserverrule:
|
||||
|
||||
""""""""""""""""""""""""""""
|
||||
permissions removeserverrule
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions removeserverrule <cog_or_command> <who_or_what...>
|
||||
|
||||
**Description**
|
||||
|
||||
Remove a server rule from a command.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<cog_or_command>``: The cog or command to remove the rule from. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
|
||||
.. _permissions-command-permissions-setdefaultglobalrule:
|
||||
|
||||
""""""""""""""""""""""""""""""""
|
||||
permissions setdefaultglobalrule
|
||||
""""""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions setdefaultglobalrule <allow_or_deny> <cog_or_command>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the default global rule for a command or a cog.
|
||||
|
||||
This is the rule a command will default to when no other rule
|
||||
is found.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
|
||||
.. _permissions-command-permissions-setdefaultserverrule:
|
||||
|
||||
""""""""""""""""""""""""""""""""
|
||||
permissions setdefaultserverrule
|
||||
""""""""""""""""""""""""""""""""
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]permissions setdefaultserverrule <allow_or_deny> <cog_or_command>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the default rule for a command or a cog in this server.
|
||||
|
||||
This is the rule a command will default to when no other rule
|
||||
is found.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<cog_or_command>``: The cog or command to add the rule to. This is case sensitive.
|
||||
* ``<who_or_what...>``: One or more users, channels or roles the rule is for.
|
||||
141
docs/cog_guides/reports.rst
Normal file
@@ -0,0 +1,141 @@
|
||||
.. _reports:
|
||||
|
||||
=======
|
||||
Reports
|
||||
=======
|
||||
|
||||
This is the cog guide for the reports cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load reports
|
||||
|
||||
.. _reports-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Create user reports that server staff can respond to.
|
||||
|
||||
Users can open reports using ``[p]report``. These are then sent
|
||||
to a channel in the server for staff, and the report creator
|
||||
gets a DM. Both can be used to communicate.
|
||||
|
||||
|
||||
.. _reports-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _reports-command-report:
|
||||
|
||||
^^^^^^
|
||||
report
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]report [text]
|
||||
|
||||
**Description**
|
||||
|
||||
Send a report.
|
||||
|
||||
Use without arguments for interactive reporting, or do
|
||||
``[p]report [text]`` to use it non-interactively.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[text]``: The content included within the report.
|
||||
|
||||
.. _reports-command-report-interact:
|
||||
|
||||
"""""""""""""""
|
||||
report interact
|
||||
"""""""""""""""
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]report interact <ticket_number>
|
||||
|
||||
**Description**
|
||||
|
||||
Open a message tunnel.
|
||||
|
||||
This tunnel will forward things you say in this channel or thread
|
||||
to the ticket opener's direct messages.
|
||||
|
||||
Tunnels do not persist across bot restarts.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<ticket_number>``: The ticket number to open the tunnel in.
|
||||
|
||||
.. _reports-command-reportset:
|
||||
|
||||
^^^^^^^^^
|
||||
reportset
|
||||
^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reportset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage Reports.
|
||||
|
||||
.. _reports-command-reportset-output:
|
||||
|
||||
""""""""""""""""
|
||||
reportset output
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reportset output <channel>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the channel where reports will be sent.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel>``: |channel-input|
|
||||
|
||||
.. _reports-command-reportset-toggle:
|
||||
|
||||
""""""""""""""""
|
||||
reportset toggle
|
||||
""""""""""""""""
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reportset toggle
|
||||
|
||||
**Description**
|
||||
|
||||
Enable or disable reporting for this server.
|
||||
533
docs/cog_guides/streams.rst
Normal file
@@ -0,0 +1,533 @@
|
||||
.. _streams:
|
||||
|
||||
=======
|
||||
Streams
|
||||
=======
|
||||
|
||||
This is the cog guide for the Streams cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load streams
|
||||
|
||||
.. _streams-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog provides commands to check if a channel
|
||||
on a supported streaming service is live as well
|
||||
as to create and manage alerts for channels.
|
||||
|
||||
Supported streaming services are:
|
||||
|
||||
- Twitch
|
||||
- Youtube
|
||||
- Picarto
|
||||
|
||||
Youtube and Twitch both require setting authentication
|
||||
details for commands for those services to work. See
|
||||
:ref:`[p]streamset twitchtoken <streams-command-streamset-twitchtoken>` and
|
||||
:ref:`[p]streamset youtubekey <streams-command-streamset-youtubekey>`
|
||||
for more information.
|
||||
|
||||
.. _streams-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _streams-command-streamset:
|
||||
|
||||
^^^^^^^^^
|
||||
streamset
|
||||
^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage stream alert settings.
|
||||
|
||||
.. _streams-command-streamset-autodelete:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
streamset autodelete
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset autodelete <on_off>
|
||||
|
||||
**Description**
|
||||
|
||||
Toggles automatic deletion of stream alerts when the
|
||||
stream goes offline.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<on_off>``: Whether to turn on or off
|
||||
|
||||
.. _streams-command-streamset-ignorereruns:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset ignorereruns
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset ignorereruns
|
||||
|
||||
**Description**
|
||||
|
||||
Toggles excluding reruns from the alerts.
|
||||
|
||||
At this time, this functionality only applies to Twitch stream alerts.
|
||||
|
||||
.. _streams-command-streamset-mention:
|
||||
|
||||
^^^^^^^^^^^^^^^^^
|
||||
streamset mention
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset mention
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle mentions for stream alerts.
|
||||
|
||||
.. _streams-command-streamset-mention-all:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset mention all
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset mention all
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle mentioning ``@everyone`` for stream alerts.
|
||||
|
||||
.. _streams-command-streamset-mention-online:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset mention online
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset mention online
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle mentioning ``@here`` for stream alerts.
|
||||
|
||||
.. _streams-command-streamset-mention-role:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset mention role
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset mention role <role>
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle mentioning a role for stream alerts.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<role>``: The role to toggle a mention for. |role-input|
|
||||
|
||||
.. _streams-command-streamset-message:
|
||||
|
||||
^^^^^^^^^^^^^^^^^
|
||||
streamset message
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset message
|
||||
|
||||
**Description**
|
||||
|
||||
Manage custom messages for stream alerts.
|
||||
|
||||
.. _streams-command-streamset-message-mention:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset message mention
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset message mention <message>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets a stream alert message for when mentions are enabled.
|
||||
|
||||
Use ``{mention}`` in the message to insert the selected mentions.
|
||||
|
||||
Use ``{stream}`` in the message to insert the channel or user name.
|
||||
|
||||
Use ``{stream.display_name}`` in the message to insert the channel's display name
|
||||
(on Twitch, this may be different from ``{stream}``).
|
||||
|
||||
For example: ``[p]streamset message mention {mention}, {stream.display_name} is live!``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<message>``: Your alert message
|
||||
|
||||
.. _streams-command-streamset-message-nomention:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset message nomention
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset message nomention <message>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets a stream alert message for when mentions are disabled.
|
||||
|
||||
Use ``{stream}`` in the message to insert the channel or user name.
|
||||
|
||||
Use ``{stream.display_name}`` in the message to insert the channel's display name
|
||||
(on Twitch, this may be different from ``{stream}``).
|
||||
|
||||
For example: ``[p]streamset message nomention {stream.display_name} is live!``
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<message>``: Your alert message
|
||||
|
||||
.. _streams-command-streamset-message-clear:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset message clear
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset message clear
|
||||
|
||||
**Description**
|
||||
|
||||
Resets the stream alert messages for the server.
|
||||
|
||||
.. _streams-command-streamset-timer:
|
||||
|
||||
^^^^^^^^^^^^^^^
|
||||
streamset timer
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset timer <refresh_timer>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the refresh time for stream alerts (how frequently they will be checked).
|
||||
|
||||
This cannot be set to anything less than 60 seconds.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<refresh_timer>``: The frequency with which streams should be checked, in seconds
|
||||
|
||||
.. _streams-command-streamset-youtubekey:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
streamset youtubekey
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset youtubekey
|
||||
|
||||
**Description**
|
||||
|
||||
Explains how to set the YouTube token.
|
||||
|
||||
To get one, do the following:
|
||||
|
||||
1. Create a project
|
||||
(see https://support.google.com/googleapi/answer/6251787 for details)
|
||||
|
||||
2. Enable the YouTube Data API v3
|
||||
(see https://support.google.com/googleapi/answer/6158841 for instructions)
|
||||
|
||||
3. Set up your API key
|
||||
(see https://support.google.com/googleapi/answer/6158862 for instructions)
|
||||
|
||||
4. Copy your API key and run the command ``[p]set api youtube api_key <your_api_key_here>``
|
||||
|
||||
.. attention:: These tokens are sensitive and should only be
|
||||
used in a private channel or in DM with the bot.
|
||||
|
||||
.. _streams-command-streamset-twitchtoken:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
streamset twitchtoken
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset twitchtoken
|
||||
|
||||
**Description**
|
||||
|
||||
Explains how to set the Twitch token.
|
||||
|
||||
To set the Twitch API tokens, follow these steps:
|
||||
|
||||
1. Go to this page: https://dev.twitch.tv/dashboard/apps.
|
||||
|
||||
2. Click Register Your Application.
|
||||
|
||||
3. Enter a name, set the OAuth Redirect URI to http://localhost, and select an Application Category of your choosing.
|
||||
|
||||
4. Click Register.
|
||||
|
||||
5. Copy your client ID and your client secret into:
|
||||
``[p]set api twitch client_id <your_client_id_here> client_secret <your_client_secret_here>``
|
||||
|
||||
.. attention:: These tokens are sensitive and should only be
|
||||
used in a private channel or in DM with the bot.
|
||||
|
||||
.. _streams-command-streamset-usebuttons:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
streamset usebuttons
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamset usebuttons
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle whether to use buttons for stream alerts.
|
||||
|
||||
.. _streams-command-picarto:
|
||||
|
||||
^^^^^^^
|
||||
picarto
|
||||
^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]picarto <channel_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Check if a Picarto channel is live.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_name>``: The Picarto channel to check.
|
||||
|
||||
.. _streams-command-twitchstream:
|
||||
|
||||
^^^^^^^^^^^^
|
||||
twitchstream
|
||||
^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]twitchstream <channel_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Check if a Twitch channel is live.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_name>``: The Twitch channel to check.
|
||||
|
||||
.. _streams-command-youtubestream:
|
||||
|
||||
^^^^^^^^^^^^^
|
||||
youtubestream
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]youtubestream <channel_id_or_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Check if a YouTube channel is live.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_id_or_name>``: The name or id of the YouTube channel to be checked.
|
||||
|
||||
.. _streams-command-streamalert:
|
||||
|
||||
^^^^^^^^^^^
|
||||
streamalert
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert
|
||||
|
||||
**Description**
|
||||
|
||||
Manage automated stream alerts.
|
||||
|
||||
.. _streams-command-streamalert-list:
|
||||
|
||||
^^^^^^^^^^^^^^^^
|
||||
streamalert list
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert list
|
||||
|
||||
**Description**
|
||||
|
||||
Lists all active alerts in the current server.
|
||||
|
||||
.. _streams-command-streamalert-picarto:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
streamalert picarto
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert picarto <channel_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle alerts in the current channel for the
|
||||
specified Picarto channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_name>``: The Picarto channel to toggle the alert for.
|
||||
|
||||
.. _streams-command-streamalert-twitch-channel:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
streamalert twitch channel
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert twitch channel <channel_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle alerts in the current channel for the
|
||||
specified Twitch channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_name>``: The Twitch channel to toggle the alert for.
|
||||
|
||||
.. _streams-command-streamalert-youtube:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
streamalert youtube
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert youtube <channel_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Toggle alerts in the current channel for the
|
||||
specified Picarto channel.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<channel_id_or_name>``: The name or id of the YouTube channel to be checked.
|
||||
|
||||
.. _streams-command-streamalert-stop:
|
||||
|
||||
^^^^^^^^^^^^^^^^
|
||||
streamalert stop
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]streamalert stop [disable-all=No]
|
||||
|
||||
**Description**
|
||||
|
||||
Disable all stream alerts for this channel or server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[disable-all]``: Defaults to ``no``. If this is set to ``yes``, all
|
||||
stream alerts in the current server will be disabled.
|
||||
If ``no`` or unspecified, all stream alerts in the
|
||||
current channel will be stopped.
|
||||
459
docs/cog_guides/trivia.rst
Normal file
@@ -0,0 +1,459 @@
|
||||
.. _trivia:
|
||||
|
||||
======
|
||||
Trivia
|
||||
======
|
||||
|
||||
This is the cog guide for the trivia cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load trivia
|
||||
|
||||
.. _trivia-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
This cog allows for playing trivia with others. You may
|
||||
choose to play just one category at a time or choose
|
||||
multiple to add variety to your game. You can even create
|
||||
your own lists!
|
||||
|
||||
.. _trivia-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
Here is a list of all of the commands for this cog:
|
||||
|
||||
.. _trivia-command-triviaset:
|
||||
|
||||
^^^^^^^^^
|
||||
triviaset
|
||||
^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset
|
||||
|
||||
**Description**
|
||||
|
||||
Commands for managing trivia settings.
|
||||
|
||||
.. _trivia-command-triviaset-botplays:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
triviaset botplays
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset botplays <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets whether the bot gains a point if nobody guesses correctly.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<true_or_false>`` If ``true``, the bot will gain a point if nobody
|
||||
guesses correctly, otherwise it will not.
|
||||
|
||||
.. _trivia-command-triviaset-maxscore:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
triviaset maxscore
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset maxscore <score>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the total points required to win.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<score>`` The amount of points required to win.
|
||||
|
||||
.. _trivia-command-triviaset-override:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
triviaset override
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset override <enabled>
|
||||
|
||||
**Description**
|
||||
|
||||
Allow/disallow trivia lists to override the settings.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<enabled>`` Whether trivia lists should be able to override settings.
|
||||
|
||||
.. _trivia-command-triviaset-payout:
|
||||
|
||||
^^^^^^^^^^^^^^^^
|
||||
triviaset payout
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset payout <multiplier>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the payout multiplier.
|
||||
|
||||
If a user wins trivia when at least 3 users are playing, they will receive credits;
|
||||
the amount received is determined by multiplying their total score by this multiplier.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<multiplier>`` The amount to multiply the winner's score by to determine payout.
|
||||
This can be any positive decimal number. Setting this to 0 will disable.
|
||||
|
||||
.. _trivia-command-triviaset-revealanswer:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
triviaset revealanswer
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset revealanswer <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets whether or not the answer is revealed if the time limit for answering runs out.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<true_or_false>`` If ``true``, the bot will reveal the answer if there is no
|
||||
correct guess within the time limit.
|
||||
|
||||
.. _trivia-command-triviaset-showsettings:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
triviaset showsettings
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset showsettings
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the current trivia settings.
|
||||
|
||||
.. _trivia-command-triviaset-stopafter:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
triviaset stopafter
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset stopafter <seconds>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets how long the bot should wait before stopping the trivia
|
||||
session due to lack of response.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<seconds>`` The number of seconds to wait before stopping the session.
|
||||
|
||||
.. _trivia-command-triviaset-timelimit:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
triviaset timelimit
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |mod-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset timelimit <seconds>
|
||||
|
||||
**Description**
|
||||
|
||||
Sets the maximum time permitted to answer a question.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<seconds>`` The number of seconds to wait for an answer.
|
||||
|
||||
.. _trivia-command-triviaset-custom:
|
||||
|
||||
^^^^^^^^^^^^^^^^
|
||||
triviaset custom
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset custom
|
||||
|
||||
**Description**
|
||||
|
||||
Manage custom trivia lists.
|
||||
|
||||
.. tip::
|
||||
|
||||
Looking to learn how to create your own trivia lists?
|
||||
See :ref:`here <guide_trivia_list_creation>` for more information.
|
||||
|
||||
.. _trivia-command-triviaset-custom-upload:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
triviaset custom upload
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset custom upload
|
||||
|
||||
**Description**
|
||||
|
||||
Upload a custom trivia list. The bot will prompt you to upload
|
||||
your list as an attachment in Discord.
|
||||
|
||||
.. _trivia-command-triviaset-custom-list:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
triviaset custom list
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset custom list
|
||||
|
||||
**Description**
|
||||
|
||||
List all uploaded custom trivia lists.
|
||||
|
||||
.. _trivia-command-triviaset-custom-delete:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
triviaset custom delete
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. note:: |owner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]triviaset custom delete <name>
|
||||
|
||||
**Description**
|
||||
|
||||
Delete a custom trivia list.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<name>`` The name of the custom list to be deleted.
|
||||
|
||||
.. _trivia-command-trivia:
|
||||
|
||||
^^^^^^
|
||||
trivia
|
||||
^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia <categories...>
|
||||
|
||||
**Description**
|
||||
|
||||
Start a trivia session on the specified category.
|
||||
|
||||
Multiple categories can be listed, in which case the trivia session
|
||||
will use all of the specified lists to select questions from.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<categories...>`` The category to play. Can be multiple.
|
||||
|
||||
.. _trivia-command-trivia-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:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
trivia leaderboard
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia leaderboard
|
||||
|
||||
**Description**
|
||||
|
||||
Shows the trivia leaderboard. Defaults to the top ten in the
|
||||
current server, sorted by total wins. The subcommands provide
|
||||
more customized leaderboards.
|
||||
|
||||
.. _trivia-command-trivia-leaderboard-global:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
trivia leaderboard global
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia leaderboard global [sort_by=wins] [top=10]
|
||||
|
||||
**Description**
|
||||
|
||||
The global trivia leaderboard.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``[sort_by=wins]`` The method by which to sort the leaderboard (defaults to wins). Can be one of:
|
||||
|
||||
- ``wins`` Total wins
|
||||
- ``avg`` Average score
|
||||
- ``total`` Total correct answers from all sessions
|
||||
- ``games`` Total games played.
|
||||
|
||||
- ``[top=10]`` The number of ranks to show on the leaderboard. Defaults to 10
|
||||
|
||||
.. _trivia-command-trivia-leaderboard-server:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
trivia leaderboard server
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia leaderboard server [sort_by=wins] [top=10]
|
||||
|
||||
**Description**
|
||||
|
||||
The trivia leaderboard for this server.
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``[sort_by=wins]`` The method by which to sort the leaderboard (defaults to wins). Can be one of:
|
||||
|
||||
- ``wins`` Total wins
|
||||
- ``avg`` Average score
|
||||
- ``total`` Total correct answers from all sessions
|
||||
- ``games`` Total games played.
|
||||
|
||||
- ``[top=10]`` The number of ranks to show on the leaderboard. Defaults to 10
|
||||
|
||||
.. _trivia-command-trivia-list:
|
||||
|
||||
^^^^^^^^^^^
|
||||
trivia list
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia list
|
||||
|
||||
**Description**
|
||||
|
||||
Lists the available trivia categories
|
||||
|
||||
.. _trivia-command-trivia-stop:
|
||||
|
||||
^^^^^^^^^^^
|
||||
trivia stop
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia stop
|
||||
|
||||
**Description**
|
||||
|
||||
Stops an ongoing trivia session.
|
||||
403
docs/cog_guides/warnings.rst
Normal file
@@ -0,0 +1,403 @@
|
||||
.. _warnings:
|
||||
|
||||
========
|
||||
Warnings
|
||||
========
|
||||
|
||||
This is the cog guide for the warnings cog. You will
|
||||
find detailed docs about usage and commands.
|
||||
|
||||
``[p]`` is considered as your prefix.
|
||||
|
||||
.. note:: To use this cog, load it by typing this::
|
||||
|
||||
[p]load warnings
|
||||
|
||||
.. _warnings-usage:
|
||||
|
||||
-----
|
||||
Usage
|
||||
-----
|
||||
|
||||
Warn misbehaving users and take automated actions.
|
||||
|
||||
|
||||
.. _warnings-commands:
|
||||
|
||||
--------
|
||||
Commands
|
||||
--------
|
||||
|
||||
.. _warnings-command-actionlist:
|
||||
|
||||
^^^^^^^^^^
|
||||
actionlist
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]actionlist
|
||||
|
||||
**Description**
|
||||
|
||||
List all configured automated actions for Warnings.
|
||||
|
||||
.. _warnings-command-mywarnings:
|
||||
|
||||
^^^^^^^^^^
|
||||
mywarnings
|
||||
^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]mywarnings
|
||||
|
||||
**Description**
|
||||
|
||||
List warnings for yourself.
|
||||
|
||||
.. _warnings-command-reasonlist:
|
||||
|
||||
^^^^^^^^^^
|
||||
reasonlist
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]reasonlist
|
||||
|
||||
**Description**
|
||||
|
||||
List all configured reasons for Warnings.
|
||||
|
||||
.. _warnings-command-unwarn:
|
||||
|
||||
^^^^^^
|
||||
unwarn
|
||||
^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]unwarn <member> <warn_id> [reason]
|
||||
|
||||
**Description**
|
||||
|
||||
Remove a warning from a member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to remove the warning from. |member-input-quotes|
|
||||
* ``<warn_id>``: The warning ID to remove from the member.
|
||||
* ``[reason]``: The reason for unwarning this member.
|
||||
|
||||
.. _warnings-command-warn:
|
||||
|
||||
^^^^
|
||||
warn
|
||||
^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warn <member> [points=1] <reason>
|
||||
|
||||
**Description**
|
||||
|
||||
Warn the user for the specified reason.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to warn. |member-input-quotes|
|
||||
* ``[points]``: The number of points the warning should be for. If no number is supplied, 1 point will be given. Pre-set warnings disregard this.
|
||||
* ``<reason>``: The reason for the warning. This can be a registered reason, or a custom reason if ``[p]warningset allowcustomreasons`` is set.
|
||||
|
||||
.. _warnings-command-warnaction:
|
||||
|
||||
^^^^^^^^^^
|
||||
warnaction
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnaction
|
||||
|
||||
**Description**
|
||||
|
||||
Manage automated actions for Warnings.
|
||||
|
||||
Actions are essentially command macros. Any command can be run
|
||||
when the action is initially triggered, and/or when the action
|
||||
is lifted.
|
||||
|
||||
Actions must be given a name and a points threshold. When a
|
||||
user is warned enough so that their points go over this
|
||||
threshold, the action will be executed.
|
||||
|
||||
.. _warnings-command-warnaction-add:
|
||||
|
||||
""""""""""""""
|
||||
warnaction add
|
||||
""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnaction add <name> <points>
|
||||
|
||||
**Description**
|
||||
|
||||
Create an automated action.
|
||||
|
||||
Duplicate action names are not allowed.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The name of the action.
|
||||
* ``<points>``: The number of points for this action.
|
||||
|
||||
.. _warnings-command-warnaction-delete:
|
||||
|
||||
"""""""""""""""""
|
||||
warnaction delete
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnaction delete <action_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Delete the action with the specified name.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<action_name>``: The name of the action to delete.
|
||||
|
||||
.. _warnings-command-warnings:
|
||||
|
||||
^^^^^^^^
|
||||
warnings
|
||||
^^^^^^^^
|
||||
|
||||
.. note:: |admin-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnings <member>
|
||||
|
||||
**Description**
|
||||
|
||||
List the warnings for the specified member.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<member>``: The member to get the warnings for. |member-input|
|
||||
|
||||
.. _warnings-command-warningset:
|
||||
|
||||
^^^^^^^^^^
|
||||
warningset
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset
|
||||
|
||||
**Description**
|
||||
|
||||
Manage settings for Warnings.
|
||||
|
||||
.. _warnings-command-warningset-allowcustomreasons:
|
||||
|
||||
"""""""""""""""""""""""""""""
|
||||
warningset allowcustomreasons
|
||||
"""""""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset allowcustomreasons <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Enable or disable custom reasons for a warning.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: |bool-input|
|
||||
|
||||
.. _warnings-command-warningset-senddm:
|
||||
|
||||
"""""""""""""""""
|
||||
warningset senddm
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset senddm <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Set whether warnings should be sent to users in DMs.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: |bool-input|
|
||||
|
||||
.. _warnings-command-warningset-showmoderator:
|
||||
|
||||
""""""""""""""""""""""""
|
||||
warningset showmoderator
|
||||
""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset showmoderator <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Decide whether the name of the moderator warning a user should be included in the DM to that user.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: |bool-input|
|
||||
|
||||
.. _warnings-command-warningset-usewarnchannel:
|
||||
|
||||
"""""""""""""""""""""""""
|
||||
warningset usewarnchannel
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset usewarnchannel <true_or_false>
|
||||
|
||||
**Description**
|
||||
|
||||
Set if warnings should be sent to a channel set with ``[p]warningset warnchannel``.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<true_or_false>``: |bool-input|
|
||||
|
||||
.. _warnings-command-warningset-warnchannel:
|
||||
|
||||
""""""""""""""""""""""
|
||||
warningset warnchannel
|
||||
""""""""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warningset warnchannel [channel]
|
||||
|
||||
**Description**
|
||||
|
||||
Set the channel where warnings should be sent to.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``[channel]``: |channel-input| Leave empty to use the channel ``[p]warn`` command was called in.
|
||||
|
||||
.. _warnings-command-warnreason:
|
||||
|
||||
^^^^^^^^^^
|
||||
warnreason
|
||||
^^^^^^^^^^
|
||||
|
||||
.. note:: |guildowner-lock|
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnreason
|
||||
|
||||
**Description**
|
||||
|
||||
Manage warning reasons.
|
||||
|
||||
Reasons must be given a name, description and points value. The
|
||||
name of the reason must be given when a user is warned.
|
||||
|
||||
.. _warnings-command-warnreason-create:
|
||||
|
||||
"""""""""""""""""
|
||||
warnreason create
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnreason create <name> <points> <description>
|
||||
|
||||
.. tip:: Alias: ``warnreason add``
|
||||
|
||||
**Description**
|
||||
|
||||
Create a warning reason.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<name>``: The name for the new reason.
|
||||
* ``<points>``: The number of points with the new reason.
|
||||
* ``<description>``: The description of the new warn reason.
|
||||
|
||||
.. _warnings-command-warnreason-delete:
|
||||
|
||||
"""""""""""""""""
|
||||
warnreason delete
|
||||
"""""""""""""""""
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]warnreason delete <reason_name>
|
||||
|
||||
**Description**
|
||||
|
||||
Delete a warning reason.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<reason_name>``: The name of the reason to delete.
|
||||
@@ -1,4 +1,5 @@
|
||||
.. Permissions Cog Reference
|
||||
.. _cog_permissions:
|
||||
|
||||
=========================
|
||||
Permissions Cog Reference
|
||||
@@ -30,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)
|
||||
|
||||
71
docs/conf.py
@@ -19,8 +19,10 @@
|
||||
#
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
sys.path.insert(0, os.path.abspath(".."))
|
||||
sys.path.insert(0, os.path.abspath("_ext"))
|
||||
|
||||
os.environ["BUILDING_DOCS"] = "1"
|
||||
|
||||
@@ -42,6 +44,8 @@ extensions = [
|
||||
"sphinx.ext.napoleon",
|
||||
"sphinx.ext.doctest",
|
||||
"sphinxcontrib_trio",
|
||||
"sphinx-prompt",
|
||||
"deprecated_removed",
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
@@ -58,7 +62,7 @@ master_doc = "index"
|
||||
|
||||
# General information about the project.
|
||||
project = "Red - Discord Bot"
|
||||
copyright = "2018-2020, 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
|
||||
@@ -66,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__
|
||||
@@ -78,15 +82,21 @@ release = __version__
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
language = "en"
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This patterns also effect to html_static_path and html_extra_path
|
||||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
||||
exclude_patterns = [
|
||||
"_build",
|
||||
"Thumbs.db",
|
||||
".DS_Store",
|
||||
# to ensure that include files (partial pages) aren't built, exclude them
|
||||
"**/_includes/**",
|
||||
]
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = "sphinx"
|
||||
pygments_style = "default"
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = False
|
||||
@@ -101,6 +111,9 @@ with open("prolog.txt", "r") as file:
|
||||
# Adds d.py version to available substitutions in all files
|
||||
rst_prolog += f"\n.. |DPY_VERSION| replace:: {dpy_version}"
|
||||
|
||||
# Add release highlight indicator to available substitutions in all files
|
||||
rst_prolog += f"\n.. |cool| replace:: \N{HEAVY BLACK HEART}\N{VARIATION SELECTOR-16}"
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
@@ -108,6 +121,12 @@ rst_prolog += f"\n.. |DPY_VERSION| replace:: {dpy_version}"
|
||||
#
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
#
|
||||
html_extra_path = ["_html"]
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
@@ -119,7 +138,10 @@ html_context = {
|
||||
"display_github": True,
|
||||
"github_user": "Cog-Creators",
|
||||
"github_repo": "Red-DiscordBot",
|
||||
"github_version": "V3/develop/docs/",
|
||||
"github_version": "V3/develop",
|
||||
"version_slug": os.environ.get("READTHEDOCS_VERSION", ""),
|
||||
"rtd_language": os.environ.get("READTHEDOCS_LANGUAGE", ""),
|
||||
"READTHEDOCS": os.environ.get("READTHEDOCS", "") == "True",
|
||||
}
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
@@ -209,21 +231,32 @@ linkcheck_retries = 3
|
||||
|
||||
# -- Options for extensions -----------------------------------------------
|
||||
|
||||
if dpy_version_info.releaselevel == "final":
|
||||
# final release - versioned docs should be available
|
||||
dpy_docs_url = f"https://discordpy.readthedocs.io/en/v{dpy_version}/"
|
||||
else:
|
||||
# alpha release - `latest` version of docs should be used
|
||||
dpy_docs_url = "https://discordpy.readthedocs.io/en/latest/"
|
||||
|
||||
# Intersphinx
|
||||
intersphinx_mapping = {
|
||||
"python": ("https://docs.python.org/3", None),
|
||||
"dpy": (f"https://discordpy.readthedocs.io/en/v{dpy_version}/", None),
|
||||
"dpy": (dpy_docs_url, None),
|
||||
"motor": ("https://motor.readthedocs.io/en/stable/", None),
|
||||
"babel": ("http://babel.pocoo.org/en/stable/", None),
|
||||
"dateutil": ("https://dateutil.readthedocs.io/en/stable/", None),
|
||||
}
|
||||
|
||||
# Extlinks
|
||||
# This allows to create links to d.py docs with
|
||||
# :dpy_docs:`link text <site_name.html>`
|
||||
extlinks = {
|
||||
"dpy_docs": (f"https://discordpy.readthedocs.io/en/v{dpy_version}/%s", None),
|
||||
"issue": ("https://github.com/Cog-Creators/Red-DiscordBot/issues/%s", "#"),
|
||||
"ghuser": ("https://github.com/%s", "@"),
|
||||
"dpy_docs": (f"{dpy_docs_url}%s", None),
|
||||
"issue": ("https://github.com/Cog-Creators/Red-DiscordBot/issues/%s", "#%s"),
|
||||
# below URL redirects to user page, if they don't have GH Sponsors set up,
|
||||
# while allowing us to direct readers directly at a sponsorship opportunity,
|
||||
# if they do
|
||||
"ghuser": ("https://github.com/sponsors/%s", "@%s"),
|
||||
}
|
||||
|
||||
# Doctest
|
||||
@@ -234,3 +267,21 @@ doctest_test_doctest_blocks = ""
|
||||
# Autodoc options
|
||||
autodoc_default_options = {"show-inheritance": True}
|
||||
autodoc_typehints = "none"
|
||||
|
||||
|
||||
from docutils import nodes
|
||||
from sphinx.transforms import SphinxTransform
|
||||
|
||||
|
||||
# d.py's |coro| substitution leaks into our docs because we don't replace some of the docstrings
|
||||
class IgnoreCoroSubstitution(SphinxTransform):
|
||||
default_priority = 210
|
||||
|
||||
def apply(self, **kwargs) -> None:
|
||||
for ref in self.document.traverse(nodes.substitution_reference):
|
||||
if ref["refname"] == "coro":
|
||||
ref.replace_self(nodes.Text(""))
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_transform(IgnoreCoroSubstitution)
|
||||
|
||||
@@ -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:
|
||||
|
||||
13
docs/framework_app_commands.rst
Normal file
@@ -0,0 +1,13 @@
|
||||
.. red app_commands module documentation
|
||||
|
||||
====================
|
||||
App Commands Package
|
||||
====================
|
||||
|
||||
This package acts almost identically to :doc:`discord.ext.app_commands <dpy:interactions/api>`; i.e.
|
||||
all of the attributes from discord.py's are also in ours.
|
||||
Some of these attributes, however, have been slightly modified, while others have been added to
|
||||
extend functionalities used throughout the bot, as outlined below.
|
||||
|
||||
.. autoclass:: redbot.core.app_commands.UserFeedbackCheckFailure
|
||||
:members:
|
||||
@@ -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:
|
||||
|
||||
@@ -35,6 +47,9 @@ extend functionalities used throughout the bot, as outlined below.
|
||||
|
||||
.. autoclass:: redbot.core.commands.DMContext
|
||||
|
||||
.. autoclass:: redbot.core.commands.UserFeedbackCheckFailure
|
||||
:members:
|
||||
|
||||
.. automodule:: redbot.core.commands.requires
|
||||
:members: PrivilegeLevel, PermState, Requires
|
||||
|
||||
@@ -54,7 +69,7 @@ Help Functionality
|
||||
|
||||
.. warning::
|
||||
|
||||
The content in this section is provisional and may change
|
||||
The content in this section is `provisional <developer-guarantees-exclusions>` and may change
|
||||
without prior notice or warning. Updates to this will be communicated
|
||||
on `this issue <https://github.com/Cog-Creators/Red-DiscordBot/issues/4084>`_
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Basic Usage
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
|
||||
self.config.register_global(
|
||||
foo=True
|
||||
@@ -55,15 +55,19 @@ Then, in the class's :code:`__init__` function, you need to get a config instanc
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
|
||||
The ``identifier`` in :py:meth:`Config.get_conf` is used to keep your cog's data separate
|
||||
from that of another cog, and thus should be unique to your cog. For example: if we
|
||||
have two cogs named :code:`MyCog` and their identifier is different, each will have
|
||||
its own data without overwriting the other's data. Note that it is also possible
|
||||
to force registration of a data key before allowing you to get and set data for
|
||||
that key by adding :code:`force_registration=True` after identifier (that defaults
|
||||
to :code:`False` though)
|
||||
its own data without overwriting the other's data.
|
||||
|
||||
Note that, as shown by most of the examples in this document, it is also possible to
|
||||
force registration of a data key before allowing you to get and set data for that key
|
||||
by adding :code:`force_registration=True` after identifier.
|
||||
When this is set to :code:`False` (the default), the default value for any key that isn't registered
|
||||
will be :code:`None`. When this is set to :code:`True` (as shown in this document), attempting
|
||||
to read from or write to any key that isn't registered will raise an :exc:`AttributeError`.
|
||||
|
||||
After we've gotten that, we need to register default values:
|
||||
|
||||
@@ -71,7 +75,7 @@ After we've gotten that, we need to register default values:
|
||||
|
||||
class MyCog(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
default_global = {
|
||||
"foobar": True,
|
||||
"foo": {
|
||||
@@ -98,13 +102,13 @@ in various ways:
|
||||
.. code-block:: python
|
||||
|
||||
@commands.command()
|
||||
@checks.admin_or_permissions(manage_guild=True)
|
||||
@commands.admin_or_permissions(manage_guild=True)
|
||||
async def setbaz(self, ctx, new_value):
|
||||
await self.config.guild(ctx.guild).baz.set(new_value)
|
||||
await ctx.send("Value of baz has been changed!")
|
||||
|
||||
@commands.command()
|
||||
@checks.is_owner()
|
||||
@commands.is_owner()
|
||||
async def setfoobar(self, ctx, new_value):
|
||||
await self.config.foobar.set(new_value)
|
||||
|
||||
@@ -128,7 +132,7 @@ Notice a few things in the above examples:
|
||||
self.config.<insert scope here, or nothing if global>.variable_name.set(new_value)
|
||||
|
||||
It is also possible to use :code:`async with` syntax to get and set config
|
||||
values. When entering the statement, the config value is retreived, and on exit,
|
||||
values. When entering the statement, the config value is retrieved, and on exit,
|
||||
it is saved. This puts a safeguard on any code within the :code:`async with`
|
||||
block such that if it breaks from the block in any way (whether it be from
|
||||
:code:`return`, :code:`break`, :code:`continue` or an exception), the value will
|
||||
@@ -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 ChannelAccesss(commands.Cog):
|
||||
class ChannelAccess(commands.Cog):
|
||||
def __init__(self):
|
||||
self.config = Config.get_conf(self, identifier=1234567890)
|
||||
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||
default_access = {
|
||||
"allowed": False
|
||||
}
|
||||
@@ -273,7 +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.
|
||||
|
||||