mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 09:22:31 -05:00
Compare commits
448 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cad381cc78 | ||
|
|
d7e7a39a96 | ||
|
|
4be15c9832 | ||
|
|
e9a9b22d0f | ||
|
|
f9b6f05415 | ||
|
|
b4af4f650c | ||
|
|
c4637aa02b | ||
|
|
c7ba118e7c | ||
|
|
be8df25ecf | ||
|
|
f1d359f816 | ||
|
|
25019d562b | ||
|
|
1e95063859 | ||
|
|
a34bab9881 | ||
|
|
842096171e | ||
|
|
f436998625 | ||
|
|
6f58ddd520 | ||
|
|
33f6193bcb | ||
|
|
032fe6906b | ||
|
|
95fe193871 | ||
|
|
9ff2085b94 | ||
|
|
d8bbf1c4c7 | ||
|
|
d88bdba092 | ||
|
|
e92a25a1b5 | ||
|
|
bc9404e9b2 | ||
|
|
9d81cdf4ea | ||
|
|
17f7bd15bf | ||
|
|
3fbf426003 | ||
|
|
aa2214f13f | ||
|
|
432de5cca8 | ||
|
|
bbd71cf6e3 | ||
|
|
e09f9a4914 | ||
|
|
aee9961dba | ||
|
|
ff21429f2b | ||
|
|
afaa1e2846 | ||
|
|
e71415c7cd | ||
|
|
65779cf70b | ||
|
|
a3a6e5cbaf | ||
|
|
dce0b713fe | ||
|
|
07d165aeb7 | ||
|
|
1ffdefc922 | ||
|
|
ef43cc53bc | ||
|
|
95583f03ee | ||
|
|
35e54b8e82 | ||
|
|
2a25d7e7c1 | ||
|
|
e8245d5075 | ||
|
|
9982ec93be | ||
|
|
b1159555e1 | ||
|
|
eba691f234 | ||
|
|
7f7ab1ccc7 | ||
|
|
7e9e596141 | ||
|
|
23b3144c84 | ||
|
|
3e8b51e117 | ||
|
|
7245c778e4 | ||
|
|
3045989a5f | ||
|
|
f500062979 | ||
|
|
1027d95092 | ||
|
|
fb08cd0520 | ||
|
|
11cb5e3414 | ||
|
|
bbfe0d24ad | ||
|
|
730c650bb4 | ||
|
|
cb4058ef10 | ||
|
|
09f19b0cf7 | ||
|
|
93d47c1192 | ||
|
|
44f4cb70de | ||
|
|
19c710e63c | ||
|
|
2a23da302e | ||
|
|
5dfd4cf998 | ||
|
|
5356cca6ec | ||
|
|
c26a603c8d | ||
|
|
a52356c031 | ||
|
|
09adae5213 | ||
|
|
f59b7fce37 | ||
|
|
ee513731be | ||
|
|
5dd0c3b579 | ||
|
|
4afa4f77e0 | ||
|
|
8c2d589c17 | ||
|
|
c7a4a0feaf | ||
|
|
cb5eafb9e3 | ||
|
|
de3ec3f26a | ||
|
|
5987f9aabc | ||
|
|
ea6eeedadf | ||
|
|
9f359dda26 | ||
|
|
1040883913 | ||
|
|
7268a8e774 | ||
|
|
86edf0de53 | ||
|
|
59c92041fc | ||
|
|
3cf0d5ebe9 | ||
|
|
65344378f6 | ||
|
|
bd010fdae5 | ||
|
|
33ed1085ab | ||
|
|
41fa3f0310 | ||
|
|
542a7b3cb2 | ||
|
|
b8cf464355 | ||
|
|
4dc509c18f | ||
|
|
cda70a0c6a | ||
|
|
9ca977ba81 | ||
|
|
4331004dc1 | ||
|
|
042731a7ed | ||
|
|
bf5e2a4424 | ||
|
|
029a7fffcb | ||
|
|
0096f874a4 | ||
|
|
07e7594308 | ||
|
|
6a4a0b4bb3 | ||
|
|
dca082f20e | ||
|
|
dfe03b9cad | ||
|
|
3865449d3b | ||
|
|
39169703a7 | ||
|
|
55d748147d | ||
|
|
7bf8bd5a93 | ||
|
|
931eb312b2 | ||
|
|
1eaa51e013 | ||
|
|
539e0b2c14 | ||
|
|
addc633425 | ||
|
|
00adb15be0 | ||
|
|
ad5a5017b6 | ||
|
|
9482f0c60c | ||
|
|
0b8747c49b | ||
|
|
3c34af5e82 | ||
|
|
c739500a13 | ||
|
|
373c04de11 | ||
|
|
2ae54c837f | ||
|
|
df19bfe679 | ||
|
|
ded19fe4fe | ||
|
|
ca3b314b5b | ||
|
|
b03e582e21 | ||
|
|
147c032788 | ||
|
|
74af8f006e | ||
|
|
05582c8636 | ||
|
|
58158ff024 | ||
|
|
dcee2077c0 | ||
|
|
2d0d5b5be1 | ||
|
|
119550739e | ||
|
|
2f8f121bb0 | ||
|
|
96421a6dfa | ||
|
|
c8992a4281 | ||
|
|
3c325bb4cb | ||
|
|
497cb50716 | ||
|
|
dbe50bc6fe | ||
|
|
55712f1ed0 | ||
|
|
8f6f2804db | ||
|
|
fe147f277f | ||
|
|
80a1088061 | ||
|
|
b9d9ae3103 | ||
|
|
a95d65c316 | ||
|
|
a6b9f785ac | ||
|
|
267720bbba | ||
|
|
339cc6b3dc | ||
|
|
2c38a7c4f2 | ||
|
|
1736502893 | ||
|
|
2d3b0e513f | ||
|
|
53484abff8 | ||
|
|
3a2b965b4b | ||
|
|
2635300b44 | ||
|
|
917ff14156 | ||
|
|
e3e8ab784b | ||
|
|
08bbf8f6db | ||
|
|
cbb5ffe252 | ||
|
|
620f462f4b | ||
|
|
bf1286775f | ||
|
|
eff496cbb7 | ||
|
|
1a4c6bb84f | ||
|
|
85ab61b17d | ||
|
|
7197952795 | ||
|
|
05a25b1f03 | ||
|
|
e8ece55501 | ||
|
|
e08909dba6 | ||
|
|
a3f61fed7c | ||
|
|
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 |
5
.cherry_picker.toml
Normal file
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"
|
||||||
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@@ -1,5 +1,5 @@
|
|||||||
# Cogs
|
# Cogs
|
||||||
/redbot/cogs/audio/** @aikaterna @Drapersniper
|
/redbot/cogs/audio/** @aikaterna @PredaaA
|
||||||
/redbot/cogs/downloader/* @jack1142
|
/redbot/cogs/downloader/* @jack1142
|
||||||
/redbot/cogs/streams/* @palmtree5
|
/redbot/cogs/streams/* @palmtree5
|
||||||
/redbot/cogs/mutes/* @TrustyJAID
|
/redbot/cogs/mutes/* @TrustyJAID
|
||||||
|
|||||||
86
.github/ISSUE_TEMPLATE/01_command_bug.yml
vendored
Normal file
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
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
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
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
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
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
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
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 -->
|
|
||||||
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,7 +1 @@
|
|||||||
### Type
|
|
||||||
|
|
||||||
- [ ] Bugfix
|
|
||||||
- [ ] Enhancement
|
|
||||||
- [ ] New feature
|
|
||||||
|
|
||||||
### Description of the changes
|
### Description of the changes
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
### Type
|
|
||||||
|
|
||||||
- [ ] Bugfix
|
|
||||||
- [ ] Enhancement
|
|
||||||
- [ ] New feature
|
|
||||||
|
|
||||||
### Description of the changes
|
|
||||||
186
.github/labeler.yml
vendored
Normal file
186
.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
"Category: Admin":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/admin/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/admin.rst
|
||||||
|
"Category: Alias":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/alias/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/alias.rst
|
||||||
|
"Category: Audio Cog":
|
||||||
|
- any:
|
||||||
|
- redbot/cogs/audio/**/*
|
||||||
|
all:
|
||||||
|
- "!redbot/cogs/audio/**/locales/*"
|
||||||
|
"Category: Bank API":
|
||||||
|
# Source
|
||||||
|
- redbot/core/bank.py
|
||||||
|
# Docs
|
||||||
|
- docs/framework_bank.rst
|
||||||
|
"Category: Bank Cog":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/bank/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/bank.rst
|
||||||
|
"Category: Bot Core":
|
||||||
|
# Source
|
||||||
|
- redbot/*
|
||||||
|
- redbot/core/__init__.py
|
||||||
|
- redbot/core/_diagnoser.py
|
||||||
|
- redbot/core/_sharedlibdeprecation.py
|
||||||
|
- redbot/core/bot.py
|
||||||
|
- redbot/core/checks.py
|
||||||
|
- redbot/core/cli.py
|
||||||
|
- redbot/core/cog_manager.py
|
||||||
|
- redbot/core/core_commands.py
|
||||||
|
- redbot/core/data_manager.py
|
||||||
|
- redbot/core/errors.py
|
||||||
|
- redbot/core/events.py
|
||||||
|
- redbot/core/global_checks.py
|
||||||
|
- redbot/core/settings_caches.py
|
||||||
|
# Docs
|
||||||
|
- docs/framework_apikeys.rst
|
||||||
|
- docs/framework_bot.rst
|
||||||
|
- docs/framework_cogmanager.rst
|
||||||
|
- docs/framework_datamanager.rst
|
||||||
|
- docs/framework_events.rst
|
||||||
|
- docs/cog_guides/cog_manager_ui.rst
|
||||||
|
- docs/cog_guides/core.rst
|
||||||
|
"Category: CI":
|
||||||
|
- .github/workflows/*
|
||||||
|
"Category: Cleanup Cog":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/cleanup/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/cleanup.rst
|
||||||
|
"Category: Command Module":
|
||||||
|
# Source
|
||||||
|
- any:
|
||||||
|
# Source
|
||||||
|
- redbot/core/commands/*
|
||||||
|
# Docs
|
||||||
|
- docs/framework_checks.rst
|
||||||
|
- docs/framework_commands.rst
|
||||||
|
all:
|
||||||
|
- "!redbot/core/commands/help.py"
|
||||||
|
"Category: Config":
|
||||||
|
# Source
|
||||||
|
- redbot/core/drivers/*
|
||||||
|
- redbot/core/config.py
|
||||||
|
# Docs
|
||||||
|
- docs/framework_config.rst
|
||||||
|
"Category: CustomCom":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/customcom/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_customcom.rst
|
||||||
|
- docs/cog_guides/customcommands.rst
|
||||||
|
"Category: Dev Cog":
|
||||||
|
- redbot/core/dev_commands.py
|
||||||
|
"Category: Docs":
|
||||||
|
- docs/**/*
|
||||||
|
"Category: Downloader":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/downloader/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/downloader.rst
|
||||||
|
"Category: Economy Cog":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/economy/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/economy.rst
|
||||||
|
"Category: Filter":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/filter/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/filter.rst
|
||||||
|
"Category: General Cog":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/general/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/general.rst
|
||||||
|
"Category: Help":
|
||||||
|
- redbot/core/commands/help.py
|
||||||
|
"Category: i18n":
|
||||||
|
# Source
|
||||||
|
- redbot/core/i18n.py
|
||||||
|
# Locale files
|
||||||
|
- redbot/**/locales/*
|
||||||
|
# Docs
|
||||||
|
- docs/framework_i18n.rst
|
||||||
|
"Category: Image":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/image/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/image.rst
|
||||||
|
"Category: Meta":
|
||||||
|
- ./*
|
||||||
|
- .github/*
|
||||||
|
- .github/ISSUE_TEMPLATE/*
|
||||||
|
- .github/PULL_REQUEST_TEMPLATE/*
|
||||||
|
- schema/*
|
||||||
|
- tools/*
|
||||||
|
"Category: Mod Cog":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/mod/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/mod.rst
|
||||||
|
"Category: Modlog API":
|
||||||
|
# Source
|
||||||
|
- redbot/core/generic_casetypes.py
|
||||||
|
- redbot/core/modlog.py
|
||||||
|
# Docs
|
||||||
|
- docs/framework_modlog.rst
|
||||||
|
"Category: Modlog Cog":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/modlog/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/modlog.rst
|
||||||
|
"Category: Mutes Cog":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/mutes/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/mutes.rst
|
||||||
|
"Category: Permissions":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/permissions/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/permissions.rst
|
||||||
|
- docs/cog_permissions.rst
|
||||||
|
"Category: Reports Cog":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/reports/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/reports.rst
|
||||||
|
"Category: RPC/ZMQ API":
|
||||||
|
# Source
|
||||||
|
- redbot/core/rpc.py
|
||||||
|
# Docs
|
||||||
|
- docs/framework_rpc.rst
|
||||||
|
"Category: Streams":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/streams/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/streams.rst
|
||||||
|
"Category: Tests":
|
||||||
|
- redbot/pytest/*
|
||||||
|
- tests/**/*
|
||||||
|
"Category: Trivia Cog":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/trivia/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/trivia.rst
|
||||||
|
- docs/guide_trivia_list_creation.rst
|
||||||
|
"Category: Trivia Lists":
|
||||||
|
- redbot/cogs/trivia/data/lists/*
|
||||||
|
"Category: Utility Functions":
|
||||||
|
# Source
|
||||||
|
- redbot/core/utils/*
|
||||||
|
# Docs
|
||||||
|
- docs/framework_utils.rst
|
||||||
|
"Category: Warnings":
|
||||||
|
# Source
|
||||||
|
- redbot/cogs/warnings/*
|
||||||
|
# Docs
|
||||||
|
- docs/cog_guides/warnings.rst
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
name: Auto Labeler
|
name: Auto Labeler - Issues
|
||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [opened]
|
types: [opened]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
16
.github/workflows/auto_labeler_pr.yml
vendored
Normal file
16
.github/workflows/auto_labeler_pr.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
name: Auto Labeler - PRs
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Apply Type Label
|
||||||
|
uses: actions/labeler@v3
|
||||||
|
with:
|
||||||
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
sync-labels: "" # this is a temporary workaround, see #4844
|
||||||
5
.github/workflows/codeql-analysis.yml
vendored
5
.github/workflows/codeql-analysis.yml
vendored
@@ -11,6 +11,9 @@ jobs:
|
|||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
security-events: write
|
||||||
|
actions: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -24,7 +27,7 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install -U pip setuptools wheel
|
python -m pip install -U pip setuptools wheel
|
||||||
python -m pip install -r ./tools/dev-requirements.txt
|
python -m pip install -e .[all]
|
||||||
# Set the `CODEQL-PYTHON` environment variable to the Python executable
|
# Set the `CODEQL-PYTHON` environment variable to the Python executable
|
||||||
# that includes the dependencies
|
# that includes the dependencies
|
||||||
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
|
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
|
||||||
|
|||||||
32
.github/workflows/crowdin_upload_strings.yml
vendored
Normal file
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@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||||
|
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y crowdin
|
||||||
|
pip install redgettext==3.3
|
||||||
|
- name: Generate source files
|
||||||
|
run: |
|
||||||
|
make gettext
|
||||||
|
- name: Upload source files
|
||||||
|
run: |
|
||||||
|
make upload_translations
|
||||||
|
env:
|
||||||
|
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
||||||
|
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
||||||
130
.github/workflows/prepare_release.yml
vendored
Normal file
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@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
|
||||||
|
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y crowdin
|
||||||
|
pip install redgettext==3.3
|
||||||
|
|
||||||
|
- name: Generate source files
|
||||||
|
run: |
|
||||||
|
make gettext
|
||||||
|
- name: Download translations
|
||||||
|
run: |
|
||||||
|
make download_translations
|
||||||
|
env:
|
||||||
|
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
|
||||||
|
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
id: cpr_crowdin
|
||||||
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
commit-message: Automated Crowdin downstream
|
||||||
|
title: "[i18n] Automated Crowdin downstream"
|
||||||
|
body: |
|
||||||
|
This is an automated PR that is part of Prepare Release automated workflow (2 out of 2).
|
||||||
|
Please ensure that there are no errors or invalid files are in the PR.
|
||||||
|
labels: "Automated PR, Category: i18n, Changelog Entry: Skipped"
|
||||||
|
branch: "automated/i18n"
|
||||||
|
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
||||||
|
milestone: ${{ needs.pr_stable_bump.outputs.milestone_number }}
|
||||||
|
|
||||||
|
- name: Close and reopen the PR with different token to trigger CI
|
||||||
|
uses: actions/github-script@v3
|
||||||
|
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@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
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@v3
|
||||||
|
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@v3
|
||||||
|
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@v3
|
||||||
|
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}));
|
||||||
50
.github/workflows/publish_crowdin.yml
vendored
50
.github/workflows/publish_crowdin.yml
vendored
@@ -1,50 +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@v2
|
|
||||||
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@v3
|
|
||||||
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"
|
|
||||||
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
|
||||||
27
.github/workflows/publish_pypi.yml
vendored
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@v2
|
|
||||||
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/*
|
|
||||||
150
.github/workflows/publish_release.yml
vendored
Normal file
150
.github/workflows/publish_release.yml
vendored
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
name: Publish Release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release_information:
|
||||||
|
if: github.repository == 'Cog-Creators/Red-DiscordBot'
|
||||||
|
name: GO HERE BEFORE APPROVING
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# Checkout repository and install Python
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
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
|
||||||
|
|
||||||
|
release_to_pypi:
|
||||||
|
needs: release_information
|
||||||
|
environment: Release
|
||||||
|
name: Release to PyPI
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.8'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install build twine
|
||||||
|
- name: Build and publish
|
||||||
|
env:
|
||||||
|
TWINE_USERNAME: __token__
|
||||||
|
TWINE_PASSWORD: ${{ secrets.pypi_token }}
|
||||||
|
run: |
|
||||||
|
python -m build
|
||||||
|
twine upload dist/*
|
||||||
|
|
||||||
|
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@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ env.BASE_BRANCH }}
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
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@v3
|
||||||
|
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@v3
|
||||||
|
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@v3
|
||||||
|
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}));
|
||||||
52
.github/workflows/scripts/bump_version.py
vendored
Normal file
52
.github/workflows/scripts/bump_version.py
vendored
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from typing import Match
|
||||||
|
|
||||||
|
import redbot
|
||||||
|
|
||||||
|
|
||||||
|
if int(os.environ.get("JUST_RETURN_VERSION", 0)):
|
||||||
|
print(f"::set-output name=version::{redbot.__version__}")
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
version_info = None
|
||||||
|
|
||||||
|
|
||||||
|
def repl(match: Match[str]) -> str:
|
||||||
|
global version_info
|
||||||
|
|
||||||
|
print(f"::set-output name=old_version::{match.group('version')}")
|
||||||
|
|
||||||
|
new_stable_version = os.environ.get("NEW_STABLE_VERSION", "auto")
|
||||||
|
if new_stable_version == "auto":
|
||||||
|
version_info = redbot.VersionInfo.from_str(match.group("version"))
|
||||||
|
version_info.dev_release = None
|
||||||
|
else:
|
||||||
|
version_info = redbot.VersionInfo.from_str(new_stable_version)
|
||||||
|
|
||||||
|
if int(os.environ.get("DEV_BUMP", 0)):
|
||||||
|
version_info.micro += 1
|
||||||
|
version_info.dev_release = 1
|
||||||
|
|
||||||
|
return f'__version__ = "{version_info}"'
|
||||||
|
|
||||||
|
|
||||||
|
with open("redbot/__init__.py", encoding="utf-8") as fp:
|
||||||
|
new_contents, found = re.subn(
|
||||||
|
pattern=r'^__version__ = "(?P<version>[^"]*)"$',
|
||||||
|
repl=repl,
|
||||||
|
string=fp.read(),
|
||||||
|
count=1,
|
||||||
|
flags=re.MULTILINE,
|
||||||
|
)
|
||||||
|
|
||||||
|
if not found:
|
||||||
|
print("Couldn't find `__version__` line!")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
with open("redbot/__init__.py", "w", encoding="utf-8", newline="\n") as fp:
|
||||||
|
fp.write(new_contents)
|
||||||
|
|
||||||
|
print(f"::set-output name=new_version::{version_info}")
|
||||||
25
.github/workflows/scripts/close_and_reopen_pr.js
vendored
Normal file
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.issues.update({
|
||||||
|
issue_number: pr_number,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
state: new_state
|
||||||
|
});
|
||||||
|
|
||||||
|
sleep_time = 2000;
|
||||||
|
}
|
||||||
|
})
|
||||||
49
.github/workflows/scripts/get_milestone_number_by_exact_title.js
vendored
Normal file
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;
|
||||||
|
})
|
||||||
14
.github/workflows/tests.yml
vendored
14
.github/workflows/tests.yml
vendored
@@ -17,12 +17,18 @@ jobs:
|
|||||||
python_version:
|
python_version:
|
||||||
- "3.8"
|
- "3.8"
|
||||||
tox_env:
|
tox_env:
|
||||||
- py
|
|
||||||
- style
|
- style
|
||||||
- docs
|
- docs
|
||||||
include:
|
include:
|
||||||
- tox_env: py
|
- tox_env: py38
|
||||||
friendly_name: Tests
|
python_version: "3.8"
|
||||||
|
friendly_name: Python 3.8 - Tests
|
||||||
|
- tox_env: py39
|
||||||
|
python_version: "3.9"
|
||||||
|
friendly_name: Python 3.9 - Tests
|
||||||
|
- tox_env: py310
|
||||||
|
python_version: "3.10-dev"
|
||||||
|
friendly_name: Python 3.10-dev - Tests
|
||||||
- tox_env: style
|
- tox_env: style
|
||||||
friendly_name: Style
|
friendly_name: Style
|
||||||
- tox_env: docs
|
- tox_env: docs
|
||||||
@@ -52,6 +58,8 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
python_version:
|
python_version:
|
||||||
- "3.8"
|
- "3.8"
|
||||||
|
- "3.9"
|
||||||
|
- "3.10-dev"
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
name: Tox - Postgres
|
name: Tox - Postgres
|
||||||
services:
|
services:
|
||||||
|
|||||||
85
.gitignore
vendored
85
.gitignore
vendored
@@ -15,6 +15,8 @@ Pipfile.lock
|
|||||||
.idea/
|
.idea/
|
||||||
*.iws
|
*.iws
|
||||||
.vscode/
|
.vscode/
|
||||||
|
*.sublime-project
|
||||||
|
*.sublime-workspace
|
||||||
|
|
||||||
## Plugin-specific files:
|
## Plugin-specific files:
|
||||||
|
|
||||||
@@ -141,3 +143,86 @@ ENV/
|
|||||||
|
|
||||||
# Pre-commit hooks
|
# Pre-commit hooks
|
||||||
/.pre-commit-config.yaml
|
/.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
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
formats:
|
|
||||||
- pdf
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: latest
|
image: latest
|
||||||
|
|
||||||
python:
|
python:
|
||||||
version: 3.8
|
version: 3.8
|
||||||
install:
|
install:
|
||||||
- requirements: docs/requirements.txt
|
|
||||||
- method: pip
|
- method: pip
|
||||||
path: .
|
path: .
|
||||||
extra_requirements:
|
extra_requirements:
|
||||||
|
|||||||
65
.travis.yml
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
|
|
||||||
@@ -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.
|
* 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.
|
* 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!
|
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:
|
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`)
|
- 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 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.
|
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.
|
Your PR will not be merged until all of these tests pass.
|
||||||
|
|
||||||
### 4.3 Style
|
### 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
|
### 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:
|
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:
|
||||||
|
|||||||
4
LICENSE
4
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.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
Red - A fully customizable Discord bot
|
Red - A fully customizable Discord bot
|
||||||
Copyright (C) 2017-2020 Cog Creators
|
Copyright (C) 2017-2021 Cog Creators
|
||||||
Copyright (C) 2015-2017 Twentysix
|
Copyright (C) 2015-2017 Twentysix
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
If the program does terminal interaction, make it output a short
|
||||||
notice like this when it starts in an interactive mode:
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
Red-DiscordBot Copyright (C) 2017-2020 Cog Creators
|
Red-DiscordBot Copyright (C) 2017-2021 Cog Creators
|
||||||
Red-DiscordBot Copyright (C) 2015-2017 Twentysix
|
Red-DiscordBot Copyright (C) 2015-2017 Twentysix
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
|
|||||||
27
MANIFEST.in
Normal file
27
MANIFEST.in
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# include license files
|
||||||
|
include LICENSE
|
||||||
|
recursive-include redbot *.LICENSE
|
||||||
|
|
||||||
|
# include locale files
|
||||||
|
recursive-include redbot locales/*.po
|
||||||
|
|
||||||
|
# include data folders for cogs
|
||||||
|
recursive-include redbot/**/data *
|
||||||
|
|
||||||
|
# include *.export files from the test fixtures
|
||||||
|
recursive-include redbot *.export
|
||||||
|
|
||||||
|
# include the py.typed file informing about Red being typed
|
||||||
|
recursive-include redbot py.typed
|
||||||
|
|
||||||
|
# include *.sql files from postgres driver
|
||||||
|
recursive-include redbot/core/drivers/postgres *.sql
|
||||||
|
|
||||||
|
# include tests
|
||||||
|
graft tests
|
||||||
|
|
||||||
|
# include tox configuration
|
||||||
|
include tox.ini
|
||||||
|
|
||||||
|
# exclude files containing byte-code and compiled libs
|
||||||
|
global-exclude *.py[cod]
|
||||||
37
Makefile
37
Makefile
@@ -1,14 +1,41 @@
|
|||||||
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
PYTHON ?= python3.8
|
PYTHON ?= python3.8
|
||||||
|
|
||||||
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
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
|
# Python Code Style
|
||||||
reformat:
|
reformat:
|
||||||
$(PYTHON) -m black $(ROOT_DIR)
|
$(VENV_PYTHON) -m black $(ROOT_DIR)
|
||||||
stylecheck:
|
stylecheck:
|
||||||
$(PYTHON) -m black --check $(ROOT_DIR)
|
$(VENV_PYTHON) -m black --check $(ROOT_DIR)
|
||||||
stylediff:
|
stylediff:
|
||||||
$(PYTHON) -m black --check --diff $(ROOT_DIR)
|
$(VENV_PYTHON) -m black --check --diff $(ROOT_DIR)
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
gettext:
|
gettext:
|
||||||
@@ -29,3 +56,7 @@ newenv:
|
|||||||
$(MAKE) syncenv
|
$(MAKE) syncenv
|
||||||
syncenv:
|
syncenv:
|
||||||
.venv/bin/pip install -Ur ./tools/dev-requirements.txt
|
.venv/bin/pip install -Ur ./tools/dev-requirements.txt
|
||||||
|
|
||||||
|
# Help
|
||||||
|
help:
|
||||||
|
@echo "$$HELP_BODY"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<a href="http://red-discordbot.readthedocs.io/en/stable/?badge=stable">
|
<a href="http://red-discordbot.readthedocs.io/en/stable/?badge=stable">
|
||||||
<img src="https://readthedocs.org/projects/red-discordbot/badge/?version=stable" alt="Red on readthedocs.org">
|
<img src="https://readthedocs.org/projects/red-discordbot/badge/?version=stable" alt="Red on readthedocs.org">
|
||||||
</a>
|
</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">
|
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code Style: Black">
|
||||||
</a>
|
</a>
|
||||||
<a href="http://makeapullrequest.com">
|
<a href="http://makeapullrequest.com">
|
||||||
@@ -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)
|
- Moderation features (kick/ban/softban/hackban, mod-log, filter, chat cleanup)
|
||||||
- Trivia (lists are included and can be easily added)
|
- Trivia (lists are included and can be easily added)
|
||||||
- Music features (YouTube, SoundCloud, local files, playlists, queues)
|
- Music features (YouTube, SoundCloud, local files, playlists, queues)
|
||||||
- Stream alerts (Twitch, Youtube, Hitbox, Picarto)
|
- Stream alerts (Twitch, Youtube, Picarto)
|
||||||
- Bank (slot machine, user credits)
|
- Bank (slot machine, user credits)
|
||||||
- Custom commands
|
- Custom commands
|
||||||
- Imgur/gif search
|
- Imgur/gif search
|
||||||
@@ -114,7 +114,7 @@ available 3rd party cogs!
|
|||||||
|
|
||||||
**Red** is in continuous development, and it’s supported by an active community which produces new
|
**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
|
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,
|
[find](https://index.discord.red) the cog you’re looking for,
|
||||||
consult our [guide](https://red-discordbot.readthedocs.io/en/stable/guide_cog_creation.html) on
|
consult our [guide](https://red-discordbot.readthedocs.io/en/stable/guide_cog_creation.html) on
|
||||||
building your own cogs!
|
building your own cogs!
|
||||||
|
|
||||||
@@ -131,4 +131,4 @@ Artwork created by [Sinlaire](https://sinlaire.deviantart.com/) on Deviant Art f
|
|||||||
Bot Project.
|
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.
|
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.
|
||||||
|
|||||||
BIN
docs/.resources/trivia/trivia_author.png
Normal file
BIN
docs/.resources/trivia/trivia_author.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
129
docs/_ext/deprecated_removed.py
Normal file
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
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
|
||||||
110
docs/autostart_mac.rst
Normal file
110
docs/autostart_mac.rst
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
.. launchd guide
|
||||||
|
|
||||||
|
==============================
|
||||||
|
Setting up auto-restart on Mac
|
||||||
|
==============================
|
||||||
|
|
||||||
|
-----------------------
|
||||||
|
Creating the plist file
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Start by activating your venv. Then run the following command:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
which python
|
||||||
|
|
||||||
|
Copy the output of that command.
|
||||||
|
|
||||||
|
Now run :code:`sudo nano /Library/LaunchDaemons/red.plist`
|
||||||
|
|
||||||
|
Paste the following and replace the following:
|
||||||
|
|
||||||
|
- :code:`username` (but not :code:`UserName`) with your Mac username
|
||||||
|
- :code:`path` with the path you copied earlier
|
||||||
|
- :code:`instance-name` with your instance name:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
:emphasize-lines: 9, 13, 28
|
||||||
|
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>Label</key>
|
||||||
|
<string>red</string>
|
||||||
|
<key>ProgramArguments</key>
|
||||||
|
<array>
|
||||||
|
<string>path</string>
|
||||||
|
<string>-O</string>
|
||||||
|
<string>-m</string>
|
||||||
|
<string>redbot</string>
|
||||||
|
<string>instance-name</string>
|
||||||
|
<string>--no-prompt</string>
|
||||||
|
</array>
|
||||||
|
<key>RunAtLoad</key>
|
||||||
|
<true/>
|
||||||
|
<key>KeepAlive</key>
|
||||||
|
<dict>
|
||||||
|
<key>SuccessfulExit</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<key>StandardOutPath</key>
|
||||||
|
<string>/tmp/red_out.log</string>
|
||||||
|
<key>StandardErrorPath</key>
|
||||||
|
<string>/tmp/red_err.log</string>
|
||||||
|
<key>UserName</key>
|
||||||
|
<string>username</string>
|
||||||
|
<key>InitGroups</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
You may add any additional arguments you need to add to the :code:`redbot` command by
|
||||||
|
adding them to the end of the array under :code:`ProgramArguments`
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Should you need to set up auto-restart for additional bots, create a :code:`.plist` file for
|
||||||
|
each bot under a different file name, and use the respective file names for the commands below.
|
||||||
|
|
||||||
|
Save and exit :code:`ctrl + O; enter; ctrl + x`
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Starting and loading the plist
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
To start the bot and set it to start on boot, you must run the following command:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo launchctl load -w /Library/LaunchDaemons/red.plist
|
||||||
|
|
||||||
|
If you need to shutdown the bot, you can use the ``[p]shutdown`` command or
|
||||||
|
type the following command in the terminal:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo launchctl stop red
|
||||||
|
|
||||||
|
To start the bot again after a shutdown, run the following:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo launchctl start red
|
||||||
|
|
||||||
|
To stop the bot and set it to not start on boot anymore, run the following:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo launchctl unload -w /Library/LaunchDaemons/red.plist
|
||||||
|
|
||||||
|
To view Red's log, run the following (:code:`red_out.log` is for the console output, and
|
||||||
|
:code:`red_err.log` for the error logs):
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
nano /tmp/red_out.log
|
||||||
|
nano /tmp/red_err.log
|
||||||
@@ -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
|
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
|
Creating the service file
|
||||||
-------------------------
|
-------------------------
|
||||||
@@ -12,29 +14,32 @@ In order to create the service file, you will first need to know two things, you
|
|||||||
|
|
||||||
First, your Linux :code:`username` can be fetched with the following command:
|
First, your Linux :code:`username` can be fetched with the following command:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. prompt:: bash
|
||||||
|
|
||||||
whoami
|
whoami
|
||||||
|
|
||||||
Next, your python :code:`path` can be fetched with the following commands:
|
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
|
# If redbot is installed in a venv
|
||||||
source ~/redenv/bin/activate
|
$ source ~/redenv/bin/activate
|
||||||
which python
|
(redenv) $ /usr/bin/which python
|
||||||
|
|
||||||
# If redbot is installed in a pyenv virtualenv
|
# If redbot is installed in a pyenv virtualenv
|
||||||
pyenv shell <virtualenv_name>
|
$ pyenv shell <virtualenv_name>
|
||||||
pyenv which python
|
(redenv) $ pyenv which python
|
||||||
|
|
||||||
Then create the new service file:
|
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.
|
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
|
.. code-block:: none
|
||||||
|
:emphasize-lines: 8-10
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=%I redbot
|
Description=%I redbot
|
||||||
@@ -65,20 +70,34 @@ Starting and enabling the service
|
|||||||
|
|
||||||
To start the bot, run the service and add the instance name after the **@**:
|
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 **@**:
|
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
|
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 **@**:
|
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.
|
.. 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.
|
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
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ Continue to the next section to enable privileged intents.
|
|||||||
Enabling Privileged Intents
|
Enabling Privileged Intents
|
||||||
-------------------------------
|
-------------------------------
|
||||||
.. warning::
|
.. warning::
|
||||||
Due to Discord API changes, Red Bot requires all intents.
|
:ref:`Red Bot requires all intents. <intents>`
|
||||||
\This section is required.
|
\This section is required.
|
||||||
|
|
||||||
1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
|
1. Make sure you're logged on to the `Discord website <https://discord.com>`_.
|
||||||
@@ -75,5 +75,6 @@ Enabling Privileged Intents
|
|||||||
.. warning::
|
.. 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.
|
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>`_.
|
*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>`_.
|
||||||
|
|||||||
@@ -650,7 +650,7 @@ Dev Cog
|
|||||||
Documentation changes
|
Documentation changes
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
- Fixed install instructions for Mac in `install_linux_mac` (:issue:`3675`, :issue:`3436`)
|
- Fixed install instructions for 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`)
|
- Windows install instructions now use ``choco upgrade`` commands instead of ``choco install`` to ensure up-to-date packages (:issue:`3684`)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -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.
|
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,
|
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
|
the bot will instantly leave new servers it joins) and announcements, which
|
||||||
will send something in all the servers of the bot.
|
can send something in all the servers of the bot.
|
||||||
|
|
||||||
.. _admin-commands:
|
.. _admin-commands:
|
||||||
|
|
||||||
@@ -46,13 +46,16 @@ selfrole
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
[p]selfrole
|
[p]selfrole <selfrole>
|
||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
Add or remove roles to yourself. Those roles must have been configured as user
|
Add or remove a role from yourself. It must have been configured as user settable
|
||||||
settable by admins using the :ref:`selfroleset command
|
by admins using the :ref:`selfroleset command <admin-command-selfroleset>`.
|
||||||
<admin-command-selfroleset>`.
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<selfrole>``: The role you want to attribute or remove from yourself. |role-input|
|
||||||
|
|
||||||
.. _admin-command-selfrole-add:
|
.. _admin-command-selfrole-add:
|
||||||
|
|
||||||
@@ -147,7 +150,7 @@ selfroleset add
|
|||||||
|
|
||||||
**Description**
|
**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.
|
.. warning:: Members will be able to assign themselves the role.
|
||||||
Make sure it doesn't give extra perms or anything that can break
|
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|
|
* ``<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:
|
.. _admin-command-selfroleset-remove:
|
||||||
|
|
||||||
""""""""""""""""""
|
""""""""""""""""""
|
||||||
@@ -171,7 +190,7 @@ selfroleset remove
|
|||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
Removes a role from the list of selfroles.
|
Remove a role, or a selection of roles, from the list of available selfroles.
|
||||||
|
|
||||||
**Arguments**
|
**Arguments**
|
||||||
|
|
||||||
@@ -229,7 +248,7 @@ as yourself, the command author.
|
|||||||
* ``<role>``: The role to remove. |role-input-quotes|
|
* ``<role>``: The role to remove. |role-input-quotes|
|
||||||
|
|
||||||
* ``[user]``: The member to remove the role from. |member-input| Defaults
|
* ``[user]``: The member to remove the role from. |member-input| Defaults
|
||||||
to the command author.
|
to the command author.
|
||||||
|
|
||||||
.. _admin-command-editrole:
|
.. _admin-command-editrole:
|
||||||
|
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ cleanup bot
|
|||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
Clean up command messages and messages from the bot.
|
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.
|
Can only cleanup custom commands and alias commands if those cogs are loaded.
|
||||||
|
|
||||||
@@ -175,7 +175,7 @@ cleanup messages
|
|||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
Delete the last X messages.
|
Delete the last X messages in the current channel.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
- ``[p]cleanup messages 26``
|
- ``[p]cleanup messages 26``
|
||||||
@@ -199,7 +199,7 @@ cleanup self
|
|||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
Clean up messages owned by the bot.
|
Clean up messages owned by the bot in the current channel.
|
||||||
|
|
||||||
By default, all messages are cleaned. If a second argument is specified,
|
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.
|
it is used for pattern matching - only messages containing the given text will be deleted.
|
||||||
@@ -255,7 +255,7 @@ cleanup text
|
|||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
Delete the last X messages matching the specified text.
|
Delete the last X messages matching the specified text in the current channel.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
- ``[p]cleanup text "test" 5``
|
- ``[p]cleanup text "test" 5``
|
||||||
@@ -283,7 +283,7 @@ cleanup user
|
|||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
Delete the last X messages from a specified user.
|
Delete the last X messages from a specified user in the current channel.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
- ``[p]cleanup user @Twentysix 2``
|
- ``[p]cleanup user @Twentysix 2``
|
||||||
@@ -294,3 +294,40 @@ Examples:
|
|||||||
- ``<user>`` The user whose messages are to be cleaned up.
|
- ``<user>`` The user whose messages are to be cleaned up.
|
||||||
- ``<number>`` The max number of messages to cleanup. Must be a positive integer.
|
- ``<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
|
- ``<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.
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ or unload them.
|
|||||||
How to install a local package without using downloader
|
How to install a local package without using downloader
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Let's suppose you made a cog request on the `cog board <https://cogboard.red>`_
|
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
|
and now you want to add your own cog to Red. You should have a folder that
|
||||||
looks like this:
|
looks like this:
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ reorderpath
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
[p]reorderpath <from\_> <to>
|
[p]reorderpath <from_> <to>
|
||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
@@ -238,8 +238,10 @@ installpath
|
|||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
Shows the install path, or sets a new one. If you want to set a new path, the
|
Shows the install path, or sets a new one.
|
||||||
same rules as for :ref:`addpath <cogmanagerui-command-addpath>` applies.
|
|
||||||
|
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 transfered.
|
.. warning:: If you edit the install path, the cogs won't be transfered.
|
||||||
|
|
||||||
|
|||||||
3581
docs/cog_guides/core.rst
Normal file
3581
docs/cog_guides/core.rst
Normal file
File diff suppressed because it is too large
Load Diff
@@ -291,4 +291,4 @@ Shows a custom command's responses and its settings.
|
|||||||
|
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
|
|
||||||
- ``<command>`` The custom command to show.
|
- ``<command_name>`` The custom command to show.
|
||||||
|
|||||||
@@ -235,8 +235,8 @@ You may only uninstall cogs which were previously installed
|
|||||||
by Downloader.
|
by Downloader.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
- ``[p]cog uninstall 26-Cogs defender``
|
- ``[p]cog uninstall defender``
|
||||||
- ``[p]cog uninstall Laggrons-Dumb-Cogs say roleinvite``
|
- ``[p]cog uninstall say roleinvite``
|
||||||
|
|
||||||
**Arguments**
|
**Arguments**
|
||||||
|
|
||||||
@@ -461,14 +461,15 @@ repo delete
|
|||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
Remove a repo and its files.
|
Remove repos and their files.
|
||||||
|
|
||||||
Example:
|
Examples:
|
||||||
- ``[p]repo delete 26-Cogs``
|
- ``[p]repo delete 26-Cogs``
|
||||||
|
- ``[p]repo delete 26-Cogs Laggrons-Dumb-Cogs``
|
||||||
|
|
||||||
**Arguments**
|
**Arguments**
|
||||||
|
|
||||||
- ``<repo>`` The name of an already added repo
|
- ``<repos...>`` The repo or repos to remove.
|
||||||
|
|
||||||
.. _downloader-command-repo-info:
|
.. _downloader-command-repo-info:
|
||||||
|
|
||||||
|
|||||||
@@ -302,18 +302,20 @@ economyset paydaytime
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
[p]economyset paydaytime <seconds>
|
[p]economyset paydaytime <duration>
|
||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
Set the cooldown for the payday command.
|
Set the cooldown for the payday command.
|
||||||
|
|
||||||
Example:
|
Examples:
|
||||||
- ``[p]economyset paydaytime 86400``
|
- ``[p]economyset paydaytime 86400``
|
||||||
|
- ``[p]economyset paydaytime 1d``
|
||||||
|
|
||||||
**Arguments**
|
**Arguments**
|
||||||
|
|
||||||
- ``<seconds>`` The new number of seconds to wait in between uses of payday. Default is 300.
|
- | ``<duration>`` The new duration to wait in between uses of payday. Default is 5 minutes.
|
||||||
|
| Accepts: seconds, minutes, hours, days, weeks (if no unit is specified, the duration is assumed to be given in seconds)
|
||||||
|
|
||||||
.. _economy-command-economyset-registeramount:
|
.. _economy-command-economyset-registeramount:
|
||||||
|
|
||||||
@@ -354,6 +356,8 @@ economyset rolepaydayamount
|
|||||||
|
|
||||||
Set the amount earned each payday for a role.
|
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.
|
Only available when not using a global bank.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@@ -436,18 +440,20 @@ economyset slottime
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
[p]economyset slottime <seconds>
|
[p]economyset slottime <duration>
|
||||||
|
|
||||||
**Description**
|
**Description**
|
||||||
|
|
||||||
Set the cooldown for the slot machine.
|
Set the cooldown for the slot machine.
|
||||||
|
|
||||||
Example:
|
Examples:
|
||||||
- ``[p]economyset slottime 10``
|
- ``[p]economyset slottime 10``
|
||||||
|
- ``[p]economyset slottime 10m``
|
||||||
|
|
||||||
**Arguments**
|
**Arguments**
|
||||||
|
|
||||||
- ``<seconds>`` The new number of seconds to wait in between uses of the slot machine. Default is 5.
|
- | ``<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:
|
.. _economy-command-leaderboard:
|
||||||
|
|
||||||
|
|||||||
335
docs/cog_guides/filter.rst
Normal file
335
docs/cog_guides/filter.rst
Normal file
@@ -0,0 +1,335 @@
|
|||||||
|
.. _filter:
|
||||||
|
|
||||||
|
======
|
||||||
|
Filter
|
||||||
|
======
|
||||||
|
|
||||||
|
This is the cog guide for the filter cog. You will
|
||||||
|
find detailed docs about usage and commands.
|
||||||
|
|
||||||
|
``[p]`` is considered as your prefix.
|
||||||
|
|
||||||
|
.. note:: To use this cog, load it by typing this::
|
||||||
|
|
||||||
|
[p]load filter
|
||||||
|
|
||||||
|
.. _filter-usage:
|
||||||
|
|
||||||
|
-----
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
This cog is designed for "filtering" unwanted words and phrases from a server.
|
||||||
|
|
||||||
|
It provides tools to manage a list of words or sentences, and to customize automatic actions to be taken against users who use those words in channels or in their name/nickname.
|
||||||
|
|
||||||
|
This can be used to prevent inappropriate language, off-topic discussions, invite links, and more.
|
||||||
|
|
||||||
|
|
||||||
|
.. _filter-commands:
|
||||||
|
|
||||||
|
--------
|
||||||
|
Commands
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. _filter-command-filter:
|
||||||
|
|
||||||
|
^^^^^^
|
||||||
|
filter
|
||||||
|
^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filter
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Base command to add or remove words from the server filter.
|
||||||
|
|
||||||
|
Use double quotes to add or remove sentences.
|
||||||
|
|
||||||
|
.. _filter-command-filter-add:
|
||||||
|
|
||||||
|
""""""""""
|
||||||
|
filter add
|
||||||
|
""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filter add [words...]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Add words to the filter.
|
||||||
|
|
||||||
|
Use double quotes to add sentences.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
- ``[p]filter add word1 word2 word3``
|
||||||
|
- ``[p]filter add "This is a sentence"``
|
||||||
|
|
||||||
|
**Arguments:**
|
||||||
|
|
||||||
|
- ``[words...]`` The words or sentences to filter.
|
||||||
|
|
||||||
|
.. _filter-command-filter-channel:
|
||||||
|
|
||||||
|
""""""""""""""
|
||||||
|
filter channel
|
||||||
|
""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filter channel
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Base command to add or remove words from the channel filter.
|
||||||
|
|
||||||
|
Use double quotes to add or remove sentences.
|
||||||
|
|
||||||
|
.. _filter-command-filter-channel-add:
|
||||||
|
|
||||||
|
""""""""""""""""""
|
||||||
|
filter channel add
|
||||||
|
""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filter channel add [words...]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Add words to the filter.
|
||||||
|
|
||||||
|
Use double quotes to add sentences.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
- ``[p]filter channel add word1 word2 word3``
|
||||||
|
- ``[p]filter channel add "This is a sentence"``
|
||||||
|
|
||||||
|
**Arguments:**
|
||||||
|
|
||||||
|
- ``[words...]`` The words or sentences to filter.
|
||||||
|
|
||||||
|
.. _filter-command-filter-channel-clear:
|
||||||
|
|
||||||
|
""""""""""""""""""""
|
||||||
|
filter channel clear
|
||||||
|
""""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filter channel clear
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Clears this channel's filter list.
|
||||||
|
|
||||||
|
.. _filter-command-filter-channel-list:
|
||||||
|
|
||||||
|
"""""""""""""""""""
|
||||||
|
filter channel list
|
||||||
|
"""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filter channel list
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Send a list of the channel's filtered words.
|
||||||
|
|
||||||
|
.. _filter-command-filter-channel-remove:
|
||||||
|
|
||||||
|
"""""""""""""""""""""
|
||||||
|
filter channel remove
|
||||||
|
"""""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filter channel remove [words...]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Remove words from the filter.
|
||||||
|
|
||||||
|
Use double quotes to remove sentences.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
- ``[p]filter channel remove word1 word2 word3``
|
||||||
|
- ``[p]filter channel remove "This is a sentence"``
|
||||||
|
|
||||||
|
**Arguments:**
|
||||||
|
|
||||||
|
- ``[words...]`` The words or sentences to no longer filter.
|
||||||
|
|
||||||
|
.. _filter-command-filter-clear:
|
||||||
|
|
||||||
|
""""""""""""
|
||||||
|
filter clear
|
||||||
|
""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filter clear
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Clears this server's filter list.
|
||||||
|
|
||||||
|
.. _filter-command-filter-delete:
|
||||||
|
|
||||||
|
"""""""""""""
|
||||||
|
filter delete
|
||||||
|
"""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filter delete [words...]
|
||||||
|
|
||||||
|
.. tip:: Aliases: ``filter remove``, ``filter del``
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Remove words from the filter.
|
||||||
|
|
||||||
|
Use double quotes to remove sentences.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
- ``[p]filter remove word1 word2 word3``
|
||||||
|
- ``[p]filter remove "This is a sentence"``
|
||||||
|
|
||||||
|
**Arguments:**
|
||||||
|
|
||||||
|
- ``[words...]`` The words or sentences to no longer filter.
|
||||||
|
|
||||||
|
.. _filter-command-filter-list:
|
||||||
|
|
||||||
|
"""""""""""
|
||||||
|
filter list
|
||||||
|
"""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filter list
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Send a list of this server's filtered words.
|
||||||
|
|
||||||
|
.. _filter-command-filter-names:
|
||||||
|
|
||||||
|
""""""""""""
|
||||||
|
filter names
|
||||||
|
""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filter names
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Toggle name and nickname filtering.
|
||||||
|
|
||||||
|
This is disabled by default.
|
||||||
|
|
||||||
|
.. _filter-command-filterset:
|
||||||
|
|
||||||
|
^^^^^^^^^
|
||||||
|
filterset
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filterset
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Base command to manage filter settings.
|
||||||
|
|
||||||
|
.. _filter-command-filterset-ban:
|
||||||
|
|
||||||
|
"""""""""""""
|
||||||
|
filterset ban
|
||||||
|
"""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filterset ban <count> <timeframe>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Set the filter's autoban conditions.
|
||||||
|
|
||||||
|
Users will be banned if they send ``<count>`` filtered words in
|
||||||
|
``<timeframe>`` seconds.
|
||||||
|
|
||||||
|
Set both to zero to disable autoban.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
- ``[p]filterset ban 5 5`` - Ban users who say 5 filtered words in 5 seconds.
|
||||||
|
- ``[p]filterset ban 2 20`` - Ban users who say 2 filtered words in 20 seconds.
|
||||||
|
|
||||||
|
**Arguments:**
|
||||||
|
|
||||||
|
- ``<count>`` The amount of filtered words required to trigger a ban.
|
||||||
|
- ``<timeframe>`` The period of time in which too many filtered words will trigger a ban.
|
||||||
|
|
||||||
|
.. _filter-command-filterset-defaultname:
|
||||||
|
|
||||||
|
"""""""""""""""""""""
|
||||||
|
filterset defaultname
|
||||||
|
"""""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]filterset defaultname <name>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Set the nickname for users with a filtered name.
|
||||||
|
|
||||||
|
Note that this has no effect if filtering names is disabled
|
||||||
|
(to toggle, run ``[p]filter names``).
|
||||||
|
|
||||||
|
The default name used is *John Doe*.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
- ``[p]filterset defaultname Missingno``
|
||||||
|
|
||||||
|
**Arguments:**
|
||||||
|
|
||||||
|
- ``<name>`` The new nickname to assign.
|
||||||
218
docs/cog_guides/general.rst
Normal file
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
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>
|
||||||
763
docs/cog_guides/mod.rst
Normal file
763
docs/cog_guides/mod.rst
Normal file
@@ -0,0 +1,763 @@
|
|||||||
|
.. _mod:
|
||||||
|
|
||||||
|
===
|
||||||
|
Mod
|
||||||
|
===
|
||||||
|
|
||||||
|
This is the cog guide for the mod cog. You will
|
||||||
|
find detailed docs about usage and commands.
|
||||||
|
|
||||||
|
``[p]`` is considered as your prefix.
|
||||||
|
|
||||||
|
.. note:: To use this cog, load it by typing this::
|
||||||
|
|
||||||
|
[p]load mod
|
||||||
|
|
||||||
|
.. _mod-usage:
|
||||||
|
|
||||||
|
-----
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
A range of highly customizable moderation tools used to protect your
|
||||||
|
guild from users who cannot follow the rules.
|
||||||
|
|
||||||
|
|
||||||
|
.. _mod-commands:
|
||||||
|
|
||||||
|
--------
|
||||||
|
Commands
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. _mod-command-ban:
|
||||||
|
|
||||||
|
^^^
|
||||||
|
ban
|
||||||
|
^^^
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]ban <user> [days] [reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Ban a user from this server and optionally delete days of messages.
|
||||||
|
|
||||||
|
``days`` is the amount of days of messages to cleanup on ban.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<user>``: The user to ban. |user-input|
|
||||||
|
* ``[days]``: The amount of days of messages to cleanup on ban. This parameter defaults to the defaultdays setting, or no days if this has not yet been configured.
|
||||||
|
* ``[reason]``: The reason why the user was banned (optional).
|
||||||
|
|
||||||
|
**Example Usage**
|
||||||
|
|
||||||
|
* ``[p]ban 428675506947227648 7 Continued to spam after told to stop.``
|
||||||
|
This will ban the user with ID 428675506947227648 and it will delete 7 days worth of messages.
|
||||||
|
* ``[p]ban @Twentysix 7 Continued to spam after told to stop.``
|
||||||
|
This will ban Twentysix and it will delete 7 days worth of messages.
|
||||||
|
|
||||||
|
A user ID should be provided if the user is not a member of this server.
|
||||||
|
If days is not a number, it's treated as the first word of the reason.
|
||||||
|
Minimum 0 days, maximum 7. If not specified, the defaultdays setting will be used instead.
|
||||||
|
|
||||||
|
.. _mod-command-kick:
|
||||||
|
|
||||||
|
^^^^
|
||||||
|
kick
|
||||||
|
^^^^
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]kick <member> [reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Kick a user.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<member>``: The member to kick. |member-input|
|
||||||
|
* ``[reason]``: The reason why the user was kicked (optional).
|
||||||
|
|
||||||
|
**Example Usage**
|
||||||
|
|
||||||
|
* ``[p]kick 428675506947227648 wanted to be kicked.``
|
||||||
|
This will kick the user with ID 428675506947227648 from the server.
|
||||||
|
* ``[p]kick @Twentysix wanted to be kicked.``
|
||||||
|
This will kick Twentysix from the server.
|
||||||
|
|
||||||
|
If a reason is specified, it will be the reason that shows up
|
||||||
|
in the audit log.
|
||||||
|
|
||||||
|
.. _mod-command-massban:
|
||||||
|
|
||||||
|
^^^^^^^
|
||||||
|
massban
|
||||||
|
^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]massban <user_ids...> [days] [reason]
|
||||||
|
|
||||||
|
.. tip:: Alias: ``hackban``
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Mass bans user(s) from the server.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<user_ids...>``: The users to ban. This must be a list of user IDs separated by spaces.
|
||||||
|
* ``[days]``: The amount of days of messages to cleanup on massban.
|
||||||
|
* ``[reason]``: The reason why these users were banned.
|
||||||
|
|
||||||
|
**Example Usage**
|
||||||
|
|
||||||
|
* ``[p]massban 345628097929936898 57287406247743488 7 they broke all rules.``
|
||||||
|
This will ban all the added userids and delete 7 days worth of their messages.
|
||||||
|
|
||||||
|
.. _mod-command-modset:
|
||||||
|
|
||||||
|
^^^^^^
|
||||||
|
modset
|
||||||
|
^^^^^^
|
||||||
|
|
||||||
|
.. note:: |guildowner-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Manage server administration settings.
|
||||||
|
|
||||||
|
.. _mod-command-modset-defaultdays:
|
||||||
|
|
||||||
|
""""""""""""""""""
|
||||||
|
modset defaultdays
|
||||||
|
""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset defaultdays [days=0]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Set the default number of days worth of messages to be deleted when a user is banned.
|
||||||
|
|
||||||
|
The number of days must be between 0 and 7.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[days=0]``: The default number of days of messages to be deleted when a user is banned.
|
||||||
|
|
||||||
|
.. note:: This value must be between 0 and 7.
|
||||||
|
|
||||||
|
.. _mod-command-modset-defaultduration:
|
||||||
|
|
||||||
|
""""""""""""""""""""""
|
||||||
|
modset defaultduration
|
||||||
|
""""""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset defaultduration <duration>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Set the default time to be used when a user is tempbanned.
|
||||||
|
|
||||||
|
Accepts: seconds, minutes, hours, days, weeks
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<duration>``: The default duration for when a user is temporarily banned. Accepts seconds, minutes, hours, days or weeks.
|
||||||
|
|
||||||
|
**Example Usage**
|
||||||
|
|
||||||
|
* ``[p]modset defaultduration 7d12h10m``
|
||||||
|
* ``[p]modset defaultduration 7 days 12 hours 10 minutes``
|
||||||
|
|
||||||
|
.. _mod-command-modset-deletenames:
|
||||||
|
|
||||||
|
""""""""""""""""""
|
||||||
|
modset deletenames
|
||||||
|
""""""""""""""""""
|
||||||
|
|
||||||
|
.. note:: |owner-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset deletenames [confirmation=False]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Delete all stored usernames and nicknames.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``<confirmation>``: Whether to delete all stored usernames and nicknames. |bool-input|
|
||||||
|
|
||||||
|
.. _mod-command-modset-deleterepeats:
|
||||||
|
|
||||||
|
""""""""""""""""""""
|
||||||
|
modset deleterepeats
|
||||||
|
""""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset deleterepeats [repeats]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Enable auto-deletion of repeated messages.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[repeats]``: The number of repeated messages needed before further messages are deleted.
|
||||||
|
|
||||||
|
.. note:: Must be between 2 and 20. Set to -1 to disable this feature.
|
||||||
|
|
||||||
|
.. _mod-command-modset-dm:
|
||||||
|
|
||||||
|
"""""""""
|
||||||
|
modset dm
|
||||||
|
"""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset dm [enabled]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Toggle whether a message should be sent to a user when they are kicked/banned.
|
||||||
|
|
||||||
|
If this option is enabled, the bot will attempt to DM the user with the guild name
|
||||||
|
and reason as to why they were kicked/banned.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[enabled]``: Whether a message should be sent to a user when they are kicked/banned. |bool-input|
|
||||||
|
|
||||||
|
.. _mod-command-modset-hierarchy:
|
||||||
|
|
||||||
|
""""""""""""""""
|
||||||
|
modset hierarchy
|
||||||
|
""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset hierarchy
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Toggle role hierarchy check for mods and admins.
|
||||||
|
|
||||||
|
.. warning:: Disabling this setting will allow mods to take actions on users above them in the role hierarchy!
|
||||||
|
|
||||||
|
This is enabled by default.
|
||||||
|
|
||||||
|
.. _mod-command-modset-mentionspam:
|
||||||
|
|
||||||
|
""""""""""""""""""
|
||||||
|
modset mentionspam
|
||||||
|
""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset mentionspam
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Manage the automoderation settings for mentionspam.
|
||||||
|
|
||||||
|
.. _mod-command-modset-mentionspam-ban:
|
||||||
|
|
||||||
|
""""""""""""""""""""""
|
||||||
|
modset mentionspam ban
|
||||||
|
""""""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset mentionspam ban <max_mentions>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Set the autoban conditions for mention spam.
|
||||||
|
|
||||||
|
Users will be banned if they send any message which contains more than
|
||||||
|
``<max_mentions>`` mentions.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
|
||||||
|
|
||||||
|
.. _mod-command-modset-mentionspam-kick:
|
||||||
|
|
||||||
|
"""""""""""""""""""""""
|
||||||
|
modset mentionspam kick
|
||||||
|
"""""""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset mentionspam kick <max_mentions>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Set the autokick conditions for mention spam.
|
||||||
|
|
||||||
|
Users will be kicked if they send any message which contains more than
|
||||||
|
``<max_mentions>`` mentions.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
|
||||||
|
|
||||||
|
.. _mod-command-modset-mentionspam-strict:
|
||||||
|
|
||||||
|
"""""""""""""""""""""""""
|
||||||
|
modset mentionspam strict
|
||||||
|
"""""""""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset mentionspam strict [enabled]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Setting to account for duplicate mentions.
|
||||||
|
|
||||||
|
If enabled all mentions will count including duplicated mentions.
|
||||||
|
If disabled only unique mentions will count.
|
||||||
|
|
||||||
|
Use this command without any parameter to see the current setting.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[enabled]``: Whether all mentions will count, including duplicated mentions. |bool-input|
|
||||||
|
|
||||||
|
.. _mod-command-modset-mentionspam-warn:
|
||||||
|
|
||||||
|
"""""""""""""""""""""""
|
||||||
|
modset mentionspam warn
|
||||||
|
"""""""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset mentionspam warn <max_mentions>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Sets the autowarn conditions for mention spam.
|
||||||
|
|
||||||
|
Users will be warned if they send any messages which contain more than
|
||||||
|
``<max_mentions>`` mentions.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<max_mentions>``: Must be 0 or greater. Set to 0 to disable this feature.
|
||||||
|
|
||||||
|
.. _mod-command-modset-reinvite:
|
||||||
|
|
||||||
|
"""""""""""""""
|
||||||
|
modset reinvite
|
||||||
|
"""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset reinvite
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Toggle whether an invite will be sent to a user when unbanned.
|
||||||
|
|
||||||
|
If this is True, the bot will attempt to create and send a single-use invite
|
||||||
|
to the newly-unbanned user.
|
||||||
|
|
||||||
|
.. _mod-command-modset-showsettings:
|
||||||
|
|
||||||
|
"""""""""""""""""""
|
||||||
|
modset showsettings
|
||||||
|
"""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset showsettings
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Show the current server administration settings.
|
||||||
|
|
||||||
|
.. _mod-command-modset-trackallnames:
|
||||||
|
|
||||||
|
""""""""""""""""""""
|
||||||
|
modset trackallnames
|
||||||
|
""""""""""""""""""""
|
||||||
|
|
||||||
|
.. note:: |owner-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset trackallnames [enabled]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Toggle whether all name changes should be tracked.
|
||||||
|
|
||||||
|
Toggling this off also overrides the tracknicknames setting.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[enabled]``: Whether all name changes should be tracked. |bool-input|
|
||||||
|
|
||||||
|
.. _mod-command-modset-tracknicknames:
|
||||||
|
|
||||||
|
"""""""""""""""""""""
|
||||||
|
modset tracknicknames
|
||||||
|
"""""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modset tracknicknames [enabled]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Toggle whether nickname changes should be tracked.
|
||||||
|
|
||||||
|
This setting will be overridden if trackallnames is disabled.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[enabled]``: Whether all nickname changes should be tracked. |bool-input|
|
||||||
|
|
||||||
|
.. _mod-command-movedeletedelay:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
movedeletedelay
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |owner-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]movedeletedelay
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Move deletedelay settings to core
|
||||||
|
|
||||||
|
.. _mod-command-moveignoredchannels:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
moveignoredchannels
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |owner-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]moveignoredchannels
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Move ignored channels and servers to core
|
||||||
|
|
||||||
|
.. _mod-command-names:
|
||||||
|
|
||||||
|
^^^^^
|
||||||
|
names
|
||||||
|
^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]names <member>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Show previous names and nicknames of a member.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<member>``: |member-input|
|
||||||
|
|
||||||
|
.. _mod-command-rename:
|
||||||
|
|
||||||
|
^^^^^^
|
||||||
|
rename
|
||||||
|
^^^^^^
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]rename <member> [nickname]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Change a member's nickname.
|
||||||
|
|
||||||
|
Leaving the nickname empty will remove it.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<member>``: |member-input|
|
||||||
|
* ``[nickname]``: The new nickname for the member.
|
||||||
|
|
||||||
|
.. _mod-command-slowmode:
|
||||||
|
|
||||||
|
^^^^^^^^
|
||||||
|
slowmode
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]slowmode [interval=0:00:00]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Changes channel's slowmode setting.
|
||||||
|
|
||||||
|
Interval can be anything from 0 seconds to 6 hours.
|
||||||
|
Use without parameters to disable.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[interval=0:00:00]``: The time for the channel's slowmode settings.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
Interval can be anything from 0 seconds to 6 hours.
|
||||||
|
Use without parameters to disable.
|
||||||
|
|
||||||
|
.. _mod-command-softban:
|
||||||
|
|
||||||
|
^^^^^^^
|
||||||
|
softban
|
||||||
|
^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]softban <member> [reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Kick a member and delete 1 day's worth of their messages.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<member>``: The member to softban. |member-input-quotes|
|
||||||
|
* ``[reason]``: Reason for the kick (optional).
|
||||||
|
|
||||||
|
.. _mod-command-tempban:
|
||||||
|
|
||||||
|
^^^^^^^
|
||||||
|
tempban
|
||||||
|
^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]tempban <member> [duration] [days] [reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Temporarily ban a user from this server.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<member>``: The member to temporarily ban. |member-input-quotes|
|
||||||
|
* ``[duration]``: The amount of time the user should be banned for.
|
||||||
|
* ``[days]``: The amount of days of messages to cleanup on tempban.
|
||||||
|
* ``[reason]``: The reason for the tempban (optional).
|
||||||
|
|
||||||
|
**Example Usage**
|
||||||
|
|
||||||
|
* ``[p]tempban @Twentysix Because I say so``
|
||||||
|
This will ban Twentysix for the default amount of time set by an administrator.
|
||||||
|
* ``[p]tempban @Twentysix 15m You need a timeout``
|
||||||
|
This will ban Twentysix for 15 minutes.
|
||||||
|
* ``[p]tempban 428675506947227648 1d2h15m 5 Evil person``
|
||||||
|
This will ban the user with ID 428675506947227648 for 1 day 2 hours 15 minutes and will delete the last 5 days of their messages.
|
||||||
|
|
||||||
|
.. _mod-command-unban:
|
||||||
|
|
||||||
|
^^^^^
|
||||||
|
unban
|
||||||
|
^^^^^
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]unban <user_id> [reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Unban a user from this server.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<user_id>``: |user-input|
|
||||||
|
* ``[reason]``: The reason for the unban (optional).
|
||||||
|
|
||||||
|
.. _mod-command-userinfo:
|
||||||
|
|
||||||
|
^^^^^^^^
|
||||||
|
userinfo
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]userinfo [member]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Show information about a user.
|
||||||
|
|
||||||
|
This includes fields for status, discord join date, server
|
||||||
|
join date, voice state and previous names/nicknames.
|
||||||
|
|
||||||
|
If the user has no roles, previous names or previous nicknames,
|
||||||
|
these fields will be omitted.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[member]``: |member-input|
|
||||||
|
|
||||||
|
.. _mod-command-voiceban:
|
||||||
|
|
||||||
|
^^^^^^^^
|
||||||
|
voiceban
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]voiceban <member> [reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Ban a user from speaking and listening in the server's voice channels.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<member>``: The member to ban from voice. |member-input|
|
||||||
|
* ``[reason]``: The reason for the voiceban (optional).
|
||||||
|
|
||||||
|
.. _mod-command-voicekick:
|
||||||
|
|
||||||
|
^^^^^^^^^
|
||||||
|
voicekick
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]voicekick <member> [reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Kick a member from a voice channel.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<member>``: |member-input|
|
||||||
|
* ``[reason]``: The reason for the voicekick (optional).
|
||||||
|
|
||||||
|
.. _mod-command-voiceunban:
|
||||||
|
|
||||||
|
^^^^^^^^^^
|
||||||
|
voiceunban
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]voiceunban <member> [reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Unban a user from speaking and listening in the server's voice channels.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<member>``: The member to unban from voice. |member-input-quotes|
|
||||||
|
* ``[reason]``: The reason for the voiceunban (optional).
|
||||||
191
docs/cog_guides/modlog.rst
Normal file
191
docs/cog_guides/modlog.rst
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
.. _modlog:
|
||||||
|
|
||||||
|
======
|
||||||
|
ModLog
|
||||||
|
======
|
||||||
|
|
||||||
|
This is the cog guide for the modlog cog. You will
|
||||||
|
find detailed docs about usage and commands.
|
||||||
|
|
||||||
|
``[p]`` is considered as your prefix.
|
||||||
|
|
||||||
|
.. note:: To use this cog, load it by typing this::
|
||||||
|
|
||||||
|
[p]load modlog
|
||||||
|
|
||||||
|
.. _modlog-usage:
|
||||||
|
|
||||||
|
-----
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
Manage log channels for moderation actions.
|
||||||
|
|
||||||
|
|
||||||
|
.. _modlog-commands:
|
||||||
|
|
||||||
|
--------
|
||||||
|
Commands
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. _modlog-command-case:
|
||||||
|
|
||||||
|
^^^^
|
||||||
|
case
|
||||||
|
^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]case <number>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Show the specified case.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<case>``: The case number to get information for.
|
||||||
|
|
||||||
|
.. _modlog-command-casesfor:
|
||||||
|
|
||||||
|
^^^^^^^^
|
||||||
|
casesfor
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]casesfor <member>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Display cases for the specified member.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<member>``: The member to get cases for. |member-input|
|
||||||
|
|
||||||
|
.. _modlog-command-listcases:
|
||||||
|
|
||||||
|
^^^^^^^^^
|
||||||
|
listcases
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]listcases <member>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
List cases for the specified member.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<member>``: The member to get cases for. |member-input|
|
||||||
|
|
||||||
|
.. _modlog-command-modlogset:
|
||||||
|
|
||||||
|
^^^^^^^^^
|
||||||
|
modlogset
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |guildowner-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modlogset
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Manage modlog settings.
|
||||||
|
|
||||||
|
.. _modlog-command-modlogset-cases:
|
||||||
|
|
||||||
|
"""""""""""""""
|
||||||
|
modlogset cases
|
||||||
|
"""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modlogset cases [action]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Enable or disable case creation for a mod action.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[action]``: The action to enable or disable case creation for.
|
||||||
|
|
||||||
|
.. _modlog-command-modlogset-modlog:
|
||||||
|
|
||||||
|
""""""""""""""""
|
||||||
|
modlogset modlog
|
||||||
|
""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modlogset modlog [channel]
|
||||||
|
|
||||||
|
.. tip:: Alias: ``modlogset channel``
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Set a channel as the modlog.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[channel]``: The channel to set as the modlog. If omitted, the modlog will be disabled.
|
||||||
|
|
||||||
|
.. _modlog-command-modlogset-resetcases:
|
||||||
|
|
||||||
|
""""""""""""""""""""
|
||||||
|
modlogset resetcases
|
||||||
|
""""""""""""""""""""
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]modlogset resetcases
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Reset all modlog cases in this server.
|
||||||
|
|
||||||
|
.. _modlog-command-reason:
|
||||||
|
|
||||||
|
^^^^^^
|
||||||
|
reason
|
||||||
|
^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]reason [case] <reason>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Specify a reason for a modlog case.
|
||||||
|
|
||||||
|
Please note that you can only edit cases you are
|
||||||
|
the owner of unless you are a mod, admin or server owner.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[case]``: The case number to update the reason for.
|
||||||
|
* ``<reason>``: The new reason for the specified case.
|
||||||
|
|
||||||
|
.. note:: If no case number is specified, the latest case will be used.
|
||||||
410
docs/cog_guides/mutes.rst
Normal file
410
docs/cog_guides/mutes.rst
Normal file
@@ -0,0 +1,410 @@
|
|||||||
|
.. _mutes:
|
||||||
|
|
||||||
|
=====
|
||||||
|
Mutes
|
||||||
|
=====
|
||||||
|
|
||||||
|
This is the cog guide for the mutes cog. You will
|
||||||
|
find detailed docs about usage and commands.
|
||||||
|
|
||||||
|
``[p]`` is considered as your prefix.
|
||||||
|
|
||||||
|
.. note:: To use this cog, load it by typing this::
|
||||||
|
|
||||||
|
[p]load mutes
|
||||||
|
|
||||||
|
.. _mutes-usage:
|
||||||
|
|
||||||
|
-----
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
Mute users temporarily or indefinitely.
|
||||||
|
|
||||||
|
.. _mutes-commands:
|
||||||
|
|
||||||
|
--------
|
||||||
|
Commands
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. _mutes-command-activemutes:
|
||||||
|
|
||||||
|
^^^^^^^^^^^
|
||||||
|
activemutes
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]activemutes
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Displays active mutes on this server.
|
||||||
|
|
||||||
|
.. _mutes-command-mute:
|
||||||
|
|
||||||
|
^^^^
|
||||||
|
mute
|
||||||
|
^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]mute <users...> [time_and_reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Mute users.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
* ``[p]mute @member1 @member2 spam 5 hours``
|
||||||
|
* ``[p]mute @member1 3 days``
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||||
|
* ``[time_and_reason]``: The time and reason. If no time is provided, the mute will use the default set time or indefinite if this hasn't been configured.
|
||||||
|
|
||||||
|
.. _mutes-command-mutechannel:
|
||||||
|
|
||||||
|
^^^^^^^^^^^
|
||||||
|
mutechannel
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]mutechannel <users...> [time_and_reason]
|
||||||
|
|
||||||
|
.. tip:: Alias: ``channelmute``
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Mute a user in the current text channel.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
* ``[p]mutechannel @member1 @member2 spam 5 hours``
|
||||||
|
* ``[p]mutechannel @member1 3 days``
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||||
|
* ``[time_and_reason]``: The time and reason. If no time is provided, the mute will use the default set time or indefinite if this hasn't been configured.
|
||||||
|
|
||||||
|
.. _mutes-command-muteset:
|
||||||
|
|
||||||
|
^^^^^^^
|
||||||
|
muteset
|
||||||
|
^^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]muteset
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Mute settings.
|
||||||
|
|
||||||
|
.. _mutes-command-muteset-defaulttime:
|
||||||
|
|
||||||
|
"""""""""""""""""""
|
||||||
|
muteset defaulttime
|
||||||
|
"""""""""""""""""""
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]muteset defaulttime [time]
|
||||||
|
|
||||||
|
.. tip:: Alias: ``muteset time``
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Set the default mute time for the mute command.
|
||||||
|
|
||||||
|
If no time interval is provided this will be cleared.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[time]``: The length of time for a default mute.
|
||||||
|
|
||||||
|
.. _mutes-command-muteset-forcerole:
|
||||||
|
|
||||||
|
"""""""""""""""""
|
||||||
|
muteset forcerole
|
||||||
|
"""""""""""""""""
|
||||||
|
|
||||||
|
.. note:: |owner-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]muteset forcerole <true_or_false>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Whether or not to force role only mutes on the bot.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
|
||||||
|
|
||||||
|
.. _mutes-command-muteset-makerole:
|
||||||
|
|
||||||
|
""""""""""""""""
|
||||||
|
muteset makerole
|
||||||
|
""""""""""""""""
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]muteset makerole <name>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Create a Muted role.
|
||||||
|
|
||||||
|
This will create a role and apply overwrites to all available channels
|
||||||
|
to more easily setup muting a user.
|
||||||
|
|
||||||
|
If you already have a muted role created on the server use
|
||||||
|
``[p]muteset role ROLE_NAME_HERE``
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<name>``: The name of the muted role to create.
|
||||||
|
|
||||||
|
.. _mutes-command-muteset-notification:
|
||||||
|
|
||||||
|
""""""""""""""""""""
|
||||||
|
muteset notification
|
||||||
|
""""""""""""""""""""
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]muteset notification [channel]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Set the notification channel for automatic unmute issues.
|
||||||
|
|
||||||
|
If no channel is provided this will be cleared and notifications
|
||||||
|
about issues when unmuting users will not be sent anywhere.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[channel]``: The channel to receive unmute issue updates. |channel-input|
|
||||||
|
|
||||||
|
.. _mutes-command-muteset-role:
|
||||||
|
|
||||||
|
""""""""""""
|
||||||
|
muteset role
|
||||||
|
""""""""""""
|
||||||
|
|
||||||
|
.. note:: |admin-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]muteset role [role]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Sets the role to be applied when muting a user.
|
||||||
|
|
||||||
|
If no role is setup the bot will attempt to mute a user by setting
|
||||||
|
channel overwrites in all channels to prevent the user from sending messages.
|
||||||
|
|
||||||
|
.. Note::
|
||||||
|
|
||||||
|
If no role is setup a user may be able to leave the server
|
||||||
|
and rejoin no longer being muted.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``[role]``: The role for muted users to receive. |role-input|
|
||||||
|
|
||||||
|
.. _mutes-command-muteset-senddm:
|
||||||
|
|
||||||
|
""""""""""""""
|
||||||
|
muteset senddm
|
||||||
|
""""""""""""""
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]muteset senddm <true_or_false>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Set whether mute notifications should be sent to users in DMs.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
|
||||||
|
|
||||||
|
.. _mutes-command-muteset-settings:
|
||||||
|
|
||||||
|
""""""""""""""""
|
||||||
|
muteset settings
|
||||||
|
""""""""""""""""
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]muteset settings
|
||||||
|
|
||||||
|
.. tip:: Alias: ``muteset showsettings``
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Shows the current mute settings for this guild.
|
||||||
|
|
||||||
|
.. _mutes-command-muteset-showmoderator:
|
||||||
|
|
||||||
|
"""""""""""""""""""""
|
||||||
|
muteset showmoderator
|
||||||
|
"""""""""""""""""""""
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]muteset showmoderator <true_or_false>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Decide whether the name of the moderator muting a user should be included in the DM to that user.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<true_or_false>``: Whether to enable or disable this setting, must provide ``true`` or ``false``.
|
||||||
|
|
||||||
|
.. _mutes-command-unmute:
|
||||||
|
|
||||||
|
^^^^^^
|
||||||
|
unmute
|
||||||
|
^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]unmute <users...> [reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Unmute users.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||||
|
* ``[reason]``: The reason for the unmute.
|
||||||
|
|
||||||
|
.. _mutes-command-unmutechannel:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
unmutechannel
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]unmutechannel <users...> [reason]
|
||||||
|
|
||||||
|
.. tip:: Alias: ``channelunmute``
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Unmute a user in this channel.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||||
|
* ``[reason]``: The reason for the unmute.
|
||||||
|
|
||||||
|
.. _mutes-command-voicemute:
|
||||||
|
|
||||||
|
^^^^^^^^^
|
||||||
|
voicemute
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]voicemute <users...> [reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Mute a user in their current voice channel.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
* ``[p]voicemute @member1 @member2 spam 5 hours``
|
||||||
|
* ``[p]voicemute @member1 3 days``
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||||
|
* ``[time_and_reason]``: The time and reason. If no time is provided, the mute will use the default set time or indefinite if this hasn't been configured.
|
||||||
|
|
||||||
|
.. _mutes-command-voiceunmute:
|
||||||
|
|
||||||
|
^^^^^^^^^^^
|
||||||
|
voiceunmute
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]voiceunmute <users...> [reason]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Unmute a user in their current voice channel.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
* ``<users...>``: A space separated list of usernames, ID's, or mentions.
|
||||||
|
* ``[reason]``: The reason for the unmute.
|
||||||
440
docs/cog_guides/permissions.rst
Normal file
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 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
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
|
||||||
|
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.
|
||||||
@@ -27,7 +27,6 @@ Supported streaming services are:
|
|||||||
|
|
||||||
- Twitch
|
- Twitch
|
||||||
- Youtube
|
- Youtube
|
||||||
- Smashcast
|
|
||||||
- Picarto
|
- Picarto
|
||||||
|
|
||||||
Youtube and Twitch both require setting authentication
|
Youtube and Twitch both require setting authentication
|
||||||
@@ -201,7 +200,10 @@ Use ``{mention}`` in the message to insert the selected mentions.
|
|||||||
|
|
||||||
Use ``{stream}`` in the message to insert the channel or user name.
|
Use ``{stream}`` in the message to insert the channel or user name.
|
||||||
|
|
||||||
For example: ``[p]streamset message mention {mention}, {stream} is live!``
|
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**
|
**Arguments**
|
||||||
|
|
||||||
@@ -225,7 +227,10 @@ Sets a stream alert message for when mentions are disabled.
|
|||||||
|
|
||||||
Use ``{stream}`` in the message to insert the channel or user name.
|
Use ``{stream}`` in the message to insert the channel or user name.
|
||||||
|
|
||||||
For example: ``[p]streamset message nomention {stream} is live!``
|
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**
|
**Arguments**
|
||||||
|
|
||||||
@@ -353,26 +358,6 @@ Check if a Picarto channel is live.
|
|||||||
|
|
||||||
* ``<channel_name>``: The Picarto channel to check.
|
* ``<channel_name>``: The Picarto channel to check.
|
||||||
|
|
||||||
.. _streams-command-smashcast:
|
|
||||||
|
|
||||||
^^^^^^^^^
|
|
||||||
smashcast
|
|
||||||
^^^^^^^^^
|
|
||||||
|
|
||||||
**Syntax**
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
[p]smashcast <channel_name>
|
|
||||||
|
|
||||||
**Description**
|
|
||||||
|
|
||||||
Check if a Smashcast channel is live.
|
|
||||||
|
|
||||||
**Arguments**
|
|
||||||
|
|
||||||
* ``<channel_name>``: The Smashcast channel to check.
|
|
||||||
|
|
||||||
.. _streams-command-twitchstream:
|
.. _streams-command-twitchstream:
|
||||||
|
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
@@ -466,27 +451,6 @@ specified Picarto channel.
|
|||||||
|
|
||||||
* ``<channel_name>``: The Picarto channel to toggle the alert for.
|
* ``<channel_name>``: The Picarto channel to toggle the alert for.
|
||||||
|
|
||||||
.. _streams-command-streamalert-smashcast:
|
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
streamalert smashcast
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
**Syntax**
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
[p]streamalert smashcast <channel_name>
|
|
||||||
|
|
||||||
**Description**
|
|
||||||
|
|
||||||
Toggle alerts in the current channel for the
|
|
||||||
specified Smashcast channel.
|
|
||||||
|
|
||||||
**Arguments**
|
|
||||||
|
|
||||||
* ``<channel_name>``: The Smashcast channel to toggle the alert for.
|
|
||||||
|
|
||||||
.. _streams-command-streamalert-twitch-channel:
|
.. _streams-command-streamalert-twitch-channel:
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|||||||
439
docs/cog_guides/trivia.rst
Normal file
439
docs/cog_guides/trivia.rst
Normal file
@@ -0,0 +1,439 @@
|
|||||||
|
.. _trivia:
|
||||||
|
|
||||||
|
======
|
||||||
|
Trivia
|
||||||
|
======
|
||||||
|
|
||||||
|
This is the cog guide for the trivia cog. You will
|
||||||
|
find detailed docs about usage and commands.
|
||||||
|
|
||||||
|
``[p]`` is considered as your prefix.
|
||||||
|
|
||||||
|
.. note:: To use this cog, load it by typing this::
|
||||||
|
|
||||||
|
[p]load trivia
|
||||||
|
|
||||||
|
.. _trivia-usage:
|
||||||
|
|
||||||
|
-----
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
This cog allows for playing trivia with others. You may
|
||||||
|
choose to play just one category at a time or choose
|
||||||
|
multiple to add variety to your game. You can even create
|
||||||
|
your own lists!
|
||||||
|
|
||||||
|
.. _trivia-commands:
|
||||||
|
|
||||||
|
--------
|
||||||
|
Commands
|
||||||
|
--------
|
||||||
|
|
||||||
|
Here is a list of all of the commands for this cog:
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset:
|
||||||
|
|
||||||
|
^^^^^^^^^
|
||||||
|
triviaset
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Commands for managing trivia settings.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-botplays:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
triviaset botplays
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset botplays <true_or_false>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Sets whether the bot gains a point if nobody guesses correctly.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``<true_or_false>`` If ``true``, the bot will gain a point if nobody
|
||||||
|
guesses correctly, otherwise it will not.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-maxscore:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
triviaset maxscore
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset maxscore <score>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Sets the total points required to win.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``<score>`` The amount of points required to win.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-override:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
triviaset override
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset override <enabled>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Allow/disallow trivia lists to override the settings.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``<enabled>`` Whether trivia lists should be able to override settings.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-payout:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
triviaset payout
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset payout <multiplier>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Sets the payout multiplier.
|
||||||
|
|
||||||
|
If a user wins trivia when at least 3 users are playing, they will receive credits;
|
||||||
|
the amount received is determined by multiplying their total score by this multiplier.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``<multiplier>`` The amount to multiply the winner's score by to determine payout.
|
||||||
|
This can be any positive decimal number. Setting this to 0 will disable.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-revealanswer:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
triviaset revealanswer
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset revealanswer <true_or_false>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Sets whether or not the answer is revealed if the time limit for answering runs out.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``<true_or_false>`` If ``true``, the bot will reveal the answer if there is no
|
||||||
|
correct guess within the time limit.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-showsettings:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
triviaset showsettings
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset showsettings
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Shows the current trivia settings.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-stopafter:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
triviaset stopafter
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset stopafter <seconds>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Sets how long the bot should wait before stopping the trivia
|
||||||
|
session due to lack of response.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``<seconds>`` The number of seconds to wait before stopping the session.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-timelimit:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
triviaset timelimit
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |mod-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset timelimit <seconds>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Sets the maximum time permitted to answer a question.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``<seconds>`` The number of seconds to wait for an answer.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-custom:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
triviaset custom
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |owner-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset custom
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Manage custom trivia lists.
|
||||||
|
|
||||||
|
.. tip::
|
||||||
|
|
||||||
|
Looking to learn how to create your own trivia lists?
|
||||||
|
See :ref:`here <guide_trivia_list_creation>` for more information.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-custom-upload:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
triviaset custom upload
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |owner-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset custom upload
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Upload a custom trivia list. The bot will prompt you to upload
|
||||||
|
your list as an attachment in Discord.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-custom-list:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
triviaset custom list
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |owner-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset custom list
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
List all uploaded custom trivia lists.
|
||||||
|
|
||||||
|
.. _trivia-command-triviaset-custom-delete:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
triviaset custom delete
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note:: |owner-lock|
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]triviaset custom delete <name>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Delete a custom trivia list.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``<name>`` The name of the custom list to be deleted.
|
||||||
|
|
||||||
|
.. _trivia-command-trivia:
|
||||||
|
|
||||||
|
^^^^^^
|
||||||
|
trivia
|
||||||
|
^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]trivia <categories...>
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Start a trivia session on the specified category.
|
||||||
|
|
||||||
|
Multiple categories can be listed, in which case the trivia session
|
||||||
|
will use all of the specified lists to select questions from.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``<categories...>`` The category to play. Can be multiple.
|
||||||
|
|
||||||
|
.. _trivia-command-trivia-leaderboard:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
trivia leaderboard
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]trivia leaderboard
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Shows the trivia leaderboard. Defaults to the top ten in the
|
||||||
|
current server, sorted by total wins. The subcommands provide
|
||||||
|
more customized leaderboards.
|
||||||
|
|
||||||
|
.. _trivia-command-trivia-leaderboard-global:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
trivia leaderboard global
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]trivia leaderboard global [sort_by=wins] [top=10]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
The global trivia leaderboard.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``[sort_by=wins]`` The method by which to sort the leaderboard (defaults to wins). Can be one of:
|
||||||
|
|
||||||
|
- ``wins`` Total wins
|
||||||
|
- ``avg`` Average score
|
||||||
|
- ``total`` Total correct answers from all sessions
|
||||||
|
- ``games`` Total games played.
|
||||||
|
|
||||||
|
- ``[top=10]`` The number of ranks to show on the leaderboard. Defaults to 10
|
||||||
|
|
||||||
|
.. _trivia-command-trivia-leaderboard-server:
|
||||||
|
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
trivia leaderboard server
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]trivia leaderboard server [sort_by=wins] [top=10]
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
The trivia leaderboard for this server.
|
||||||
|
|
||||||
|
**Arguments**
|
||||||
|
|
||||||
|
- ``[sort_by=wins]`` The method by which to sort the leaderboard (defaults to wins). Can be one of:
|
||||||
|
|
||||||
|
- ``wins`` Total wins
|
||||||
|
- ``avg`` Average score
|
||||||
|
- ``total`` Total correct answers from all sessions
|
||||||
|
- ``games`` Total games played.
|
||||||
|
|
||||||
|
- ``[top=10]`` The number of ranks to show on the leaderboard. Defaults to 10
|
||||||
|
|
||||||
|
.. _trivia-command-trivia-list:
|
||||||
|
|
||||||
|
^^^^^^^^^^^
|
||||||
|
trivia list
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]trivia list
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Lists the available trivia categories
|
||||||
|
|
||||||
|
.. _trivia-command-trivia-stop:
|
||||||
|
|
||||||
|
^^^^^^^^^^^
|
||||||
|
trivia stop
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
**Syntax**
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
[p]trivia stop
|
||||||
|
|
||||||
|
**Description**
|
||||||
|
|
||||||
|
Stops an ongoing trivia session.
|
||||||
403
docs/cog_guides/warnings.rst
Normal file
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
|
.. Permissions Cog Reference
|
||||||
|
.. _cog_permissions:
|
||||||
|
|
||||||
=========================
|
=========================
|
||||||
Permissions Cog Reference
|
Permissions Cog Reference
|
||||||
|
|||||||
22
docs/conf.py
22
docs/conf.py
@@ -21,6 +21,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath(".."))
|
sys.path.insert(0, os.path.abspath(".."))
|
||||||
|
sys.path.insert(0, os.path.abspath("_ext"))
|
||||||
|
|
||||||
os.environ["BUILDING_DOCS"] = "1"
|
os.environ["BUILDING_DOCS"] = "1"
|
||||||
|
|
||||||
@@ -42,6 +43,8 @@ extensions = [
|
|||||||
"sphinx.ext.napoleon",
|
"sphinx.ext.napoleon",
|
||||||
"sphinx.ext.doctest",
|
"sphinx.ext.doctest",
|
||||||
"sphinxcontrib_trio",
|
"sphinxcontrib_trio",
|
||||||
|
"sphinx-prompt",
|
||||||
|
"deprecated_removed",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
@@ -58,7 +61,7 @@ master_doc = "index"
|
|||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = "Red - Discord Bot"
|
project = "Red - Discord Bot"
|
||||||
copyright = "2018-2020, Cog Creators"
|
copyright = "2018-2021, Cog Creators"
|
||||||
author = "Cog Creators"
|
author = "Cog Creators"
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
@@ -83,10 +86,16 @@ language = None
|
|||||||
# List of patterns, relative to source directory, that match files and
|
# List of patterns, relative to source directory, that match files and
|
||||||
# directories to ignore when looking for source files.
|
# directories to ignore when looking for source files.
|
||||||
# This patterns also effect to html_static_path and html_extra_path
|
# 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.
|
# 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.
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||||
todo_include_todos = False
|
todo_include_todos = False
|
||||||
@@ -108,6 +117,12 @@ rst_prolog += f"\n.. |DPY_VERSION| replace:: {dpy_version}"
|
|||||||
#
|
#
|
||||||
html_theme = "sphinx_rtd_theme"
|
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
|
# 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
|
# further. For a list of options available for each theme, see the
|
||||||
# documentation.
|
# documentation.
|
||||||
@@ -215,6 +230,7 @@ intersphinx_mapping = {
|
|||||||
"dpy": (f"https://discordpy.readthedocs.io/en/v{dpy_version}/", None),
|
"dpy": (f"https://discordpy.readthedocs.io/en/v{dpy_version}/", None),
|
||||||
"motor": ("https://motor.readthedocs.io/en/stable/", None),
|
"motor": ("https://motor.readthedocs.io/en/stable/", None),
|
||||||
"babel": ("http://babel.pocoo.org/en/stable/", None),
|
"babel": ("http://babel.pocoo.org/en/stable/", None),
|
||||||
|
"dateutil": ("https://dateutil.readthedocs.io/en/stable/", None),
|
||||||
}
|
}
|
||||||
|
|
||||||
# Extlinks
|
# Extlinks
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ This is a quick start guide for a general usage.
|
|||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
If you haven't installed Red, please do it by following
|
If you haven't installed Red, please do it by following
|
||||||
the :ref:`installation guides <main>`.
|
one of the `installation guides <install_guides/index>`.
|
||||||
|
|
||||||
Assuming you correctly installed Red, you should have a
|
Assuming you correctly installed Red, you should have a
|
||||||
window like this:
|
window like this:
|
||||||
@@ -26,8 +26,8 @@ window like this:
|
|||||||
Invite Red to your server
|
Invite Red to your server
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
When started, the console will show you ``Invite URL`` (here at
|
When started, the console will show you the ``Invite URL``
|
||||||
the bottom of the screenshot).
|
(visible at the bottom of the screenshot above).
|
||||||
Paste the link into your browser and select the server you want
|
Paste the link into your browser and select the server you want
|
||||||
to invite the bot in, like any other bot.
|
to invite the bot in, like any other bot.
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ example, if your prefix is ``!``, you will execute your command like this:
|
|||||||
The commands
|
The commands
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
The command you're going to use the most is help. That command will
|
The command you're going to use the most is **help**. This command will
|
||||||
show you **all of the available commands** of the bot with a small description.
|
show you **all of the available commands** of the bot with a small description.
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
@@ -92,6 +92,13 @@ parameters.
|
|||||||
Sometimes (especially for the last argument) these double quotes are not
|
Sometimes (especially for the last argument) these double quotes are not
|
||||||
required.
|
required.
|
||||||
|
|
||||||
|
Arguments followed by an ellipsis ``...`` means that you may provide
|
||||||
|
multiple arguments for the command.
|
||||||
|
|
||||||
|
For example, the command ``[p]cog install`` in the downloader cog has
|
||||||
|
the syntax ``cog install <repo> <cogs...>``, meaning that you can provide
|
||||||
|
1 or more ``cogs`` to install from the ``repo``.
|
||||||
|
|
||||||
Arguments followed by ``=value`` means that, if not specified,
|
Arguments followed by ``=value`` means that, if not specified,
|
||||||
the argument will be equal to ``value``.
|
the argument will be equal to ``value``.
|
||||||
|
|
||||||
@@ -99,8 +106,8 @@ parameters.
|
|||||||
the syntax ``cleanup messages <number> [delete_pinned=False]``, which means
|
the syntax ``cleanup messages <number> [delete_pinned=False]``, which means
|
||||||
``delete_pinned`` default will be false, unless you specify it as true.
|
``delete_pinned`` default will be false, unless you specify it as true.
|
||||||
|
|
||||||
You can use help to show the **categories** too, generally called cogs.
|
You can use help to show the **categories** too, generally called cogs,
|
||||||
Just do something like this (notice the capitalization):
|
by doing the following (notice the capitalization):
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
@@ -115,7 +122,7 @@ To get the description of a subcommand, type this:
|
|||||||
|
|
||||||
When using subcommands, you also need to specify the command group.
|
When using subcommands, you also need to specify the command group.
|
||||||
As an example, ``cleanup`` has 6 subcommands. If you want
|
As an example, ``cleanup`` has 6 subcommands. If you want
|
||||||
to use one, do it like this: ``[p]cleanup messages 10``
|
to use one of them, do: ``[p]cleanup messages 10``
|
||||||
|
|
||||||
.. _getting-started-cogs:
|
.. _getting-started-cogs:
|
||||||
|
|
||||||
@@ -210,7 +217,7 @@ Server owner
|
|||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
The server owner can access all commands on his guild, except the global
|
The server owner can access all commands on his guild, except the global
|
||||||
ones or those who can interact with system files (available for the
|
ones or those that can interact with system files (available for the
|
||||||
bot owner).
|
bot owner).
|
||||||
|
|
||||||
~~~~~~~~~~~~~
|
~~~~~~~~~~~~~
|
||||||
@@ -230,12 +237,13 @@ Moderator
|
|||||||
A moderator is a step above the average users. You can set multiple moderator
|
A moderator is a step above the average users. You can set multiple moderator
|
||||||
roles with the ``[p]set addmodrole`` and ``[p]set removemodrole`` commands.
|
roles with the ``[p]set addmodrole`` and ``[p]set removemodrole`` commands.
|
||||||
|
|
||||||
For example, in the mod cog (again), a mod will be able to mute, kick and ban;
|
For example, in the filter cog, a mod will be able to use the various commands
|
||||||
but he won't be able to modify the cog settings with the ``[p]modset`` command.
|
under ``[p]filter`` (such as adding and removing filtered words), but they will
|
||||||
|
not be able to modify the cog settings with the ``[p]filterset`` command.
|
||||||
|
|
||||||
.. tip::
|
.. tip::
|
||||||
If you don't like the default permission settings for some commands or
|
If you don't like the default permission settings for some commands or
|
||||||
if want to restrict a cog or a command to a channel/member, you can use
|
want to restrict a cog or a command to a channel/member, you can use
|
||||||
the permissions cog.
|
the permissions cog.
|
||||||
|
|
||||||
.. _getting-started-hosting:
|
.. _getting-started-hosting:
|
||||||
@@ -246,9 +254,9 @@ Hosting
|
|||||||
|
|
||||||
If you are hosting Red on your personal computer, you will soon notice that
|
If you are hosting Red on your personal computer, you will soon notice that
|
||||||
if you close the window or if you shut down you computer, Red will be offline.
|
if you close the window or if you shut down you computer, Red will be offline.
|
||||||
She needs an environment to work and respond.
|
It needs an environment to work and respond.
|
||||||
|
|
||||||
You can try to host Red somewhere she will always be online, like on a virtual
|
You can try to host Red somewhere it will always be online, like on a virtual
|
||||||
private server (VPS) or on a personal server (e.g. Raspberry Pi).
|
private server (VPS) or on a personal server (e.g. Raspberry Pi).
|
||||||
|
|
||||||
If you want to do it, follow these steps.
|
If you want to do it, follow these steps.
|
||||||
@@ -258,15 +266,15 @@ If you want to do it, follow these steps.
|
|||||||
basics of the Unix commands, such as navigating the system files or use
|
basics of the Unix commands, such as navigating the system files or use
|
||||||
a terminal text editor.
|
a terminal text editor.
|
||||||
|
|
||||||
You should follow `this guide
|
You should read `DigitalOcean's tutorial: An Introduction to Linux Basics
|
||||||
<https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-basics>`_
|
<https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-basics>`_
|
||||||
from DigitalOcean which will introduce you to the Linux basics.
|
if you have not used Linux before.
|
||||||
|
|
||||||
1. **Find a host**
|
1. **Find a host**
|
||||||
|
|
||||||
You need to find a server to host Red. You can rent a VPS (it can be free)
|
You need to find a server to host Red. You can rent a VPS (it can be free)
|
||||||
on an online service. Please check :ref:`this list <host-list>` for
|
on an online service. Please check :ref:`this list of hosts <host-list>` for
|
||||||
quality VPS providers.
|
more information.
|
||||||
|
|
||||||
You can also buy a Raspberry Pi (~$20), which is a micro-computer that will
|
You can also buy a Raspberry Pi (~$20), which is a micro-computer that will
|
||||||
be able to host Red. The model 3 or above is recommended.
|
be able to host Red. The model 3 or above is recommended.
|
||||||
@@ -274,7 +282,7 @@ If you want to do it, follow these steps.
|
|||||||
2. **Install Linux**
|
2. **Install Linux**
|
||||||
|
|
||||||
Most of the VPS providers have tools for installing Linux automatically. If
|
Most of the VPS providers have tools for installing Linux automatically. If
|
||||||
you're a beginner, we recommend **Ubuntu 20.04 LTS**.
|
you're a beginner, we recommend **Ubuntu 22.04 LTS**.
|
||||||
|
|
||||||
For Raspberry Pi users, just install `Raspbian
|
For Raspberry Pi users, just install `Raspbian
|
||||||
<https://www.raspberrypi.org/software/>`_ on a micro-SD card.
|
<https://www.raspberrypi.org/software/>`_ on a micro-SD card.
|
||||||
@@ -299,8 +307,8 @@ If you want to do it, follow these steps.
|
|||||||
|
|
||||||
3. **Install and set up Red**
|
3. **Install and set up Red**
|
||||||
|
|
||||||
Just follow one of the Linux installation guide. We provide guides for the
|
Follow one of the Linux installation guides. We provide guides for the
|
||||||
most used distributions. Check the :ref:`home page <main>` and search for
|
most used distributions. Check the `list of install guides <install_guides/index>` and search for
|
||||||
your distribution.
|
your distribution.
|
||||||
|
|
||||||
4. **Set up an auto-restart**
|
4. **Set up an auto-restart**
|
||||||
@@ -310,7 +318,7 @@ If you want to do it, follow these steps.
|
|||||||
side task and handle fatal errors, so you can just leave your server running
|
side task and handle fatal errors, so you can just leave your server running
|
||||||
and enjoy Red!
|
and enjoy Red!
|
||||||
|
|
||||||
For that, just follow :ref:`this guide <systemd-service-guide>`.
|
For that, follow :ref:`the systemd service guide <systemd-service-guide>`.
|
||||||
|
|
||||||
.. _getting-started-userdocs:
|
.. _getting-started-userdocs:
|
||||||
|
|
||||||
@@ -336,9 +344,12 @@ The cog guides are formatted the same. They're divided into 3 sections:
|
|||||||
|
|
||||||
A line that will show how the command must be invoked, with the arguments.
|
A line that will show how the command must be invoked, with the arguments.
|
||||||
|
|
||||||
.. tip:: If the command show something like ``[lavalinkset|llset]``, that means
|
* **Aliases**
|
||||||
you can invoke the command with ``lavalinkset`` or with ``llset``, this is
|
|
||||||
called an alias.
|
Each command may have one or more aliases, which are alternative command names
|
||||||
|
you can use to invoke the same command. For example, ``[p]set colour`` can also
|
||||||
|
be invoked with ``[p]set color``. If there are aliases for a command, they will
|
||||||
|
appear just under the syntax.
|
||||||
|
|
||||||
* **Description**
|
* **Description**
|
||||||
|
|
||||||
|
|||||||
@@ -83,9 +83,12 @@ In that file, place the following code:
|
|||||||
|
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
|
|
||||||
class Mycog(commands.Cog):
|
class MyCog(commands.Cog):
|
||||||
"""My custom cog"""
|
"""My custom cog"""
|
||||||
|
|
||||||
|
def __init__(self, bot):
|
||||||
|
self.bot = bot
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def mycom(self, ctx):
|
async def mycom(self, ctx):
|
||||||
"""This does stuff!"""
|
"""This does stuff!"""
|
||||||
@@ -96,11 +99,11 @@ Open :code:`__init__.py`. In that file, place the following:
|
|||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
from .mycog import Mycog
|
from .mycog import MyCog
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
bot.add_cog(Mycog())
|
bot.add_cog(MyCog(bot))
|
||||||
|
|
||||||
Make sure that both files are saved.
|
Make sure that both files are saved.
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ Creating a Cog Creator Application
|
|||||||
You will need to have created and published your cogs before you create a Cog Creator Application!
|
You will need to have created and published your cogs before you create a Cog Creator Application!
|
||||||
See `guide_cog_creation` and `guide_publish_cogs` for more information.
|
See `guide_cog_creation` and `guide_publish_cogs` for more information.
|
||||||
|
|
||||||
Cog Creator Applications are hosted on the `cogboard <https://cogboard.red/c/apps/12>`__.
|
Cog Creator Applications are hosted on the `cogboard <https://cogboard.discord.red/c/apps/12>`__.
|
||||||
To create an application, start a new topic in the "Applications" category and fill out all of the required information.
|
To create an application, start a new topic in the "Applications" category and fill out all of the required information.
|
||||||
QA reviews Cog Creator Applications for security and functionality on a first come, first serve basis.
|
QA reviews Cog Creator Applications for security and functionality on a first come, first serve basis.
|
||||||
Once your application is reviewed, you will have 14 days to make any requested changes, or to check in with the member of QA who is reviewing your application.
|
Once your application is reviewed, you will have 14 days to make any requested changes, or to check in with the member of QA who is reviewing your application.
|
||||||
|
|||||||
@@ -86,3 +86,12 @@ Keys specific to the cog info.json (case sensitive)
|
|||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Shared libraries are deprecated since version 3.2 and are marked for removal in the future.
|
Shared libraries are deprecated since version 3.2 and are marked for removal in the future.
|
||||||
|
|
||||||
|
Adding to the Index
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Repositories that are correctly configured can be added to the `public index of cogs <https://index.discord.red/>`_.
|
||||||
|
|
||||||
|
To be added to the index, make a pull request to the `Red-Index repository <https://github.com/Cog-Creators/Red-Index>`_ in the unapproved section. You can learn more about this process in the repository description.
|
||||||
|
|
||||||
|
To be added to the approved repositories, first see `guide_cog_creators`.
|
||||||
|
|||||||
125
docs/guide_trivia_list_creation.rst
Normal file
125
docs/guide_trivia_list_creation.rst
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
.. _guide_trivia_list_creation:
|
||||||
|
|
||||||
|
==========================
|
||||||
|
Trivia List Creation Guide
|
||||||
|
==========================
|
||||||
|
|
||||||
|
The Trivia cog allows you to create your own "trivia lists",
|
||||||
|
which are then processed in the cog - allowing you to create as
|
||||||
|
many questions as you'd like, with easy to use syntax.
|
||||||
|
|
||||||
|
---------------
|
||||||
|
Getting Started
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Let's start off by creating a file named ``mytrivia.yaml``.
|
||||||
|
Our trivia list will be named after the file, so in this case,
|
||||||
|
it will be called ``mytrivia``.
|
||||||
|
|
||||||
|
------------
|
||||||
|
Author Field
|
||||||
|
------------
|
||||||
|
|
||||||
|
We should first include an ``AUTHOR`` field,
|
||||||
|
to let the user know who wrote the questions.
|
||||||
|
|
||||||
|
When the user starts the trivia, the author(s) will
|
||||||
|
be sent in the starting message (see below).
|
||||||
|
|
||||||
|
.. image:: .resources/trivia/trivia_author.png
|
||||||
|
|
||||||
|
The following should be placed at the top of your file, replacing "Red"
|
||||||
|
with your name:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
AUTHOR: Red
|
||||||
|
|
||||||
|
If there are multiple authors, we can separate them with commas.
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
AUTHOR: Red, Rojo, Rouge
|
||||||
|
|
||||||
|
---------------------
|
||||||
|
Questions and Answers
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Writing questions and answers is simple. Once you've finished your
|
||||||
|
``AUTHOR`` field, you can move on to your questions just below.
|
||||||
|
|
||||||
|
Questions should consist of at least one answer, with other
|
||||||
|
possible answers included if necessary. You must put a colon at the end
|
||||||
|
of the question, for example:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
How many days are there in a regular year?:
|
||||||
|
|
||||||
|
Answers will follow below, each separated by a line break and with a
|
||||||
|
hyphen at the start of the line.
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
How many days are there in a regular year?:
|
||||||
|
- 365
|
||||||
|
- three hundred and sixty five
|
||||||
|
|
||||||
|
It's always nice to include alternative answers if a question needs it.
|
||||||
|
We can add as many valid answers as we'd like below this question. Answers
|
||||||
|
are **NOT** case sensitive, so you don't need to worry about adding the same
|
||||||
|
answer multiple times in different casings.
|
||||||
|
|
||||||
|
There are multiple special characters in YAML, such as colons, hashtags, hyphens
|
||||||
|
and more. If these characters are included within our questions or answers,
|
||||||
|
you'll need to enclose the content with quotation marks.
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
"Who is the #1 followed user on Twitter?":
|
||||||
|
|
||||||
|
If we didn't have these quotation marks, the question would not render.
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
Who is the #1 followed user on Twitter?:
|
||||||
|
|
||||||
|
.. tip::
|
||||||
|
|
||||||
|
We can also include line breaks within our questions by using ``\n``, like
|
||||||
|
this for example:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
"My first line\nMy second line":
|
||||||
|
|
||||||
|
As you've added more questions, your file should look something like this:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
AUTHOR: Red
|
||||||
|
How many days are there in a regular year?:
|
||||||
|
- 365
|
||||||
|
- three hundred and sixty five
|
||||||
|
"Who is the #1 followed user on Twitter?":
|
||||||
|
- Barack Obama
|
||||||
|
- Obama
|
||||||
|
What is the only sea without any coasts?:
|
||||||
|
- Sargasso
|
||||||
|
- Sargasso Sea
|
||||||
|
Who won the Premier League in 2015?:
|
||||||
|
- Chelsea
|
||||||
|
- chelsea f.c.
|
||||||
|
How much money is a US Olympic gold medalist awarded?:
|
||||||
|
- $25,000
|
||||||
|
- 25,000
|
||||||
|
- 25k
|
||||||
|
- 25000
|
||||||
|
- $25000
|
||||||
|
|
||||||
|
You can keep adding questions until you are satisfied, and then you can upload and
|
||||||
|
play your very own trivia! See :ref:`[p]triviaset custom <trivia-command-triviaset-custom>` for more information.
|
||||||
|
|
||||||
|
Still stuck? Take a look at
|
||||||
|
`the core trivia lists <https://github.com/Cog-Creators/Red-DiscordBot/tree/V3/develop/redbot/cogs/trivia/data/lists>`_
|
||||||
|
for reference.
|
||||||
@@ -2,90 +2,150 @@
|
|||||||
|
|
||||||
.. _host-list:
|
.. _host-list:
|
||||||
|
|
||||||
=============
|
===================
|
||||||
VPS providers
|
Hosting Information
|
||||||
=============
|
===================
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
This doc is written for the :ref:`hosting section <getting-started-hosting>`
|
This doc is written for the :ref:`hosting section <getting-started-hosting>`
|
||||||
of the :ref:`getting started <getting-started>` guide. Please take a look
|
of the :ref:`getting started guide <getting-started>`. Please take a look
|
||||||
if you don't know how to host Red on a VPS.
|
if you don't know how to host Red.
|
||||||
|
|
||||||
This is a list of the recommended VPS providers.
|
|
||||||
|
| For your instance of Red to stay online 24/7, it needs to be hosted on a dedicated system.
|
||||||
|
This page contains hosting related information and advice for beginners in
|
||||||
|
topics such as picking a provider.
|
||||||
|
|
||||||
|
First, we would like to make something clear:
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
Due to their inability to handle Red's data structure and meet the
|
||||||
|
conditions of being a supported platform; platforms such as Heroku,
|
||||||
|
Pterodactyl, repl.it, Termux and alike are **NOT** officially supported.
|
||||||
|
Docker support found in GitHub is also a work in progress and not ready
|
||||||
|
for daily use. Workarounds for getting Red running on those platforms
|
||||||
|
are imperfect due to Red's nature. You will not be able to receive
|
||||||
|
support if an issue occurs when hosting on any of these platforms.
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------
|
||||||
|
Hosting on a VPS or Dedicated Server
|
||||||
|
------------------------------------
|
||||||
|
|
||||||
|
| You can host Red in a VPS running Linux or Windows. Using a Linux VPS is the
|
||||||
|
recommended option. Dedicated servers also work but are overpowered and cost
|
||||||
|
ineffective unless one plans to run a very large bot or use their server for
|
||||||
|
more than just hosting Red. If you have already created an instance, Red can be moved to a different
|
||||||
|
server for hosting with a backup/restore process. More information and guidance
|
||||||
|
about this process is available in the `Red Support Server <https://discord.com/invite/red>`_.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
Please be aware that a Linux server is controlled through a command line.
|
Please be aware that a Linux server is controlled through a command line.
|
||||||
If you don't know Unix basics, please take a look at `this guide
|
If you don't know Unix basics, please take a look at
|
||||||
<https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-basics>`_
|
`DigitalOcean's tutorial: An Introduction to Linux Basics
|
||||||
from DigitalOcean which will introduce you to the Linux basics.
|
<https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-basics>`_.
|
||||||
|
|
||||||
-------------
|
|
||||||
Linux hosting
|
|
||||||
-------------
|
|
||||||
|
|
||||||
+------------------------------------+------------------------------------------------------+
|
|
||||||
|Link |Description |
|
|
||||||
+====================================+======================================================+
|
|
||||||
|`Scaleway |Incredibly cheap but powerful VPSes, owned by |
|
|
||||||
|<https://www.scaleway.com/>`_ |`<https://online.net/>`_, based in Europe. |
|
|
||||||
+------------------------------------+------------------------------------------------------+
|
|
||||||
|`DigitalOcean |US-based cheap VPSes. The gold standard. Locations |
|
|
||||||
|<https://www.digitalocean.com/>`_ |available world wide. |
|
|
||||||
+------------------------------------+------------------------------------------------------+
|
|
||||||
|`OVH <https://www.ovh.co.uk/>`_ |Cheap VPSes, used by many people. French and Canadian |
|
|
||||||
| |locations available. |
|
|
||||||
+------------------------------------+------------------------------------------------------+
|
|
||||||
|`Time4VPS |Cheap VPSes, seemingly based in Lithuania. |
|
|
||||||
|<https://www.time4vps.eu/>`_ | |
|
|
||||||
+------------------------------------+------------------------------------------------------+
|
|
||||||
|`Linode <https://www.linode.com/>`_ |More cheap VPSes! |
|
|
||||||
+------------------------------------+------------------------------------------------------+
|
|
||||||
|`Vultr <https://www.vultr.com/>`_ |US-based, DigitalOcean-like. |
|
|
||||||
+------------------------------------+------------------------------------------------------+
|
|
||||||
|
|
||||||
------
|
|
||||||
Others
|
|
||||||
------
|
|
||||||
|
|
||||||
+-------------------------------------+-----------------------------------------------------+
|
|
||||||
|Link | |
|
|
||||||
+=====================================+=====================================================+
|
|
||||||
|`AWS <https://aws.amazon.com/>`_ |Amazon Web Services. Free for a year (with certain |
|
|
||||||
| |limits), but very pricey after that. |
|
|
||||||
+-------------------------------------+-----------------------------------------------------+
|
|
||||||
|`Google Cloud |Same as AWS, but it's Google. |
|
|
||||||
|<https://cloud.google.com/compute/>`_| |
|
|
||||||
+-------------------------------------+-----------------------------------------------------+
|
|
||||||
|`Microsoft Azure |Same as AWS, but it's Microsoft. |
|
|
||||||
|<https://azure.microsoft.com>`_ | |
|
|
||||||
+-------------------------------------+-----------------------------------------------------+
|
|
||||||
|`Oracle Cloud |Same as AWS, but it's Oracle. |
|
|
||||||
|<https://oracle.com/cloud/>`_ | |
|
|
||||||
+-------------------------------------+-----------------------------------------------------+
|
|
||||||
|`LowEndBox <http://lowendbox.com/>`_ |A curator for lower specced servers. |
|
|
||||||
+-------------------------------------+-----------------------------------------------------+
|
|
||||||
|
|
||||||
------------
|
------------
|
||||||
Self-hosting
|
Self Hosting
|
||||||
------------
|
------------
|
||||||
|
|
||||||
You can always self-host on your own hardware.
|
| It's possible to self host Red with your own hardware. A Raspberry Pi 3
|
||||||
A Raspberry Pi 3 will be more than sufficient for small to medium sized bots.
|
will have enough computing capacity to handle a small to medium sized bot.
|
||||||
|
You can also host on your own computer or rack server. Any modern hardware
|
||||||
|
should work without issues. However, this option leaves you responsible for
|
||||||
|
keeping the bot online by paying for electricity costs and dealing with power outages.
|
||||||
|
|
||||||
For bigger bots, you can build your own server PC for usage, or buy a rack
|
-------------------
|
||||||
server. Any modern hardware should work 100% fine.
|
Choosing a Provider
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
| The following are some common providers suitable for hosting Red. With
|
||||||
|
each having their pros and cons, this list is mainly intended to act as a
|
||||||
|
starting point. You should conduct your own research and come to
|
||||||
|
a conclusion depending on your needs and budget, taking into account
|
||||||
|
providers not listed here if desired. The key is the provider offering
|
||||||
|
an OS supported by Red.
|
||||||
|
|
||||||
|
.. tip::
|
||||||
|
You will have better results with Audio when the region in your Discord
|
||||||
|
server settings is closer to the bulk of the server's audience and
|
||||||
|
the location you picked for your Red host.
|
||||||
|
|
||||||
|
|
||||||
|
-----------------
|
||||||
|
Average Providers
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
| `Scaleway <https://www.scaleway.com/>`_ is a VPS and dedicated server
|
||||||
|
provider French in origin with locations in Poland and Netherlands.
|
||||||
|
|
||||||
|
| `DigitalOcean <https://www.digitalocean.com/>`_ is a US based cloud services company
|
||||||
|
with locations available worldwide, the VPS service is provided under the brand name
|
||||||
|
"Droplet".
|
||||||
|
|
||||||
|
| `OVH <https://us.ovhcloud.com/vps/>`_ is a company focused on providing hosting
|
||||||
|
and cloud services with locations in Europe, North America and Asia Pacific.
|
||||||
|
|
||||||
|
| `Time4VPS <https://www.time4vps.eu/>`_ is a Lithuanian VPS provider mainly focused
|
||||||
|
on lower cost.
|
||||||
|
|
||||||
|
| `GalaxyGate <https://galaxygate.net/>`_ is a VPS and dedicated server provider
|
||||||
|
with a single location in New York.
|
||||||
|
|
||||||
|
| `Linode <https://www.linode.com/>`_ is a US based cloud services company similar
|
||||||
|
to DigitalOcean with locations available worldwide.
|
||||||
|
|
||||||
|
| `AWS Lightsail <https://aws.amazon.com/lightsail/>`_ is a VPS service from Amazon
|
||||||
|
Web Services priced lower than their enterprise offerings.
|
||||||
|
|
||||||
|
| `Vultr <https://www.vultr.com/>`_ is a US based provider of VPS and dedicated servers
|
||||||
|
with locations available worldwide.
|
||||||
|
|
||||||
|
| `Hetzner Online <https://www.hetzner.com/>`_ is a German VPS and dedicated server
|
||||||
|
provider with locations in Germany, US and Finland.
|
||||||
|
|
||||||
|
| `Contabo <https://contabo.com/>`_ is also a German VPS and dedicated server provider
|
||||||
|
with locations in Germany, Asia and the United States.
|
||||||
|
|
||||||
|
| `Ramnode <https://www.ramnode.com/>`_ is a US based VPS provider focused on
|
||||||
|
low to middle end VPS with locations in the US and Netherlands.
|
||||||
|
|
||||||
|
| `LowEndBox <http://lowendbox.com/>`_ is a website where hosting providers are
|
||||||
|
discussed and curated, often with lower costs and less known providers.
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
Higher End Providers
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
| `AWS EC2 <https://aws.amazon.com/ec2/>`__ is the enterprise offering of Amazon Web Services.
|
||||||
|
A limited free plan is available for 12 months, after which a complex pricing model with
|
||||||
|
high costs take over.
|
||||||
|
|
||||||
|
| `Google Compute Engine <https://cloud.google.com/compute/>`__ is Google's EC2 competitor.
|
||||||
|
However, an always free plan with limited resources is offered.
|
||||||
|
|
||||||
|
| `Microsoft Azure VM <https://azure.microsoft.com/services/virtual-machines/>`__ is
|
||||||
|
Microsoft's EC2 competitor with lower costs than EC2 for Windows instances, but similar
|
||||||
|
otherwise.
|
||||||
|
|
||||||
|
| `Oracle Cloud Compute <https://www.oracle.com/cloud/compute/>`__ is Oracle's EC2
|
||||||
|
competitor. But an always free plan is available with slightly higher specifications
|
||||||
|
compared to that of Google Compute Engine.
|
||||||
|
|
||||||
------------
|
------------
|
||||||
Free hosting
|
Free Hosting
|
||||||
------------
|
------------
|
||||||
|
|
||||||
| `Google Cloud Compute Engine <https://cloud.google.com/free/docs/gcp-free-tier>`_,
|
| `Google Compute Engine <https://cloud.google.com/free/docs/gcp-free-tier>`_,
|
||||||
`Oracle Cloud Compute <https://oracle.com/cloud/free/#always-free>`_ and
|
`Oracle Cloud Compute <https://oracle.com/cloud/free/#always-free>`_ and
|
||||||
`AWS EC2 <https://aws.amazon.com/free/>`_ have free tier VPSes suitable for small bots.
|
`AWS EC2 <https://aws.amazon.com/free/>`_ have free tier VPSes suitable for small bots.
|
||||||
|
|
||||||
| **Note:** AWS EC2's free tier does not last forever - it's a 12 month trial.
|
| **Note:** The free tier offered by AWS for EC2 only lasts for 12 months, while
|
||||||
| Additionally, new Google Cloud customers get a $300 credit which is valid
|
Oracle Cloud and Google Cloud offer always free tiers with limited resources.
|
||||||
for 3 months.
|
|
||||||
|
|
||||||
Other than that... no. There is no good free VPS hoster, outside of
|
| Additionally, new Google Cloud customers get a $300 credit which is valid for 3 months.
|
||||||
persuading somebody to host for you, which is incredibly unlikely.
|
New Oracle Cloud customers also get $300 of free credit, but only valid for 30 days.
|
||||||
|
|
||||||
|
| Excluding the above, there is no recommended free VPS host. Persuasion of
|
||||||
|
another individual for hosting Red is an option, albeit low in success rate.
|
||||||
|
|||||||
@@ -12,13 +12,12 @@ Welcome to Red - Discord Bot's documentation!
|
|||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
:caption: Installation Guides:
|
:caption: Installation Guides:
|
||||||
|
|
||||||
install_windows
|
install_guides/index
|
||||||
install_linux_mac
|
|
||||||
bot_application_guide
|
bot_application_guide
|
||||||
update_red
|
update_red
|
||||||
about_venv
|
about_venv
|
||||||
autostart_systemd
|
autostart_systemd
|
||||||
autostart_pm2
|
autostart_mac
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
@@ -26,21 +25,34 @@ Welcome to Red - Discord Bot's documentation!
|
|||||||
|
|
||||||
cog_customcom
|
cog_customcom
|
||||||
cog_permissions
|
cog_permissions
|
||||||
|
guide_trivia_list_creation
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
:caption: User guides:
|
:caption: User guides:
|
||||||
|
|
||||||
getting_started
|
getting_started
|
||||||
|
intents
|
||||||
cog_guides/admin
|
cog_guides/admin
|
||||||
cog_guides/alias
|
cog_guides/alias
|
||||||
cog_guides/bank
|
cog_guides/bank
|
||||||
cog_guides/cleanup
|
cog_guides/cleanup
|
||||||
cog_guides/cog_manager_ui
|
cog_guides/cog_manager_ui
|
||||||
|
cog_guides/core
|
||||||
cog_guides/customcommands
|
cog_guides/customcommands
|
||||||
cog_guides/downloader
|
cog_guides/downloader
|
||||||
cog_guides/economy
|
cog_guides/economy
|
||||||
|
cog_guides/filter
|
||||||
|
cog_guides/general
|
||||||
|
cog_guides/image
|
||||||
|
cog_guides/permissions
|
||||||
|
cog_guides/mod
|
||||||
|
cog_guides/modlog
|
||||||
|
cog_guides/mutes
|
||||||
|
cog_guides/reports
|
||||||
cog_guides/streams
|
cog_guides/streams
|
||||||
|
cog_guides/trivia
|
||||||
|
cog_guides/warnings
|
||||||
red_core_data_statement
|
red_core_data_statement
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
To install/update pyenv, run the following command:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
command -v pyenv && pyenv update || curl https://pyenv.run | bash
|
||||||
|
|
||||||
|
After this command, you will see a warning about 'pyenv' not being in the load path. To address this,
|
||||||
|
you should run these commands:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
profile=$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))
|
||||||
|
rcfile=$([ -n "$ZSH_VERSION" ] && echo ~/.zshrc || echo ~/.bashrc)
|
||||||
|
printf '%s\n%s\n%s\n' 'export PYENV_ROOT="$HOME/.pyenv"' 'export PATH="$PYENV_ROOT/bin:$PATH"' "$([ -f "$profile" ] && cat "$profile")" > "$profile"
|
||||||
|
echo 'eval "$(pyenv init --path)"' >> "$profile"
|
||||||
|
echo 'eval "$(pyenv init -)"' >> "$rcfile"
|
||||||
|
echo 'eval "$(pyenv virtualenv-init -)"' >> "$rcfile"
|
||||||
|
|
||||||
|
Then **log out and log back in** and run the following command:
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
------------------------------
|
||||||
|
Creating a Virtual Environment
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
.. tip::
|
||||||
|
|
||||||
|
If you want to learn more about virtual environments, see page: `about-venvs`
|
||||||
|
|
||||||
|
We require installing Red into a virtual environment. Don't be scared, it's very
|
||||||
|
straightforward.
|
||||||
|
|
||||||
|
**************************
|
||||||
|
Using ``pyenv virtualenv``
|
||||||
|
**************************
|
||||||
|
|
||||||
|
Using ``pyenv virtualenv`` saves you the headache of remembering where you installed your virtual
|
||||||
|
environments. This option is only available if you installed Python with pyenv.
|
||||||
|
|
||||||
|
First, ensure your pyenv interpreter is set to python 3.8.1 or greater with the following command:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
pyenv version
|
||||||
|
|
||||||
|
Now, create a virtual environment with the following command:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
pyenv virtualenv <name>
|
||||||
|
|
||||||
|
Replace ``<name>`` with whatever you like. If you ever forget what you named it,
|
||||||
|
you can always use the command ``pyenv versions`` to list all virtual environments.
|
||||||
|
|
||||||
|
Now activate your virtualenv with the following command:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
pyenv shell <name>
|
||||||
|
|
||||||
|
.. important::
|
||||||
|
|
||||||
|
You must activate the virtual environment with the above command every time you open a new
|
||||||
|
shell to run, install or update Red. You can check out other commands like ``pyenv local`` and
|
||||||
|
``pyenv global`` if you wish to keep the virtualenv activated all the time.
|
||||||
38
docs/install_guides/_includes/create-env-with-venv.rst
Normal file
38
docs/install_guides/_includes/create-env-with-venv.rst
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
------------------------------
|
||||||
|
Creating a Virtual Environment
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
.. tip::
|
||||||
|
|
||||||
|
If you want to learn more about virtual environments, see page: `about-venvs`
|
||||||
|
|
||||||
|
We require installing Red into a virtual environment. Don't be scared, it's very
|
||||||
|
straightforward.
|
||||||
|
|
||||||
|
**************
|
||||||
|
Using ``venv``
|
||||||
|
**************
|
||||||
|
|
||||||
|
This is the quickest way to get your virtual environment up and running, as `venv` is shipped with
|
||||||
|
python.
|
||||||
|
|
||||||
|
First, choose a directory where you would like to create your virtual environment. It's a good idea
|
||||||
|
to keep it in a location which is easy to type out the path to. From now, we'll call it
|
||||||
|
``redenv`` and it will be located in your home directory.
|
||||||
|
|
||||||
|
Create your virtual environment with the following command:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
python3.9 -m venv ~/redenv
|
||||||
|
|
||||||
|
And activate it with the following command:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
source ~/redenv/bin/activate
|
||||||
|
|
||||||
|
.. important::
|
||||||
|
|
||||||
|
You must activate the virtual environment with the above command every time you open a new
|
||||||
|
shell to run, install or update Red.
|
||||||
52
docs/install_guides/_includes/install-and-setup-red-unix.rst
Normal file
52
docs/install_guides/_includes/install-and-setup-red-unix.rst
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
--------------
|
||||||
|
Installing Red
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Choose one of the following commands to install Red.
|
||||||
|
|
||||||
|
To install without additional config backend support:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
:prompts: (redenv) $
|
||||||
|
|
||||||
|
python -m pip install -U pip setuptools wheel
|
||||||
|
python -m pip install -U Red-DiscordBot
|
||||||
|
|
||||||
|
Or, to install with PostgreSQL support:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
:prompts: (redenv) $
|
||||||
|
|
||||||
|
python -m pip install -U pip setuptools wheel
|
||||||
|
python -m pip install -U "Red-DiscordBot[postgres]"
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------
|
||||||
|
Setting Up and Running Red
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
After installation, set up your instance with the following command:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
:prompts: (redenv) $
|
||||||
|
|
||||||
|
redbot-setup
|
||||||
|
|
||||||
|
This will set the location where data will be stored, as well as your
|
||||||
|
storage backend and the name of the instance (which will be used for
|
||||||
|
running the bot).
|
||||||
|
|
||||||
|
Once done setting up the instance, run the following command to run Red:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
:prompts: (redenv) $
|
||||||
|
|
||||||
|
redbot <your instance name>
|
||||||
|
|
||||||
|
It will walk through the initial setup, asking for your token and a prefix.
|
||||||
|
You can find out how to obtain a token with
|
||||||
|
`this guide <../bot_application_guide>`.
|
||||||
|
|
||||||
|
.. tip::
|
||||||
|
If it's the first time you're using Red, you should check our `getting-started` guide
|
||||||
|
that will walk you through all essential information on how to interact with Red.
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Red Hat Enterprise Linux (RHEL) 8.4-8.x and its derivatives have all required packages available in official repositories.
|
||||||
|
Install them with dnf:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo dnf -y update
|
||||||
|
sudo dnf -y group install development
|
||||||
|
sudo dnf -y install python39 python39-pip python39-devel java-11-openjdk-headless nano git
|
||||||
|
|
||||||
|
Set ``java`` executable to point to Java 11:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo alternatives --set java "java-11-openjdk.$(uname -i)"
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-venv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Red Hat Enterprise Linux (RHEL) 9 and its derivatives have all required packages available in official repositories.
|
||||||
|
Install them with dnf:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo dnf -y install python39 git java-11-openjdk-headless @development nano
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-venv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
27
docs/install_guides/_includes/install-python-pyenv.rst
Normal file
27
docs/install_guides/_includes/install-python-pyenv.rst
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
----------------------------
|
||||||
|
Installing Python with pyenv
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
On distributions where Python 3.9 needs to be compiled from source, we recommend the use of pyenv.
|
||||||
|
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
|
||||||
|
virtual environment.
|
||||||
|
|
||||||
|
.. include:: _includes/_install-pyenv-and-setup-path.rst
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.9.13 -v
|
||||||
|
|
||||||
|
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||||
|
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||||
|
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
|
||||||
|
drastically reduce the install time. However, be aware that this will make Python run about 10%
|
||||||
|
slower.
|
||||||
|
|
||||||
|
After that is finished, run:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
pyenv global 3.9.13
|
||||||
|
|
||||||
|
Pyenv is now installed and your system should be configured to run Python 3.9.
|
||||||
27
docs/install_guides/_includes/install-python38-pyenv.rst
Normal file
27
docs/install_guides/_includes/install-python38-pyenv.rst
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
----------------------------
|
||||||
|
Installing Python with pyenv
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
On distributions where Python 3.8 needs to be compiled from source, we recommend the use of pyenv.
|
||||||
|
This simplifies the compilation process and has the added bonus of simplifying setting up Red in a
|
||||||
|
virtual environment.
|
||||||
|
|
||||||
|
.. include:: _includes/_install-pyenv-and-setup-path.rst
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
CONFIGURE_OPTS=--enable-optimizations pyenv install 3.8.12 -v
|
||||||
|
|
||||||
|
This may take a long time to complete, depending on your hardware. For some machines (such as
|
||||||
|
Raspberry Pis and micro-tier VPSes), it may take over an hour; in this case, you may wish to remove
|
||||||
|
the ``CONFIGURE_OPTS=--enable-optimizations`` part from the front of the command, which will
|
||||||
|
drastically reduce the install time. However, be aware that this will make Python run about 10%
|
||||||
|
slower.
|
||||||
|
|
||||||
|
After that is finished, run:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
pyenv global 3.8.12
|
||||||
|
|
||||||
|
Pyenv is now installed and your system should be configured to run Python 3.8.
|
||||||
5
docs/install_guides/_includes/linux-preamble.rst
Normal file
5
docs/install_guides/_includes/linux-preamble.rst
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
.. warning::
|
||||||
|
|
||||||
|
For safety reasons, DO NOT install Red with a root user. If you are unsure how to create
|
||||||
|
a new user on Linux, see `DigitalOcean's tutorial: How To Create a New Sudo-enabled User
|
||||||
|
<https://www.digitalocean.com/community/tutorials/how-to-create-a-new-sudo-enabled-user-on-ubuntu-20-04-quickstart>`_.
|
||||||
7
docs/install_guides/alma-linux-8.rst
Normal file
7
docs/install_guides/alma-linux-8.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.. _install-alma-linux-8:
|
||||||
|
|
||||||
|
====================================
|
||||||
|
Installing Red on Alma Linux 8.4-8.x
|
||||||
|
====================================
|
||||||
|
|
||||||
|
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||||
7
docs/install_guides/alma-linux-9.rst
Normal file
7
docs/install_guides/alma-linux-9.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.. _install-alma-linux-9:
|
||||||
|
|
||||||
|
==============================
|
||||||
|
Installing Red on Alma Linux 9
|
||||||
|
==============================
|
||||||
|
|
||||||
|
.. include:: _includes/install-guide-rhel9-derivatives.rst
|
||||||
35
docs/install_guides/arch.rst
Normal file
35
docs/install_guides/arch.rst
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
.. _install-arch:
|
||||||
|
|
||||||
|
============================
|
||||||
|
Installing Red on Arch Linux
|
||||||
|
============================
|
||||||
|
|
||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Install the pre-requirements with pacman:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo pacman -Syu git jre11-openjdk-headless base-devel nano
|
||||||
|
|
||||||
|
On Arch Linux, Python 3.9 can be installed from the Arch User Repository (AUR) from the ``python39`` package.
|
||||||
|
|
||||||
|
The manual build process is the Arch-supported install method for AUR packages. You can install ``python39`` package with the following commands:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
git clone https://aur.archlinux.org/python39.git /tmp/python39
|
||||||
|
cd /tmp/python39
|
||||||
|
makepkg -sicL
|
||||||
|
cd -
|
||||||
|
rm -rf /tmp/python39
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-venv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
42
docs/install_guides/centos-7.rst
Normal file
42
docs/install_guides/centos-7.rst
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
.. _install-centos-7:
|
||||||
|
|
||||||
|
==========================
|
||||||
|
Installing Red on CentOS 7
|
||||||
|
==========================
|
||||||
|
|
||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Install the pre-requirements with yum:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo yum -y groupinstall development
|
||||||
|
sudo yum -y install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel xz-devel java-11-openjdk-headless nano git
|
||||||
|
|
||||||
|
In order to install gcc 8, we'll use SCL repository:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo yum -y install centos-release-scl
|
||||||
|
sudo yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++
|
||||||
|
echo "source scl_source enable devtoolset-8" >> ~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
|
|
||||||
|
In order to install Git 2.11 or greater, we recommend adding the IUS repository:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo yum -y install https://repo.ius.io/ius-release-el7.rpm
|
||||||
|
sudo yum -y swap git git236
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/install-python-pyenv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-pyenv-virtualenv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
7
docs/install_guides/centos-stream-8.rst
Normal file
7
docs/install_guides/centos-stream-8.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.. _install-centos-stream-8:
|
||||||
|
|
||||||
|
=================================
|
||||||
|
Installing Red on CentOS Stream 8
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||||
7
docs/install_guides/centos-stream-9.rst
Normal file
7
docs/install_guides/centos-stream-9.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.. _install-centos-stream-9:
|
||||||
|
|
||||||
|
=================================
|
||||||
|
Installing Red on CentOS Stream 9
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. include:: _includes/install-guide-rhel9-derivatives.rst
|
||||||
28
docs/install_guides/debian-10.rst
Normal file
28
docs/install_guides/debian-10.rst
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
.. _install-debian-10:
|
||||||
|
|
||||||
|
==================================
|
||||||
|
Installing Red on Debian 10 Buster
|
||||||
|
==================================
|
||||||
|
|
||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
We recommend installing pyenv as a method of installing non-native versions of Python on
|
||||||
|
Debian Buster. This guide will tell you how. First, run the following commands:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt -y install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless nano
|
||||||
|
CXX=/usr/bin/g++
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/install-python-pyenv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-pyenv-virtualenv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
25
docs/install_guides/debian-11.rst
Normal file
25
docs/install_guides/debian-11.rst
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
.. _install-debian-11:
|
||||||
|
|
||||||
|
====================================
|
||||||
|
Installing Red on Debian 11 Bullseye
|
||||||
|
====================================
|
||||||
|
|
||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Debian 11 "Bullseye" has all required packages available in official repositories. Install them
|
||||||
|
with apt:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt -y install python3 python3-dev python3-venv python3-pip git openjdk-11-jre-headless build-essential nano
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-venv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
24
docs/install_guides/fedora.rst
Normal file
24
docs/install_guides/fedora.rst
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
.. _install-fedora:
|
||||||
|
|
||||||
|
==============================
|
||||||
|
Installing Red on Fedora Linux
|
||||||
|
==============================
|
||||||
|
|
||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Fedora Linux 35 and above has all required packages available in official repositories. Install
|
||||||
|
them with dnf:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo dnf -y install python39 git java-11-openjdk-headless @development-tools nano
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-venv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
38
docs/install_guides/index.rst
Normal file
38
docs/install_guides/index.rst
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
.. _install-guides:
|
||||||
|
|
||||||
|
Installing Red
|
||||||
|
==============
|
||||||
|
|
||||||
|
The list below shows the installation guides available based on the operating system being used.
|
||||||
|
|
||||||
|
If you want to host Red on a VPS and are unsure what operating system you should choose,
|
||||||
|
we recommend **Ubuntu 22.04 LTS**.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
windows
|
||||||
|
mac
|
||||||
|
alma-linux-8
|
||||||
|
alma-linux-9
|
||||||
|
arch
|
||||||
|
centos-7
|
||||||
|
centos-stream-8
|
||||||
|
centos-stream-9
|
||||||
|
debian-10
|
||||||
|
debian-11
|
||||||
|
fedora
|
||||||
|
opensuse-leap-15
|
||||||
|
opensuse-tumbleweed
|
||||||
|
oracle-linux-8
|
||||||
|
oracle-linux-9
|
||||||
|
raspberry-pi-os-10
|
||||||
|
raspberry-pi-os-11
|
||||||
|
rhel-8
|
||||||
|
rhel-9
|
||||||
|
rocky-linux-8
|
||||||
|
rocky-linux-9
|
||||||
|
ubuntu-1804
|
||||||
|
ubuntu-2004
|
||||||
|
ubuntu-2204
|
||||||
|
ubuntu-non-lts
|
||||||
42
docs/install_guides/mac.rst
Normal file
42
docs/install_guides/mac.rst
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
.. _install-mac:
|
||||||
|
|
||||||
|
=======================
|
||||||
|
Installing Red on macOS
|
||||||
|
=======================
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
To install pre-requirements, we first have to install Brew.
|
||||||
|
In Finder or Spotlight, search for and open *Terminal*. In the terminal, paste the
|
||||||
|
following, then press Enter:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||||
|
|
||||||
|
After the installation, install the required packages by pasting the commands and pressing enter,
|
||||||
|
one-by-one:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
brew install python@3.9
|
||||||
|
brew install git
|
||||||
|
brew tap homebrew/cask-versions
|
||||||
|
brew install --cask temurin11
|
||||||
|
|
||||||
|
By default, Python installed through Homebrew is not added to the load path.
|
||||||
|
To fix this, you should run these commands:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
profile=$([ -n "$ZSH_VERSION" ] && echo ~/.zprofile || ([ -f ~/.bash_profile ] && echo ~/.bash_profile || echo ~/.profile))
|
||||||
|
echo 'export PATH="$(brew --prefix)/opt/python@3.9/bin:$PATH"' >> "$profile"
|
||||||
|
source "$profile"
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-venv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
54
docs/install_guides/opensuse-leap-15.rst
Normal file
54
docs/install_guides/opensuse-leap-15.rst
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
.. _install-opensuse-leap-15:
|
||||||
|
|
||||||
|
=====================================
|
||||||
|
Installing Red on openSUSE Leap 15.2+
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
We recommend installing a community package to get Python 3.9 on openSUSE Leap 15.2+. This package will
|
||||||
|
be installed to the ``/opt`` directory.
|
||||||
|
|
||||||
|
First, add the Opt-Python community repository:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
source /etc/os-release
|
||||||
|
sudo zypper -n ar -f https://download.opensuse.org/repositories/home:/Rotkraut:/Opt-Python/openSUSE_Leap_${VERSION_ID}/ Opt-Python
|
||||||
|
sudo zypper -n --gpg-auto-import-keys ref
|
||||||
|
|
||||||
|
Now install the pre-requirements with zypper:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo zypper -n install opt-python39 opt-python39-setuptools git-core java-11-openjdk-headless nano
|
||||||
|
sudo zypper -n install -t pattern devel_basis
|
||||||
|
|
||||||
|
Since Python is now installed to ``/opt/python``, we should add it to PATH. You can add a file in
|
||||||
|
``/etc/profile.d/`` to do this:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
echo 'export PATH="/opt/python/bin:$PATH"' | sudo tee /etc/profile.d/opt-python.sh
|
||||||
|
source /etc/profile.d/opt-python.sh
|
||||||
|
|
||||||
|
Now, bootstrap pip with ensurepip:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo /opt/python/bin/python3.9 -m ensurepip --altinstall
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
After this command, a warning about running pip as root might be printed.
|
||||||
|
For this specific command, this warning can be safely ignored.
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-venv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
25
docs/install_guides/opensuse-tumbleweed.rst
Normal file
25
docs/install_guides/opensuse-tumbleweed.rst
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
.. _install-opensuse-tumbleweed:
|
||||||
|
|
||||||
|
=====================================
|
||||||
|
Installing Red on openSUSE Tumbleweed
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
openSUSE Tumbleweed has all required dependencies available in official repositories. Install them
|
||||||
|
with zypper:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo zypper -n install python39-base python39-pip git-core java-11-openjdk-headless nano
|
||||||
|
sudo zypper -n install -t pattern devel_basis
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-venv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
7
docs/install_guides/oracle-linux-8.rst
Normal file
7
docs/install_guides/oracle-linux-8.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.. _install-oracle-linux-8:
|
||||||
|
|
||||||
|
======================================
|
||||||
|
Installing Red on Oracle Linux 8.4-8.x
|
||||||
|
======================================
|
||||||
|
|
||||||
|
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||||
7
docs/install_guides/oracle-linux-9.rst
Normal file
7
docs/install_guides/oracle-linux-9.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.. _install-oracle-linux-9:
|
||||||
|
|
||||||
|
================================
|
||||||
|
Installing Red on Oracle Linux 9
|
||||||
|
================================
|
||||||
|
|
||||||
|
.. include:: _includes/install-guide-rhel9-derivatives.rst
|
||||||
48
docs/install_guides/raspberry-pi-os-10.rst
Normal file
48
docs/install_guides/raspberry-pi-os-10.rst
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
.. _install-raspberry-pi-os-10:
|
||||||
|
|
||||||
|
====================================================
|
||||||
|
Installing Red on Raspberry Pi OS (Legacy) 10 Buster
|
||||||
|
====================================================
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
While we do provide support and install instructions for running Red
|
||||||
|
on Raspberry Pi OS (Legacy) 10 Buster, we highly recommend installing/upgrading to
|
||||||
|
the new version - Raspberry Pi OS 11 Bullseye.
|
||||||
|
|
||||||
|
If you're not sure what version you are using,
|
||||||
|
you can check your version of Raspberry Pi OS by running:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
lsb_release -a
|
||||||
|
|
||||||
|
If you're running Bullseye already, read `install-raspberry-pi-os-11` document instead.
|
||||||
|
|
||||||
|
If you're using Buster, please consider upgrading to Bullseye if possible.
|
||||||
|
You can read
|
||||||
|
`the post about Bullseye release from Raspberry Pi Foundation <https://www.raspberrypi.com/news/raspberry-pi-os-debian-bullseye/>`__
|
||||||
|
to learn how you can install/upgrade to the new version.
|
||||||
|
|
||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
We recommend installing pyenv as a method of installing non-native versions of Python on
|
||||||
|
Raspberry Pi OS. This guide will tell you how. First, run the following commands:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt -y install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev libgdbm-dev uuid-dev python3-openssl git openjdk-11-jre-headless nano
|
||||||
|
CXX=/usr/bin/g++
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/install-python38-pyenv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-pyenv-virtualenv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
40
docs/install_guides/raspberry-pi-os-11.rst
Normal file
40
docs/install_guides/raspberry-pi-os-11.rst
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
.. _install-raspberry-pi-os-11:
|
||||||
|
|
||||||
|
=============================================
|
||||||
|
Installing Red on Raspberry Pi OS 11 Bullseye
|
||||||
|
=============================================
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This guide can only be used with Raspberry Pi OS 11 Bullseye,
|
||||||
|
it will not work with any older (e.g. Raspberry Pi OS 10 Buster)
|
||||||
|
or newer (e.g. Raspberry Pi OS 12 Bookworm) releases.
|
||||||
|
You can check your version of Raspberry Pi OS by running:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
lsb_release -a
|
||||||
|
|
||||||
|
If you're not running Bullseye, you should read
|
||||||
|
`the post about Bullseye release from Raspberry Pi Foundation <https://www.raspberrypi.com/news/raspberry-pi-os-debian-bullseye/>`__
|
||||||
|
to learn how you can install/upgrade to the new version.
|
||||||
|
|
||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
Raspberry Pi OS "Bullseye" has all required packages available in official repositories. Install them
|
||||||
|
with apt:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt -y install python3 python3-dev python3-venv python3-pip git openjdk-11-jre-headless build-essential nano
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-venv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
7
docs/install_guides/rhel-8.rst
Normal file
7
docs/install_guides/rhel-8.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.. _install-rhel-8:
|
||||||
|
|
||||||
|
=========================================================
|
||||||
|
Installing Red on Red Hat Enterprise Linux (RHEL) 8.4-8.x
|
||||||
|
=========================================================
|
||||||
|
|
||||||
|
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||||
7
docs/install_guides/rhel-9.rst
Normal file
7
docs/install_guides/rhel-9.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.. _install-rhel-9:
|
||||||
|
|
||||||
|
===================================================
|
||||||
|
Installing Red on Red Hat Enterprise Linux (RHEL) 9
|
||||||
|
===================================================
|
||||||
|
|
||||||
|
.. include:: _includes/install-guide-rhel9-derivatives.rst
|
||||||
7
docs/install_guides/rocky-linux-8.rst
Normal file
7
docs/install_guides/rocky-linux-8.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.. _install-rocky-linux-8:
|
||||||
|
|
||||||
|
===============================
|
||||||
|
Installing Red on Rocky Linux 8
|
||||||
|
===============================
|
||||||
|
|
||||||
|
.. include:: _includes/install-guide-rhel8-derivatives.rst
|
||||||
7
docs/install_guides/rocky-linux-9.rst
Normal file
7
docs/install_guides/rocky-linux-9.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
.. _install-rocky-linux-9:
|
||||||
|
|
||||||
|
===============================
|
||||||
|
Installing Red on Rocky Linux 9
|
||||||
|
===============================
|
||||||
|
|
||||||
|
.. include:: _includes/install-guide-rhel9-derivatives.rst
|
||||||
37
docs/install_guides/ubuntu-1804.rst
Normal file
37
docs/install_guides/ubuntu-1804.rst
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
.. _install-ubuntu-1804:
|
||||||
|
|
||||||
|
==================================
|
||||||
|
Installing Red on Ubuntu 18.04 LTS
|
||||||
|
==================================
|
||||||
|
|
||||||
|
.. include:: _includes/linux-preamble.rst
|
||||||
|
|
||||||
|
-------------------------------
|
||||||
|
Installing the pre-requirements
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
We recommend adding the ``git-core`` ppa to install Git 2.11 or greater:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt -y install software-properties-common
|
||||||
|
sudo add-apt-repository -y ppa:git-core/ppa
|
||||||
|
|
||||||
|
We recommend adding the ``deadsnakes`` ppa to install Python 3.9:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo add-apt-repository -y ppa:deadsnakes/ppa
|
||||||
|
|
||||||
|
Now install the pre-requirements with apt:
|
||||||
|
|
||||||
|
.. prompt:: bash
|
||||||
|
|
||||||
|
sudo apt -y install python3.9 python3.9-dev python3.9-venv python3-pip git openjdk-11-jre-headless build-essential nano
|
||||||
|
|
||||||
|
.. Include common instructions:
|
||||||
|
|
||||||
|
.. include:: _includes/create-env-with-venv.rst
|
||||||
|
|
||||||
|
.. include:: _includes/install-and-setup-red-unix.rst
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user