Compare commits
566 Commits
Author | SHA1 | Date | |
---|---|---|---|
ce783c3f75 | |||
0589728f58 | |||
be9352bc03 | |||
af26fcfa5f | |||
|
7a73869a9f | ||
|
b1987be30c | ||
|
cdd5928028 | ||
c3a93b17dc | |||
|
55c4691933 | ||
|
cf2532af9a | ||
|
89a6adb389 | ||
|
b66ba51e0d | ||
|
f20ccd01f4 | ||
|
8842a86b30 | ||
|
038f17c3a4 | ||
|
bdc6974451 | ||
|
0234df0844 | ||
|
68a92426c2 | ||
|
f5eaa4f335 | ||
|
7923c32323 | ||
|
cf5756e0a8 | ||
|
9f2d9d6710 | ||
|
6bea4b9f02 | ||
|
a127e43dc0 | ||
|
9cff3b59c1 | ||
|
4841418cff | ||
|
51f9ae9e3b | ||
|
eef5ad0c36 | ||
|
c3755055a1 | ||
|
16fd835d4b | ||
|
25258a0c61 | ||
|
37412e4e73 | ||
|
494d8405b8 | ||
|
0a52676042 | ||
|
48adfc19af | ||
|
067297478e | ||
|
a2c4695557 | ||
|
438f68cde7 | ||
|
46f9de01d6 | ||
|
90b698f18e | ||
|
d51c28b73c | ||
|
f08fd3bdb1 | ||
|
ea0ca1471f | ||
|
4c591a69b1 | ||
|
d658fe7414 | ||
|
81a7c6f398 | ||
|
cdf15d6c01 | ||
|
1a85825049 | ||
|
62c016c7cf | ||
|
6c3025ecf1 | ||
|
927e98514a | ||
|
3de9a40ffd | ||
|
1af4679d9e | ||
|
4adf85a9eb | ||
|
531633b018 | ||
|
76249c5b29 | ||
|
771e0df064 | ||
|
2ab4274c22 | ||
|
6f12ad1478 | ||
|
b9f22df756 | ||
|
6b896d8091 | ||
|
268f9b0448 | ||
|
5403105062 | ||
|
192667aa35 | ||
|
af334a0b5c | ||
|
14490024ea | ||
|
88833bd5fc | ||
|
9531fb7717 | ||
|
cd2a86c624 | ||
|
35176465b1 | ||
|
306ff3a918 | ||
|
96d792f63b | ||
|
f61123ef92 | ||
|
2aca71cd8a | ||
|
20fb253eb3 | ||
|
5362821843 | ||
|
19d710cdd4 | ||
|
088d95340f | ||
|
e5609a0708 | ||
|
a612e50ea3 | ||
|
658597db9f | ||
|
919c81d385 | ||
|
f255ed26dd | ||
|
03a86b0be9 | ||
|
fe3770270e | ||
|
e50e71014e | ||
|
d74a23d215 | ||
|
7a1895bf31 | ||
|
70906ed5cb | ||
|
a98be21181 | ||
|
1552d2c892 | ||
|
6c5ea68032 | ||
|
0bf6459e6a | ||
|
f02ac7cd78 | ||
|
e2d7ed343c | ||
|
57dd324f3e | ||
|
464118f792 | ||
|
10fdd36e87 | ||
|
1358878773 | ||
|
540209706d | ||
|
79d3fca7e4 | ||
|
d12d70df1b | ||
|
ce602b5b35 | ||
|
38125509e5 | ||
|
958eca2935 | ||
|
dea9a935a4 | ||
|
47125ed687 | ||
|
ec7f69f1c0 | ||
|
94e4c89564 | ||
|
d9a446d874 | ||
|
f3984c824e | ||
|
e0be610ec0 | ||
|
82aac891dd | ||
|
3097ef88a7 | ||
|
f06ee47516 | ||
|
d5978a0d66 | ||
|
53661b3337 | ||
|
2fe812c4ac | ||
|
fece28b66b | ||
|
bf7585cd83 | ||
|
f1e59d561d | ||
|
97b84ef469 | ||
|
a0496454bd | ||
|
ffd570511a | ||
|
ed623dd967 | ||
|
e10aee9c69 | ||
|
6294dc8679 | ||
|
89b810df54 | ||
|
2d1b5dda96 | ||
|
2a137004a5 | ||
|
92bf9b88b4 | ||
|
44b3223c1b | ||
|
81f0032262 | ||
|
d86c8ed41b | ||
|
afda3e2046 | ||
|
8e7935f893 | ||
|
5295704447 | ||
|
c738cb569e | ||
|
263a95a6ad | ||
|
e9cf57d46f | ||
|
f773b0c6b6 | ||
|
1aa86937c8 | ||
|
f1b348406d | ||
|
b9bb72f06d | ||
|
d074444c26 | ||
|
0d216ad78a | ||
|
0131b7713e | ||
|
613655eb95 | ||
|
cedaf73785 | ||
|
9163510eee | ||
|
fe88611183 | ||
|
4130317f40 | ||
|
3f7f6cecbe | ||
|
50236d71d5 | ||
|
8612dc852e | ||
|
8dd24443c0 | ||
|
86743250cf | ||
|
661d026973 | ||
|
55b1c3945b | ||
|
c054543d98 | ||
|
618968d2e4 | ||
|
4e11a6c8bc | ||
|
b3243eb0e9 | ||
|
028606b080 | ||
|
ac5e4e7540 | ||
|
30bafa8a89 | ||
|
4eca5be1d4 | ||
|
f239c46e20 | ||
|
1c72d2864a | ||
|
45ee3042bb | ||
|
17719dd8e2 | ||
|
11b533c3b7 | ||
|
b8573f11b5 | ||
|
f26a7de704 | ||
|
6124c3dce8 | ||
|
390a637c08 | ||
|
202c5e98a5 | ||
|
fd410bc856 | ||
|
c328ec68d3 | ||
|
4dbdce7f5d | ||
|
67f0cfb717 | ||
|
ed40bc99b2 | ||
|
b85cc023f2 | ||
|
467b482ff9 | ||
|
c0012e296e | ||
|
8a75c28d73 | ||
|
4b9977e5d6 | ||
|
c1cf85b338 | ||
|
5e230fad22 | ||
|
0e4728d9c9 | ||
|
8f90410e2d | ||
|
ec94459722 | ||
|
ab3ad4f2fb | ||
|
dc0176365b | ||
|
34b56c6353 | ||
|
9a744172a9 | ||
|
70f0f6af44 | ||
|
3119a47007 | ||
|
5db254e8f3 | ||
|
f396fc78db | ||
|
9d778de7f2 | ||
|
3966629263 | ||
|
f1a4a88730 | ||
|
fad0b908c8 | ||
|
9eab7d949f | ||
|
f58e7ed7ac | ||
|
27f925fa63 | ||
|
aa01314b3a | ||
|
72e7b04319 | ||
|
568cdfbd3c | ||
|
4132565948 | ||
|
96ae60378b | ||
|
4de7e38277 | ||
|
ab99801a37 | ||
|
994457f9af | ||
|
9e9f21d525 | ||
|
f3f934e05f | ||
|
bf860f9aa8 | ||
|
a49002a808 | ||
|
88e42e672b | ||
|
fcbf3a0918 | ||
|
cb04e987c3 | ||
|
7f4970a5da | ||
|
19246b9bf2 | ||
|
b73e0d18e5 | ||
|
d0c580f39a | ||
|
93b48ff3b0 | ||
|
b04e7cbd55 | ||
|
fe175ecd43 | ||
|
c7936335bf | ||
|
264e38c7a0 | ||
|
d782ceb9fa | ||
|
e15045292f | ||
|
74ad7b32bd | ||
|
d55a9efe9b | ||
|
9196c1e368 | ||
|
a0a6de855d | ||
|
6af90191c3 | ||
|
793cbdf608 | ||
|
8331af2870 | ||
|
a55f61aa8c | ||
|
5d6b0f44ae | ||
|
62326da5b5 | ||
|
1694727ad9 | ||
|
88945af60b | ||
|
fb18c2ed32 | ||
|
98e2b0ce37 | ||
|
fbedf5878b | ||
|
42923c5272 | ||
|
269a4e3157 | ||
|
8f844d38d3 | ||
|
94bb6f15a7 | ||
|
78be4598cf | ||
|
ab07199a1e | ||
|
3a71f63754 | ||
|
4cf54c1b31 | ||
|
9fddfe77c4 | ||
|
6b51dbd330 | ||
|
d0326ad680 | ||
|
d089a37bf0 | ||
|
65b76ec48e | ||
|
221a30b576 | ||
|
768c8b20ee | ||
|
c244cb7de0 | ||
|
6591dd7c74 | ||
|
54a91b4a79 | ||
|
b4cf9fee84 | ||
|
507c9de136 | ||
|
9bb8f3d666 | ||
|
c33c2bce60 | ||
|
d5903a1e25 | ||
|
8b72447b0f | ||
|
17158d5e80 | ||
|
a6d432de7f | ||
|
b1a4aa6a21 | ||
|
556174ec89 | ||
|
842b45178d | ||
|
684dba0d9c | ||
|
fc941770e9 | ||
|
eba804b5ce | ||
|
f826fb97f6 | ||
|
89eabc7c14 | ||
|
44859529d5 | ||
|
421431d01d | ||
|
99049a6ace | ||
|
a609e17717 | ||
|
3c9b68e739 | ||
|
9f3c04c93e | ||
|
196f40e648 | ||
|
728aeab809 | ||
|
1d1b7de20a | ||
|
322424b0a1 | ||
|
b33e4bdd80 | ||
|
45e4816033 | ||
|
8e1c20624d | ||
|
5015b6ad95 | ||
|
0e73372c23 | ||
|
7de15bf444 | ||
|
bbe3ac66e3 | ||
|
4d52566250 | ||
|
f2d1b821d0 | ||
|
e792e7b39e | ||
|
42658355b1 | ||
|
9bb72d9976 | ||
|
3731994061 | ||
|
9889baf8bd | ||
|
f8ad6dda50 | ||
|
d242952d4a | ||
|
8f5c63a057 | ||
|
cb5fdde6d0 | ||
|
728539528f | ||
|
db1581f67d | ||
|
3709f4b066 | ||
|
1df7e4d3d0 | ||
|
6b0889f845 | ||
|
d7a0168fc5 | ||
|
5fc9c18d98 | ||
|
b08ad7cb77 | ||
|
e9365b7753 | ||
|
cbd2de284f | ||
|
36069d7552 | ||
|
cedf08b128 | ||
|
ed3ccbf6d9 | ||
|
942f15cf05 | ||
|
aa5b7f96c7 | ||
|
85a07d1cdd | ||
|
273af5ffe4 | ||
|
8a4d76b8e6 | ||
|
721ad63add | ||
|
dca4bf39a0 | ||
|
61a96d9c4f | ||
|
39e79843e1 | ||
|
e75f23557b | ||
|
ee8643bf29 | ||
|
902ddc70f6 | ||
|
ff56af3e73 | ||
|
3f2eef5647 | ||
|
e1baa3942a | ||
|
f11429b714 | ||
|
e27e1005eb | ||
|
7ad5c5e02b | ||
|
a8f2ca60c2 | ||
|
741538a982 | ||
|
bed3001ce1 | ||
|
0aa65b2953 | ||
|
2cad7f4475 | ||
|
d3c598ae01 | ||
|
ee72962ee5 | ||
|
d2ea530c10 | ||
|
f1bcbd91a3 | ||
|
4b57d874ba | ||
|
85e1839991 | ||
|
4862564c74 | ||
|
cb9f427927 | ||
|
c709680413 | ||
|
4b954df56d | ||
|
0f37e48869 | ||
|
5d136ffd2c | ||
|
e5f1721c15 | ||
|
e64104fa7a | ||
|
9eec364ae6 | ||
|
f7168ab3db | ||
|
e7515c7adc | ||
|
b788a5e95f | ||
|
449586c0e3 | ||
|
95a7da3200 | ||
|
f26c7a32ec | ||
|
d5f4dcdf20 | ||
|
01cf59d83e | ||
|
4684117654 | ||
|
808dca8ec4 | ||
|
b381ee00b6 | ||
|
abd2937708 | ||
|
838da3d827 | ||
|
9114d1586b | ||
|
77754c7dec | ||
|
936ee30e1f | ||
|
fc13b2aa23 | ||
|
733f2bfe15 | ||
|
277fbdbe4d | ||
|
e17163170d | ||
|
884793c658 | ||
|
270600198b | ||
|
8801a7451b | ||
|
6bc4bb7803 | ||
|
0cf1d328d3 | ||
|
f56b6f804a | ||
|
3cfe783ac9 | ||
|
fa58bad149 | ||
|
3bf224ab57 | ||
|
4e7b7a6ee5 | ||
|
06693b9b34 | ||
|
809219acc3 | ||
|
dd1d21e29c | ||
|
b0966a7cd3 | ||
|
e51d2bec23 | ||
|
a0559b7130 | ||
|
eb97c0b749 | ||
|
5da75c31b2 | ||
|
f60bf271b2 | ||
|
9ff0c929c2 | ||
|
e7422c6db0 | ||
|
a90ed6c33e | ||
|
cdaf78cd27 | ||
|
f100da8918 | ||
|
182ade0ad7 | ||
|
3d76207887 | ||
|
eadcde8397 | ||
|
7aa06f3631 | ||
|
eeaf1a001e | ||
|
1c3c65921c | ||
|
173a13f341 | ||
|
703381255b | ||
|
d3e20f5564 | ||
|
3304746f1a | ||
|
1fa23c095a | ||
|
0d56f57ee5 | ||
|
320c7c0fc3 | ||
|
f71801cbe6 | ||
|
fb52e90e57 | ||
|
c97f5da647 | ||
|
abb332e99f | ||
|
48fff57d7a | ||
|
6c2b497ff1 | ||
|
e6792ebf50 | ||
|
caa5c42fae | ||
|
b0af0fbb08 | ||
|
28115aa2b7 | ||
|
877ef81296 | ||
|
891afbe7e7 | ||
|
afb2e515d7 | ||
|
125d0231c1 | ||
|
fb1a09f4b0 | ||
|
dd56e24c42 | ||
|
2ff55a49fb | ||
|
21a72c182e | ||
|
87236661b3 | ||
|
7617c8ac39 | ||
|
75d3b0197d | ||
|
628963f1a2 | ||
|
4329cc2742 | ||
|
c1fba53151 | ||
|
20a96ecf92 | ||
|
649c400cb7 | ||
|
8b7b534619 | ||
|
c5e36caabc | ||
|
e69776beb1 | ||
|
11250a6d0d | ||
|
41af8b9622 | ||
|
bfc78bf010 | ||
|
dc10f4f80b | ||
|
b771786cb6 | ||
|
c2799f9145 | ||
|
2bc6052a5b | ||
|
ab6c3a7408 | ||
|
0a36ecf066 | ||
|
64f841052b | ||
|
052bf21435 | ||
|
0eba3c946c | ||
|
6a0a749c67 | ||
|
da85372fae | ||
|
c2230ac5eb | ||
|
b705a6ad11 | ||
|
7d5afdd234 | ||
|
29483d4909 | ||
|
4d9c6db90c | ||
|
7b9b314aaf | ||
|
73cbfc6725 | ||
|
85fa412155 | ||
|
2031f7e3a9 | ||
|
f572a2a33e | ||
|
ce5a2c776b | ||
|
9cf199433f | ||
|
7c7f932fff | ||
|
c4444f04a0 | ||
|
8b820e0a05 | ||
|
e7192b90a0 | ||
|
130e757afd | ||
|
6fe479f47c | ||
|
103e77b003 | ||
|
177f6d8999 | ||
|
83955758a4 | ||
|
8c7cf11875 | ||
|
4a21c33a91 | ||
|
3ae47b2034 | ||
|
332a8b75a0 | ||
|
7f29c15973 | ||
|
6988bdeb80 | ||
|
370ce140df | ||
|
d75a39c1c5 | ||
|
73c33c1fe0 | ||
|
3595581fe0 | ||
|
c7f5aae500 | ||
|
5c881979a7 | ||
|
56fe63dc96 | ||
|
f615715236 | ||
|
bde9df7d01 | ||
|
2f47f292ce | ||
|
5011ddf9bd | ||
|
eda4160e6d | ||
|
96e1f02aa8 | ||
|
e892818100 | ||
|
b0ad33337d | ||
|
9502e235bd | ||
|
112065a6c2 | ||
|
b3947146f0 | ||
|
d095e4e2a2 | ||
|
4cdeb4b1cf | ||
|
697b240ee3 | ||
|
0a5d9e66d6 | ||
|
9efd41c25d | ||
|
fa29131818 | ||
|
ec5a5c42a9 | ||
|
0465c75f7a | ||
|
3433a75125 | ||
|
53b45c1fdb | ||
|
d391e42fa7 | ||
|
f92fd23cab | ||
|
cc212626f7 | ||
|
bb96a01877 | ||
|
747a834e60 | ||
|
ff07777a38 | ||
|
524452e72e | ||
|
25a977545c | ||
|
20826448ec | ||
|
4306bdfe75 | ||
|
1fa0aa3450 | ||
|
3890816fa7 | ||
|
6dd002002d | ||
|
7704569c36 | ||
|
2d9fc9893b | ||
|
bb897fc43d | ||
|
6d27271d4a | ||
|
dfb4c778d2 | ||
|
a4973ffbb3 | ||
|
355425bf80 | ||
|
3797fbd439 | ||
|
351ebabd64 | ||
|
9e3dc6d5a1 | ||
|
c183e8ad58 | ||
|
2df415341c | ||
|
d08bc60be5 | ||
|
2344624838 | ||
|
87983d97c3 | ||
|
0587189963 | ||
|
0222726315 | ||
|
a6d3b0bd07 | ||
|
558796809c | ||
|
91e7663e31 | ||
|
8408a17450 | ||
|
13dea118a9 | ||
|
f6bdb98c41 | ||
|
8f894e095b | ||
|
f5523c8469 | ||
|
9579ab7902 | ||
|
54f51a8ce1 | ||
|
1c6e67ccf5 | ||
|
185008e33b | ||
|
aaf8db6356 | ||
|
ac7cd2b140 | ||
|
c0c2386ee8 | ||
|
87069bf44c | ||
|
4b4eb88ac8 | ||
|
f3d00d6da8 | ||
|
b0f555eaea | ||
|
70a5d6603d |
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,5 +1,10 @@
|
|||||||
#Manually added files
|
#Manually added files
|
||||||
|
|
||||||
|
patreon_rewards.json
|
||||||
|
command_errors*.txt
|
||||||
|
|
||||||
|
src/NadekoBot/Command Errors*.txt
|
||||||
|
|
||||||
src/NadekoBot/credentials.json
|
src/NadekoBot/credentials.json
|
||||||
src/NadekoBot/data/NadekoBot.db
|
src/NadekoBot/data/NadekoBot.db
|
||||||
src/NadekoBot/data/musicdata
|
src/NadekoBot/data/musicdata
|
||||||
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,4 +0,0 @@
|
|||||||
[submodule "Discord.Net"]
|
|
||||||
path = Discord.Net
|
|
||||||
url = https://github.com/Kwoth/Discord.Net
|
|
||||||
branch = rogue-dev
|
|
28
.vscode/launch.json
vendored
Normal file
28
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to find out which attributes exist for C# debugging
|
||||||
|
// Use hover for the description of the existing attributes
|
||||||
|
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": ".NET Core Launch (console)",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "build",
|
||||||
|
// If you have changed target frameworks, make sure to update the program path.
|
||||||
|
"program": "${workspaceRoot}/src/NadekoBot/bin/Debug/netcoreapp1.0/NadekoBot.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceRoot}/src/NadekoBot",
|
||||||
|
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
|
||||||
|
"console": "internalConsole",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"internalConsoleOptions": "openOnSessionStart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Attach",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "attach",
|
||||||
|
"processId": "${command:pickProcess}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
16
.vscode/tasks.json
vendored
Normal file
16
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"version": "0.1.0",
|
||||||
|
"command": "dotnet",
|
||||||
|
"isShellCommand": true,
|
||||||
|
"args": [],
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"taskName": "build",
|
||||||
|
"args": [
|
||||||
|
"${workspaceRoot}/src/NadekoBot/project.json"
|
||||||
|
],
|
||||||
|
"isBuildCommand": true,
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -1 +0,0 @@
|
|||||||
Subproject commit d2229228b92117899d65cd549a1f2853057b255b
|
|
104
NadekoBot.iss
Normal file
104
NadekoBot.iss
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
#define sysfolder "system"
|
||||||
|
#define version GetEnv("NADEKOBOT_INSTALL_VERSION")
|
||||||
|
#define target "win7-x64"
|
||||||
|
|
||||||
|
[Setup]
|
||||||
|
AppName=NadekoBot
|
||||||
|
AppVersion={#version}
|
||||||
|
AppPublisher=Kwoth
|
||||||
|
DefaultDirName={pf}\NadekoBot
|
||||||
|
DefaultGroupName=NadekoBot
|
||||||
|
UninstallDisplayIcon={app}\{#sysfolder}\nadeko_icon.ico
|
||||||
|
Compression=lzma2
|
||||||
|
SolidCompression=yes
|
||||||
|
OutputDir=userdocs:projekti/NadekoInstallerOutput
|
||||||
|
OutputBaseFilename=NadekoBot-setup-{#version}
|
||||||
|
AppReadmeFile=http://nadekobot.readthedocs.io/en/1.4/Commands%20List/
|
||||||
|
ArchitecturesInstallIn64BitMode=x64
|
||||||
|
UsePreviousSetupType=no
|
||||||
|
DisableWelcomePage=no
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
;install
|
||||||
|
Source: "src\NadekoBot\bin\Release\netcoreapp1.1\{#target}\publish\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist ignoreversion createallsubdirs; Excludes: "*.pdb, *.db"
|
||||||
|
;rename credentials example to credentials, but don't overwrite if it exists
|
||||||
|
;Source: "src\NadekoBot\bin\Release\netcoreapp1.1\{#target}\publish\credentials_example.json"; DestName: "credentials.json"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: skipifsourcedoesntexist onlyifdoesntexist;
|
||||||
|
|
||||||
|
;reinstall - i want to copy all files, but i don't want to overwrite any data files because users will lose their customization if they don't have a backup,
|
||||||
|
; and i don't want them to have to backup and then copy-merge into data folder themselves, or lose their currency images due to overwrite.
|
||||||
|
Source: "src\NadekoBot\bin\Release\netcoreapp1.1\{#target}\publish\*"; DestDir: "{app}\{#sysfolder}"; Permissions: users-full; Flags: recursesubdirs ignoreversion onlyifdestfileexists createallsubdirs; Excludes: "*.pdb, *.db, data\*, credentials.json";
|
||||||
|
Source: "src\NadekoBot\bin\Release\netcoreapp1.1\{#target}\publish\data\*"; DestDir: "{app}\{#sysfolder}\data"; Permissions: users-full; Flags: recursesubdirs onlyifdoesntexist createallsubdirs;
|
||||||
|
|
||||||
|
;readme
|
||||||
|
;Source: "readme"; DestDir: "{app}"; Flags: isreadme
|
||||||
|
|
||||||
|
[Dirs]
|
||||||
|
Name:"{app}\{#sysfolder}\data"; Permissions: everyone-modify
|
||||||
|
Name:"{app}\{#sysfolder}"; Permissions: everyone-modify
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
Filename: "http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/"; Flags: postinstall shellexec runasoriginaluser; Description: "Open setup guide"
|
||||||
|
Filename: "{app}\{#sysfolder}\credentials.json"; Flags: postinstall shellexec runasoriginaluser; Description: "Open credentials file"
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
; for pretty install directory
|
||||||
|
Name: "{app}\NadekoBot"; Filename: "{app}\{#sysfolder}\NadekoBot.exe"; IconFilename: "{app}\{#sysfolder}\nadeko_icon.ico"
|
||||||
|
Name: "{app}\credentials"; Filename: "{app}\{#sysfolder}\credentials.json"
|
||||||
|
Name: "{app}\data"; Filename: "{app}\{#sysfolder}\data"
|
||||||
|
|
||||||
|
; desktop shortcut
|
||||||
|
Name: "{commondesktop}\NadekoBot"; Filename: "{app}\NadekoBot"; Tasks: desktopicon
|
||||||
|
; desktop icon checkbox
|
||||||
|
[Tasks]
|
||||||
|
Name: desktopicon; Description: "Create a &desktop shortcut";
|
||||||
|
|
||||||
|
[Registry]
|
||||||
|
;make the app run as administrator
|
||||||
|
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; \
|
||||||
|
ValueType: String; ValueName: "{app}\{#sysfolder}\NadekoBot.exe"; ValueData: "RUNASADMIN"; \
|
||||||
|
Flags: uninsdeletekeyifempty uninsdeletevalue;
|
||||||
|
Root: "HKCU"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; \
|
||||||
|
ValueType: String; ValueName: "{app}\{#sysfolder}\NadekoBot.exe"; ValueData: "RUNASADMIN"; \
|
||||||
|
Flags: uninsdeletekeyifempty uninsdeletevalue;
|
||||||
|
Root: "HKLM"; Subkey: "SOFTWARE\NadekoBot"; \
|
||||||
|
ValueType: String; ValueName: "InstallPath"; ValueData: "{app}\{#sysfolder}"; \
|
||||||
|
Flags: deletevalue uninsdeletekeyifempty uninsdeletevalue;
|
||||||
|
Root: "HKLM"; Subkey: "SOFTWARE\NadekoBot"; \
|
||||||
|
ValueType: String; ValueName: "Version"; ValueData: "{#version}"; \
|
||||||
|
Flags: deletevalue uninsdeletekeyifempty uninsdeletevalue;
|
||||||
|
|
||||||
|
[Messages]
|
||||||
|
WelcomeLabel2=IMPORTANT! READ BELOW!%n%nIt is recommended that you CLOSE any ANTI VIRUS before continuing.%n%nYou can only update v1.4 or newer.%n%nDo not select your old NadekoBot folder as an install path if it's not 1.4 or newer.
|
||||||
|
|
||||||
|
;ask the user if they want to delete all settings
|
||||||
|
[Code]
|
||||||
|
var
|
||||||
|
X: string;
|
||||||
|
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
|
||||||
|
begin
|
||||||
|
if CurUninstallStep = usPostUninstall then
|
||||||
|
begin
|
||||||
|
X := ExpandConstant('{app}');
|
||||||
|
if FileExists(X + '\{#sysfolder}\data\NadekoBot.db') then begin
|
||||||
|
if MsgBox('Do you want to delete all settings associated with this bot?', mbConfirmation, MB_YESNO) = IDYES then begin
|
||||||
|
DelTree(X + '\{#sysfolder}', True, True, True);
|
||||||
|
end
|
||||||
|
end else begin
|
||||||
|
MsgBox(X + '\{#sysfolder}\data\NadekoBot.db doesn''t exist', mbConfirmation, MB_YESNO)
|
||||||
|
end
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetFileName(const AFileName: string): string;
|
||||||
|
begin
|
||||||
|
Result := ExpandConstant('{app}\{#sysfolder}\' + AFileName);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure CurStepChanged(CurStep: TSetupStep);
|
||||||
|
begin
|
||||||
|
if (CurStep = ssPostInstall) then
|
||||||
|
begin
|
||||||
|
if FileExists(GetFileName('credentials_example.json')) and not FileExists(GetFileName('credentials.json')) then
|
||||||
|
RenameFile(GetFileName('credentials_example.json'), GetFileName('credentials.json'));
|
||||||
|
end;
|
||||||
|
end;
|
@ -1,24 +1,17 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 14
|
# Visual Studio 15
|
||||||
VisualStudioVersion = 14.0.25420.1
|
VisualStudioVersion = 15.0.26430.12
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{04929013-5BAB-42B0-B9B2-8F2BB8F16AF2}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0B2F1537-4BF0-422B-A0DD-8F9CCEFB340F}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{0B2F1537-4BF0-422B-A0DD-8F9CCEFB340F}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
global.json = global.json
|
global.json = global.json
|
||||||
|
NadekoBot.iss = NadekoBot.iss
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "NadekoBot", "src\NadekoBot\NadekoBot.xproj", "{45EC1473-C678-4857-A544-07DFE0D0B478}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot", "src\NadekoBot\NadekoBot.csproj", "{45EC1473-C678-4857-A544-07DFE0D0B478}"
|
||||||
EndProject
|
|
||||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Discord.Net.Commands", "discord.net\src\Discord.Net.Commands\Discord.Net.Commands.xproj", "{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Discord.Net.Core", "discord.net\src\Discord.Net.Core\Discord.Net.Core.xproj", "{E5F4786F-58F3-469E-8C87-1908A95436B7}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Discord.Net.Rest", "discord.net\src\Discord.Net.Rest\Discord.Net.Rest.xproj", "{63F5B5C8-56FE-4B53-8003-B58CEB451EF9}"
|
|
||||||
EndProject
|
|
||||||
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Discord.Net.WebSocket", "discord.net\src\Discord.Net.WebSocket\Discord.Net.WebSocket.xproj", "{E9800F7A-3354-41B1-BDBB-2D59F8124EC9}"
|
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -33,30 +26,6 @@ Global
|
|||||||
{45EC1473-C678-4857-A544-07DFE0D0B478}.GlobalNadeko|Any CPU.Build.0 = Release|Any CPU
|
{45EC1473-C678-4857-A544-07DFE0D0B478}.GlobalNadeko|Any CPU.Build.0 = Release|Any CPU
|
||||||
{45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.Build.0 = Release|Any CPU
|
{45EC1473-C678-4857-A544-07DFE0D0B478}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{078DD7E6-943D-4D09-AFC2-D2BA58B76C9C}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{E5F4786F-58F3-469E-8C87-1908A95436B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{E5F4786F-58F3-469E-8C87-1908A95436B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{E5F4786F-58F3-469E-8C87-1908A95436B7}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{E5F4786F-58F3-469E-8C87-1908A95436B7}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{E5F4786F-58F3-469E-8C87-1908A95436B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{E5F4786F-58F3-469E-8C87-1908A95436B7}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{63F5B5C8-56FE-4B53-8003-B58CEB451EF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{63F5B5C8-56FE-4B53-8003-B58CEB451EF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{63F5B5C8-56FE-4B53-8003-B58CEB451EF9}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{63F5B5C8-56FE-4B53-8003-B58CEB451EF9}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{63F5B5C8-56FE-4B53-8003-B58CEB451EF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{63F5B5C8-56FE-4B53-8003-B58CEB451EF9}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{E9800F7A-3354-41B1-BDBB-2D59F8124EC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{E9800F7A-3354-41B1-BDBB-2D59F8124EC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{E9800F7A-3354-41B1-BDBB-2D59F8124EC9}.GlobalNadeko|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{E9800F7A-3354-41B1-BDBB-2D59F8124EC9}.GlobalNadeko|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{E9800F7A-3354-41B1-BDBB-2D59F8124EC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{E9800F7A-3354-41B1-BDBB-2D59F8124EC9}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
![img](https://ci.appveyor.com/api/projects/status/gmu6b3ltc80hr3k9?svg=true)
|
![img](https://ci.appveyor.com/api/projects/status/gmu6b3ltc80hr3k9?svg=true)
|
||||||
[![Discord](https://discordapp.com/api/guilds/117523346618318850/widget.png)](https://discord.gg/nadekobot)
|
[![Discord](https://discordapp.com/api/guilds/117523346618318850/widget.png)](https://discord.gg/nadekobot)
|
||||||
[![Documentation Status](https://readthedocs.org/projects/nadekobot/badge/?version=latest)](http://nadekobot.readthedocs.io/en/latest/?badge=latest)
|
[![Documentation Status](https://readthedocs.org/projects/nadekobot/badge/?version=latest)](http://nadekobot.readthedocs.io/en/latest/?badge=latest)
|
||||||
[![nadeko0](https://cdn.discordapp.com/attachments/266240393639755778/281920716809699328/part1.png)](http://nadekobot.me)
|
[![nadeko0](https://cdn.discordapp.com/attachments/266240393639755778/281920716809699328/part1.png)](https://nadekobot.me)
|
||||||
[![nadeko1](https://cdn.discordapp.com/attachments/266240393639755778/281920134967328768/part2.png)](https://discordapp.com/oauth2/authorize?client_id=170254782546575360&scope=bot&permissions=66186303)
|
[![nadeko1](https://cdn.discordapp.com/attachments/266240393639755778/281920134967328768/part2.png)](https://discordapp.com/oauth2/authorize?client_id=170254782546575360&scope=bot&permissions=66186303)
|
||||||
[![nadeko2](https://cdn.discordapp.com/attachments/266240393639755778/281920161311883264/part3.png)](http://nadekobot.readthedocs.io/en/latest/Commands%20List/)
|
[![nadeko2](https://cdn.discordapp.com/attachments/266240393639755778/281920161311883264/part3.png)](http://nadekobot.readthedocs.io/en/latest/Commands%20List/)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: 1.0.{build}
|
version: 1.4.{build}
|
||||||
before_build:
|
before_build:
|
||||||
- cmd: >-
|
- cmd: >-
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
4
build.ps1
Normal file
4
build.ps1
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
appveyor-retry dotnet restore NadekoBot.sln -v Minimal /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG"
|
||||||
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||||
|
dotnet build NadekoBot.sln -c "Release" /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG"
|
||||||
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
@ -3,7 +3,6 @@ You can support the project on patreon: <https://patreon.com/nadekobot> or paypa
|
|||||||
##Table of contents
|
##Table of contents
|
||||||
- [Help](#help)
|
- [Help](#help)
|
||||||
- [Administration](#administration)
|
- [Administration](#administration)
|
||||||
- [ClashOfClans](#clashofclans)
|
|
||||||
- [CustomReactions](#customreactions)
|
- [CustomReactions](#customreactions)
|
||||||
- [Gambling](#gambling)
|
- [Gambling](#gambling)
|
||||||
- [Games](#games)
|
- [Games](#games)
|
||||||
@ -13,21 +12,20 @@ You can support the project on patreon: <https://patreon.com/nadekobot> or paypa
|
|||||||
- [Pokemon](#pokemon)
|
- [Pokemon](#pokemon)
|
||||||
- [Searches](#searches)
|
- [Searches](#searches)
|
||||||
- [Utility](#utility)
|
- [Utility](#utility)
|
||||||
|
- [Xp](#xp)
|
||||||
|
|
||||||
|
|
||||||
### Administration
|
### Administration
|
||||||
Commands and aliases | Description | Usage
|
Commands and aliases | Description | Usage
|
||||||
----------------|--------------|-------
|
----------------|--------------|-------
|
||||||
`.resetperms` | Resets the bot's permissions module on this server to the default value. **Requires Administrator server permission.** | `.resetperms`
|
|
||||||
`.resetglobalperms` | Resets global permissions set by bot owner. **Bot owner only** | `.resetglobalperms`
|
|
||||||
`.delmsgoncmd` | Toggles the automatic deletion of the user's successful command message to prevent chat flood. **Requires Administrator server permission.** | `.delmsgoncmd`
|
`.delmsgoncmd` | Toggles the automatic deletion of the user's successful command message to prevent chat flood. **Requires Administrator server permission.** | `.delmsgoncmd`
|
||||||
`.setrole` `.sr` | Sets a role for a given user. **Requires ManageRoles server permission.** | `.sr @User Guest`
|
`.setrole` `.sr` | Sets a role for a given user. **Requires ManageRoles server permission.** | `.sr @User Guest`
|
||||||
`.removerole` `.rr` | Removes a role from a given user. **Requires ManageRoles server permission.** | `.rr @User Admin`
|
`.removerole` `.rr` | Removes a role from a given user. **Requires ManageRoles server permission.** | `.rr @User Admin`
|
||||||
`.renamerole` `.renr` | Renames a role. The role you are renaming must be lower than bot's highest role. **Requires ManageRoles server permission.** | `.renr "First role" SecondRole`
|
`.renamerole` `.renr` | Renames a role. The role you are renaming must be lower than bot's highest role. **Requires ManageRoles server permission.** | `.renr "First role" SecondRole`
|
||||||
`.removeallroles` `.rar` | Removes all roles from a mentioned user. **Requires ManageRoles server permission.** | `.rar @User`
|
`.removeallroles` `.rar` | Removes all roles from a mentioned user. **Requires ManageRoles server permission.** | `.rar @User`
|
||||||
`.createrole` `.cr` | Creates a role with a given name. **Requires ManageRoles server permission.** | `.cr Awesome Role`
|
`.createrole` `.cr` | Creates a role with a given name. **Requires ManageRoles server permission.** | `.cr Awesome Role`
|
||||||
`.rolehoist` `.rh` | Toggles if this role is displayed in the sidebar or not **Requires ManageRoles server permission.** | `.rh Guests true` or `.rh "Space Wizards" true`
|
`.rolehoist` `.rh` | Toggles whether this role is displayed in the sidebar or not. **Requires ManageRoles server permission.** | `.rh Guests` or `.rh "Space Wizards"`
|
||||||
`.rolecolor` `.rc` | Set a role's color to the hex or 0-255 rgb color value provided. **Requires ManageRoles server permission.** | `.rc Admin 255 200 100` or `.rc Admin ffba55`
|
`.rolecolor` `.roleclr` | Set a role's color to the hex or 0-255 rgb color value provided. **Requires ManageRoles server permission.** | `.roleclr Admin 255 200 100` or `.roleclr Admin ffba55`
|
||||||
`.deafen` `.deaf` | Deafens mentioned user or users. **Requires DeafenMembers server permission.** | `.deaf "@Someguy"` or `.deaf "@Someguy" "@Someguy"`
|
`.deafen` `.deaf` | Deafens mentioned user or users. **Requires DeafenMembers server permission.** | `.deaf "@Someguy"` or `.deaf "@Someguy" "@Someguy"`
|
||||||
`.undeafen` `.undef` | Undeafens mentioned user or users. **Requires DeafenMembers server permission.** | `.undef "@Someguy"` or `.undef "@Someguy" "@Someguy"`
|
`.undeafen` `.undef` | Undeafens mentioned user or users. **Requires DeafenMembers server permission.** | `.undef "@Someguy"` or `.undef "@Someguy" "@Someguy"`
|
||||||
`.delvoichanl` `.dvch` | Deletes a voice channel with a given name. **Requires ManageChannels server permission.** | `.dvch VoiceChannelName`
|
`.delvoichanl` `.dvch` | Deletes a voice channel with a given name. **Requires ManageChannels server permission.** | `.dvch VoiceChannelName`
|
||||||
@ -36,7 +34,6 @@ Commands and aliases | Description | Usage
|
|||||||
`.creatxtchanl` `.ctch` | Creates a new text channel with a given name. **Requires ManageChannels server permission.** | `.ctch TextChannelName`
|
`.creatxtchanl` `.ctch` | Creates a new text channel with a given name. **Requires ManageChannels server permission.** | `.ctch TextChannelName`
|
||||||
`.settopic` `.st` | Sets a topic on the current channel. **Requires ManageChannels server permission.** | `.st My new topic`
|
`.settopic` `.st` | Sets a topic on the current channel. **Requires ManageChannels server permission.** | `.st My new topic`
|
||||||
`.setchanlname` `.schn` | Changes the name of the current channel. **Requires ManageChannels server permission.** | `.schn NewName`
|
`.setchanlname` `.schn` | Changes the name of the current channel. **Requires ManageChannels server permission.** | `.schn NewName`
|
||||||
`.prune` `.clr` | `.prune` removes all Nadeko's messages in the last 100 messages. `.prune X` removes last `X` number of messages from the channel (up to 100). `.prune @Someone` removes all Someone's messages in the last 100 messages. `.prune @Someone X` removes last `X` number of 'Someone's' messages in the channel. | `.prune` or `.prune 5` or `.prune @Someone` or `.prune @Someone X`
|
|
||||||
`.mentionrole` `.menro` | Mentions every person from the provided role or roles (separated by a ',') on this server. **Requires MentionEveryone server permission.** | `.menro RoleName`
|
`.mentionrole` `.menro` | Mentions every person from the provided role or roles (separated by a ',') on this server. **Requires MentionEveryone server permission.** | `.menro RoleName`
|
||||||
`.donators` | List of the lovely people who donated to keep this project alive. | `.donators`
|
`.donators` | List of the lovely people who donated to keep this project alive. | `.donators`
|
||||||
`.donadd` | Add a donator to the database. **Bot owner only** | `.donadd Donate Amount`
|
`.donadd` | Add a donator to the database. **Bot owner only** | `.donadd Donate Amount`
|
||||||
@ -61,10 +58,13 @@ Commands and aliases | Description | Usage
|
|||||||
`.addplaying` `.adpl` | Adds a specified string to the list of playing strings to rotate. Supported placeholders: `%servers%`, `%users%`, `%playing%`, `%queued%`, `%time%`, `%shardid%`, `%shardcount%`, `%shardguilds%`. **Bot owner only** | `.adpl`
|
`.addplaying` `.adpl` | Adds a specified string to the list of playing strings to rotate. Supported placeholders: `%servers%`, `%users%`, `%playing%`, `%queued%`, `%time%`, `%shardid%`, `%shardcount%`, `%shardguilds%`. **Bot owner only** | `.adpl`
|
||||||
`.listplaying` `.lipl` | Lists all playing statuses with their corresponding number. **Bot owner only** | `.lipl`
|
`.listplaying` `.lipl` | Lists all playing statuses with their corresponding number. **Bot owner only** | `.lipl`
|
||||||
`.removeplaying` `.rmpl` `.repl` | Removes a playing string on a given number. **Bot owner only** | `.rmpl`
|
`.removeplaying` `.rmpl` `.repl` | Removes a playing string on a given number. **Bot owner only** | `.rmpl`
|
||||||
|
`.prefix` | Sets this server's prefix for all bot commands. Provide no arguments to see the current server prefix. | `.prefix +`
|
||||||
|
`.defprefix` | Sets bot's default prefix for all bot commands. Provide no arguments to see the current default prefix. This will not change this server's current prefix. **Bot owner only** | `.defprefix +`
|
||||||
`.antiraid` | Sets an anti-raid protection on the server. First argument is number of people which will trigger the protection. Second one is a time interval in which that number of people needs to join in order to trigger the protection, and third argument is punishment for those people (Kick, Ban, Mute) **Requires Administrator server permission.** | `.antiraid 5 20 Kick`
|
`.antiraid` | Sets an anti-raid protection on the server. First argument is number of people which will trigger the protection. Second one is a time interval in which that number of people needs to join in order to trigger the protection, and third argument is punishment for those people (Kick, Ban, Mute) **Requires Administrator server permission.** | `.antiraid 5 20 Kick`
|
||||||
`.antispam` | Stops people from repeating same message X times in a row. You can specify to either mute, kick or ban the offenders. Max message count is 10. **Requires Administrator server permission.** | `.antispam 3 Mute` or `.antispam 4 Kick` or `.antispam 6 Ban`
|
`.antispam` | Stops people from repeating same message X times in a row. You can specify to either mute, kick or ban the offenders. Max message count is 10. **Requires Administrator server permission.** | `.antispam 3 Mute` or `.antispam 4 Kick` or `.antispam 6 Ban`
|
||||||
`.antispamignore` | Toggles whether antispam ignores current channel. Antispam must be enabled. | `.antispamignore`
|
`.antispamignore` | Toggles whether antispam ignores current channel. Antispam must be enabled. | `.antispamignore`
|
||||||
`.antilist` `.antilst` | Shows currently enabled protection features. | `.antilist`
|
`.antilist` `.antilst` | Shows currently enabled protection features. | `.antilist`
|
||||||
|
`.prune` `.clear` | `.prune` removes all Nadeko's messages in the last 100 messages. `.prune X` removes last `X` number of messages from the channel (up to 100). `.prune @Someone` removes all Someone's messages in the last 100 messages. `.prune @Someone X` removes last `X` number of 'Someone's' messages in the channel. | `.prune` or `.prune 5` or `.prune @Someone` or `.prune @Someone X`
|
||||||
`.slowmode` | Toggles slowmode. Disable by specifying no parameters. To enable, specify a number of messages each user can send, and an interval in seconds. For example 1 message every 5 seconds. **Requires ManageMessages server permission.** | `.slowmode 1 5` or `.slowmode`
|
`.slowmode` | Toggles slowmode. Disable by specifying no parameters. To enable, specify a number of messages each user can send, and an interval in seconds. For example 1 message every 5 seconds. **Requires ManageMessages server permission.** | `.slowmode 1 5` or `.slowmode`
|
||||||
`.slowmodewl` | Ignores a role or a user from the slowmode feature. **Requires ManageMessages server permission.** | `.slowmodewl SomeRole` or `.slowmodewl AdminDude`
|
`.slowmodewl` | Ignores a role or a user from the slowmode feature. **Requires ManageMessages server permission.** | `.slowmodewl SomeRole` or `.slowmodewl AdminDude`
|
||||||
`.adsarm` | Toggles the automatic deletion of confirmations for `.iam` and `.iamn` commands. **Requires ManageMessages server permission.** | `.adsarm`
|
`.adsarm` | Toggles the automatic deletion of confirmations for `.iam` and `.iamn` commands. **Requires ManageMessages server permission.** | `.adsarm`
|
||||||
@ -81,16 +81,15 @@ Commands and aliases | Description | Usage
|
|||||||
`.scclr` | Removes all startup commands. **Bot owner only** | `.scclr`
|
`.scclr` | Removes all startup commands. **Bot owner only** | `.scclr`
|
||||||
`.fwmsgs` | Toggles forwarding of non-command messages sent to bot's DM to the bot owners **Bot owner only** | `.fwmsgs`
|
`.fwmsgs` | Toggles forwarding of non-command messages sent to bot's DM to the bot owners **Bot owner only** | `.fwmsgs`
|
||||||
`.fwtoall` | Toggles whether messages will be forwarded to all bot owners or only to the first one specified in the credentials.json file **Bot owner only** | `.fwtoall`
|
`.fwtoall` | Toggles whether messages will be forwarded to all bot owners or only to the first one specified in the credentials.json file **Bot owner only** | `.fwtoall`
|
||||||
`.connectshard` | Try (re)connecting a shard with a certain shardid when it dies. No one knows will it work. Keep an eye on the console for errors. **Bot owner only** | `.connectshard 2`
|
|
||||||
`.leave` | Makes Nadeko leave the server. Either server name or server ID is required. **Bot owner only** | `.leave 123123123331`
|
`.leave` | Makes Nadeko leave the server. Either server name or server ID is required. **Bot owner only** | `.leave 123123123331`
|
||||||
`.die` | Shuts the bot down. **Bot owner only** | `.die`
|
`.die` | Shuts the bot down. **Bot owner only** | `.die`
|
||||||
`.setname` `.newnm` | Gives the bot a new name. **Bot owner only** | `.newnm BotName`
|
`.setname` `.newnm` | Gives the bot a new name. **Bot owner only** | `.newnm BotName`
|
||||||
|
`.setnick` | Changes the nickname of the bot on this server. You can also target other users to change their nickname. **Requires ManageNicknames server permission.** | `.setnick BotNickname` or `.setnick @SomeUser New Nickname`
|
||||||
`.setstatus` | Sets the bot's status. (Online/Idle/Dnd/Invisible) **Bot owner only** | `.setstatus Idle`
|
`.setstatus` | Sets the bot's status. (Online/Idle/Dnd/Invisible) **Bot owner only** | `.setstatus Idle`
|
||||||
`.setavatar` `.setav` | Sets a new avatar image for the NadekoBot. Argument is a direct link to an image. **Bot owner only** | `.setav http://i.imgur.com/xTG3a1I.jpg`
|
`.setavatar` `.setav` | Sets a new avatar image for the NadekoBot. Argument is a direct link to an image. **Bot owner only** | `.setav http://i.imgur.com/xTG3a1I.jpg`
|
||||||
`.setgame` | Sets the bots game. **Bot owner only** | `.setgame with snakes`
|
`.setgame` | Sets the bots game. **Bot owner only** | `.setgame with snakes`
|
||||||
`.setstream` | Sets the bots stream. First argument is the twitch link, second argument is stream name. **Bot owner only** | `.setstream TWITCHLINK Hello`
|
`.setstream` | Sets the bots stream. First argument is the twitch link, second argument is stream name. **Bot owner only** | `.setstream TWITCHLINK Hello`
|
||||||
`.send` | Sends a message to someone on a different server through the bot. Separate server and channel/user ids with `|` and prefix the channel id with `c:` and the user id with `u:`. **Bot owner only** | `.send serverid|c:channelid message` or `.send serverid|u:userid message`
|
`.send` | Sends a message to someone on a different server through the bot. Separate server and channel/user ids with `|` and prefix the channel id with `c:` and the user id with `u:`. **Bot owner only** | `.send serverid|c:channelid message` or `.send serverid|u:userid message`
|
||||||
`.announce` | Sends a message to all servers' default channel that bot is connected to. **Bot owner only** | `.announce Useless spam`
|
|
||||||
`.reloadimages` | Reloads images bot is using. Safe to use even when bot is being used heavily. **Bot owner only** | `.reloadimages`
|
`.reloadimages` | Reloads images bot is using. Safe to use even when bot is being used heavily. **Bot owner only** | `.reloadimages`
|
||||||
`.greetdel` `.grdel` | Sets the time it takes (in seconds) for greet messages to be auto-deleted. Set it to 0 to disable automatic deletion. **Requires ManageServer server permission.** | `.greetdel 0` or `.greetdel 30`
|
`.greetdel` `.grdel` | Sets the time it takes (in seconds) for greet messages to be auto-deleted. Set it to 0 to disable automatic deletion. **Requires ManageServer server permission.** | `.greetdel 0` or `.greetdel 30`
|
||||||
`.greet` | Toggles anouncements on the current channel when someone joins the server. **Requires ManageServer server permission.** | `.greet`
|
`.greet` | Toggles anouncements on the current channel when someone joins the server. **Requires ManageServer server permission.** | `.greet`
|
||||||
@ -100,8 +99,11 @@ Commands and aliases | Description | Usage
|
|||||||
`.bye` | Toggles anouncements on the current channel when someone leaves the server. **Requires ManageServer server permission.** | `.bye`
|
`.bye` | Toggles anouncements on the current channel when someone leaves the server. **Requires ManageServer server permission.** | `.bye`
|
||||||
`.byemsg` | Sets a new leave announcement message. Type `%user%` if you want to show the name the user who left. Type `%id%` to show id. Using this command with no message will show the current bye message. You can use embed json from <http://nadekobot.me/embedbuilder/> instead of a regular text, if you want the message to be embedded. **Requires ManageServer server permission.** | `.byemsg %user% has left.`
|
`.byemsg` | Sets a new leave announcement message. Type `%user%` if you want to show the name the user who left. Type `%id%` to show id. Using this command with no message will show the current bye message. You can use embed json from <http://nadekobot.me/embedbuilder/> instead of a regular text, if you want the message to be embedded. **Requires ManageServer server permission.** | `.byemsg %user% has left.`
|
||||||
`.byedel` | Sets the time it takes (in seconds) for bye messages to be auto-deleted. Set it to `0` to disable automatic deletion. **Requires ManageServer server permission.** | `.byedel 0` or `.byedel 30`
|
`.byedel` | Sets the time it takes (in seconds) for bye messages to be auto-deleted. Set it to `0` to disable automatic deletion. **Requires ManageServer server permission.** | `.byedel 0` or `.byedel 30`
|
||||||
|
`.timezones` | Lists all timezones available on the system to be used with `.timezone`. | `.timezones`
|
||||||
|
`.timezone` | Sets this guilds timezone. This affects bot's time output in this server (logs, etc..) | `.timezone` or `.timezone GMT Standard Time`
|
||||||
`.warn` | Warns a user. **Requires BanMembers server permission.** | `.warn @b1nzy Very rude person`
|
`.warn` | Warns a user. **Requires BanMembers server permission.** | `.warn @b1nzy Very rude person`
|
||||||
`.warnlog` | See a list of warnings of a certain user. **Requires BanMembers server permission.** | `.warnlog @b1nzy`
|
`.warnlog` | See a list of warnings of a certain user. **Requires BanMembers server permission.** | `.warnlog @b1nzy`
|
||||||
|
`.warnlogall` | See a list of all warnings on the server. 15 users per page. **Requires BanMembers server permission.** | `.warnlogall` or `.warnlogall 2`
|
||||||
`.warnclear` `.warnc` | Clears all warnings from a certain user. **Requires BanMembers server permission.** | `.warnclear @PoorDude`
|
`.warnclear` `.warnc` | Clears all warnings from a certain user. **Requires BanMembers server permission.** | `.warnclear @PoorDude`
|
||||||
`.warnpunish` `.warnp` | Sets a punishment for a certain number of warnings. Provide no punishment to remove. **Requires BanMembers server permission.** | `.warnpunish 5 Ban` or `.warnpunish 3`
|
`.warnpunish` `.warnp` | Sets a punishment for a certain number of warnings. Provide no punishment to remove. **Requires BanMembers server permission.** | `.warnpunish 5 Ban` or `.warnpunish 3`
|
||||||
`.warnpunishlist` `.warnpl` | Lists punishments for warnings. | `.warnpunishlist`
|
`.warnpunishlist` `.warnpl` | Lists punishments for warnings. | `.warnpunishlist`
|
||||||
@ -116,21 +118,6 @@ Commands and aliases | Description | Usage
|
|||||||
|
|
||||||
###### [Back to ToC](#table-of-contents)
|
###### [Back to ToC](#table-of-contents)
|
||||||
|
|
||||||
### ClashOfClans
|
|
||||||
Commands and aliases | Description | Usage
|
|
||||||
----------------|--------------|-------
|
|
||||||
`,createwar` `,cw` | Creates a new war by specifying a size (>10 and multiple of 5) and enemy clan name. **Requires ManageMessages server permission.** | `,cw 15 The Enemy Clan`
|
|
||||||
`,startwar` `,sw` | Starts a war with a given number. | `,sw 15`
|
|
||||||
`,listwar` `,lw` | Shows the active war claims by a number. Shows all wars in a short way if no number is specified. | `,lw [war_number]` or `,lw`
|
|
||||||
`,claim` `,call` `,c` | Claims a certain base from a certain war. You can supply a name in the third optional argument to claim in someone else's place. | `,call [war_number] [base_number] [optional_other_name]`
|
|
||||||
`,claimfinish1` `,cf1` | Finish your claim with 1 star if you destroyed a base. First argument is the war number, optional second argument is a base number if you want to finish for someone else. | `,cf1 1` or `,cf1 1 5`
|
|
||||||
`,claimfinish2` `,cf2` | Finish your claim with 2 stars if you destroyed a base. First argument is the war number, optional second argument is a base number if you want to finish for someone else. | `,cf2 1` or `,cf2 1 5`
|
|
||||||
`,claimfinish` `,cf` | Finish your claim with 3 stars if you destroyed a base. First argument is the war number, optional second argument is a base number if you want to finish for someone else. | `,cf 1` or `,cf 1 5`
|
|
||||||
`,endwar` `,ew` | Ends the war with a given index. | `,ew [war_number]`
|
|
||||||
`,unclaim` `,ucall` `,uc` | Removes your claim from a certain war. Optional second argument denotes a person in whose place to unclaim | `,uc [war_number] [optional_other_name]`
|
|
||||||
|
|
||||||
###### [Back to ToC](#table-of-contents)
|
|
||||||
|
|
||||||
### CustomReactions
|
### CustomReactions
|
||||||
Commands and aliases | Description | Usage
|
Commands and aliases | Description | Usage
|
||||||
----------------|--------------|-------
|
----------------|--------------|-------
|
||||||
@ -139,6 +126,7 @@ Commands and aliases | Description | Usage
|
|||||||
`.listcustreactg` `.lcrg` | Lists global or server custom reactions (20 commands per page) grouped by trigger, and show a number of responses for each. Running the command in DM will list global custom reactions, while running it in server will list that server's custom reactions. | `.lcrg 1`
|
`.listcustreactg` `.lcrg` | Lists global or server custom reactions (20 commands per page) grouped by trigger, and show a number of responses for each. Running the command in DM will list global custom reactions, while running it in server will list that server's custom reactions. | `.lcrg 1`
|
||||||
`.showcustreact` `.scr` | Shows a custom reaction's response on a given ID. | `.scr 1`
|
`.showcustreact` `.scr` | Shows a custom reaction's response on a given ID. | `.scr 1`
|
||||||
`.delcustreact` `.dcr` | Deletes a custom reaction on a specific index. If ran in DM, it is bot owner only and deletes a global custom reaction. If ran in a server, it requires Administration privileges and removes server custom reaction. | `.dcr 5`
|
`.delcustreact` `.dcr` | Deletes a custom reaction on a specific index. If ran in DM, it is bot owner only and deletes a global custom reaction. If ran in a server, it requires Administration privileges and removes server custom reaction. | `.dcr 5`
|
||||||
|
`.crca` | Toggles whether the custom reaction will trigger if the triggering message contains the keyword (instead of only starting with it). | `.crca 44`
|
||||||
`.crdm` | Toggles whether the response message of the custom reaction will be sent as a direct message. | `.crdm 44`
|
`.crdm` | Toggles whether the response message of the custom reaction will be sent as a direct message. | `.crdm 44`
|
||||||
`.crad` | Toggles whether the message triggering the custom reaction will be automatically deleted. | `.crad 59`
|
`.crad` | Toggles whether the message triggering the custom reaction will be automatically deleted. | `.crad 59`
|
||||||
`.crstatsclear` | Resets the counters on `.crstats`. You can specify a trigger to clear stats only for that trigger. **Bot owner only** | `.crstatsclear` or `.crstatsclear rng`
|
`.crstatsclear` | Resets the counters on `.crstats`. You can specify a trigger to clear stats only for that trigger. **Bot owner only** | `.crstatsclear` or `.crstatsclear rng`
|
||||||
@ -149,282 +137,287 @@ Commands and aliases | Description | Usage
|
|||||||
### Gambling
|
### Gambling
|
||||||
Commands and aliases | Description | Usage
|
Commands and aliases | Description | Usage
|
||||||
----------------|--------------|-------
|
----------------|--------------|-------
|
||||||
`$raffle` | Prints a name and ID of a random user from the online list from the (optional) role. | `$raffle` or `$raffle RoleName`
|
`.raffle` | Prints a name and ID of a random user from the online list from the (optional) role. | `.raffle` or `.raffle RoleName`
|
||||||
`$cash` `$$$` | Check how much currency a person has. (Defaults to yourself) | `$$$` or `$$$ @SomeGuy`
|
`.$` `.currency` `.$$` `.$$$` `.cash` `.cur` | Check how much currency a person has. (Defaults to yourself) | `.$` or `.$ @SomeGuy`
|
||||||
`$give` | Give someone a certain amount of currency. | `$give 1 "@SomeGuy"`
|
`.give` | Give someone a certain amount of currency. | `.give 1 @SomeGuy`
|
||||||
`$award` | Awards someone a certain amount of currency. You can also specify a role name to award currency to all users in a role. **Bot owner only** | `$award 100 @person` or `$award 5 Role Of Gamblers`
|
`.award` | Awards someone a certain amount of currency. You can also specify a role name to award currency to all users in a role. **Bot owner only** | `.award 100 @person` or `.award 5 Role Of Gamblers`
|
||||||
`$take` | Takes a certain amount of currency from someone. **Bot owner only** | `$take 1 "@someguy"`
|
`.take` | Takes a certain amount of currency from someone. **Bot owner only** | `.take 1 @SomeGuy`
|
||||||
`$betroll` `$br` | Bets a certain amount of currency and rolls a dice. Rolling over 66 yields x2 of your currency, over 90 - x4 and 100 x10. | `$br 5`
|
`.betroll` `.br` | Bets a certain amount of currency and rolls a dice. Rolling over 66 yields x2 of your currency, over 90 - x4 and 100 x10. | `.br 5`
|
||||||
`$leaderboard` `$lb` | Displays the bot's currency leaderboard. | `$lb`
|
`.leaderboard` `.lb` | Displays the bot's currency leaderboard. | `.lb`
|
||||||
`$race` | Starts a new animal race. | `$race`
|
`.race` | Starts a new animal race. | `.race`
|
||||||
`$joinrace` `$jr` | Joins a new race. You can specify an amount of currency for betting (optional). You will get YourBet*(participants-1) back if you win. | `$jr` or `$jr 5`
|
`.joinrace` `.jr` | Joins a new race. You can specify an amount of currency for betting (optional). You will get YourBet*(participants-1) back if you win. | `.jr` or `.jr 5`
|
||||||
`$startevent` | Starts one of the events seen on public nadeko. **Bot owner only** | `$startevent flowerreaction`
|
`.startevent` | Starts one of the events seen on public nadeko. **Bot owner only** | `.startevent flowerreaction`
|
||||||
`$roll` | Rolls 0-100. If you supply a number `X` it rolls up to 30 normal dice. If you split 2 numbers with letter `d` (`xdy`) it will roll `X` dice from 1 to `y`. `Y` can be a letter 'F' if you want to roll fate dice instead of dnd. | `$roll` or `$roll 7` or `$roll 3d5` or `$roll 5dF`
|
`.roll` | Rolls 0-100. If you supply a number `X` it rolls up to 30 normal dice. If you split 2 numbers with letter `d` (`xdy`) it will roll `X` dice from 1 to `y`. `Y` can be a letter 'F' if you want to roll fate dice instead of dnd. | `.roll` or `.roll 7` or `.roll 3d5` or `.roll 5dF`
|
||||||
`$rolluo` | Rolls `X` normal dice (up to 30) unordered. If you split 2 numbers with letter `d` (`xdy`) it will roll `X` dice from 1 to `y`. | `$rolluo` or `$rolluo 7` or `$rolluo 3d5`
|
`.rolluo` | Rolls `X` normal dice (up to 30) unordered. If you split 2 numbers with letter `d` (`xdy`) it will roll `X` dice from 1 to `y`. | `.rolluo` or `.rolluo 7` or `.rolluo 3d5`
|
||||||
`$nroll` | Rolls in a given range. | `$nroll 5` (rolls 0-5) or `$nroll 5-15`
|
`.nroll` | Rolls in a given range. | `.nroll 5` (rolls 0-5) or `.nroll 5-15`
|
||||||
`$draw` | Draws a card from the deck.If you supply number X, she draws up to 5 cards from the deck. | `$draw` or `$draw 5`
|
`.draw` | Draws a card from this server's deck. You can draw up to 10 cards by supplying a number of cards to draw. | `.draw` or `.draw 5`
|
||||||
`$shuffle` `$sh` | Reshuffles all cards back into the deck. | `$sh`
|
`.drawnew` | Draws a card from the NEW deck of cards. You can draw up to 10 cards by supplying a number of cards to draw. | `.drawnew` or `.drawnew 5`
|
||||||
`$flip` | Flips coin(s) - heads or tails, and shows an image. | `$flip` or `$flip 3`
|
`.deckshuffle` `.dsh` | Reshuffles all cards back into the deck. | `.dsh`
|
||||||
`$betflip` `$bf` | Bet to guess will the result be heads or tails. Guessing awards you 1.95x the currency you've bet (rounded up). Multiplier can be changed by the bot owner. | `$bf 5 heads` or `$bf 3 t`
|
`.flip` | Flips coin(s) - heads or tails, and shows an image. | `.flip` or `.flip 3`
|
||||||
`$shop` | Lists this server's administrators' shop. Paginated. | `$shop` or `$shop 2`
|
`.betflip` `.bf` | Bet to guess will the result be heads or tails. Guessing awards you 1.95x the currency you've bet (rounded up). Multiplier can be changed by the bot owner. | `.bf 5 heads` or `.bf 3 t`
|
||||||
`$buy` | Buys an item from the shop on a given index. If buying items, make sure that the bot can DM you. | `$buy 2`
|
`.shop` | Lists this server's administrators' shop. Paginated. | `.shop` or `.shop 2`
|
||||||
`$shopadd` | Adds an item to the shop by specifying type price and name. Available types are role and list. **Requires Administrator server permission.** | `$shopadd role 1000 Rich`
|
`.buy` | Buys an item from the shop on a given index. If buying items, make sure that the bot can DM you. | `.buy 2`
|
||||||
`$shoplistadd` | Adds an item to the list of items for sale in the shop entry given the index. You usually want to run this command in the secret channel, so that the unique items are not leaked. **Requires Administrator server permission.** | `$shoplistadd 1 Uni-que-Steam-Key`
|
`.shopadd` | Adds an item to the shop by specifying type price and name. Available types are role and list. **Requires Administrator server permission.** | `.shopadd role 1000 Rich`
|
||||||
`$shoprem` `$shoprm` | Removes an item from the shop by its ID. **Requires Administrator server permission.** | `$shoprm 1`
|
`.shoplistadd` | Adds an item to the list of items for sale in the shop entry given the index. You usually want to run this command in the secret channel, so that the unique items are not leaked. **Requires Administrator server permission.** | `.shoplistadd 1 Uni-que-Steam-Key`
|
||||||
`$slotstats` | Shows the total stats of the slot command for this bot's session. **Bot owner only** | `$slotstats`
|
`.shoprem` `.shoprm` | Removes an item from the shop by its ID. **Requires Administrator server permission.** | `.shoprm 1`
|
||||||
`$slottest` | Tests to see how much slots payout for X number of plays. **Bot owner only** | `$slottest 1000`
|
`.slotstats` | Shows the total stats of the slot command for this bot's session. **Bot owner only** | `.slotstats`
|
||||||
`$slot` | Play Nadeko slots. Max bet is 9999. 1.5 second cooldown per user. | `$slot 5`
|
`.slottest` | Tests to see how much slots payout for X number of plays. **Bot owner only** | `.slottest 1000`
|
||||||
`$claimwaifu` `$claim` | Claim a waifu for yourself by spending currency. You must spend at least 10% more than her current value unless she set `$affinity` towards you. | `$claim 50 @Himesama`
|
`.slot` | Play Nadeko slots. Max bet is 9999. 1.5 second cooldown per user. | `.slot 5`
|
||||||
`$divorce` | Releases your claim on a specific waifu. You will get some of the money you've spent back unless that waifu has an affinity towards you. 6 hours cooldown. | `$divorce @CheatingSloot`
|
`.claimwaifu` `.claim` | Claim a waifu for yourself by spending currency. You must spend at least 10% more than her current value unless she set `.affinity` towards you. | `.claim 50 @Himesama`
|
||||||
`$affinity` | Sets your affinity towards someone you want to be claimed by. Setting affinity will reduce their `$claim` on you by 20%. You can leave second argument empty to clear your affinity. 30 minutes cooldown. | `$affinity @MyHusband` or `$affinity`
|
`.divorce` | Releases your claim on a specific waifu. You will get some of the money you've spent back unless that waifu has an affinity towards you. 6 hours cooldown. | `.divorce @CheatingSloot`
|
||||||
`$waifus` `$waifulb` | Shows top 9 waifus. | `$waifus`
|
`.affinity` | Sets your affinity towards someone you want to be claimed by. Setting affinity will reduce their `.claim` on you by 20%. You can leave second argument empty to clear your affinity. 30 minutes cooldown. | `.affinity @MyHusband` or `.affinity`
|
||||||
`$waifuinfo` `$waifustats` | Shows waifu stats for a target person. Defaults to you if no user is provided. | `$waifuinfo @MyCrush` or `$waifuinfo`
|
`.waifus` `.waifulb` | Shows top 9 waifus. You can specify another page to show other waifus. | `.waifus` or `.waifulb 3`
|
||||||
|
`.waifuinfo` `.waifustats` | Shows waifu stats for a target person. Defaults to you if no user is provided. | `.waifuinfo @MyCrush` or `.waifuinfo`
|
||||||
|
`.waifugift` `.gift` `.gifts` | Gift an item to someone. This will increase their waifu value by 50% of the gifted item's value if they don't have affinity set towards you, or 100% if they do. Provide no arguments to see a list of items that you can gift. | `.gifts` or `.gift Rose @Himesama`
|
||||||
|
`.wheeloffortune` `.wheel` | Bets a certain amount of currency on the wheel of fortune. Wheel can stop on one of many different multipliers. Won amount is rounded down to the nearest whole number. | `.wheel 10`
|
||||||
|
|
||||||
###### [Back to ToC](#table-of-contents)
|
###### [Back to ToC](#table-of-contents)
|
||||||
|
|
||||||
### Games
|
### Games
|
||||||
Commands and aliases | Description | Usage
|
Commands and aliases | Description | Usage
|
||||||
----------------|--------------|-------
|
----------------|--------------|-------
|
||||||
`>choose` | Chooses a thing from a list of things | `>choose Get up;Sleep;Sleep more`
|
`.choose` | Chooses a thing from a list of things | `.choose Get up;Sleep;Sleep more`
|
||||||
`>8ball` | Ask the 8ball a yes/no question. | `>8ball should I do something`
|
`.8ball` | Ask the 8ball a yes/no question. | `.8ball should I do something`
|
||||||
`>rps` | Play a game of Rocket-Paperclip-Scissors with Nadeko. | `>rps scissors`
|
`.rps` | Play a game of Rocket-Paperclip-Scissors with Nadeko. | `.rps scissors`
|
||||||
`>rategirl` | Use the universal hot-crazy wife zone matrix to determine the girl's worth. It is everything young men need to know about women. At any moment in time, any woman you have previously located on this chart can vanish from that location and appear anywhere else on the chart. | `>rategirl @SomeGurl`
|
`.rategirl` | Use the universal hot-crazy wife zone matrix to determine the girl's worth. It is everything young men need to know about women. At any moment in time, any woman you have previously located on this chart can vanish from that location and appear anywhere else on the chart. | `.rategirl @SomeGurl`
|
||||||
`>linux` | Prints a customizable Linux interjection | `>linux Spyware Windows`
|
`.linux` | Prints a customizable Linux interjection | `.linux Spyware Windows`
|
||||||
`>leet` | Converts a text to leetspeak with 6 (1-6) severity levels | `>leet 3 Hello`
|
`.leet` | Converts a text to leetspeak with 6 (1-6) severity levels | `.leet 3 Hello`
|
||||||
`>acrophobia` `>acro` | Starts an Acrophobia game. Second argument is optional round length in seconds. (default is 60) | `>acro` or `>acro 30`
|
`.acrophobia` `.acro` | Starts an Acrophobia game. Second argument is optional round length in seconds. (default is 60) | `.acro` or `.acro 30`
|
||||||
`>cleverbot` | Toggles cleverbot session. When enabled, the bot will reply to messages starting with bot mention in the server. Custom reactions starting with %mention% won't work if cleverbot is enabled. **Requires ManageMessages server permission.** | `>cleverbot`
|
`.cleverbot` | Toggles cleverbot session. When enabled, the bot will reply to messages starting with bot mention in the server. Custom reactions starting with %mention% won't work if cleverbot is enabled. **Requires ManageMessages server permission.** | `.cleverbot`
|
||||||
`>hangmanlist` | Shows a list of hangman term types. | `> hangmanlist`
|
`.connect4` `.con4` | Creates or joins an existing connect4 game. 2 players are required for the game. Objective of the game is to get 4 of your pieces next to each other in a vertical, horizontal or diagonal line. | `.connect4`
|
||||||
`>hangman` | Starts a game of hangman in the channel. Use `>hangmanlist` to see a list of available term types. Defaults to 'all'. | `>hangman` or `>hangman movies`
|
`.hangmanlist` | Shows a list of hangman term types. | `.hangmanlist`
|
||||||
`>pick` | Picks the currency planted in this channel. 60 seconds cooldown. | `>pick`
|
`.hangman` | Starts a game of hangman in the channel. Use `.hangmanlist` to see a list of available term types. Defaults to 'all'. | `.hangman` or `.hangman movies`
|
||||||
`>plant` | Spend an amount of currency to plant it in this channel. Default is 1. (If bot is restarted or crashes, the currency will be lost) | `>plant` or `>plant 5`
|
`.hangmanstop` | Stops the active hangman game on this channel if it exists. | `.hangmanstop`
|
||||||
`>gencurrency` `>gc` | Toggles currency generation on this channel. Every posted message will have chance to spawn currency. Chance is specified by the Bot Owner. (default is 2%) **Requires ManageMessages server permission.** | `>gc`
|
`.nunchi` | Creates or joins an existing nunchi game. Users have to count up by 1 from the starting number shown by the bot. If someone makes a mistake (types an incorrent number, or repeats the same number) they are out of the game and a new round starts without them. Minimum 3 users required. | `.nunchi`
|
||||||
`>poll` | Creates a poll which requires users to send the number of the voting option to the bot. **Requires ManageMessages server permission.** | `>poll Question?;Answer1;Answ 2;A_3`
|
`.pick` | Picks the currency planted in this channel. 60 seconds cooldown. | `.pick`
|
||||||
`>publicpoll` `>ppoll` | Creates a public poll which requires users to type a number of the voting option in the channel command is ran in. **Requires ManageMessages server permission.** | `>ppoll Question?;Answer1;Answ 2;A_3`
|
`.plant` | Spend an amount of currency to plant it in this channel. Default is 1. (If bot is restarted or crashes, the currency will be lost) | `.plant` or `.plant 5`
|
||||||
`>pollstats` | Shows the poll results without stopping the poll on this server. **Requires ManageMessages server permission.** | `>pollstats`
|
`.gencurrency` `.gc` | Toggles currency generation on this channel. Every posted message will have chance to spawn currency. Chance is specified by the Bot Owner. (default is 2%) **Requires ManageMessages server permission.** | `.gc`
|
||||||
`>pollend` | Stops active poll on this server and prints the results in this channel. **Requires ManageMessages server permission.** | `>pollend`
|
`.poll` `.ppoll` | Creates a public poll which requires users to type a number of the voting option in the channel command is ran in. **Requires ManageMessages server permission.** | `.ppoll Question?;Answer1;Answ 2;A_3`
|
||||||
`>typestart` | Starts a typing contest. | `>typestart`
|
`.pollstats` | Shows the poll results without stopping the poll on this server. **Requires ManageMessages server permission.** | `.pollstats`
|
||||||
`>typestop` | Stops a typing contest on the current channel. | `>typestop`
|
`.pollend` | Stops active poll on this server and prints the results in this channel. **Requires ManageMessages server permission.** | `.pollend`
|
||||||
`>typeadd` | Adds a new article to the typing contest. **Bot owner only** | `>typeadd wordswords`
|
`.typestart` | Starts a typing contest. | `.typestart`
|
||||||
`>typelist` | Lists added typing articles with their IDs. 15 per page. | `>typelist` or `>typelist 3`
|
`.typestop` | Stops a typing contest on the current channel. | `.typestop`
|
||||||
`>typedel` | Deletes a typing article given the ID. **Bot owner only** | `>typedel 3`
|
`.typeadd` | Adds a new article to the typing contest. **Bot owner only** | `.typeadd wordswords`
|
||||||
`>tictactoe` `>ttt` | Starts a game of tic tac toe. Another user must run the command in the same channel in order to accept the challenge. Use numbers 1-9 to play. 15 seconds per move. | >ttt
|
`.typelist` | Lists added typing articles with their IDs. 15 per page. | `.typelist` or `.typelist 3`
|
||||||
`>trivia` `>t` | Starts a game of trivia. You can add `nohint` to prevent hints. First player to get to 10 points wins by default. You can specify a different number. 30 seconds per question. | `>t` or `>t 5 nohint`
|
`.typedel` | Deletes a typing article given the ID. **Bot owner only** | `.typedel 3`
|
||||||
`>tl` | Shows a current trivia leaderboard. | `>tl`
|
`.tictactoe` `.ttt` | Starts a game of tic tac toe. Another user must run the command in the same channel in order to accept the challenge. Use numbers 1-9 to play. 15 seconds per move. | .ttt
|
||||||
`>tq` | Quits current trivia after current question. | `>tq`
|
`.trivia` `.t` | Starts a game of trivia. You can add `nohint` to prevent hints. First player to get to 10 points wins by default. You can specify a different number. 30 seconds per question. | `.t` or `.t 5 nohint`
|
||||||
|
`.tl` | Shows a current trivia leaderboard. | `.tl`
|
||||||
|
`.tq` | Quits current trivia after current question. | `.tq`
|
||||||
|
|
||||||
###### [Back to ToC](#table-of-contents)
|
###### [Back to ToC](#table-of-contents)
|
||||||
|
|
||||||
### Help
|
### Help
|
||||||
Commands and aliases | Description | Usage
|
Commands and aliases | Description | Usage
|
||||||
----------------|--------------|-------
|
----------------|--------------|-------
|
||||||
`-modules` `-mdls` | Lists all bot modules. | `-modules`
|
`.modules` `.mdls` | Lists all bot modules. | `.modules`
|
||||||
`-commands` `-cmds` | List all of the bot's commands from a certain module. You can either specify the full name or only the first few letters of the module name. | `-commands Administration` or `-cmds Admin`
|
`.commands` `.cmds` | List all of the bot's commands from a certain module. You can either specify the full name or only the first few letters of the module name. | `.commands Administration` or `.cmds Admin`
|
||||||
`-help` `-h` | Either shows a help for a single command, or DMs you help link if no arguments are specified. | `-h -cmds` or `-h`
|
`.help` `.h` | Either shows a help for a single command, or DMs you help link if no arguments are specified. | `.h .cmds` or `.h`
|
||||||
`-hgit` | Generates the commandlist.md file. **Bot owner only** | `-hgit`
|
`.hgit` | Generates the commandlist.md file. **Bot owner only** | `.hgit`
|
||||||
`-readme` `-guide` | Sends a readme and a guide links to the channel. | `-readme` or `-guide`
|
`.readme` `.guide` | Sends a readme and a guide links to the channel. | `.readme` or `.guide`
|
||||||
`-donate` | Instructions for helping the project financially. | `-donate`
|
`.donate` | Instructions for helping the project financially. | `.donate`
|
||||||
|
|
||||||
###### [Back to ToC](#table-of-contents)
|
###### [Back to ToC](#table-of-contents)
|
||||||
|
|
||||||
### Music
|
### Music
|
||||||
Commands and aliases | Description | Usage
|
Commands and aliases | Description | Usage
|
||||||
----------------|--------------|-------
|
----------------|--------------|-------
|
||||||
`!!next` `!!n` | Goes to the next song in the queue. You have to be in the same voice channel as the bot. You can skip multiple songs, but in that case songs will not be requeued if !!rcs or !!rpl is enabled. | `!!n` or `!!n 5`
|
`.play` `.start` | If no arguments are specified, acts as `.next 1` command. If you specify a song number, it will jump to that song. If you specify a search query, acts as a `.q` command | `.play` or `.play 5` or `.play Dream Of Venice`
|
||||||
`!!stop` `!!s` | Stops the music and clears the playlist. Stays in the channel. | `!!s`
|
`.queue` `.q` `.yq` | Queue a song using keywords or a link. Bot will join your voice channel. **You must be in a voice channel**. | `.q Dream Of Venice`
|
||||||
`!!destroy` `!!d` | Completely stops the music and unbinds the bot from the channel. (may cause weird behaviour) | `!!d`
|
`.queuenext` `.qn` | Works the same as `.queue` command, except it enqueues the new song after the current one. **You must be in a voice channel**. | `.qn Dream Of Venice`
|
||||||
`!!pause` `!!p` | Pauses or Unpauses the song. | `!!p`
|
`.queuesearch` `.qs` `.yqs` | Search for top 5 youtube song result using keywords, and type the index of the song to play that song. Bot will join your voice channel. **You must be in a voice channel**. | `.qs Dream Of Venice`
|
||||||
`!!fairplay` `!!fp` | Toggles fairplay. While enabled, the bot will prioritize songs from users who didn't have their song recently played instead of the song's position in the queue. | `!!fp`
|
`.listqueue` `.lq` | Lists 10 currently queued songs per page. Default page is 1. | `.lq` or `.lq 2`
|
||||||
`!!queue` `!!q` `!!yq` | Queue a song using keywords or a link. Bot will join your voice channel. **You must be in a voice channel**. | `!!q Dream Of Venice`
|
`.next` `.n` | Goes to the next song in the queue. You have to be in the same voice channel as the bot. You can skip multiple songs, but in that case songs will not be requeued if .rcs or .rpl is enabled. | `.n` or `.n 5`
|
||||||
`!!soundcloudqueue` `!!sq` | Queue a soundcloud song using keywords. Bot will join your voice channel. **You must be in a voice channel**. | `!!sq Dream Of Venice`
|
`.stop` `.s` | Stops the music and preserves the current song index. Stays in the channel. | `.s`
|
||||||
`!!listqueue` `!!lq` | Lists 15 currently queued songs per page. Default page is 1. | `!!lq` or `!!lq 2`
|
`.destroy` `.d` | Completely stops the music and unbinds the bot from the channel. (may cause weird behaviour) | `.d`
|
||||||
`!!nowplaying` `!!np` | Shows the song that the bot is currently playing. | `!!np`
|
`.pause` `.p` | Pauses or Unpauses the song. | `.p`
|
||||||
`!!volume` `!!vol` | Sets the music playback volume (0-100%) | `!!vol 50`
|
`.volume` `.vol` | Sets the music playback volume (0-100%) | `.vol 50`
|
||||||
`!!defvol` `!!dv` | Sets the default music volume when music playback is started (0-100). Persists through restarts. | `!!dv 80`
|
`.defvol` `.dv` | Sets the default music volume when music playback is started (0-100). Persists through restarts. | `.dv 80`
|
||||||
`!!shuffle` `!!sh` | Shuffles the current playlist. | `!!sh`
|
`.songremove` `.srm` | Remove a song by its # in the queue, or 'all' to remove all songs from the queue and reset the song index. | `.srm 5`
|
||||||
`!!playlist` `!!pl` | Queues up to 500 songs from a youtube playlist specified by a link, or keywords. | `!!pl playlist link or name`
|
`.playlists` `.pls` | Lists all playlists. Paginated, 20 per page. Default page is 0. | `.pls 1`
|
||||||
`!!soundcloudpl` `!!scpl` | Queue a Soundcloud playlist using a link. | `!!scpl soundcloudseturl`
|
`.deleteplaylist` `.delpls` | Deletes a saved playlist. Works only if you made it or if you are the bot owner. | `.delpls animu-5`
|
||||||
`!!localplaylst` `!!lopl` | Queues all songs from a directory. **Bot owner only** | `!!lopl C:/music/classical`
|
`.save` | Saves a playlist under a certain name. Playlist name must be no longer than 20 characters and must not contain dashes. | `.save classical1`
|
||||||
`!!radio` `!!ra` | Queues a radio stream from a link. It can be a direct mp3 radio stream, .m3u, .pls .asx or .xspf (Usage Video: <https://streamable.com/al54>) | `!!ra radio link here`
|
`.load` | Loads a saved playlist using its ID. Use `.pls` to list all saved playlists and `.save` to save new ones. | `.load 5`
|
||||||
`!!local` `!!lo` | Queues a local file by specifying a full path. **Bot owner only** | `!!lo C:/music/mysong.mp3`
|
`.fairplay` `.fp` | Toggles fairplay. While enabled, the bot will prioritize songs from users who didn't have their song recently played instead of the song's position in the queue. | `.fp`
|
||||||
`!!remove` `!!rm` | Remove a song by its # in the queue, or 'all' to remove whole queue. | `!!rm 5`
|
`.songautodelete` `.sad` | Toggles whether the song should be automatically removed from the music queue when it finishes playing. | `.sad`
|
||||||
`!!movesong` `!!ms` | Moves a song from one position to another. | `!!ms 5>3`
|
`.soundcloudqueue` `.sq` | Queue a soundcloud song using keywords. Bot will join your voice channel. **You must be in a voice channel**. | `.sq Dream Of Venice`
|
||||||
`!!setmaxqueue` `!!smq` | Sets a maximum queue size. Supply 0 or no argument to have no limit. | `!!smq 50` or `!!smq`
|
`.soundcloudpl` `.scpl` | Queue a Soundcloud playlist using a link. | `.scpl soundcloudseturl`
|
||||||
`!!setmaxplaytime` `!!smp` | Sets a maximum number of seconds (>14) a song can run before being skipped automatically. Set 0 to have no limit. | `!!smp 0` or `!!smp 270`
|
`.nowplaying` `.np` | Shows the song that the bot is currently playing. | `.np`
|
||||||
`!!reptcursong` `!!rcs` | Toggles repeat of current song. | `!!rcs`
|
`.shuffle` `.sh` `.plsh` | Shuffles the current playlist. | `.plsh`
|
||||||
`!!rpeatplaylst` `!!rpl` | Toggles repeat of all songs in the queue (every song that finishes is added to the end of the queue). | `!!rpl`
|
`.playlist` `.pl` | Queues up to 500 songs from a youtube playlist specified by a link, or keywords. | `.pl playlist link or name`
|
||||||
`!!save` | Saves a playlist under a certain name. Playlist name must be no longer than 20 characters and must not contain dashes. | `!!save classical1`
|
`.radio` `.ra` | Queues a radio stream from a link. It can be a direct mp3 radio stream, .m3u, .pls .asx or .xspf (Usage Video: <https://streamable.com/al54>) | `.ra radio link here`
|
||||||
`!!load` | Loads a saved playlist using its ID. Use `!!pls` to list all saved playlists and `!!save` to save new ones. | `!!load 5`
|
`.local` `.lo` | Queues a local file by specifying a full path. **Bot owner only** | `.lo C:/music/mysong.mp3`
|
||||||
`!!playlists` `!!pls` | Lists all playlists. Paginated, 20 per page. Default page is 0. | `!!pls 1`
|
`.localplaylst` `.lopl` | Queues all songs from a directory. **Bot owner only** | `.lopl C:/music/classical`
|
||||||
`!!deleteplaylist` `!!delpls` | Deletes a saved playlist. Works only if you made it or if you are the bot owner. | `!!delpls animu-5`
|
`.move` `.mv` | Moves the bot to your voice channel. (works only if music is already playing) | `.mv`
|
||||||
`!!goto` | Goes to a specific time in seconds in a song. | `!!goto 30`
|
`.movesong` `.ms` | Moves a song from one position to another. | `.ms 5>3`
|
||||||
`!!autoplay` `!!ap` | Toggles autoplay - When the song is finished, automatically queue a related Youtube song. (Works only for Youtube songs and when queue is empty) | `!!ap`
|
`.setmaxqueue` `.smq` | Sets a maximum queue size. Supply 0 or no argument to have no limit. | `.smq 50` or `.smq`
|
||||||
`!!setmusicchannel` `!!smch` | Sets the current channel as the default music output channel. This will output playing, finished, paused and removed songs to that channel instead of the channel where the first song was queued in. **Requires ManageMessages server permission.** | `!!smch`
|
`.setmaxplaytime` `.smp` | Sets a maximum number of seconds (>14) a song can run before being skipped automatically. Set 0 to have no limit. | `.smp 0` or `.smp 270`
|
||||||
|
`.reptcursong` `.rcs` | Toggles repeat of current song. | `.rcs`
|
||||||
|
`.rpeatplaylst` `.rpl` | Toggles repeat of all songs in the queue (every song that finishes is added to the end of the queue). | `.rpl`
|
||||||
|
`.autoplay` `.ap` | Toggles autoplay - When the song is finished, automatically queue a related Youtube song. (Works only for Youtube songs and when queue is empty) | `.ap`
|
||||||
|
`.setmusicchannel` `.smch` | Sets the current channel as the default music output channel. This will output playing, finished, paused and removed songs to that channel instead of the channel where the first song was queued in. **Requires ManageMessages server permission.** | `.smch`
|
||||||
|
|
||||||
###### [Back to ToC](#table-of-contents)
|
###### [Back to ToC](#table-of-contents)
|
||||||
|
|
||||||
### NSFW
|
### NSFW
|
||||||
Commands and aliases | Description | Usage
|
Commands and aliases | Description | Usage
|
||||||
----------------|--------------|-------
|
----------------|--------------|-------
|
||||||
`~hentai` | Shows a hentai image from a random website (gelbooru or danbooru or konachan or atfbooru or yandere) with a given tag. Tag is optional but preferred. Only 1 tag allowed. | `~hentai yuri`
|
`.hentai` | Shows a hentai image from a random website (gelbooru or danbooru or konachan or atfbooru or yandere) with a given tag. Tag is optional but preferred. Only 1 tag allowed. | `.hentai yuri`
|
||||||
`~autohentai` | Posts a hentai every X seconds with a random tag from the provided tags. Use `|` to separate tags. 20 seconds minimum. Provide no arguments to disable. **Requires ManageMessages channel permission.** | `~autohentai 30 yuri|tail|long_hair` or `~autohentai`
|
`.autohentai` | Posts a hentai every X seconds with a random tag from the provided tags. Use `|` to separate tags. 20 seconds minimum. Provide no arguments to disable. **Requires ManageMessages channel permission.** | `.autohentai 30 yuri|tail|long_hair` or `.autohentai`
|
||||||
`~hentaibomb` | Shows a total 5 images (from gelbooru, danbooru, konachan, yandere and atfbooru). Tag is optional but preferred. | `~hentaibomb yuri`
|
`.hentaibomb` | Shows a total 5 images (from gelbooru, danbooru, konachan, yandere and atfbooru). Tag is optional but preferred. | `.hentaibomb yuri`
|
||||||
`~yandere` | Shows a random image from yandere with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `~yandere tag1+tag2`
|
`.yandere` | Shows a random image from yandere with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `.yandere tag1+tag2`
|
||||||
`~konachan` | Shows a random hentai image from konachan with a given tag. Tag is optional but preferred. | `~konachan yuri`
|
`.konachan` | Shows a random hentai image from konachan with a given tag. Tag is optional but preferred. | `.konachan yuri`
|
||||||
`~e621` | Shows a random hentai image from e621.net with a given tag. Tag is optional but preferred. Use spaces for multiple tags. | `~e621 yuri kissing`
|
`.e621` | Shows a random hentai image from e621.net with a given tag. Tag is optional but preferred. Use spaces for multiple tags. | `.e621 yuri kissing`
|
||||||
`~rule34` | Shows a random image from rule34.xx with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `~rule34 yuri+kissing`
|
`.rule34` | Shows a random image from rule34.xx with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `.rule34 yuri+kissing`
|
||||||
`~danbooru` | Shows a random hentai image from danbooru with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `~danbooru yuri+kissing`
|
`.danbooru` | Shows a random hentai image from danbooru with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `.danbooru yuri+kissing`
|
||||||
`~gelbooru` | Shows a random hentai image from gelbooru with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `~gelbooru yuri+kissing`
|
`.gelbooru` | Shows a random hentai image from gelbooru with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `.gelbooru yuri+kissing`
|
||||||
`~boobs` | Real adult content. | `~boobs`
|
`.boobs` | Real adult content. | `.boobs`
|
||||||
`~butts` `~ass` `~butt` | Real adult content. | `~butts` or `~ass`
|
`.butts` `.ass` `.butt` | Real adult content. | `.butts` or `.ass`
|
||||||
|
`.nsfwtagbl` `.nsfwtbl` | Toggles whether the tag is blacklisted or not in nsfw searches. Provide no parameters to see the list of blacklisted tags. | `.nsfwtbl poop`
|
||||||
|
`.nsfwcc` | Clears nsfw cache. **Bot owner only** | `.nsfwcc`
|
||||||
|
|
||||||
###### [Back to ToC](#table-of-contents)
|
###### [Back to ToC](#table-of-contents)
|
||||||
|
|
||||||
### Permissions
|
### Permissions
|
||||||
Commands and aliases | Description | Usage
|
Commands and aliases | Description | Usage
|
||||||
----------------|--------------|-------
|
----------------|--------------|-------
|
||||||
`;verbose` `;v` | Sets whether to show when a command/module is blocked. | `;verbose true`
|
`.verbose` `.v` | Sets whether to show when a command/module is blocked. | `.verbose true`
|
||||||
`;permrole` `;pr` | Sets a role which can change permissions. Supply no parameters to see the current one. Default is 'Nadeko'. | `;pr role`
|
`.permrole` `.pr` | Sets a role which can change permissions. Supply no parameters to see the current one. Default is 'Nadeko'. | `.pr role`
|
||||||
`;listperms` `;lp` | Lists whole permission chain with their indexes. You can specify an optional page number if there are a lot of permissions. | `;lp` or `;lp 3`
|
`.listperms` `.lp` | Lists whole permission chain with their indexes. You can specify an optional page number if there are a lot of permissions. | `.lp` or `.lp 3`
|
||||||
`;removeperm` `;rp` | Removes a permission from a given position in the Permissions list. | `;rp 1`
|
`.removeperm` `.rp` | Removes a permission from a given position in the Permissions list. | `.rp 1`
|
||||||
`;moveperm` `;mp` | Moves permission from one position to another in the Permissions list. | `;mp 2 4`
|
`.moveperm` `.mp` | Moves permission from one position to another in the Permissions list. | `.mp 2 4`
|
||||||
`;srvrcmd` `;sc` | Sets a command's permission at the server level. | `;sc "command name" disable`
|
`.srvrcmd` `.sc` | Sets a command's permission at the server level. | `.sc "command name" disable`
|
||||||
`;srvrmdl` `;sm` | Sets a module's permission at the server level. | `;sm ModuleName enable`
|
`.srvrmdl` `.sm` | Sets a module's permission at the server level. | `.sm ModuleName enable`
|
||||||
`;usrcmd` `;uc` | Sets a command's permission at the user level. | `;uc "command name" enable SomeUsername`
|
`.usrcmd` `.uc` | Sets a command's permission at the user level. | `.uc "command name" enable SomeUsername`
|
||||||
`;usrmdl` `;um` | Sets a module's permission at the user level. | `;um ModuleName enable SomeUsername`
|
`.usrmdl` `.um` | Sets a module's permission at the user level. | `.um ModuleName enable SomeUsername`
|
||||||
`;rolecmd` `;rc` | Sets a command's permission at the role level. | `;rc "command name" disable MyRole`
|
`.rolecmd` `.rc` | Sets a command's permission at the role level. | `.rc "command name" disable MyRole`
|
||||||
`;rolemdl` `;rm` | Sets a module's permission at the role level. | `;rm ModuleName enable MyRole`
|
`.rolemdl` `.rm` | Sets a module's permission at the role level. | `.rm ModuleName enable MyRole`
|
||||||
`;chnlcmd` `;cc` | Sets a command's permission at the channel level. | `;cc "command name" enable SomeChannel`
|
`.chnlcmd` `.cc` | Sets a command's permission at the channel level. | `.cc "command name" enable SomeChannel`
|
||||||
`;chnlmdl` `;cm` | Sets a module's permission at the channel level. | `;cm ModuleName enable SomeChannel`
|
`.chnlmdl` `.cm` | Sets a module's permission at the channel level. | `.cm ModuleName enable SomeChannel`
|
||||||
`;allchnlmdls` `;acm` | Enable or disable all modules in a specified channel. | `;acm enable #SomeChannel`
|
`.allchnlmdls` `.acm` | Enable or disable all modules in a specified channel. | `.acm enable #SomeChannel`
|
||||||
`;allrolemdls` `;arm` | Enable or disable all modules for a specific role. | `;arm [enable/disable] MyRole`
|
`.allrolemdls` `.arm` | Enable or disable all modules for a specific role. | `.arm [enable/disable] MyRole`
|
||||||
`;allusrmdls` `;aum` | Enable or disable all modules for a specific user. | `;aum enable @someone`
|
`.allusrmdls` `.aum` | Enable or disable all modules for a specific user. | `.aum enable @someone`
|
||||||
`;allsrvrmdls` `;asm` | Enable or disable all modules for your server. | `;asm [enable/disable]`
|
`.allsrvrmdls` `.asm` | Enable or disable all modules for your server. | `.asm [enable/disable]`
|
||||||
`;ubl` | Either [add]s or [rem]oves a user specified by a Mention or an ID from a blacklist. **Bot owner only** | `;ubl add @SomeUser` or `;ubl rem 12312312313`
|
`.ubl` | Either [add]s or [rem]oves a user specified by a Mention or an ID from a blacklist. **Bot owner only** | `.ubl add @SomeUser` or `.ubl rem 12312312313`
|
||||||
`;cbl` | Either [add]s or [rem]oves a channel specified by an ID from a blacklist. **Bot owner only** | `;cbl rem 12312312312`
|
`.cbl` | Either [add]s or [rem]oves a channel specified by an ID from a blacklist. **Bot owner only** | `.cbl rem 12312312312`
|
||||||
`;sbl` | Either [add]s or [rem]oves a server specified by a Name or an ID from a blacklist. **Bot owner only** | `;sbl add 12312321312` or `;sbl rem SomeTrashServer`
|
`.sbl` | Either [add]s or [rem]oves a server specified by a Name or an ID from a blacklist. **Bot owner only** | `.sbl add 12312321312` or `.sbl rem SomeTrashServer`
|
||||||
`;cmdcooldown` `;cmdcd` | Sets a cooldown per user for a command. Set it to 0 to remove the cooldown. | `;cmdcd "some cmd" 5`
|
`.cmdcooldown` `.cmdcd` | Sets a cooldown per user for a command. Set it to 0 to remove the cooldown. | `.cmdcd "some cmd" 5`
|
||||||
`;allcmdcooldowns` `;acmdcds` | Shows a list of all commands and their respective cooldowns. | `;acmdcds`
|
`.allcmdcooldowns` `.acmdcds` | Shows a list of all commands and their respective cooldowns. | `.acmdcds`
|
||||||
`;srvrfilterinv` `;sfi` | Toggles automatic deletion of invites posted in the server. Does not affect the Bot Owner. | `;sfi`
|
`.srvrfilterinv` `.sfi` | Toggles automatic deletion of invites posted in the server. Does not affect the Bot Owner. | `.sfi`
|
||||||
`;chnlfilterinv` `;cfi` | Toggles automatic deletion of invites posted in the channel. Does not negate the `;srvrfilterinv` enabled setting. Does not affect the Bot Owner. | `;cfi`
|
`.chnlfilterinv` `.cfi` | Toggles automatic deletion of invites posted in the channel. Does not negate the `.srvrfilterinv` enabled setting. Does not affect the Bot Owner. | `.cfi`
|
||||||
`;srvrfilterwords` `;sfw` | Toggles automatic deletion of messages containing filtered words on the server. Does not affect the Bot Owner. | `;sfw`
|
`.srvrfilterwords` `.sfw` | Toggles automatic deletion of messages containing filtered words on the server. Does not affect the Bot Owner. | `.sfw`
|
||||||
`;chnlfilterwords` `;cfw` | Toggles automatic deletion of messages containing filtered words on the channel. Does not negate the `;srvrfilterwords` enabled setting. Does not affect the Bot Owner. | `;cfw`
|
`.chnlfilterwords` `.cfw` | Toggles automatic deletion of messages containing filtered words on the channel. Does not negate the `.srvrfilterwords` enabled setting. Does not affect the Bot Owner. | `.cfw`
|
||||||
`;fw` | Adds or removes (if it exists) a word from the list of filtered words. Use`;sfw` or `;cfw` to toggle filtering. | `;fw poop`
|
`.fw` | Adds or removes (if it exists) a word from the list of filtered words. Use`.sfw` or `.cfw` to toggle filtering. | `.fw poop`
|
||||||
`;lstfilterwords` `;lfw` | Shows a list of filtered words. | `;lfw`
|
`.lstfilterwords` `.lfw` | Shows a list of filtered words. | `.lfw`
|
||||||
`;listglobalperms` `;lgp` | Lists global permissions set by the bot owner. **Bot owner only** | `;lgp`
|
`.listglobalperms` `.lgp` | Lists global permissions set by the bot owner. **Bot owner only** | `.lgp`
|
||||||
`;globalmodule` `;gmod` | Toggles whether a module can be used on any server. **Bot owner only** | `;gmod nsfw`
|
`.globalmodule` `.gmod` | Toggles whether a module can be used on any server. **Bot owner only** | `.gmod nsfw`
|
||||||
`;globalcommand` `;gcmd` | Toggles whether a command can be used on any server. **Bot owner only** | `;gcmd .stats`
|
`.globalcommand` `.gcmd` | Toggles whether a command can be used on any server. **Bot owner only** | `.gcmd .stats`
|
||||||
|
`.resetperms` | Resets the bot's permissions module on this server to the default value. **Requires Administrator server permission.** | `.resetperms`
|
||||||
|
`.resetglobalperms` | Resets global permissions set by bot owner. **Bot owner only** | `.resetglobalperms`
|
||||||
|
|
||||||
###### [Back to ToC](#table-of-contents)
|
###### [Back to ToC](#table-of-contents)
|
||||||
|
|
||||||
### Pokemon
|
### Pokemon
|
||||||
Commands and aliases | Description | Usage
|
Commands and aliases | Description | Usage
|
||||||
----------------|--------------|-------
|
----------------|--------------|-------
|
||||||
`>attack` | Attacks a target with the given move. Use `>movelist` to see a list of moves your type can use. | `>attack "vine whip" @someguy`
|
`.attack` | Attacks a target with the given move. Use `.movelist` to see a list of moves your type can use. | `.attack "vine whip" @someguy`
|
||||||
`>movelist` `>ml` | Lists the moves you are able to use | `>ml`
|
`.movelist` `.ml` | Lists the moves you are able to use | `.ml`
|
||||||
`>heal` | Heals someone. Revives those who fainted. Costs a NadekoFlower. | `>heal @someone`
|
`.heal` | Heals someone. Revives those who fainted. Costs a NadekoFlower. | `.heal @someone`
|
||||||
`>type` | Get the poketype of the target. | `>type @someone`
|
`.type` | Get the poketype of the target. | `.type @someone`
|
||||||
`>settype` | Set your poketype. Costs a NadekoFlower. Provide no arguments to see a list of available types. | `>settype fire` or `>settype`
|
`.settype` | Set your poketype. Costs a NadekoFlower. Provide no arguments to see a list of available types. | `.settype fire` or `.settype`
|
||||||
|
|
||||||
###### [Back to ToC](#table-of-contents)
|
###### [Back to ToC](#table-of-contents)
|
||||||
|
|
||||||
### Searches
|
### Searches
|
||||||
Commands and aliases | Description | Usage
|
Commands and aliases | Description | Usage
|
||||||
----------------|--------------|-------
|
----------------|--------------|-------
|
||||||
`~weather` `~we` | Shows weather data for a specified city. You can also specify a country after a comma. | `~we Moscow, RU`
|
`.lolban` | Shows top banned champions ordered by ban rate. | `.lolban`
|
||||||
`~time` | Shows the current time and timezone in the specified location. | `~time London, UK`
|
`.weather` `.we` | Shows weather data for a specified city. You can also specify a country after a comma. | `.we Moscow, RU`
|
||||||
`~youtube` `~yt` | Searches youtubes and shows the first result | `~yt query`
|
`.time` | Shows the current time and timezone in the specified location. | `.time London, UK`
|
||||||
`~imdb` `~omdb` | Queries omdb for movies or series, show first result. | `~imdb Batman vs Superman`
|
`.youtube` `.yt` | Searches youtubes and shows the first result | `.yt query`
|
||||||
`~randomcat` `~meow` | Shows a random cat image. | `~meow`
|
`.imdb` `.omdb` | Queries omdb for movies or series, show first result. | `.imdb Batman vs Superman`
|
||||||
`~randomdog` `~woof` | Shows a random dog image. | `~woof`
|
`.randomcat` `.meow` | Shows a random cat image. | `.meow`
|
||||||
`~image` `~img` | Pulls the first image found using a search parameter. Use `~rimg` for different results. | `~img cute kitten`
|
`.randomdog` `.woof` | Shows a random dog image. | `.woof`
|
||||||
`~randomimage` `~rimg` | Pulls a random image using a search parameter. | `~rimg cute kitten`
|
`.image` `.img` | Pulls the first image found using a search parameter. Use `.rimg` for different results. | `.img cute kitten`
|
||||||
`~lmgtfy` | Google something for an idiot. | `~lmgtfy query`
|
`.randomimage` `.rimg` | Pulls a random image using a search parameter. | `.rimg cute kitten`
|
||||||
`~shorten` | Attempts to shorten an URL, if it fails, returns the input URL. | `~shorten https://google.com`
|
`.lmgtfy` | Google something for an idiot. | `.lmgtfy query`
|
||||||
`~google` `~g` | Get a Google search link for some terms. | `~google query`
|
`.shorten` | Attempts to shorten an URL, if it fails, returns the input URL. | `.shorten https://google.com`
|
||||||
`~magicthegathering` `~mtg` | Searches for a Magic The Gathering card. | `~magicthegathering about face` or `~mtg about face`
|
`.google` `.g` | Get a Google search link for some terms. | `.google query`
|
||||||
`~hearthstone` `~hs` | Searches for a Hearthstone card and shows its image. Takes a while to complete. | `~hs Ysera`
|
`.magicthegathering` `.mtg` | Searches for a Magic The Gathering card. | `.magicthegathering about face` or `.mtg about face`
|
||||||
`~yodify` `~yoda` | Translates your normal sentences into Yoda styled sentences! | `~yoda my feelings hurt`
|
`.hearthstone` `.hs` | Searches for a Hearthstone card and shows its image. Takes a while to complete. | `.hs Ysera`
|
||||||
`~urbandict` `~ud` | Searches Urban Dictionary for a word. | `~ud Pineapple`
|
`.yodify` `.yoda` | Translates your normal sentences into Yoda styled sentences! | `.yoda my feelings hurt`
|
||||||
`~define` `~def` | Finds a definition of a word. | `~def heresy`
|
`.urbandict` `.ud` | Searches Urban Dictionary for a word. | `.ud Pineapple`
|
||||||
`~#` | Searches Tagdef.com for a hashtag. | `~# ff`
|
`.define` `.def` | Finds a definition of a word. | `.def heresy`
|
||||||
`~catfact` | Shows a random catfact from <http://catfacts-api.appspot.com/api/facts> | `~catfact`
|
`.#` | Searches Tagdef.com for a hashtag. | `.# ff`
|
||||||
`~revav` | Returns a Google reverse image search for someone's avatar. | `~revav "@SomeGuy"`
|
`.catfact` | Shows a random catfact from <http://catfacts-api.appspot.com/api/facts> | `.catfact`
|
||||||
`~revimg` | Returns a Google reverse image search for an image from a link. | `~revimg Image link`
|
`.revav` | Returns a Google reverse image search for someone's avatar. | `.revav @SomeGuy`
|
||||||
`~safebooru` | Shows a random image from safebooru with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `~safebooru yuri+kissing`
|
`.revimg` | Returns a Google reverse image search for an image from a link. | `.revimg Image link`
|
||||||
`~wikipedia` `~wiki` | Gives you back a wikipedia link | `~wiki query`
|
`.safebooru` | Shows a random image from safebooru with a given tag. Tag is optional but preferred. (multiple tags are appended with +) | `.safebooru yuri+kissing`
|
||||||
`~color` `~clr` | Shows you what color corresponds to that hex. | `~clr 00ff00`
|
`.wikipedia` `.wiki` | Gives you back a wikipedia link | `.wiki query`
|
||||||
`~videocall` | Creates a private <http://www.appear.in> video call link for you and other mentioned people. The link is sent to mentioned people via a private message. | `~videocall "@SomeGuy"`
|
`.color` | Shows you what color corresponds to that hex. | `.color 00ff00`
|
||||||
`~avatar` `~av` | Shows a mentioned person's avatar. | `~av "@SomeGuy"`
|
`.videocall` | Creates a private <http://www.appear.in> video call link for you and other mentioned people. The link is sent to mentioned people via a private message. | `.videocall "@the First" "@Xyz"`
|
||||||
`~wikia` | Gives you back a wikia link | `~wikia mtg Vigilance` or `~wikia mlp Dashy`
|
`.avatar` `.av` | Shows a mentioned person's avatar. | `.av @SomeGuy`
|
||||||
`~lolban` | Shows top banned champions ordered by ban rate. | `~lolban`
|
`.wikia` | Gives you back a wikia link | `.wikia mtg Vigilance` or `.wikia mlp Dashy`
|
||||||
`~mal` | Shows basic info from a MyAnimeList profile. | `~mal straysocks`
|
`.mal` | Shows basic info from a MyAnimeList profile. | `.mal straysocks`
|
||||||
`~anime` `~ani` `~aq` | Queries anilist for an anime and shows the first result. | `~ani aquarion evol`
|
`.anime` `.ani` `.aq` | Queries anilist for an anime and shows the first result. | `.ani aquarion evol`
|
||||||
`~manga` `~mang` `~mq` | Queries anilist for a manga and shows the first result. | `~mq Shingeki no kyojin`
|
`.manga` `.mang` `.mq` | Queries anilist for a manga and shows the first result. | `.mq Shingeki no kyojin`
|
||||||
`~yomama` `~ym` | Shows a random joke from <http://api.yomomma.info/> | `~ym`
|
`.yomama` `.ym` | Shows a random joke from <http://api.yomomma.info/> | `.ym`
|
||||||
`~randjoke` `~rj` | Shows a random joke from <http://tambal.azurewebsites.net/joke/random> | `~rj`
|
`.randjoke` `.rj` | Shows a random joke from <http://tambal.azurewebsites.net/joke/random> | `.rj`
|
||||||
`~chucknorris` `~cn` | Shows a random Chuck Norris joke from <http://api.icndb.com/jokes/random/> | `~cn`
|
`.chucknorris` `.cn` | Shows a random Chuck Norris joke from <http://api.icndb.com/jokes/random/> | `.cn`
|
||||||
`~wowjoke` | Get one of Kwoth's penultimate WoW jokes. | `~wowjoke`
|
`.wowjoke` | Get one of Kwoth's penultimate WoW jokes. | `.wowjoke`
|
||||||
`~magicitem` `~mi` | Shows a random magic item from <https://1d4chan.org/wiki/List_of_/tg/%27s_magic_items> | `~mi`
|
`.magicitem` `.mi` | Shows a random magic item from <https://1d4chan.org/wiki/List_of_/tg/%27s_magic_items> | `.mi`
|
||||||
`~memelist` | Pulls a list of memes you can use with `~memegen` from http://memegen.link/templates/ | `~memelist`
|
`.memelist` | Pulls a list of memes you can use with `.memegen` from http://memegen.link/templates/ | `.memelist`
|
||||||
`~memegen` | Generates a meme from memelist with top and bottom text. | `~memegen biw "gets iced coffee" "in the winter"`
|
`.memegen` | Generates a meme from memelist with top and bottom text. | `.memegen biw "gets iced coffee" "in the winter"`
|
||||||
`~osu` | Shows osu stats for a player. | `~osu Name` or `~osu Name taiko`
|
`.osu` | Shows osu stats for a player. | `.osu Name` or `.osu Name taiko`
|
||||||
`~osub` | Shows information about an osu beatmap. | `~osub https://osu.ppy.sh/s/127712`
|
`.osub` | Shows information about an osu beatmap. | `.osub https://osu.ppy.sh/s/127712`
|
||||||
`~osu5` | Displays a user's top 5 plays. | `~osu5 Name`
|
`.osu5` | Displays a user's top 5 plays. | `.osu5 Name`
|
||||||
`~overwatch` `~ow` | Show's basic stats on a player (competitive rank, playtime, level etc) Region codes are: `eu` `us` `cn` `kr` | `~ow us Battletag#1337` or `~overwatch eu Battletag#2016`
|
`.overwatch` `.ow` | Show's basic stats on a player (competitive rank, playtime, level etc) Region codes are: `eu` `us` `cn` `kr` | `.ow us Battletag#1337` or `.overwatch eu Battletag#2016`
|
||||||
`~placelist` | Shows the list of available tags for the `~place` command. | `~placelist`
|
`.placelist` | Shows the list of available tags for the `.place` command. | `.placelist`
|
||||||
`~place` | Shows a placeholder image of a given tag. Use `~placelist` to see all available tags. You can specify the width and height of the image as the last two optional arguments. | `~place Cage` or `~place steven 500 400`
|
`.place` | Shows a placeholder image of a given tag. Use `.placelist` to see all available tags. You can specify the width and height of the image as the last two optional arguments. | `.place Cage` or `.place steven 500 400`
|
||||||
`~pokemon` `~poke` | Searches for a pokemon. | `~poke Sylveon`
|
`.pokemon` `.poke` | Searches for a pokemon. | `.poke Sylveon`
|
||||||
`~pokemonability` `~pokeab` | Searches for a pokemon ability. | `~pokeab overgrow`
|
`.pokemonability` `.pokeab` | Searches for a pokemon ability. | `.pokeab overgrow`
|
||||||
`~hitbox` `~hb` | Notifies this channel when a certain user starts streaming. **Requires ManageMessages server permission.** | `~hitbox SomeStreamer`
|
`.smashcast` `.hb` | Notifies this channel when a certain user starts streaming. **Requires ManageMessages server permission.** | `.smashcast SomeStreamer`
|
||||||
`~twitch` `~tw` | Notifies this channel when a certain user starts streaming. **Requires ManageMessages server permission.** | `~twitch SomeStreamer`
|
`.twitch` `.tw` | Notifies this channel when a certain user starts streaming. **Requires ManageMessages server permission.** | `.twitch SomeStreamer`
|
||||||
`~beam` `~bm` | Notifies this channel when a certain user starts streaming. **Requires ManageMessages server permission.** | `~beam SomeStreamer`
|
`.mixer` `.bm` | Notifies this channel when a certain user starts streaming. **Requires ManageMessages server permission.** | `.mixer SomeStreamer`
|
||||||
`~liststreams` `~ls` | Lists all streams you are following on this server. | `~ls`
|
`.liststreams` `.ls` | Lists all streams you are following on this server. | `.ls`
|
||||||
`~removestream` `~rms` | Removes notifications of a certain streamer from a certain platform on this channel. **Requires ManageMessages server permission.** | `~rms Twitch SomeGuy` or `~rms Beam SomeOtherGuy`
|
`.removestream` `.rms` | Removes notifications of a certain streamer from a certain platform on this channel. **Requires ManageMessages server permission.** | `.rms Twitch SomeGuy` or `.rms mixer SomeOtherGuy`
|
||||||
`~checkstream` `~cs` | Checks if a user is online on a certain streaming platform. | `~cs twitch MyFavStreamer`
|
`.checkstream` `.cs` | Checks if a user is online on a certain streaming platform. | `.cs twitch MyFavStreamer`
|
||||||
`~translate` `~trans` | Translates from>to text. From the given language to the destination language. | `~trans en>fr Hello`
|
`.translate` `.trans` | Translates from>to text. From the given language to the destination language. | `.trans en>fr Hello`
|
||||||
`~autotrans` `~at` | Starts automatic translation of all messages by users who set their `~atl` in this channel. You can set "del" argument to automatically delete all translated user messages. **Requires Administrator server permission.** **Bot owner only** | `~at` or `~at del`
|
`.autotrans` `.at` | Starts automatic translation of all messages by users who set their `.atl` in this channel. You can set "del" argument to automatically delete all translated user messages. **Requires Administrator server permission.** **Bot owner only** | `.at` or `.at del`
|
||||||
`~autotranslang` `~atl` | Sets your source and target language to be used with `~at`. Specify no arguments to remove previously set value. | `~atl en>fr`
|
`.autotranslang` `.atl` | Sets your source and target language to be used with `.at`. Specify no arguments to remove previously set value. | `.atl en>fr`
|
||||||
`~translangs` | Lists the valid languages for translation. | `~translangs`
|
`.translangs` | Lists the valid languages for translation. | `.translangs`
|
||||||
`~xkcd` | Shows a XKCD comic. No arguments will retrieve random one. Number argument will retrieve a specific comic, and "latest" will get the latest one. | `~xkcd` or `~xkcd 1400` or `~xkcd latest`
|
`.xkcd` | Shows a XKCD comic. No arguments will retrieve random one. Number argument will retrieve a specific comic, and "latest" will get the latest one. | `.xkcd` or `.xkcd 1400` or `.xkcd latest`
|
||||||
|
|
||||||
###### [Back to ToC](#table-of-contents)
|
###### [Back to ToC](#table-of-contents)
|
||||||
|
|
||||||
### Utility
|
### Utility
|
||||||
Commands and aliases | Description | Usage
|
Commands and aliases | Description | Usage
|
||||||
----------------|--------------|-------
|
----------------|--------------|-------
|
||||||
`.rotaterolecolor` `.rrc` | Rotates a roles color on an interval with a list of supplied colors. First argument is interval in seconds (Minimum 60). Second argument is a role, followed by a space-separated list of colors in hex. Provide a rolename with a 0 interval to disable. **Requires ManageRoles server permission.** **Bot owner only** | `.rrc 60 MyLsdRole #ff0000 #00ff00 #0000ff` or `.rrc 0 MyLsdRole`
|
|
||||||
`.togethertube` `.totube` | Creates a new room on <https://togethertube.com> and shows the link in the chat. | `.totube`
|
`.togethertube` `.totube` | Creates a new room on <https://togethertube.com> and shows the link in the chat. | `.totube`
|
||||||
`.whosplaying` `.whpl` | Shows a list of users who are playing the specified game. | `.whpl Overwatch`
|
`.whosplaying` `.whpl` | Shows a list of users who are playing the specified game. | `.whpl Overwatch`
|
||||||
`.inrole` | Lists every person from the specified role on this server. You can use role ID, role name. | `.inrole Some Role`
|
`.inrole` | Lists every person from the specified role on this server. You can use role ID, role name. | `.inrole Some Role`
|
||||||
`.checkmyperms` | Checks your user-specific permissions on this channel. | `.checkmyperms`
|
`.checkmyperms` | Checks your user-specific permissions on this channel. | `.checkmyperms`
|
||||||
`.userid` `.uid` | Shows user ID. | `.uid` or `.uid "@SomeGuy"`
|
`.userid` `.uid` | Shows user ID. | `.uid` or `.uid @SomeGuy`
|
||||||
`.channelid` `.cid` | Shows current channel ID. | `.cid`
|
`.channelid` `.cid` | Shows current channel ID. | `.cid`
|
||||||
`.serverid` `.sid` | Shows current server ID. | `.sid`
|
`.serverid` `.sid` | Shows current server ID. | `.sid`
|
||||||
`.roles` | List roles on this server or a roles of a specific user if specified. Paginated, 20 roles per page. | `.roles 2` or `.roles @Someone`
|
`.roles` | List roles on this server or a roles of a specific user if specified. Paginated, 20 roles per page. | `.roles 2` or `.roles @Someone`
|
||||||
`.channeltopic` `.ct` | Sends current channel's topic as a message. | `.ct`
|
`.channeltopic` `.ct` | Sends current channel's topic as a message. | `.ct`
|
||||||
`.createinvite` `.crinv` | Creates a new invite which has infinite max uses and never expires. **Requires CreateInstantInvite channel permission.** | `.crinv`
|
`.createinvite` `.crinv` | Creates a new invite which has infinite max uses and never expires. **Requires CreateInstantInvite channel permission.** | `.crinv`
|
||||||
`.shardstats` | Stats for shards. Paginated with 25 shards per page. | `.shardstats` or `.shardstats 2`
|
`.shardstats` | Stats for shards. Paginated with 25 shards per page. | `.shardstats` or `.shardstats 2`
|
||||||
`.shardid` | Shows which shard is a certain guild on, by guildid. | `.shardid 117523346618318850`
|
|
||||||
`.stats` | Shows some basic stats for Nadeko. | `.stats`
|
`.stats` | Shows some basic stats for Nadeko. | `.stats`
|
||||||
`.showemojis` `.se` | Shows a name and a link to every SPECIAL emoji in the message. | `.se A message full of SPECIAL emojis`
|
`.showemojis` `.se` | Shows a name and a link to every SPECIAL emoji in the message. | `.se A message full of SPECIAL emojis`
|
||||||
`.listservers` | Lists servers the bot is on with some basic info. 15 per page. **Bot owner only** | `.listservers 3`
|
`.listservers` | Lists servers the bot is on with some basic info. 15 per page. **Bot owner only** | `.listservers 3`
|
||||||
`.savechat` | Saves a number of messages to a text file and sends it to you. **Bot owner only** | `.savechat 150`
|
`.savechat` | Saves a number of messages to a text file and sends it to you. **Bot owner only** | `.savechat 150`
|
||||||
`.ping` | Ping the bot to see if there are latency issues. | `.ping`
|
`.ping` | Ping the bot to see if there are latency issues. | `.ping`
|
||||||
`.activity` | Checks for spammers. **Bot owner only** | `.activity`
|
`.botconfigedit` `.bce` | Sets one of available bot config settings to a specified value. Use the command without any parameters to get a list of available settings. **Bot owner only** | `.bce CurrencyName b1nzy` or `.bce`
|
||||||
`.calculate` `.calc` | Evaluate a mathematical expression. | `.calc 1+1`
|
`.calculate` `.calc` | Evaluate a mathematical expression. | `.calc 1+1`
|
||||||
`.calcops` | Shows all available operations in the `.calc` command | `.calcops`
|
`.calcops` | Shows all available operations in the `.calc` command | `.calcops`
|
||||||
`.alias` `.cmdmap` | Create a custom alias for a certain Nadeko command. Provide no alias to remove the existing one. **Requires Administrator server permission.** | `.alias allin $bf 100 h` or `.alias "linux thingy" >loonix Spyware Windows`
|
`.alias` `.cmdmap` | Create a custom alias for a certain Nadeko command. Provide no alias to remove the existing one. **Requires Administrator server permission.** | `.alias allin $bf 100 h` or `.alias "linux thingy" >loonix Spyware Windows`
|
||||||
`.aliaslist` `.cmdmaplist` `.aliases` | Shows the list of currently set aliases. Paginated. | `.aliaslist` or `.aliaslist 3`
|
`.aliaslist` `.cmdmaplist` `.aliases` | Shows the list of currently set aliases. Paginated. | `.aliaslist` or `.aliaslist 3`
|
||||||
`.scsc` | Starts an instance of cross server channel. You will get a token as a DM that other people will use to tune in to the same instance. **Bot owner only** | `.scsc`
|
`.serverinfo` `.sinfo` | Shows info about the server the bot is on. If no server is supplied, it defaults to current one. | `.sinfo Some Server`
|
||||||
`.jcsc` | Joins current channel to an instance of cross server channel using the token. **Requires ManageServer server permission.** | `.jcsc TokenHere`
|
|
||||||
`.lcsc` | Leaves a cross server channel instance from this channel. **Requires ManageServer server permission.** | `.lcsc`
|
|
||||||
`.serverinfo` `.sinfo` | Shows info about the server the bot is on. If no channel is supplied, it defaults to current one. | `.sinfo Some Server`
|
|
||||||
`.channelinfo` `.cinfo` | Shows info about the channel. If no channel is supplied, it defaults to current one. | `.cinfo #some-channel`
|
`.channelinfo` `.cinfo` | Shows info about the channel. If no channel is supplied, it defaults to current one. | `.cinfo #some-channel`
|
||||||
`.userinfo` `.uinfo` | Shows info about the user. If no user is supplied, it defaults a user running the command. | `.uinfo @SomeUser`
|
`.userinfo` `.uinfo` | Shows info about the user. If no user is supplied, it defaults a user running the command. | `.uinfo @SomeUser`
|
||||||
`.repeatinvoke` `.repinv` | Immediately shows the repeat message on a certain index and restarts its timer. **Requires ManageMessages server permission.** | `.repinv 1`
|
`.activity` | Checks for spammers. **Bot owner only** | `.activity`
|
||||||
`.repeatremove` `.reprm` | Removes a repeating message on a specified index. Use `.repeatlist` to see indexes. **Requires ManageMessages server permission.** | `.reprm 2`
|
|
||||||
`.repeat` | Repeat a message every `X` minutes in the current channel. You can have up to 5 repeating messages on the server in total. **Requires ManageMessages server permission.** | `.repeat 5 Hello there`
|
|
||||||
`.repeatlist` `.replst` | Shows currently repeating messages and their indexes. **Requires ManageMessages server permission.** | `.repeatlist`
|
|
||||||
`.parewrel` | Forces the update of the list of patrons who are eligible for the reward. **Bot owner only** | `.parewrel`
|
`.parewrel` | Forces the update of the list of patrons who are eligible for the reward. **Bot owner only** | `.parewrel`
|
||||||
`.clparew` | Claim patreon rewards. If you're subscribed to bot owner's patreon you can use this command to claim your rewards - assuming bot owner did setup has their patreon key. | `.clparew`
|
`.clparew` | Claim patreon rewards. If you're subscribed to bot owner's patreon you can use this command to claim your rewards - assuming bot owner did setup has their patreon key. | `.clparew`
|
||||||
`.listquotes` `.liqu` | Lists all quotes on the server ordered alphabetically. 15 Per page. | `.liqu` or `.liqu 3`
|
`.listquotes` `.liqu` | Lists all quotes on the server ordered alphabetically. 15 Per page. | `.liqu` or `.liqu 3`
|
||||||
@ -432,9 +425,47 @@ Commands and aliases | Description | Usage
|
|||||||
`.qsearch` | Shows a random quote for a keyword that contains any text specified in the search. | `.qsearch keyword text`
|
`.qsearch` | Shows a random quote for a keyword that contains any text specified in the search. | `.qsearch keyword text`
|
||||||
`.quoteid` `.qid` | Displays the quote with the specified ID number. Quote ID numbers can be found by typing `.liqu [num]` where `[num]` is a number of a page which contains 15 quotes. | `.qid 123456`
|
`.quoteid` `.qid` | Displays the quote with the specified ID number. Quote ID numbers can be found by typing `.liqu [num]` where `[num]` is a number of a page which contains 15 quotes. | `.qid 123456`
|
||||||
`..` | Adds a new quote with the specified name and message. | `.. sayhi Hi`
|
`..` | Adds a new quote with the specified name and message. | `.. sayhi Hi`
|
||||||
`.deletequote` `.delq` | Deletes a quote with the specified ID. You have to be either server Administrator or the creator of the quote to delete it. | `.delq 123456`
|
`.quotedel` `.qdel` | Deletes a quote with the specified ID. You have to be either server Administrator or the creator of the quote to delete it. | `.qdel 123456`
|
||||||
`.delallq` `.daq` | Deletes all quotes on a specified keyword. **Requires Administrator server permission.** | `.delallq kek`
|
`.delallq` `.daq` | Deletes all quotes on a specified keyword. **Requires Administrator server permission.** | `.delallq kek`
|
||||||
`.remind` | Sends a message to you or a channel after certain amount of time. First argument is `me`/`here`/'channelname'. Second argument is time in a descending order (mo>w>d>h>m) example: 1w5d3h10m. Third argument is a (multiword) message. | `.remind me 1d5h Do something` or `.remind #general 1m Start now!`
|
`.remind` | Sends a message to you or a channel after certain amount of time. First argument is `me`/`here`/'channelname'. Second argument is time in a descending order (mo>w>d>h>m) example: 1w5d3h10m. Third argument is a (multiword) message. | `.remind me 1d5h Do something` or `.remind #general 1m Start now!`
|
||||||
`.remindtemplate` | Sets message for when the remind is triggered. Available placeholders are `%user%` - user who ran the command, `%message%` - Message specified in the remind, `%target%` - target channel of the remind. **Bot owner only** | `.remindtemplate %user%, do %message%!`
|
`.remindtemplate` | Sets message for when the remind is triggered. Available placeholders are `%user%` - user who ran the command, `%message%` - Message specified in the remind, `%target%` - target channel of the remind. **Bot owner only** | `.remindtemplate %user%, do %message%!`
|
||||||
|
`.repeatinvoke` `.repinv` | Immediately shows the repeat message on a certain index and restarts its timer. **Requires ManageMessages server permission.** | `.repinv 1`
|
||||||
|
`.repeatremove` `.reprm` | Removes a repeating message on a specified index. Use `.repeatlist` to see indexes. **Requires ManageMessages server permission.** | `.reprm 2`
|
||||||
|
`.repeat` | Repeat a message every `X` minutes in the current channel. You can instead specify time of day for the message to be repeated at daily (make sure you've set your server's timezone). You can have up to 5 repeating messages on the server in total. **Requires ManageMessages server permission.** | `.repeat 5 Hello there` or `.repeat 17:30 tea time`
|
||||||
|
`.repeatlist` `.replst` | Shows currently repeating messages and their indexes. **Requires ManageMessages server permission.** | `.repeatlist`
|
||||||
|
`.streamrole` | Sets a role which is monitored for streamers (FromRole), and a role to add if a user from 'FromRole' is streaming (AddRole). When a user from 'FromRole' starts streaming, they will receive an 'AddRole'. Provide no arguments to disable **Requires ManageRoles server permission.** | `.streamrole "Eligible Streamers" "Featured Streams"`
|
||||||
|
`.streamrolekw` `.srkw` | Sets keyword which is required in the stream's title in order for the streamrole to apply. Provide no keyword in order to reset. **Requires ManageRoles server permission.** | `.srkw` or `.srkw PUBG`
|
||||||
|
`.streamrolebl` `.srbl` | Adds or removes a blacklisted user. Blacklisted users will never receive the stream role. **Requires ManageRoles server permission.** | `.srbl add @b1nzy#1234` or `.srbl rem @b1nzy#1234`
|
||||||
|
`.streamrolewl` `.srwl` | Adds or removes a whitelisted user. Whitelisted users will receive the stream role even if they don't have the specified keyword in their stream title. **Requires ManageRoles server permission.** | `.srwl add @b1nzy#1234` or `.srwl rem @b1nzy#1234`
|
||||||
`.convertlist` | List of the convertible dimensions and currencies. | `.convertlist`
|
`.convertlist` | List of the convertible dimensions and currencies. | `.convertlist`
|
||||||
`.convert` | Convert quantities. Use `.convertlist` to see supported dimensions and currencies. | `.convert m km 1000`
|
`.convert` | Convert quantities. Use `.convertlist` to see supported dimensions and currencies. | `.convert m km 1000`
|
||||||
|
`.verboseerror` `.ve` | Toggles whether the bot should print command errors when a command is incorrectly used. **Requires ManageMessages server permission.** | `.ve`
|
||||||
|
|
||||||
|
###### [Back to ToC](#table-of-contents)
|
||||||
|
|
||||||
|
### Xp
|
||||||
|
Commands and aliases | Description | Usage
|
||||||
|
----------------|--------------|-------
|
||||||
|
`.experience` `.xp` | Shows your xp stats. Specify the user to show that user's stats instead. | `.xp`
|
||||||
|
`.xprolerewards` `.xprrs` | Shows currently set role rewards. | `.xprrs`
|
||||||
|
`.xprolereward` `.xprr` | Sets a role reward on a specified level. Provide no role name in order to remove the role reward. **Requires ManageRoles server permission.** | `.xprr 3 Social`
|
||||||
|
`.xpnotify` `.xpn` | Sets how the bot should notify you when you get a `server` or `global` level. You can set `dm` (for the bot to send a direct message), `channel` (to get notified in the channel you sent the last message in) or `none` to disable. | `.xpn global dm` `.xpn server channel`
|
||||||
|
`.xpexclude` `.xpex` | Exclude a user or a role from the xp system, or whole current server. **Requires Administrator server permission.** | `.xpex Role Excluded-Role` `.xpex Server`
|
||||||
|
`.xpexclusionlist` `.xpexl` | Shows the roles and channels excluded from the XP system on this server, as well as whether the whole server is excluded. | `.xpexl`
|
||||||
|
`.xpleaderboard` `.xplb` | Shows current server's xp leaderboard. | `.xplb`
|
||||||
|
`.xpgleaderboard` `.xpglb` | Shows the global xp leaderboard. | `.xpglb`
|
||||||
|
`.xpadd` | Adds xp to a user on the server. This does not affect their global ranking. You can use negative values. **Requires Administrator server permission.** | `.xpadd 100 @b1nzy`
|
||||||
|
`.clubcreate` | Creates a club. You must be atleast level 5 and not be in the club already. | `.clubcreate b1nzy's friends`
|
||||||
|
`.clubicon` | Sets the club icon. | `.clubicon https://i.imgur.com/htfDMfU.png`
|
||||||
|
`.clubinfo` | Shows information about the club. | `.clubinfo b1nzy's friends#123`
|
||||||
|
`.clubbans` | Shows the list of users who have banned from your club. Paginated. You must be club owner to use this command. | `.clubbans 2`
|
||||||
|
`.clubapps` | Shows the list of users who have applied to your club. Paginated. You must be club owner to use this command. | `.clubapps 2`
|
||||||
|
`.clubapply` | Apply to join a club. You must meet that club's minimum level requirement, and not be on its ban list. | `.clubapply b1nzy's friends#123`
|
||||||
|
`.clubaccept` | Accept a user who applied to your club. | `.clubaccept b1nzy#1337`
|
||||||
|
`.clubleave` | Leaves the club you're currently in. | `.clubleave`
|
||||||
|
`.clubkick` | Kicks the user from the club. You must be the club owner. They will be able to apply again. | `.clubkick b1nzy#1337`
|
||||||
|
`.clubban` | Bans the user from the club. You must be the club owner. They will not be able to apply again. | `.clubban b1nzy#1337`
|
||||||
|
`.clubunban` | Unbans the previously banned user from the club. You must be the club owner. | `.clubunban b1nzy#1337`
|
||||||
|
`.clublevelreq` | Sets the club required level to apply to join the club. You must be club owner. You can't set this number below 5. | `.clublevelreq 7`
|
||||||
|
`.clubdisband` | Disbands the club you're the owner of. This action is irreversible. | `.clubdisband`
|
||||||
|
`.clublb` | Shows club rankings on the specified page. | `.clublb 2`
|
||||||
|
@ -36,14 +36,4 @@ For example:
|
|||||||
Now if you try to trigger `/o/`, it won't print anything.
|
Now if you try to trigger `/o/`, it won't print anything.
|
||||||
|
|
||||||
###Placeholders!
|
###Placeholders!
|
||||||
There are currently three different placeholders which we will look at, with more placeholders potentially coming in the future.
|
To learn about placeholders, go [here](Placeholders.md)
|
||||||
|
|
||||||
| Placeholder | Description | Example Usage | Usage |
|
|
||||||
|:-----------:|-------------|---------------|-------|
|
|
||||||
|`%mention%`|The `%mention%` placeholder is triggered when you type `@BotName` - It's important to note that if you've given the bot a custom nickname, this trigger won't work!|```.acr "Hello %mention%" I, %mention%, also say hello!```|Input: "Hello @BotName" Output: "I, @BotName, also say hello!"|
|
|
||||||
|`%user%`|The `%user%` placeholder mentions the person who said the command|`.acr "Who am I?" You are %user%!`|Input: "Who am I?" Output: "You are @Username!"|
|
|
||||||
|`%rng%`|The `%rng%` placeholder generates a random number between 0 and 10. You can also specify a custom range (%rng1-100%) even with negative numbers: `%rng-9--1%` (from -9 to -1) . |`.acr "Random number" %rng%`|Input: "Random number" Output: "2"|
|
|
||||||
|`%rnduser%`|The `%rnduser%` placeholder mentions a random user from the server. |`.acr "Random user" %rnduser%`|Input: "Random number" Output: @SomeUser|
|
|
||||||
|`%target%`|The `%target%` placeholder is used to make Nadeko Mention another person or phrase, it is only supported as part of the response|`.acr "Say this: " %target%`|Input: "Say this: I, @BotName, am a parrot!". Output: "I, @BotName, am a parrot!".|
|
|
||||||
|
|
||||||
Thanks to Nekai for being creative. <3
|
|
||||||
|
@ -3,19 +3,19 @@
|
|||||||
|
|
||||||
###Question 1: How do I get Nadeko to join my server?
|
###Question 1: How do I get Nadeko to join my server?
|
||||||
----
|
----
|
||||||
**Answer:** Simply send Nadeko a Direct Message with `-h` and follow the link. **Only People with the Manage Server permission can add the bot to the server**
|
**Answer:** Simply send Nadeko a Direct Message with `.h` and follow the link. **Only People with the Manage Server permission can add the bot to the server**
|
||||||
|
|
||||||
###Question 2: I want to change permissions, but it isn't working!
|
###Question 2: I want to change permissions, but it isn't working!
|
||||||
----
|
----
|
||||||
**Answer:** You must have the `;permrole` (by default this is the `Nadeko` role, for more details on permissions check [here](http://nadekobot.readthedocs.io/en/latest/Permissions%20System/ "Permissions"). If you have a role called `Nadeko` but can't assign it it's probably the Bot Role so, just create a **New Role** called `Nadeko` and assign that to yourself instead.)
|
**Answer:** You must have the `.permrole` (by default this is the `Nadeko` role, for more details on permissions check [here](http://nadekobot.readthedocs.io/en/latest/Permissions%20System/ "Permissions"). If you have a role called `Nadeko` but can't assign it it's probably the Bot Role so, just create a **New Role** called `Nadeko` and assign that to yourself instead.)
|
||||||
|
|
||||||
###Question 3: I want to disable NSFW on my server.
|
###Question 3: I want to disable NSFW on my server.
|
||||||
----
|
----
|
||||||
**Answer:** To disable the NSFW Module for your server type, `;sm NSFW disable`. If this does not work refer to Question 2.
|
**Answer:** To disable the NSFW Module for your server type, `.sm NSFW disable`. If this does not work refer to Question 2.
|
||||||
|
|
||||||
###Question 4: How do I get NadekoFlowers/Currency?
|
###Question 4: How do I get NadekoFlowers/Currency?
|
||||||
----
|
----
|
||||||
**Answer:** You can get NadekoFlowers by picking them up after they have been generated with `>gc`, which you can then either plant (give away to a channel so that someone can pick it), or gamble with for potentinal profit with `$betflip`, `$betroll` and `$jr`
|
**Answer:** You can get NadekoFlowers by picking them up after they have been generated with `.gc`, which you can then either plant (give away to a channel so that someone can pick it), or gamble with for potentinal profit with `.betflip`, `.betroll` and `.jr`
|
||||||
|
|
||||||
###Question 5: I have an issue/bug/suggestion, where do I put it so it gets noticed?
|
###Question 5: I have an issue/bug/suggestion, where do I put it so it gets noticed?
|
||||||
-----------
|
-----------
|
||||||
@ -25,7 +25,7 @@ If your problem or suggestion is not there, feel free to request/notify us about
|
|||||||
|
|
||||||
###Question 6: How do I use this command?
|
###Question 6: How do I use this command?
|
||||||
--------
|
--------
|
||||||
**Answer:** You can see the description and usage of certain commands by using `-h command` **i.e** `-h ;sm`.
|
**Answer:** You can see the description and usage of certain commands by using `.h command` **i.e** `.h .sm`.
|
||||||
|
|
||||||
The whole list of commands can be found [here](http://nadekobot.readthedocs.io/en/latest/Commands%20List/ "Command List")
|
The whole list of commands can be found [here](http://nadekobot.readthedocs.io/en/latest/Commands%20List/ "Command List")
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ The whole list of commands can be found [here](http://nadekobot.readthedocs.io/e
|
|||||||
###Question 8: My music is still not working/very laggy?
|
###Question 8: My music is still not working/very laggy?
|
||||||
----
|
----
|
||||||
**Answer:** Try changing your discord [location][1], if this doesn't work be sure you have enabled the correct permissions for Nadeko and rebooted since installing FFMPEG.
|
**Answer:** Try changing your discord [location][1], if this doesn't work be sure you have enabled the correct permissions for Nadeko and rebooted since installing FFMPEG.
|
||||||
[1]: https://support.discordapp.com/hc/en-us/articles/216661717-How-do-I-change-my-Voice-Server-Region-
|
[1]: https://support.discordapp.com/hc/en-us/articles/216661717.how-do-I-change-my-Voice-Server-Region-
|
||||||
|
|
||||||
###Question 9: I want to change data in the database like NadekoFlowers or something else but how?
|
###Question 9: I want to change data in the database like NadekoFlowers or something else but how?
|
||||||
----
|
----
|
||||||
@ -56,13 +56,13 @@ Follow this Detailed [Guide](http://discord.kongslien.net/guide.html).
|
|||||||
|
|
||||||
###Question 12: I'm building NadekoBot from source, but I get hundreds of (namespace) errors without changing anything!?
|
###Question 12: I'm building NadekoBot from source, but I get hundreds of (namespace) errors without changing anything!?
|
||||||
-----
|
-----
|
||||||
**Answer:** Using Visual Studio, you can solve these errors by going to `Tools` -> `NuGet Package Manager` -> `Manage NuGet Packages for Solution`. Go to the Installed tab, select the Packages that were missing (usually `Newtonsoft.json` and `RestSharp`) and install them for all projects
|
**Answer:** Using Visual Studio, you can solve these errors by going to `Tools` -> `NuGet Package Manager` -> `Manage NuGet Packages for Solution`. Go to the Installed tab, select the Packages that were missing (usually `Newtonsoft.json` and `RestSharp`) and install them for all projects.
|
||||||
|
|
||||||
###Question 13: My bot has all permissions but it's still saying, "Failed to add roles. Bot has insufficient permissions". How do I fix this?
|
###Question 13: My bot has all permissions but it's still saying, "Failed to add roles. Bot has insufficient permissions". How do I fix this?
|
||||||
----------
|
----------
|
||||||
**Answer:** Discord has added few new features and the roles now follows the role hierarchy which means you need to place your bot's role above every-other role your server has to fix the role hierarchy issue. [Here's](https://support.discordapp.com/hc/en-us/articles/214836687-Role-Management-101) a link to Discords role management 101.
|
**Answer:** Discord has added a few new features and the roles now follow the role hierarchy, which means you need to place your bot's role above every other role on your server to fix the issue. [Here's](https://support.discordapp.com/hc/en-us/articles/214836687-Role-Management-101) a link to Discord's role management 101.
|
||||||
|
|
||||||
**Please Note:** *The bot can only set/add all roles below its own highest role. It can not assign it's "highest role" to anyone else.*
|
**Please Note:** *The bot can only set/add all roles below its own highest role. It cannot assign its "highest role" to anyone else.*
|
||||||
|
|
||||||
###Question 14: I've broken permissions and am stuck, can I reset permissions?
|
###Question 14: I've broken permissions and am stuck, can I reset permissions?
|
||||||
----------
|
----------
|
||||||
|
@ -1,72 +1,186 @@
|
|||||||
###Setting up your Credentials
|
## Setting up your Credentials
|
||||||
If you do not see `credentials.json` you will need to rename `credentials_example.json` to `credentials.json`.
|
If you do not see `credentials.json` you will need to rename `credentials_example.json` to `credentials.json`.
|
||||||
|
|
||||||
**This is how the unedited credentials look:**
|
**This is how the `credentials.json` looks with all the APIs:**
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"ClientId": 123123123,
|
"ClientId": 179372110000358912,
|
||||||
"BotId": null,
|
"BotId": 179372110000358912,
|
||||||
"Token": "",
|
"Token": "MTc5MzcyXXX2MDI1ODY3MjY0.ChKs4g.I8J_R9XX0t-QY-0PzXXXiN0-7vo",
|
||||||
"OwnerIds": [
|
"OwnerIds": [
|
||||||
0
|
105635123466156544,
|
||||||
|
105635123566156544,
|
||||||
|
105635123666156544
|
||||||
],
|
],
|
||||||
"LoLApiKey": "",
|
"LoLApiKey": "6e99ecf36f0000095b0a3ccfe35df45f",
|
||||||
"GoogleApiKey": "",
|
"GoogleApiKey": "AIzaSyDSci1sdlWQOWNVj1vlXxxxxxbk0oWMEzM",
|
||||||
"MashapeKey": "",
|
"MashapeKey": "4UrKpcWXc2mshS8RKi00000y8Kf5p1Q8kI6jsn32bmd8oVWiY7",
|
||||||
"OsuApiKey": "",
|
"OsuApiKey": "4c8c8fdff8e1234581725db27fd140a7d93320d6",
|
||||||
"SoundCloudClientId": "",
|
"CleverbotApiKey": "",
|
||||||
"CarbonKey": "",
|
"PatreonAccessToken": "",
|
||||||
|
"PatreonCampaignId": "334038",
|
||||||
"Db": null,
|
"Db": null,
|
||||||
"TotalShards": 1
|
"TotalShards": 1,
|
||||||
|
"ShardRunCommand": "",
|
||||||
|
"ShardRunArguments": "",
|
||||||
|
"ShardRunPort": null
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
####Required Parts
|
-----
|
||||||
- **Token** - Required to log in. Refer to this [guide](http://discord.kongslien.net/guide.html)
|
#### Creating Discord Bot application
|
||||||
- **OwnerIds** - Required for the **Owner-Only** commands. Seperate multiple Id's with a comma.
|
![img2](http://i.imgur.com/x3jWudH.gif)
|
||||||
- **BotId** - Required for custom reactions to work.
|
|
||||||
- **Important : Bot ID and Client ID will be the same in newer bot accounts due to recent changes by Discord.**
|
|
||||||
|
|
||||||
_BotId and the OwnerIds are **NOT** the names of the owner and the bot. If you do not know the id of your bot, keep the two random numbers in those fields and
|
- Go to [the Discord developer application page][DiscordApp].
|
||||||
run the bot then do `.uid @MyBotName` - this will give you your bot_id.
|
- Log in with your Discord account.
|
||||||
Do the same for yourself with `.uid @MyName` Put these numbers in their respective field of the credentials._
|
- On the left side, press `New Application`.
|
||||||
|
- Fill out the `App Name` (Your bot's name, in this case)
|
||||||
|
- Put the image if you want, and add an app description. **(Optional)**
|
||||||
|
- Create the application.
|
||||||
|
- Click on `Create a Bot User` and confirm that you do want to add a bot to this app.
|
||||||
|
- **Keep this window open for now.**
|
||||||
|
|
||||||
Setting up your API keys
|
|
||||||
====================
|
#### Inviting your bot to your server
|
||||||
####This part is completely optional, **However it is necessary for music to work properly**
|
![img4](http://i.imgur.com/aFK7InR.gif)
|
||||||
- **GoogleAPIKey** - Required for Youtube Song Search, Playlist queuing, and URL Shortener. `~i` and `~img`.
|
|
||||||
You can get this api Key [here](https://console.developers.google.com/apis)
|
- [Invite Guide][Invite Guide]
|
||||||
- **SoundCloudClientID** - Required to queue soundloud songs from sc links.
|
- Copy your `Client ID` from your [applications page][DiscordApp].
|
||||||
You will need to create a new app [here](http://soundcloud.com/you/apps). **Please note you must be logged into SoundCloud**
|
- Replace the **`12345678`** in this link:
|
||||||
- Simply click Register a new application and enter a name.
|
`https://discordapp.com/oauth2/authorize?client_id=`**`12345678`**`&scope=bot&permissions=66186303` with your `Client ID`.
|
||||||
- Copy the Client ID and click "save app" then paste the Client Id it into your `credentials.json`
|
- The link should now look like this:
|
||||||
- **MashapeKey** - Required for Urban Disctionary, Hashtag search, and Hearthstone cards.
|
`https://discordapp.com/oauth2/authorize?client_id=`**`YOUR_CLIENT_ID_HERE`**`&scope=bot&permissions=66186303`
|
||||||
You need to create an account on their [api marketplace](https://market.mashape.com/), after that go to `market.mashape.com/YOURNAMEHERE/applications/default-application` and press **Get the keys** in the top right corner.
|
- Go to the newly created link and pick the server we created, and click `Authorize`.
|
||||||
|
- The bot should have been added to your server.
|
||||||
|
|
||||||
|
|
||||||
|
#### Setting up credentials.json file
|
||||||
|
**For Windows** you can find `credentials.json` file in `NadekoBot\system` folder.
|
||||||
|
e.g. `C:\Program Files\NadekoBot\system`
|
||||||
|
**For Linux** you can find `credentials.json` in `NadekoBot/src/NadekoBot` folder.
|
||||||
|
e.g. `/root/NadekoBot/src/NadekoBot`
|
||||||
|
|
||||||
|
![img3](http://i.imgur.com/QwKMnTG.gif)
|
||||||
|
|
||||||
|
##### Getting Bot's Token:
|
||||||
|
- In your [Discord applications page][DiscordApp], under the **`APP BOT USER`** section, you will see `Token:click to reveal`, click to reveal the token.
|
||||||
|
*Note: Make sure that you actually use a Token and not a Client Secret!* It is in the **App Bot User** section.
|
||||||
|
- Copy your bot's token, and on the **`"Token"`** line of your `credentials.json`, paste your bot token **between** the quotation marks.
|
||||||
|
```
|
||||||
|
It should look like:
|
||||||
|
```
|
||||||
|
```json
|
||||||
|
"Token": "MTc5MzcyXXX2MDI1ODY3MjY0.ChKs4g.I8J_R9XX0t-QY-0PzXXXiN0-7vo",
|
||||||
|
```
|
||||||
|
##### Getting Client and Bot ID:
|
||||||
|
- Copy the `Client ID` on the page and replace the `12312123` part of the **`"ClientId"`** line with it.
|
||||||
|
- **Important: Bot ID and Client ID** will be the same in **newer bot accounts** due to recent changes by Discord.
|
||||||
|
- If that's the case, **copy the same client ID** to **`"BotId"`**
|
||||||
|
```
|
||||||
|
It should look like:
|
||||||
|
```
|
||||||
|
```json
|
||||||
|
"ClientId": 179372110000358912,
|
||||||
|
"BotId": 179372110000358912,
|
||||||
|
```
|
||||||
|
-----
|
||||||
|
##### Getting Owner ID*(s)*:
|
||||||
|
|
||||||
|
- Go to your Discord server and attempt to mention yourself, but put a backslash at the start like shown below:
|
||||||
|
*(to make it slightly easier, add the backslash after you type the mention out)*
|
||||||
|
- So the message `\@fearnlj01#3535` will appear as `<@145521851676884992>` after you send the message.
|
||||||
|
- The message will appear as a mention if done correctly, copy the numbers from the message **`145521851676884992`** and replace the ID (By default, the ID is `105635576866156544`) on the `OwnerIds` section with your user ID shown earlier.
|
||||||
|
- Save `credentials.json`
|
||||||
|
- If done correctly, you are now the bot owner. You can add multiple owners by seperating each owner ID with a comma within the square brackets.
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
For single owner it should look like:
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
```json
|
||||||
|
"OwnerIds": [
|
||||||
|
105635576866156544
|
||||||
|
],
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
For multiple owners it should look like:
|
||||||
|
```
|
||||||
|
|
||||||
|
```json
|
||||||
|
"OwnerIds": [
|
||||||
|
105635123466156544,
|
||||||
|
105635123566156544,
|
||||||
|
105635123666156544
|
||||||
|
],
|
||||||
|
```
|
||||||
|
-----
|
||||||
|
|
||||||
|
## Setting up your API keys
|
||||||
|
|
||||||
|
This part is completely optional, **However it is necessary for music and few other features to work properly**
|
||||||
|
|
||||||
|
- **GoogleAPIKey**
|
||||||
|
- Required for Youtube Song Search, Playlist queuing, URL Shortener and lot more.
|
||||||
|
- Follow these steps on how to setup Google API keys:
|
||||||
|
- Go to [Google Console][Google Console] and log in.
|
||||||
|
- Create a new project (name does not matter).
|
||||||
|
- Once the project is created, go into **`Library`**
|
||||||
|
- Under the **`Other Popular APIs`** section, enable `URL Shortener API` and `Custom Search API`
|
||||||
|
- Under the **`YouTube APIs`** section, enable `YouTube Data API`
|
||||||
|
- Under the **`Google Maps APIs`** section, enable `Google Maps Geocoding API` and `Google Maps Time Zone API`
|
||||||
|
- On the left tab, access **`Credentials`**,
|
||||||
|
- Click `Create Credentials` button,
|
||||||
|
- Click on `API Key`
|
||||||
|
- A new window will appear with your `Google API key`
|
||||||
|
*NOTE: You don't really need to click on `RESTRICT KEY`, just click on `CLOSE` when you are done.*
|
||||||
|
- Copy the key.
|
||||||
|
|
||||||
|
- Open up **`credentials.json`** and look for **`"GoogleAPIKey"`**, paste your API key inbetween the quotation marks.
|
||||||
|
```
|
||||||
|
It should look like:
|
||||||
|
```
|
||||||
|
|
||||||
|
```json
|
||||||
|
"GoogleApiKey": "AIzaSyDSci1sdlWQOWNVj1vlXxxxxxbk0oWMEzM",
|
||||||
|
```
|
||||||
|
- **MashapeKey**
|
||||||
|
- Required for Urban Disctionary, Hashtag search, and Hearthstone cards.
|
||||||
|
- You need to create an account on their [api marketplace](https://market.mashape.com/), after that go to `market.mashape.com/YOURNAMEHERE/applications/default-application` and press **Get the keys** in the top right corner.
|
||||||
- Copy the key and paste it into `credentials.json`
|
- Copy the key and paste it into `credentials.json`
|
||||||
- **LOLAPIKey** - Required for all League of Legends commands.
|
- **LoLApiKey**
|
||||||
You can get this key [here](http://api.champion.gg/)
|
- Required for all League of Legends commands.
|
||||||
- **OsuAPIKey** - Required for Osu commands
|
- You can get this key [here.](http://api.champion.gg/)
|
||||||
You can get this key [here](https://osu.ppy.sh/p/api) **You will need to log in and like the soundcloud it may take a few tries**
|
- **OsuApiKey**
|
||||||
- **CarbonKey** -This key is for Carobnitex.net stats.
|
- Required for Osu commands
|
||||||
Most likely unnecessary **Needed only if your bot is listed on Carbonitex.net**
|
- You can get this key [here.](https://osu.ppy.sh/p/api)
|
||||||
|
- **CleverbotApiKey**
|
||||||
|
- Required if you want to use official cleverobot, instead of program-o
|
||||||
|
- you can get this key [here.](http://www.cleverbot.com/api/)
|
||||||
|
- **PatreonAccessToken**
|
||||||
|
- For Patreon creators only.
|
||||||
|
- **PatreonCampaignId**
|
||||||
|
- For Patreon creators only. Id of your campaign.
|
||||||
|
- **TotalShards**
|
||||||
|
- Required if the bot will be connected to more than 1500 servers.
|
||||||
|
- Most likely unnecessary to change until your bot is added to more than 1500 servers.
|
||||||
|
-----
|
||||||
|
|
||||||
Additional options
|
## DB files
|
||||||
====================
|
|
||||||
- **TotalShards** - Required if the bot will be connected to more than 2500 servers
|
|
||||||
Most likely unnecessary to change until your bot is added to more than 2000 servers
|
|
||||||
[//]: # (- **Db** - Allows for advanced database configuration )
|
|
||||||
[//]: # ( - Leave this with the `null` value for standard operation - change this to `examples` to [This is only a comment so doesn't need proper detail])
|
|
||||||
|
|
||||||
|
Nadeko saves all the settings and infomations in `NadekoBot.db` file here:
|
||||||
|
`NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data/NadekoBot.db` (macOS and Linux)
|
||||||
|
`NadekoBot\system\data` (Windows)
|
||||||
|
|
||||||
Config.json
|
in order to open the database file you will need [DB Browser for SQLite](http://sqlitebrowser.org/).
|
||||||
===========
|
|
||||||
`config.json` is now removed with the addition of `NadekoBot.db` so if you have Nadeko 0.9x follow the [upgrading guide](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/) to upgrade your bot.
|
|
||||||
|
|
||||||
DB files
|
*NOTE: You don't have to worry if you don't have `NadekoBot.db` file, it gets auto created once you run the bot successfully.*
|
||||||
========
|
|
||||||
Nadeko uses few db files in order to open these database files `NadekoBot\src\NadekoBot\bin\Release\netcoreapp1.0\data\NadekoBot.db` (1.0) or `data\NadekoBot.sqlite` (0.9x) you will need [DB Browser for SQLite](http://sqlitebrowser.org/).
|
|
||||||
|
|
||||||
To make changes
|
**To make changes:**
|
||||||
|
|
||||||
|
- Copy the `NadekoBot.db` to someplace safe. (Back up)
|
||||||
|
- Open `NadekoBot.db`
|
||||||
- go to **Browse Data** tab
|
- go to **Browse Data** tab
|
||||||
- click on **Table** drop-down list
|
- click on **Table** drop-down list
|
||||||
- choose the table you want to edit
|
- choose the table you want to edit
|
||||||
@ -75,8 +189,29 @@ To make changes
|
|||||||
- click on **Apply**
|
- click on **Apply**
|
||||||
- click on **Write Changes**
|
- click on **Write Changes**
|
||||||
|
|
||||||
and that will save all the changes.
|
|
||||||
|
|
||||||
![nadekodb](https://cdn.discordapp.com/attachments/251504306010849280/254067055240806400/nadekodb.gif)
|
![nadekodb](https://cdn.discordapp.com/attachments/251504306010849280/254067055240806400/nadekodb.gif)
|
||||||
|
|
||||||
[CleverBot APIs]: https://cleverbot.io/keys
|
and that will save all the changes.
|
||||||
|
|
||||||
|
## Sharding your bot
|
||||||
|
|
||||||
|
- **ShardRunCommand**
|
||||||
|
- Command with which to run shards 1+
|
||||||
|
- Required if you're sharding your bot on windows using .exe, or in a custom way.
|
||||||
|
- This internally defaults to `dotnet`
|
||||||
|
- For example, if you want to shard your NadekoBot which you installed using windows installer, you would want to set it to something like this: `C:\Program Files\NadekoBot\system\NadekoBot.exe`
|
||||||
|
- **ShardRunArguments**
|
||||||
|
- Arguments to the shard run command
|
||||||
|
- Required if you're sharding your bot on windows using .exe, or in a custom way.
|
||||||
|
- This internally defaults to `run -c Release -- {0} {1} {2}` which will be enough to run linux and other 'from source' setups
|
||||||
|
- {0} will be replaced by the `shard ID` of the shard being ran, {1} by the shard 0's process id, and {2} by the port shard communication is happening on
|
||||||
|
- If shard0 (main window) is closed, all other shards will close too
|
||||||
|
- For example, if you want to shard your NadekoBot which you installed using windows installer, you would want to set it to `{0} {1} {2}`
|
||||||
|
- **ShardRunPort**
|
||||||
|
- Bot uses a random UDP port in [5000, 6000) range for communication between shards
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[Google Console]: https://console.developers.google.com
|
||||||
|
[DiscordApp]: https://discordapp.com/developers/applications/me
|
||||||
|
[Invite Guide]: http://discord.kongslien.net/guide.html
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Permissions Overview
|
Permissions Overview
|
||||||
===================
|
===================
|
||||||
Have you ever felt confused or even overwhelmed when trying to set Nadeko's permissions? In this guide we will be explaining how to use the
|
Have you ever felt confused or even overwhelmed when trying to set Nadeko's permissions? In this guide we will be explaining how to use the
|
||||||
permission commands correctly and even cover a few common questions! Every command we discuss here can be found in the [Commands List](http://nadekobot.readthedocs.io/en/1.0/Commands%20List/#permissions).
|
permission commands correctly and even cover a few common questions! Every command we discuss here can be found in the [Commands List](http://nadekobot.readthedocs.io/en/latest/Commands%20List/#permissions).
|
||||||
|
|
||||||
**To see the old guide for versions 0.9 and below, see [here](http://nadekobot.readthedocs.io/en/latest/Permissions%20System/)**
|
**To see the guide, [click here](http://nadekobot.readthedocs.io/en/latest/Permissions%20System/)**
|
||||||
|
|
||||||
Why do we use the Permissions Commands?
|
Why do we use the Permissions Commands?
|
||||||
------------------------------
|
------------------------------
|
||||||
@ -15,13 +15,16 @@ With the permissions system it possible to restrict who can skip the current son
|
|||||||
|
|
||||||
First Time Setup
|
First Time Setup
|
||||||
------------------
|
------------------
|
||||||
To change permissions you **must** meet the following requirement:
|
To change permissions you **must** meet the following requirements:
|
||||||
|
|
||||||
**Have the role specified by `;permrole` (By default, this is Nadeko)**
|
**Be the owner of the server**
|
||||||
|
|
||||||
|
**If you are NOT the server owner, get the role specified by `.permrole` (By default, this is Nadeko)**
|
||||||
|
|
||||||
If you have an existing role called `Nadeko` but can't assign it to yourself, create a new role called `Nadeko` and assign that to yourself.
|
If you have an existing role called `Nadeko` but can't assign it to yourself, create a new role called `Nadeko` and assign that to yourself.
|
||||||
|
![img0](https://i.imgur.com/5QKZqqy.gif)
|
||||||
|
|
||||||
If you would like to set a different role, such as `Admins`, to be the role required to edit permissions, do `;permrole Admins` (you must have the current permission role to be able to do this).
|
If you would like to set a different role, such as `Admins`, to be the role required to edit permissions, do `.permrole Admins` (you must have the current permission role to be able to do this).
|
||||||
|
|
||||||
Basics & Hierarchy
|
Basics & Hierarchy
|
||||||
-----
|
-----
|
||||||
@ -30,14 +33,14 @@ The [Commands List](http://nadekobot.readthedocs.io/en/1.0/Commands%20List/#perm
|
|||||||
Firstly, let's explain how the permissions system works - It's simple once you figure out how each command works!
|
Firstly, let's explain how the permissions system works - It's simple once you figure out how each command works!
|
||||||
The permissions system works as a chain, everytime a command is used, the permissions chain is checked. Starting from the top of the chain, the command is compared to a rule, if it isn't either allowed or disallowed by that rule it proceeds to check the next rule all the way till it reaches the bottom rule, which allows all commands.
|
The permissions system works as a chain, everytime a command is used, the permissions chain is checked. Starting from the top of the chain, the command is compared to a rule, if it isn't either allowed or disallowed by that rule it proceeds to check the next rule all the way till it reaches the bottom rule, which allows all commands.
|
||||||
|
|
||||||
To view this permissions chain, do `;listperms`, with the top of the chain being rule number 1, shown at the top of the message.
|
To view this permissions chain, do `.listperms`, with the top of the chain being rule number 1, shown at the top of the message.
|
||||||
|
|
||||||
If you want to remove a permission from the chain of permissions, do `;removeperm X` to remove rule number X and similarly, do `;moveperm X Y` to move rule number X to number Y (moving, not swapping!).
|
If you want to remove a permission from the chain of permissions, do `.removeperm X` to remove rule number X and similarly, do `.moveperm X Y` to move rule number X to number Y (moving, not swapping!).
|
||||||
|
|
||||||
As an example, if you wanted to enable NSFW for a certain role, say "Lewd", you could do `;rolemdl NSFW enable Lewd`.
|
As an example, if you wanted to enable NSFW for a certain role, say "Lewd", you could do `.rolemdl NSFW enable Lewd`.
|
||||||
This adds the rule to the top of the permissions chain so even if the default `;sm NSFW disabled` rule exists, the "Lewd" role will be able to use the NSFW module.
|
This adds the rule to the top of the permissions chain so even if the default `.sm NSFW disable` rule exists, the "Lewd" role will be able to use the NSFW module.
|
||||||
|
|
||||||
If you want the bot to notify users why they can't use a command or module, use `;verbose true` and Nadeko will tell you what rule is preventing the command.
|
If you want the bot to notify users why they can't use a command or module, use `.verbose true` and Nadeko will tell you what rule is preventing the command.
|
||||||
|
|
||||||
Commonly Asked Questions
|
Commonly Asked Questions
|
||||||
---------------
|
---------------
|
||||||
@ -45,19 +48,19 @@ Commonly Asked Questions
|
|||||||
###How do I create a music DJ?
|
###How do I create a music DJ?
|
||||||
To allow users to only see the current song and have a DJ role for queuing follow these steps:
|
To allow users to only see the current song and have a DJ role for queuing follow these steps:
|
||||||
|
|
||||||
1. `;sm Music disable`
|
1. `.sm Music disable`
|
||||||
|
|
||||||
* Disables music commands for everybody
|
* Disables music commands for everybody
|
||||||
|
|
||||||
2. `;sc !!nowplaying enable`
|
2. `.sc .nowplaying enable`
|
||||||
|
|
||||||
* Enables the "nowplaying" command for everyone
|
* Enables the "nowplaying" command for everyone
|
||||||
|
|
||||||
3. `;sc !!listqueue enable`
|
3. `.sc .listqueue enable`
|
||||||
|
|
||||||
* Enables the "listqueue" command for everyone
|
* Enables the "listqueue" command for everyone
|
||||||
|
|
||||||
4. `;rm Music enable DJ`
|
4. `.rm Music enable DJ`
|
||||||
|
|
||||||
* Enables all music commands only for the DJ role
|
* Enables all music commands only for the DJ role
|
||||||
|
|
||||||
@ -65,10 +68,10 @@ To allow users to only see the current song and have a DJ role for queuing follo
|
|||||||
###How do I create a NSFW channel?
|
###How do I create a NSFW channel?
|
||||||
Say you want to only enable NSFW commands in the #NSFW channel, just do the following two steps.
|
Say you want to only enable NSFW commands in the #NSFW channel, just do the following two steps.
|
||||||
|
|
||||||
1. `;sm NSFW disable`
|
1. `.sm NSFW disable`
|
||||||
* Disables the NSFW module from being used
|
* Disables the NSFW module from being used
|
||||||
|
|
||||||
2. `;cm NSFW enable #NSFW`
|
2. `.cm NSFW enable #NSFW`
|
||||||
* Enables the NSFW module for use in the #NSFW channel
|
* Enables the NSFW module for use in the #NSFW channel
|
||||||
|
|
||||||
###I've broken permissions and am stuck, can I reset permissions?
|
###I've broken permissions and am stuck, can I reset permissions?
|
||||||
|
25
docs/Placeholders.md
Normal file
25
docs/Placeholders.md
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
Placeholders are used in Quotes, Custom Reactions, Greet/bye messages, playing statuses, and a few other places.
|
||||||
|
|
||||||
|
They can be used to make the message more user friendly, generate random numbers or pictures, etc...
|
||||||
|
|
||||||
|
Some features have their own specific placeholders which are noted in that feature's command help. Some placeholders are not available in certain features because they don't make sense there.
|
||||||
|
|
||||||
|
### Here is a list of the usual placeholders:
|
||||||
|
- `%mention%` - Mention the bot
|
||||||
|
- `%shardid%` - Shard id
|
||||||
|
- `%server%` - Server name
|
||||||
|
- `%sid%` - Server Id
|
||||||
|
- `%channel%` - Channel mention
|
||||||
|
- `%chname%` - Channel mention
|
||||||
|
- `%cid%` - Channel Id
|
||||||
|
- `%user%` - User mention
|
||||||
|
- `%id%` or `%uid%` - User Id
|
||||||
|
- `%userfull%` - Username#discriminator
|
||||||
|
- `%userdiscrim%` - discriminator (for example 1234)
|
||||||
|
- `%rngX-Y%` - Replace X and Y with the range (for example `%rng5-10%` - random between 5 and 10)
|
||||||
|
- `%time%` - Bot time
|
||||||
|
- `%server_time%` - Time on this server, set with `.timezone` command
|
||||||
|
|
||||||
|
**If you're using placeholders in embeds, don't use %user% and in titles, footers and field names. They will not show properly.**
|
||||||
|
|
||||||
|
![img](http://i.imgur.com/lNNNfs1.png)
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
###Music on the public Nadeko
|
###Music on the public Nadeko
|
||||||
|
|
||||||
- In case you got Nadeko in your server by the invitation from **Carbonitex**, our **GitHub** invite or **help (-h)**, music is disabled.
|
- In case you got Nadeko in your server by the invitation from **Carbonitex**, our **GitHub** invite or **help (.h)**, music is disabled.
|
||||||
- Music is **disabled** due to large maintenance expenses, unless Kwoth is **testing** music module.
|
- Music is **disabled** due to large maintenance expenses, unless Kwoth is **testing** music module.
|
||||||
- If you want to have music module on your server, you will have to **host** the bot on your PC, or any of the external servers.
|
- If you want to have music module on your server, you will have to **host** the bot on your PC, or any of the external servers.
|
||||||
- How to **host** the bot, check the **guides** on the left side.
|
- How to **host** the bot, check the **guides** on the left side.
|
||||||
@ -17,12 +17,12 @@
|
|||||||
###NadekoFlowers
|
###NadekoFlowers
|
||||||
|
|
||||||
- NadekoFlowers is the **currency** of the public Nadeko.
|
- NadekoFlowers is the **currency** of the public Nadeko.
|
||||||
- NadekoFlowers can be `>pick`ed after Nadeko plants a flower randomly after `>gc` has been used on a channel
|
- NadekoFlowers can be `.pick`ed after Nadeko plants a flower randomly after `.gc` has been enabled on a channel
|
||||||
- You can give NadekoFlowers to other users, using the command `$give X @person`.
|
- You can give NadekoFlowers to other users, using the command `.give X @person`.
|
||||||
- You can only give flowers you **own**.
|
- You can only give flowers you **own**.
|
||||||
- If you want to have **unlimited** number of flowers, you will have to **host** the bot.
|
- If you want to have **unlimited** number of flowers, you will have to **host** the bot.
|
||||||
- Commands `$award X @person` and `$take X @person` can only be used by the *bot owner*.
|
- Commands `.award X @person` and `.take X @person` can only be used by the *bot owner*.
|
||||||
- If you `>plant` the flower, flower will be avaliable for everyone to `>pick` it. In that case you will **lose** the flower.
|
- If you `.plant` the flower, flower will be avaliable for everyone to `.pick` it. In that case you will **lose** the flower.
|
||||||
|
|
||||||
###Manage Permissions
|
###Manage Permissions
|
||||||
|
|
||||||
|
@ -1,28 +1,7 @@
|
|||||||
## Terms of Use
|
Copyright 2017 Kwoth
|
||||||
|
|
||||||
**The Unlicense License**
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
This is free and unencumbered software released into the public domain.
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
distribute this software, either in source code form or as a compiled
|
|
||||||
binary, for any purpose, commercial or non-commercial, and by any
|
|
||||||
means.
|
|
||||||
|
|
||||||
In jurisdictions that recognize copyright laws, the author or authors
|
|
||||||
of this software dedicate any and all copyright interest in the
|
|
||||||
software to the public domain. We make this dedication for the benefit
|
|
||||||
of the public at large and to the detriment of our heirs and
|
|
||||||
successors. We intend this dedication to be an overt act of
|
|
||||||
relinquishment in perpetuity of all present and future rights to this
|
|
||||||
software under copyright law.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
For more information, please refer to <http://unlicense.org/>
|
|
@ -8,11 +8,11 @@ Follow the respective guide for your operating system found here [Docker Engine
|
|||||||
For this guide we will be using the folder /nadeko as our config root folder.
|
For this guide we will be using the folder /nadeko as our config root folder.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker create --name=nadeko -v /nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data -v /nadeko/credentials.json:/opt/NadekoBot/src/NadekoBot/credentials.json uirel/nadeko
|
docker create --name=nadeko -v /nadeko/conf/:/root/nadeko -v /nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data uirel/nadeko:1.4
|
||||||
```
|
```
|
||||||
-If you are coming from a previous version of nadeko (the old docker) make sure your crednetials.json has been copied into this directory and is the only thing in this folder.
|
-If you are coming from a previous version of nadeko (the old docker) make sure your credentials.json has been copied into this directory and is the only thing in this folder.
|
||||||
|
|
||||||
-If you are making a fresh install, create your credentials.json from the following guide and palce it in the /nadeko folder [Nadeko JSON Guide](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/)
|
-If you are making a fresh install, create your credentials.json from the following guide and place it in the /nadeko folder [Nadeko JSON Guide](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/)
|
||||||
|
|
||||||
Next start the docker up with
|
Next start the docker up with
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ Next start the docker up with
|
|||||||
The docker will start and the log file will start scrolling past. Depending on hardware the bot start can take up to 5 minutes on a small DigitalOcean droplet.
|
The docker will start and the log file will start scrolling past. Depending on hardware the bot start can take up to 5 minutes on a small DigitalOcean droplet.
|
||||||
Once the log ends with "NadekoBot | Starting NadekoBot v1.0-rc2" the bot is ready and can be invited to your server. Ctrl+C at this point to stop viewing the logs.
|
Once the log ends with "NadekoBot | Starting NadekoBot v1.0-rc2" the bot is ready and can be invited to your server. Ctrl+C at this point to stop viewing the logs.
|
||||||
|
|
||||||
After a few moments you should be able to invite Nadeko to your server. If you cannot check the log file for errors
|
After a few moments you should be able to invite Nadeko to your server. If you cannot check the log file for errors.
|
||||||
|
|
||||||
## Monitoring
|
## Monitoring
|
||||||
|
|
||||||
@ -37,7 +37,9 @@ The following commands are required for the default options
|
|||||||
|
|
||||||
`docker stop nadeko; docker rm nadeko`
|
`docker stop nadeko; docker rm nadeko`
|
||||||
|
|
||||||
`docker create --name=nadeko -v /nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data -v /nadeko/credentials.json:/opt/NadekoBot/src/NadekoBot/credentials.json uirel/nadeko`
|
```
|
||||||
|
docker create --name=nadeko -v /nadeko/conf/:/root/nadeko -v /nadeko/data:/opt/NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data uirel/nadeko:1.4
|
||||||
|
```
|
||||||
|
|
||||||
`docker start nadeko`
|
`docker start nadeko`
|
||||||
|
|
||||||
|
22
docs/guides/From Source.md
Normal file
22
docs/guides/From Source.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
Prerequisites
|
||||||
|
- [.net core 1.1.X][.netcore]
|
||||||
|
- [ffmpeg][ffmpeg] (and added to path) either download or install using your distro's package manager
|
||||||
|
- [git][git]
|
||||||
|
|
||||||
|
*Clone the repo*
|
||||||
|
`git clone -b 1.4 https://github.com/Kwoth/NadekoBot`
|
||||||
|
`cd NadekoBot/src/NadekoBot`
|
||||||
|
Edit `credentials.json.` Read the [JSON Explanations](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/) guide if you don't know how to set it up.
|
||||||
|
|
||||||
|
*run*
|
||||||
|
`dotnet restore`
|
||||||
|
`dotnet run -c Release`
|
||||||
|
|
||||||
|
*when you decide to update in the future (might not work if you've made custom edits to the source, make sure you know how git works)*
|
||||||
|
`git pull`
|
||||||
|
`dotnet restore`
|
||||||
|
`dotnet run -c Release`
|
||||||
|
|
||||||
|
[.netcore]: https://www.microsoft.com/net/download/core#/sdk
|
||||||
|
[ffmpeg]: http://ffmpeg.zeranoe.com/builds/
|
||||||
|
[git]: https://git-scm.com/downloads
|
@ -1,9 +1,9 @@
|
|||||||
## Setting up NadekoBot on Linux
|
## Setting up NadekoBot on Linux
|
||||||
|
|
||||||
#### Setting up NadekoBot on Linux Digital Ocean Droplet
|
**Setting up NadekoBot on Linux Digital Ocean Droplet**
|
||||||
If you want Nadeko to play music for you 24/7 without having to hosting it on your PC and want to keep it cheap, reliable and convenient as possible, you can try Nadeko on Linux Digital Ocean Droplet using the link [DigitalOcean](http://m.do.co/c/46b4d3d44795/) (and using this link will be supporting Nadeko and will give you **$10 credit**)
|
If you want Nadeko to play music for you 24/7 without having to hosting it on your PC and want to keep it cheap, reliable and convenient as possible, you can try Nadeko on Linux Digital Ocean Droplet using the link [DigitalOcean](http://m.do.co/c/46b4d3d44795/) (and using this link will be supporting Nadeko and will give you **$10 credit**)
|
||||||
|
|
||||||
#### Setting up NadekoBot
|
**Setting up NadekoBot**
|
||||||
Assuming you have followed the link above to setup an account and Droplet with 64bit OS in Digital Ocean and got the `IP address and root password (in email)` to login, its time to get started.
|
Assuming you have followed the link above to setup an account and Droplet with 64bit OS in Digital Ocean and got the `IP address and root password (in email)` to login, its time to get started.
|
||||||
|
|
||||||
**Go through this whole guide before setting up Nadeko**
|
**Go through this whole guide before setting up Nadeko**
|
||||||
@ -11,92 +11,76 @@ Assuming you have followed the link above to setup an account and Droplet with 6
|
|||||||
#### Prerequisites
|
#### Prerequisites
|
||||||
- Download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
|
- Download [PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
|
||||||
- Download [WinSCP](https://winscp.net/eng/download.php) *(optional)*
|
- Download [WinSCP](https://winscp.net/eng/download.php) *(optional)*
|
||||||
|
- Create and Invite the bot.
|
||||||
|
- Read here how to [create a Discord Bot application and invite it.](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#creating-discord-bot-application)
|
||||||
|
|
||||||
#### Starting up
|
#### Starting up
|
||||||
|
|
||||||
- **Open PuTTY.exe** that you downloaded before, and paste or enter your `IP address` and then click **Open**.
|
- **Open PuTTY.exe** that you downloaded before, and paste or enter your `IP address` and then click **Open**.
|
||||||
If you entered your Droplets IP address correctly, it should show **login as:** in a newly opened window.
|
If you entered your Droplets IP address correctly, it should show **login as:** in a newly opened window.
|
||||||
- Now for **login as:**, type `root` and hit enter.
|
- Now for **login as:**, type `root` and press enter.
|
||||||
- It should then, ask for password, type the `root password` you have received in your **email address registered with Digital Ocean**, then hit Enter.
|
- It should then, ask for password, type the `root password` you have received in your **email address registered with Digital Ocean**, then press Enter.
|
||||||
|
|
||||||
*as you are running it for the first time, it will most likely to ask you to change your root password, for that, type the "password you received through email", hit Enter, enter a "new password", hit Enter and confirm that "new password" again.*
|
If you are running your VPS/ droplet for the first time, it will most likely ask you to change your VPS root password, to do that, type the **password you received through email** it won't show any changes on the screen like `******` when password is being typed, press Enter once done.
|
||||||
**SAVE that new password somewhere safe, not just in your mind**. After you've done that, you are ready to write commands.
|
Type a **new password**, press Enter and type the **new password** again and you're done.
|
||||||
|
**Write down and save the new password somewhere safe.**
|
||||||
|
After you've done that, you are ready to use your VPS.
|
||||||
|
|
||||||
**NOTE:** Copy the commands, and just paste them using **mouse single right-click.**
|
|
||||||
|
|
||||||
#### Creating and Inviting bot
|
|
||||||
|
|
||||||
- Read here how to [create a DiscordBot application](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#creating-discordbot-application)
|
|
||||||
- [Visual Invite Guide](http://discord.kongslien.net/guide.html) **(Note: Client ID is your Bot ID)**
|
|
||||||
- Copy your `Client ID` from your [applications page](https://discordapp.com/developers/applications/me).
|
|
||||||
- Replace the **12345678** in this link:
|
|
||||||
`https://discordapp.com/oauth2/authorize?client_id=`12345678`&scope=bot&permissions=66186303`
|
|
||||||
with your `Client ID`
|
|
||||||
- The link should now look like this:
|
|
||||||
`https://discordapp.com/oauth2/authorize?client_id=`**YOUR_CLENT_ID_HERE**`&scope=bot&permissions=66186303`
|
|
||||||
- Go to the newly created link and pick the server we created, and click `Authorize`
|
|
||||||
- The bot should have been added to your server.
|
|
||||||
|
|
||||||
#### Getting NadekoBot
|
#### Getting NadekoBot
|
||||||
##### Part I - Downloading the installer
|
##### Part I - Downloading the installer
|
||||||
Use the following command to get and run `linuxAIO.sh`
|
Use the following command to get and run `linuxAIO.sh`
|
||||||
(Remember **Do Not** rename the file **linuxAIO.sh**)
|
(Remember **Do Not** rename the file **linuxAIO.sh**)
|
||||||
|
|
||||||
`cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/master/linuxAIO.sh && bash linuxAIO.sh`
|
`cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.4/linuxAIO.sh && bash linuxAIO.sh`
|
||||||
|
|
||||||
You should see these following options after using the above command:
|
You should see these following options after using the above command:
|
||||||
|
|
||||||
```
|
```
|
||||||
1. Download Dev Build (Latest)
|
1. Download NadekoBot
|
||||||
2. Download Stable Build
|
2. Run Nadeko (Normally)
|
||||||
3. Run Nadeko (Normally)
|
3. Run Nadeko with Auto Restart (Run Nadeko normally before using this.)
|
||||||
4. Run Nadeko with Auto Restart (Run Nadeko normally before using this.)
|
4. Auto-Install Prerequisites (for Ubuntu, Debian and CentOS)
|
||||||
5. Auto-Install Prerequisites (for Ubuntu, Debian and CentOS)
|
5. Set up credentials.json (if you have downloaded the bot already)
|
||||||
6. Set up credentials.json (if you have downloaded the bot already)
|
6. To exit
|
||||||
7. To exit
|
|
||||||
```
|
```
|
||||||
##### Part II - Downloading Nadekobot prerequisites
|
##### Part II - Downloading Nadekobot prerequisites
|
||||||
|
|
||||||
**If** you are running NadekoBot for the first time on your system and never had any *prerequisites* installed and have Ubuntu, Debian or CentOS, Press `5` and `enter` key, then `y` when you see the following:
|
**If** you are running NadekoBot for the first time on your system and never had any *prerequisites* installed and have Ubuntu, Debian or CentOS, Press `4` and `enter` key, then `y` when you see the following:
|
||||||
```
|
```
|
||||||
Welcome to NadekoBot Auto Prerequisites Installer.
|
Welcome to NadekoBot Auto Prerequisites Installer.
|
||||||
Would you like to continue?
|
Would you like to continue?
|
||||||
```
|
```
|
||||||
That will install all the prerequisites your system need to run NadekoBot.
|
That will install all the prerequisites your system need to run NadekoBot.
|
||||||
|
(Optional) **If** you want to install it manually, you can try finding it [here.](https://github.com/Kwoth/NadekoBot-BashScript/blob/1.4/nadekoautoinstaller.sh)
|
||||||
(Optional) **If** you want to install it manually, you can try finding it [here](https://github.com/Kwoth/NadekoBot-BashScript/blob/master/nadekoautoinstaller.sh)
|
|
||||||
|
|
||||||
Once *prerequisites* finish installing,
|
Once *prerequisites* finish installing,
|
||||||
|
|
||||||
##### Part III - Installing Nadeko
|
##### Part III - Installing Nadeko
|
||||||
Choose either
|
Choose `1` to get the **most updated build of NadekoBot**
|
||||||
`1` to get the **most updated build of NadekoBot**
|
|
||||||
or
|
|
||||||
`2` to get the **previously stable build of NadekoBot**
|
|
||||||
and then press `enter` key.
|
and then press `enter` key.
|
||||||
|
|
||||||
Once Installation is completed you should see the options again.
|
When installation is complete, you will see the options again.
|
||||||
|
|
||||||
Next, check out:
|
Next, check out:
|
||||||
##### Part IV - Setting up credentials
|
##### Part IV - Setting up credentials
|
||||||
|
|
||||||
- [1. Setting up credentials.json](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#setting-up-credentialsjson)
|
- [1. Set up credentials.json](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file)
|
||||||
- [2. To Get the Google API](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music)
|
- [2. Get the Google API](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
|
||||||
- [3. JSON Explanations for other APIs](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/)
|
|
||||||
|
|
||||||
You will need the following for the next step:
|
You will need the following for the next step:
|
||||||
![botimg](https://cdn.discordapp.com/attachments/251504306010849280/276455844223123457/Capture.PNG)
|
![botimg](https://cdn.discordapp.com/attachments/251504306010849280/276455844223123457/Capture.PNG)
|
||||||
|
|
||||||
- **Bot's Client ID** and **Bot's ID** (both are same) [(*required)](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file)
|
- **Bot's Client ID** and **Bot's ID** (both are same) [(*required)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file)
|
||||||
- **Bot's Token** (not client secret) [(*required)](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file)
|
- **Bot's Token** (not client secret) [(*required)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file)
|
||||||
- Your **Discord userID** [(*required)](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file)
|
- Your **Discord userID** [(*required)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file)
|
||||||
- **Google Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music)
|
- **Google Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
|
||||||
- **LoL Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/)
|
- **LoL Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
|
||||||
- **Mashape Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/)
|
- **Mashape Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
|
||||||
- **Osu Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/)
|
- **Osu Api Key** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
|
||||||
- **Sound Cloud Client Id** [(optional)](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/)
|
|
||||||
|
|
||||||
Once you have acquired them, press `6` to **Set up credentials.json**
|
Once you have acquired them, press `5` to **Set up credentials.json**
|
||||||
|
|
||||||
You will be asked to enter the required informations, just follow the on-screen instructions and enter the required information.
|
You will be asked to enter the required informations, just follow the on-screen instructions and enter the required information.
|
||||||
*i.e* If you are asked **Bot's Token**, then just copy and paste or type the **Bot's Token** and press `enter` key.
|
*i.e* If you are asked **Bot's Token**, then just copy and paste or type the **Bot's Token** and press `enter` key.
|
||||||
@ -105,10 +89,10 @@ You will be asked to enter the required informations, just follow the on-screen
|
|||||||
Once done,
|
Once done,
|
||||||
##### Part V - Checking if Nadeko is working
|
##### Part V - Checking if Nadeko is working
|
||||||
You should see the options again.
|
You should see the options again.
|
||||||
Next, press `3` to **Run Nadeko (Normally)**.
|
Next, press `2` to **Run Nadeko (Normally)**.
|
||||||
Check in your discord server if your new bot is working properly.
|
Check in your discord server if your new bot is working properly.
|
||||||
##### Part VI - Running Nadeko on tmux
|
##### Part VI - Running Nadeko on tmux
|
||||||
If your bot is working properly in your server, type `.die` to **shut down the bot**, then press `7` to **exit**.
|
If your bot is working properly in your server, type `.die` to **shut down the bot**, then press `6` on the console to **exit**.
|
||||||
Next, [Run your bot again with **tmux**.](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#running-nadekobot)
|
Next, [Run your bot again with **tmux**.](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#running-nadekobot)
|
||||||
|
|
||||||
[Check this when you need to **restart** your **NadekoBot** anytime later along with tmux session.](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#restarting-nadeko)
|
[Check this when you need to **restart** your **NadekoBot** anytime later along with tmux session.](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#restarting-nadeko)
|
||||||
@ -123,43 +107,42 @@ The above command will create a new session named **nadeko** *(you can replace
|
|||||||
|
|
||||||
**Next, we need to run `linuxAIO.sh` in order to get the latest running scripts with patches:**
|
**Next, we need to run `linuxAIO.sh` in order to get the latest running scripts with patches:**
|
||||||
|
|
||||||
- `cd ~ && bash linuxAIO.sh`
|
- `cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.4/linuxAIO.sh && bash linuxAIO.sh`
|
||||||
|
|
||||||
**From the options,**
|
**From the options,**
|
||||||
|
|
||||||
Choose `3` to **Run NadekoBot normally.**
|
Choose `2` to **Run NadekoBot normally.**
|
||||||
**NOTE:** With option `3` (Running Normally), if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/Commands%20List/#administration) in discord. The bot will shut down and will stay offline until you manually run it again. (best if you want to check the bot.)
|
**NOTE:** With option `2` (Running normally), if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/Commands%20List/#administration) in discord. The bot will shut down and will stay offline until you manually run it again. (best if you want to check the bot.)
|
||||||
|
|
||||||
Choose `4` to **Run NadekoBot with Auto Restart.**
|
Choose `3` to **Run NadekoBot with Auto Restart.**
|
||||||
It will show you more options:
|
**NOTE:** With option `3` (Running with Auto Restart), bot will auto run if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/Commands%20List/#administration) making the command `.die` to function as restart.
|
||||||
|
|
||||||
|
It will show you the following options:
|
||||||
```
|
```
|
||||||
1. Run Auto Restart normally without Updating.
|
1. Run Auto Restart normally without Updating.
|
||||||
2. Auto Restart and Update with Dev Build (latest)
|
2. Run Auto Restart and update NadekoBot.
|
||||||
3. Auto Restart and Update with Stable Build
|
3. Exit
|
||||||
4. Exit
|
|
||||||
```
|
```
|
||||||
**NOTE:** With option `4` (Running with Auto Restart), bot will auto run if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/Commands%20List/#administration) making the command `.die` to function as restart.
|
|
||||||
|
|
||||||
See how that happens:
|
- With option `1. Run Auto Restart normally without Updating.` Bot will restart on `die` command and will not be downloading the latest build available.
|
||||||
|
- With option `2. Run Auto Restart and update NadekoBot.` Bot will restart and download the latest build of bot available everytime `die` command is used.
|
||||||
![img9](https://cdn.discordapp.com/attachments/251504306010849280/251506312893038592/die_explaination.gif)
|
|
||||||
|
|
||||||
**Remember** that, while running with Auto Restart, you will need to [close the tmux session](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#restarting-nadeko) to stop the bot completely.
|
**Remember** that, while running with Auto Restart, you will need to [close the tmux session](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#restarting-nadeko) to stop the bot completely.
|
||||||
|
|
||||||
**Now check your Discord, the bot should be online**
|
**Now check your Discord, the bot should be online**
|
||||||
|
|
||||||
Next to **move the bot to background** and to do that, press **CTRL+B, release, D** (that will detach the nadeko session using TMUX) and you can finally close **PuTTY** if you want.
|
Next to **move the bot to background** and to do that, press **CTRL+B, release, D** (that will detach the nadeko session using TMUX) and you can finally close **PuTTY**.
|
||||||
|
|
||||||
#### Restarting Nadeko
|
#### Restarting Nadeko
|
||||||
|
|
||||||
**Restarting NadekoBot:**
|
**Restarting NadekoBot:**
|
||||||
|
|
||||||
**If** you have chosen option `4` to **Run Nadeko with Auto Restart** from Nadeko's `linuxAIO.sh` *[(you got it from this step)](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#getting-nadekobot)*
|
**If** you have chosen option `2` to **Run Nadeko with Auto Restart** from Nadeko's `linuxAIO.sh` *[(you got it from this step)](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#getting-nadekobot)*
|
||||||
You can simply type `.die` in the server you have your NadekoBot to make her restart.
|
You can simply type `.die` in the server you have your NadekoBot to make her restart.
|
||||||
|
|
||||||
**Restarting Nadeko with the Server:**
|
**Restarting Nadeko with the Server:**
|
||||||
|
|
||||||
Open **PuTTY** and login as you have before, type `reboot` and hit Enter.
|
Open **PuTTY** and login as you have before, type `reboot` and press Enter.
|
||||||
|
|
||||||
**Restarting Manually:**
|
**Restarting Manually:**
|
||||||
|
|
||||||
@ -173,43 +156,24 @@ Open **PuTTY** and login as you have before, type `reboot` and hit Enter.
|
|||||||
- `tmux kill-session -t nadeko` (don't forget to replace **nadeko** in the command with the name of your bot's session)
|
- `tmux kill-session -t nadeko` (don't forget to replace **nadeko** in the command with the name of your bot's session)
|
||||||
- Make sure the bot is **not** running.
|
- Make sure the bot is **not** running.
|
||||||
- `tmux new -s nadeko` (**nadeko** is the name of the session)
|
- `tmux new -s nadeko` (**nadeko** is the name of the session)
|
||||||
- `cd ~ && bash linuxAIO.sh`
|
- `cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.4/linuxAIO.sh && bash linuxAIO.sh`
|
||||||
- Choose either `1` or `2` to update the bot with **latest build** or **stable build** respectively.
|
- Choose `1` to update the bot with **latest build** available.
|
||||||
- Choose either `3` or `4` to run the bot again with **normally** or **auto restart** respectively.
|
- Next, choose either `2` or `3` to run the bot again with **normally** or **auto restart** respectively.
|
||||||
- Done. You can close **PuTTY** now.
|
- Done.
|
||||||
|
|
||||||
#### Setting up Music
|
#### Additional Information
|
||||||
|
|
||||||
To set up Nadeko for music and Google API Keys, follow [Setting up NadekoBot for Music](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music)
|
##### Setting up Music
|
||||||
|
|
||||||
Once done, go back to **PuTTY**
|
To set up Nadeko for music and Google API Keys, follow [Setting up your API keys.][setup music]
|
||||||
|
|
||||||
#### Some more Info
|
##### tmux
|
||||||
|
|
||||||
##### Info about tmux
|
|
||||||
|
|
||||||
- If you want to **see the sessions** after logging back again, type `tmux ls`, and that will give you the list of sessions running.
|
- If you want to **see the sessions** after logging back again, type `tmux ls`, and that will give you the list of sessions running.
|
||||||
- If you want to **switch to/ see that session**, type `tmux a -t nadeko` (**nadeko** is the name of the session we created before so, replace **“nadeko”** with the session name you created.)
|
- If you want to **switch to/ see that session**, type `tmux a -t nadeko` (**nadeko** is the name of the session we created before so, replace **“nadeko”** with the session name you created.)
|
||||||
- If you want to **kill** NadekoBot **session**, type `tmux kill-session -t nadeko`
|
- If you want to **kill** NadekoBot **session**, type `tmux kill-session -t nadeko`
|
||||||
|
|
||||||
#### Guide for Advance Users (Optional)
|
##### Setting up SFTP
|
||||||
|
|
||||||
**Skip this step if you are a Regular User or New to Linux.**
|
|
||||||
|
|
||||||
[![img7][img7]](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#getting-nadekobot)
|
|
||||||
|
|
||||||
- Right after [Getting NadekoBot](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#getting-nadekobot)
|
|
||||||
- `cd NadekoBot/src/NadekoBot/` (go to this folder)
|
|
||||||
- `pico credentials.json` (open credentials.json to edit)
|
|
||||||
- Insert your bot **Client ID, Bot ID** (should be same as your Client ID) **and Token** if you got it following [Creating and Inviting bot](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#creating-and-inviting-bot).
|
|
||||||
- Insert your own ID in Owners ID follow: [Setting up credentials.json](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file)
|
|
||||||
- And Google API from [Setting up NadekoBot for Music](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music)
|
|
||||||
- Once done, press `CTRL+X`
|
|
||||||
- It will ask for "Save Modified Buffer?", press `Y` for yes
|
|
||||||
- It will then ask "File Name to Write" (rename), just hit `Enter` and Done.
|
|
||||||
- You can now move to [Running NadekoBot](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#running-nadekobot)
|
|
||||||
|
|
||||||
#### Setting up SFTP
|
|
||||||
|
|
||||||
- Open **WinSCP**
|
- Open **WinSCP**
|
||||||
- Click on **New Site** (top-left corner).
|
- Click on **New Site** (top-left corner).
|
||||||
@ -222,13 +186,16 @@ Once done, go back to **PuTTY**
|
|||||||
- It should show you the NadekoBot folder which was created by git earlier on the right-hand side window.
|
- It should show you the NadekoBot folder which was created by git earlier on the right-hand side window.
|
||||||
- Open that folder, then open the `src` folder, followed by another `NadekoBot` folder and you should see `credentials.json` there.
|
- Open that folder, then open the `src` folder, followed by another `NadekoBot` folder and you should see `credentials.json` there.
|
||||||
|
|
||||||
#### Setting up credentials.json
|
##### Setting up credentials.json
|
||||||
|
|
||||||
- Copy the `credentials.json` to desktop
|
- Copy the `credentials.json` to desktop
|
||||||
- EDIT it as it is guided here: [Setting up credentials.json](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file)
|
- EDIT it as it is guided here: [Setting up credentials.json][setup credentials]
|
||||||
- Paste/put it back in the folder once done. `(Using WinSCP)`
|
- Paste/put it back in the folder once done. `(Using WinSCP)`
|
||||||
- **If** you already have Nadeko 1.0 setup and have `credentials.json` and `NadekoBot.db`, you can just copy and paste the `credentials.json` to `NadekoBot/src/NadekoBot` and `NadekoBot.db` to `NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data` using WinSCP.
|
- **If** you already have Nadeko 1.3.x setup and have `credentials.json` and `NadekoBot.db`, you can just copy and paste the `credentials.json` to `NadekoBot/src/NadekoBot` and `NadekoBot.db` to `NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data` using WinSCP.
|
||||||
- **If** you have Nadeko 0.9x follow the [Upgrading Guide](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/)
|
**Or** follow the [Upgrading Guide.][upgrading]
|
||||||
|
|
||||||
|
|
||||||
[img7]: https://cdn.discordapp.com/attachments/251504306010849280/251505766370902016/setting_up_credentials.gif
|
[img7]: https://cdn.discordapp.com/attachments/251504306010849280/251505766370902016/setting_up_credentials.gif
|
||||||
|
[setup credentials]: http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file
|
||||||
|
[setup music]: http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys
|
||||||
|
[upgrading]: http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
## Setting Up NadekoBot on OSX
|
## Setting Up NadekoBot on OSX (macOS)
|
||||||
|
|
||||||
#### Prerequisites
|
#### Prerequisites
|
||||||
- [Homebrew][Homebrew]
|
- [Homebrew][Homebrew]
|
||||||
- Google Account
|
- [Google Account](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys)
|
||||||
- Soundcloud Account (if you want soundcloud support)
|
|
||||||
- Text Editor (TextWrangler, or equivalent) or outside editor such as [Atom][Atom]
|
- Text Editor (TextWrangler, or equivalent) or outside editor such as [Atom][Atom]
|
||||||
|
|
||||||
#### Installing Homebrew
|
#### Installing Homebrew
|
||||||
@ -25,6 +24,8 @@ brew install opusfile
|
|||||||
brew install libffi
|
brew install libffi
|
||||||
brew install libsodium
|
brew install libsodium
|
||||||
brew install tmux
|
brew install tmux
|
||||||
|
brew install python
|
||||||
|
brew install youtube-dl
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Installing .NET Core SDK
|
#### Installing .NET Core SDK
|
||||||
@ -59,69 +60,69 @@ A dialog box will open asking if you want to install `xcode-select`. Select inst
|
|||||||
Use the following command to get and run `linuxAIO.sh`:
|
Use the following command to get and run `linuxAIO.sh`:
|
||||||
(Remember **DO NOT** rename the file `linuxAIO.sh`)
|
(Remember **DO NOT** rename the file `linuxAIO.sh`)
|
||||||
|
|
||||||
`cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/master/linuxAIO.sh && bash linuxAIO.sh`
|
`cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.4/linuxAIO.sh && bash linuxAIO.sh`
|
||||||
|
|
||||||
Follow the on screen instructions:
|
Follow the on screen instructions:
|
||||||
|
|
||||||
1. To Get the latest build. (most recent updates)
|
Choose `1. Download NadekoBot` To Get the latest build. (most recent updates)
|
||||||
2. To Get the stable build.
|
|
||||||
|
|
||||||
Choose either `1` or `2` then press `enter` key.
|
|
||||||
Once Installation is completed you should see the options again.
|
Once Installation is completed you should see the options again.
|
||||||
Next, choose `5` to exit.
|
Next, choose `6` to exit.
|
||||||
|
|
||||||
#### Creating and Inviting bot
|
#### Creating and Inviting bot
|
||||||
|
|
||||||
- Read here how to [create a DiscordBot application](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#creating-discordbot-application)
|
- Read here [how to create a Discord Bot application and invite it.](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#creating-discord-bot-application)
|
||||||
- [Visual Invite Guide](http://discord.kongslien.net/guide.html) *NOTE: Client ID is your Bot ID*
|
|
||||||
- Copy your `Client ID` from your [applications page](https://discordapp.com/developers/applications/me).
|
|
||||||
- Replace the `12345678` in this link `https://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303` with your `Client ID`.
|
|
||||||
- The link should now look like this: `https://discordapp.com/oauth2/authorize?client_id=**YOUR_CLENT_ID_HERE**&scope=bot&permissions=66186303`.
|
|
||||||
- Go to the newly created link and pick the server we created, and click `Authorize`.
|
|
||||||
- The bot should have been added to your server.
|
|
||||||
|
|
||||||
#### Setting up Credentials.json file
|
#### Setting up Credentials.json file
|
||||||
- Open up the `NadekoBot` folder, which should be in your home directory, then `NadekoBot` folder then `src` folder and then the additonal `NadekoBot` folder.
|
- Open up the `NadekoBot` folder, which should be in your home directory, then `NadekoBot` folder then `src` folder and then the additonal `NadekoBot` folder.
|
||||||
- EDIT it as it is guided here: [Setting up credentials.json](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-credentialsjson-file)
|
- Edit the way its guided here: [Setting up credentials.json](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file)
|
||||||
- **If** you already have Nadeko 1.0 setup and have `credentials.json` and `NadekoBot.db`, you can just copy and paste the `credentials.json` to `NadekoBot/src/NadekoBot` and `NadekoBot.db` to `NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data`.
|
- **If** you already have Nadeko 1.x setup and have `credentials.json` and `NadekoBot.db`, you can just copy and paste the `credentials.json` to `NadekoBot/src/NadekoBot` and `NadekoBot.db` to `NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data`.
|
||||||
- **If** you have Nadeko 0.9x follow the [Upgrading Guide](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/)
|
**Or** follow the [Upgrading Guide.](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/)
|
||||||
|
|
||||||
#### Setting NadekoBot Music
|
#### Setting NadekoBot Music
|
||||||
|
|
||||||
For Music Setup and API keys check [Setting up NadekoBot for Music](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#setting-up-nadekobot-for-music) and [JSON Explanations](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/).
|
For Music Setup and API keys check [Setting up NadekoBot for Music](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-your-api-keys) and [JSON Explanations](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/).
|
||||||
|
|
||||||
#### Running NadekoBot
|
#### Running NadekoBot
|
||||||
|
|
||||||
- Using tmux
|
**Create a new Session:**
|
||||||
|
|
||||||
`tmux new -s nadeko`
|
|
||||||
|
|
||||||
^this will create a new session named “nadeko”
|
|
||||||
`(you can replace “nadeko” with anything you prefer and remember its your session name)`.
|
|
||||||
|
|
||||||
- Using Screen
|
- Using Screen
|
||||||
|
|
||||||
`screen -S nadeko`
|
`screen -S nadeko`
|
||||||
|
|
||||||
^this will create a new screen named “nadeko”
|
- Using tmux
|
||||||
`(you can replace “nadeko” with anything you prefer and remember its your screen name)`.
|
|
||||||
|
|
||||||
- Start Nadeko using .NET Core:
|
`tmux new -s nadeko`
|
||||||
|
|
||||||
`cd ~ && bash linuxAIO.sh`
|
The above command will create a new session named **nadeko** *(you can replace “nadeko” with anything you prefer and remember its your session name)* so you can run the bot in background without having to keep the PuTTY running.
|
||||||
|
|
||||||
From the options,
|
**Next, we need to run `linuxAIO.sh` in order to get the latest running scripts with patches:**
|
||||||
|
|
||||||
Choose `3` To Run the bot normally.
|
- `cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.4/linuxAIO.sh && bash linuxAIO.sh`
|
||||||
**NOTE:** With option `3` (Running Normally), if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/Commands%20List/#administration) in discord. The bot will shut down and will stay offline untill you manually run it again. (best if you want to check the bot.)
|
|
||||||
|
|
||||||
Choose `4` To Run the bot with Auto Restart.
|
**From the options,**
|
||||||
**NOTE:** With option `4` (Running with Auto Restart), bot will auto run if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/Commands%20List/#administration) making the command `.die` to be used as restart.
|
|
||||||
**NOTE:** [To stop the bot you will have to kill the session.](http://nadekobot.readthedocs.io/en/latest/guides/OSX%20Guide/#some-more-info)
|
|
||||||
|
|
||||||
**Now check your Discord, the bot should be online**
|
Choose `2` to **Run NadekoBot normally.**
|
||||||
|
**NOTE:** With option `2` (Running normally), if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/Commands%20List/#administration) in discord. The bot will shut down and will stay offline until you manually run it again. (best if you want to check the bot.)
|
||||||
|
|
||||||
Now time to move bot to background and to do that, press CTRL+B+D (this will detach the nadeko session using TMUX)
|
Choose `3` to **Run NadekoBot with Auto Restart.**
|
||||||
|
**NOTE:** With option `3` (Running with Auto Restart), bot will auto run if you use `.die` [command](http://nadekobot.readthedocs.io/en/latest/Commands%20List/#administration) making the command `.die` to function as restart.
|
||||||
|
|
||||||
|
It will show you the following options:
|
||||||
|
```
|
||||||
|
1. Run Auto Restart normally without Updating.
|
||||||
|
2. Run Auto Restart and update NadekoBot.
|
||||||
|
3. Exit
|
||||||
|
```
|
||||||
|
|
||||||
|
- With option `1. Run Auto Restart normally without Updating.` Bot will restart on `die` command and will not be downloading the latest build available.
|
||||||
|
- With option `2. Run Auto Restart and update NadekoBot.` Bot will restart and download the latest build of bot available everytime `die` command is used.
|
||||||
|
|
||||||
|
**Remember** that, while running with Auto Restart, you will need to [close the tmux session](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#restarting-nadeko) to stop the bot completely.
|
||||||
|
|
||||||
|
|
||||||
|
Now time to move bot to background and to do that, press CTRL+B,D (this will detach the nadeko session using TMUX)
|
||||||
If you used Screen press CTRL+A+D (this will detach the nadeko screen)
|
If you used Screen press CTRL+A+D (this will detach the nadeko screen)
|
||||||
|
|
||||||
#### Updating Nadeko
|
#### Updating Nadeko
|
||||||
@ -130,10 +131,10 @@ If you used Screen press CTRL+A+D (this will detach the nadeko screen)
|
|||||||
- `tmux kill-session -t nadeko` [(don't forget to replace **nadeko** in the command to what ever you named your bot's session)](http://nadekobot.readthedocs.io/en/latest/guides/OSX%20Guide/#some-more-info)
|
- `tmux kill-session -t nadeko` [(don't forget to replace **nadeko** in the command to what ever you named your bot's session)](http://nadekobot.readthedocs.io/en/latest/guides/OSX%20Guide/#some-more-info)
|
||||||
- Make sure the bot is **not** running.
|
- Make sure the bot is **not** running.
|
||||||
- `tmux new -s nadeko` (**nadeko** is the name of the session)
|
- `tmux new -s nadeko` (**nadeko** is the name of the session)
|
||||||
- `cd ~ && bash linuxAIO.sh`
|
- `cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.4/linuxAIO.sh && bash linuxAIO.sh`
|
||||||
- Choose either `1` or `2` to update the bot with **latest build** or **stable build** respectively.
|
- Choose `1` to update the bot with **latest build** available.
|
||||||
- Choose either `3` or `4` to run the bot again with **normally** or **auto restart** respectively.
|
- Next, choose either `2` or `3` to run the bot again with **normally** or **auto restart** respectively.
|
||||||
- Done. You can close terminal now.
|
- Done.
|
||||||
|
|
||||||
#### Some more Info
|
#### Some more Info
|
||||||
|
|
||||||
@ -149,25 +150,8 @@ If you used Screen press CTRL+A+D (this will detach the nadeko screen)
|
|||||||
- If you want to switch to/ see that screen, type `screen -r nadeko` (nadeko is the name of the screen we created before so, replace `nadeko` with the screen name you created.)
|
- If you want to switch to/ see that screen, type `screen -r nadeko` (nadeko is the name of the screen we created before so, replace `nadeko` with the screen name you created.)
|
||||||
- If you want to kill the NadekoBot screen, type `screen -X -S nadeko quit`
|
- If you want to kill the NadekoBot screen, type `screen -X -S nadeko quit`
|
||||||
|
|
||||||
#### Alternative Method to Install Nadeko
|
|
||||||
|
|
||||||
**METHOD I**
|
|
||||||
|
|
||||||
- `cd ~ && curl -L https://github.com/Kwoth/NadekoBot-BashScript/raw/master/nadeko_installer.sh | sh`
|
|
||||||
|
|
||||||
**METHOD II**
|
|
||||||
|
|
||||||
- `cd ~`
|
|
||||||
- `git clone -b 1.0 --recursive https://github.com/Kwoth/NadekoBot.git`
|
|
||||||
- `cd ~/NadekoBot/discord.net`
|
|
||||||
- `dotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json`
|
|
||||||
- `dotnet restore`
|
|
||||||
- `cd ~/NadekoBot/src/NadekoBot/`
|
|
||||||
- `dotnet restore`
|
|
||||||
- `dotnet build --configuration Release`
|
|
||||||
|
|
||||||
[Homebrew]: http://brew.sh/
|
[Homebrew]: http://brew.sh/
|
||||||
[.NET Core SDK]: https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.1-preview2.1-download.md
|
[.NET Core SDK]: https://www.microsoft.com/net/core#macos
|
||||||
[DiscordApp]: https://discordapp.com/developers/applications/me
|
[DiscordApp]: https://discordapp.com/developers/applications/me
|
||||||
[Atom]: https://atom.io/
|
[Atom]: https://atom.io/
|
||||||
[Invite Guide]: http://discord.kongslien.net/guide.html
|
[Invite Guide]: http://discord.kongslien.net/guide.html
|
||||||
|
@ -1,11 +1,30 @@
|
|||||||
##Upgrading Nadeko from an older release
|
#### If you have NadekoBot 1.x on Windows
|
||||||
|
|
||||||
**If you have NadekoBot 0.9x**
|
- Follow the [Windows Guide](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/) and install the latest version of **NadekoBot**.
|
||||||
|
- Navigate to your **old** `Nadeko` folder and copy your `credentials.json` file and the `data` folder.
|
||||||
- Follow the [Windows Guide](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/)/[Linux Guide](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/)/[OS X Guide](http://nadekobot.readthedocs.io/en/latest/guides/OSX%20Guide/) and install **NadekoBot 1.0**.
|
- Paste credentials into the **NadekoBot 1.4x+** `C:\Program Files\NadekoBot\system` folder.
|
||||||
- Navigate to your **old** `Nadeko` folder and copy `credentials.json` file and the `data` folder.
|
- Paste your **old** `Nadeko` data folder into **NadekoBot 1.4x+** `C:\Program Files\NadekoBot\system` folder.
|
||||||
- Paste them into **NadekoBot 1.0** `/NadekoBot/src/NadekoBot/` folder.
|
|
||||||
- If it asks you to overwrite files, it is fine to do so.
|
- If it asks you to overwrite files, it is fine to do so.
|
||||||
- Next launch your **new** Nadeko as the guide describes, if it is not already running.
|
- Next launch your **new** Nadeko as the guide describes, if it is not already running.
|
||||||
- In any channel, run the `.migratedata` [command](http://nadekobot.readthedocs.io/en/latest/Commands%20List/) and Nadeko will start migrating your old data.
|
|
||||||
- Once that is done **restart** Nadeko and everything should work as expected!
|
|
||||||
|
#### If you are running Dockerised Nadeko
|
||||||
|
|
||||||
|
- Shutdown your existing container `docker stop nadeko`.
|
||||||
|
- Move you credentials and other files to another folder.
|
||||||
|
- Delete your container `docker rm nadeko`.
|
||||||
|
- Create a new container `docker create --name=nadeko -v /nadeko/:/root/nadeko uirel/nadeko:1.4`.
|
||||||
|
- Start the container with `docker start nadeko`, and wait for it to complain about lacking credentials.
|
||||||
|
- Stop the container, `docker stop nadeko`, open the `Nadeko` folder and replace the credentials, database and other files with your copies.
|
||||||
|
- Restart the container `docker start nadeko`.
|
||||||
|
|
||||||
|
#### If you have NadekoBot 1.x on Linux or macOS
|
||||||
|
|
||||||
|
- Backup the `NadekoBot.db` from `NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.0/data`.
|
||||||
|
- Backup the `credentials.json` from `NadekoBot/src/NadekoBot/`.
|
||||||
|
- **For MacOS Users Only:** download and install the latest version of [.NET Core SDK](https://www.microsoft.com/net/core#macos).
|
||||||
|
- Next, use the command `cd ~ && wget -N https://github.com/Kwoth/NadekoBot-BashScript/raw/1.4/linuxAIO.sh && bash linuxAIO.sh`
|
||||||
|
- **For Ubuntu, Debian and CentOS Users Only:** use the option `4. Auto-Install Prerequisites` to install the latest version of .NET Core SDK.
|
||||||
|
- Use option `1. Download NadekoBot` to update your NadekoBot to 1.4+ version.
|
||||||
|
- Next, just [run your NadekoBot.](http://nadekobot.readthedocs.io/en/latest/guides/Linux%20Guide/#running-nadekobot)
|
||||||
|
- *NOTE: 1.4+ version uses `NadekoBot.db` file from `NadekoBot/src/NadekoBot/bin/Release/netcoreapp1.1/data` folder.*
|
||||||
|
@ -1,137 +1,34 @@
|
|||||||
________________________________________________________________________________
|
|
||||||
*Thanks to @Flatbread and @Mirai for making this guide*
|
|
||||||
________________________________________________________________________________
|
|
||||||
|
|
||||||
## Setting Up NadekoBot on Windows
|
## Setting Up NadekoBot on Windows
|
||||||
|
|
||||||
#### Prerequisites
|
#### Prerequisites
|
||||||
- 1) [.NET Core SDK][.NET Core SDK]
|
- [Notepad++][Notepad++] (or some other decent text editor)
|
||||||
- 2) [Git][Git]
|
- Windows 8 or later
|
||||||
- 3) Google Account
|
- [Create Discord Bot application](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#creating-discord-bot-application) and [Invite the bot to your server](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#inviting-your-bot-to-your-server).
|
||||||
- 4) Soundcloud Account (if you want soundcloud support)
|
|
||||||
- 5) [7zip][7zip] (or whatever you are using, WinRar)
|
|
||||||
- 6) [Notepad++][Notepad++]
|
|
||||||
- 7) Windows 8 or later
|
|
||||||
|
|
||||||
#### Guide
|
#### Guide
|
||||||
- Make sure you have installed both [Git][Git] and the [.NET Core SDK][.NET Core SDK].
|
- Download and run the [NadekoBot Updater.][Updater]
|
||||||
- Create a **new folder** anywhere you like and name it `Nadeko`.
|
- Press **`Install ffmpeg`** and **`Install youtube-dl`** if you want music features.
|
||||||
- Next, [Right-Click on this link](https://github.com/Kwoth/NadekoBotInstallerWin/raw/master/NadekoInstaller.bat) and select **Save link as** and save the file `NadekoInstaller.bat` inside the `Nadeko` folder that we created earlier. (Please **DO NOT** rename the file `NadekoInstaller.bat`.)
|
***NOTE:** RESTART YOUR PC IF YOU DO.*
|
||||||
- Once that's done, right-click on `NadekoInstaller.bat` to run it as Administrator.
|
- Press **`Update`** and go through the installation wizard.
|
||||||
- From the options,
|
***NOTE:** If you're upgrading from 1.3, DO NOT select your old nadekobot folder. Install it in a separate directory and read the [upgrading guide](http://nadekobot.readthedocs.io/en/latest/guides/Upgrading%20Guide/).*
|
||||||
- Choose `1` to get the **most recent build**.
|
- When installation is finished, make sure **`Open credentials.json`** is checked.
|
||||||
- Choose `2` to get the **stable build**.
|
***NOTE:** Make sure to open it with Notepad++ or some other decent text editor.*
|
||||||
- Wait a while for the file to finish installing, it'll display it's progress in the command prompt.
|
- [Set up credentials.json](http://nadekobot.readthedocs.io/en/latest/JSON%20Explanations/#setting-up-credentialsjson-file) file.
|
||||||
- You should now have a new folder named `NadekoBot` inside the `Nadeko` folder we previously created.
|
|
||||||
- Once Installation is completed, press any key to close the command prompt.
|
|
||||||
![img1](http://i.imgur.com/O1dY9eW.gif)
|
|
||||||
|
|
||||||
#### Creating DiscordBot application
|
|
||||||
- Go to [the Discord developer application page][DiscordApp].
|
|
||||||
- Log in with your Discord account.
|
|
||||||
- On the left side, press `New Application`.
|
|
||||||
- Fill out the `App Name` (your bot's name, in this case), put the image you want, and add an app description(optional).
|
|
||||||
- Create the application.
|
|
||||||
- Click on `Create a Bot User` and confirm that you do want to add a bot to this app.
|
|
||||||
- Keep this window open for now.
|
|
||||||
![img2](http://i.imgur.com/x3jWudH.gif)
|
|
||||||
|
|
||||||
#### Setting up credentials.json file
|
|
||||||
- In our `NadekoBot` folder you should see a `src` folder, then *another* `NadekoBot` folder, in this final folder, you should see a `.json` file named `credentials.json`. (Note: If you do not see a `.json` after `credentials.json`, do not add the `.json`. You most likely have **"Hide file extensions"** enabled.)
|
|
||||||
- If you mess up the setup of `credentials.json`, rename `credentials_example.json` to `credentials.json`.
|
|
||||||
- Open the file with [Notepad++][Notepad++].
|
|
||||||
- In there you will see fields such as `Token`, `ClientId`, `BotId` and `OwnerIDs`.
|
|
||||||
- In your [applications page][DiscordApp] (the window you were asked to keep open earlier), under the `Bot User` section, you will see `Token:click to reveal`, click to reveal the token. (Note: Make sure that you actually use a Token and not a Client Secret! It is in the **App Bot User** tab.)
|
|
||||||
- Copy your bot's token, and on the `"Token"` line of your `credentials.json`, paste your bot token between the quotation marks.
|
|
||||||
- Copy the `Client ID` on the page and replace the `12312123` part of the `ClientId` line with it.
|
|
||||||
- Again, copy the same `Client ID` and replace the `null` part of the `BotId` line with it.
|
|
||||||
- Go to a server on discord and attempt to mention yourself, but put a backslash at the start like shown below
|
|
||||||
- So the message `\@fearnlj01#3535` will appears as `<@145521851676884992>` after you send the message (to make it slightly easier, add the backslash after you type the mention out)
|
|
||||||
- The message will appear as a mention if done correctly, copy the numbers from the message you sent (`145521851676884992`) and replace the ID (By default, the ID is `105635576866156544`) on the `OwnerIds` section with your user ID shown earlier.
|
|
||||||
- Save `credentials.json` (make sure you aren't saving it as `credentials.json.txt`)
|
|
||||||
- If done correctly, you are now the bot owner. You can add multiple owners by seperating each owner ID with a comma within the square brackets.
|
|
||||||
![img3](http://i.imgur.com/QwKMnTG.gif)
|
|
||||||
|
|
||||||
#### Inviting your bot to your server
|
|
||||||
- [Invite Guide][Invite Guide]
|
|
||||||
- Copy your `Client ID` from your [applications page][DiscordApp].
|
|
||||||
- Replace the `12345678` in this link `https://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303` with your `Client ID`.
|
|
||||||
- The link should now look like this: `https://discordapp.com/oauth2/authorize?client_id=**YOUR_CLENT_ID_HERE**&scope=bot&permissions=66186303`.
|
|
||||||
- Go to the newly created link and pick the server we created, and click `Authorize`.
|
|
||||||
- The bot should have been added to your server.
|
|
||||||
![img4](http://i.imgur.com/aFK7InR.gif)
|
|
||||||
|
|
||||||
#### Starting the bot
|
#### Starting the bot
|
||||||
- Go to the `Nadeko` folder that we have created earlier, and run the `NadekoInstaller.bat` file as Administrator.
|
- Either press **`Start`** Button in the updater, or run the bot via it's desktop shortcut.
|
||||||
- From the options,
|
|
||||||
- Choose `3` to **run the bot normally**.
|
|
||||||
(with normal-run the bot will shutdown and will stay offline if it disconnects by the use of `.die` command until you manually run it again. Useful if you want to test the bot.)
|
|
||||||
- Choose `4` to **run the bot with auto restart**.
|
|
||||||
(with auto restart the bot will restart itself if it disconnects by the use of `.die` command. Useful if you want to have restart function for any reason.)
|
|
||||||
|
|
||||||
#### Updating NadekoBot
|
#### Updating NadekoBot
|
||||||
- Make sure the bot is closed and is not running (Run `.die` in a connected server to ensure it's not running).
|
- Make sure the bot is closed and is not running
|
||||||
- Once that's checked, go to the `Nadeko` folder.
|
(Run `.die` in a connected server to ensure it's not running).
|
||||||
- Run the `NadekoInstaller.bat` file.
|
- Open NadekoBot Updater
|
||||||
- From the options,
|
- If updates are available, you will be able to click on the Update button
|
||||||
- Choose `1` to get the **most recent build**.
|
- Start the bot
|
||||||
- Choose `2` to get the **stable build**.
|
|
||||||
- Follow the messages and press any key to continue.
|
|
||||||
- Wait for it to finish.
|
|
||||||
- Press any key to close the window when it shows **Installation complete.**
|
|
||||||
- [Start the bot again.](http://nadekobot.readthedocs.io/en/latest/guides/Windows%20Guide/#starting-the-bot)
|
|
||||||
- You've updated and are running again, easy as that!
|
- You've updated and are running again, easy as that!
|
||||||
________________________________________________________________________________
|
|
||||||
|
|
||||||
### Setting Up NadekoBot For Music
|
[Updater]: https://download.nadekobot.me/
|
||||||
|
|
||||||
In order to have a functioning music module, you need to install ffmpeg and setup api keys.
|
|
||||||
|
|
||||||
#### Setting up `ffmpeg` using NadekoBot Client!
|
|
||||||
- Go to the `Nadeko` folder that we have created earlier, and run the `NadekoInstaller.bat` file as Administrator.
|
|
||||||
- From the options select `6` Install ffmpeg (for music)
|
|
||||||
- Next, **Press Any Key** if you are running as Administrator or just close and relaunch it as Administrator using mouse right-click.
|
|
||||||
- Wait for it to finish installing and backing up existing.
|
|
||||||
- Once done, you should see "ffmpeg Installation complete!".
|
|
||||||
- Next, **Press Any Key** to go back to NadekoBot Client.
|
|
||||||
- Press `3` to run the bot normally just to test music. (optional)
|
|
||||||
- `ffmpeg` installation for Music is now complete.
|
|
||||||
|
|
||||||
#### Manual `ffmpeg` setup
|
|
||||||
- Create a folder named `ffmpeg` in your main Windows directory. We will use **C:\ffmpeg** (for our guide)
|
|
||||||
- Download FFMPEG through the link https://ffmpeg.zeranoe.com/builds/ (download static build)
|
|
||||||
- EXTRACT it using `7zip` and place the FOLDER `ffmpeg-xxxxx-git-xxxxx-xxxx-static` inside **C:\ffmpeg**
|
|
||||||
- Before proceeding, check out this gif to set up `ffmpeg` PATH correctly ![LINK TO gif](http://i.imgur.com/aR5l1Hn.gif) *(thanks to PooPeePants#7135)*
|
|
||||||
- Go to My Computer, right click and select Properties. On the left tab, select Advanced System Settings. Under the Advanced tab, select Environmental Variables near the bottom. One of the variables should be called "Path". Add a semi-colon (;) to the end followed by your FFMPEG's **bin** install location (**for example C:\ffmpeg\ffmpeg-xxxxx-git-xxxxx-xxxx-static\bin**). Save and close.
|
|
||||||
- Setup your API keys as explained above.
|
|
||||||
- **Restart your computer**
|
|
||||||
|
|
||||||
#### Api keys setup
|
|
||||||
- Follow these steps on how to setup Google API keys:
|
|
||||||
- Go to [Google Console][Google Console] and log in.
|
|
||||||
- Create a new project (name does not matter). Once the project is created, go into "Enable and manage APIs."
|
|
||||||
- Under the "Other Popular APIs" section, enable `URL Shortener API` and `Custom Search API`. Under the `YouTube APIs` section, enable `YouTube Data API`.
|
|
||||||
- Under the "Google Maps APIs" section, enable `Google Maps Geocoding API` and `Google Maps Time Zone API`.
|
|
||||||
- On the left tab, access `Credentials`. Click `Create Credentials` button. Click on `API Key`. A new window will appear with your `Google API key`.
|
|
||||||
- Copy the key.
|
|
||||||
- Open up `credentials.json`.
|
|
||||||
- For `"GoogleAPIKey"`, paste your API key inbetween the quotation marks, like how the `Token` and `ClientId` should be set up.
|
|
||||||
- Follow these steps on how to setup Soundcloud API key:
|
|
||||||
- Go to [Soundcloud][Soundcloud].
|
|
||||||
- Enter a name for the app and create it.
|
|
||||||
- You will need to fill out an application form to request access to the Soundcloud API.
|
|
||||||
- All requests for an API key must go through the review process, where applications will be reviewed on a case by case basis, in line with Soundcloud API Terms of Use. If your application is successful, you will receive an API key.
|
|
||||||
- **Restart your computer**
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[.NET Core SDK]: https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.1-preview2.1-download.md
|
|
||||||
[Git]: https://git-scm.com/download/win
|
|
||||||
[7zip]: http://www.7-zip.org/download.html
|
|
||||||
[DiscordApp]: https://discordapp.com/developers/applications/me
|
[DiscordApp]: https://discordapp.com/developers/applications/me
|
||||||
[Notepad++]: https://notepad-plus-plus.org/
|
[Notepad++]: https://notepad-plus-plus.org/
|
||||||
[Invite Guide]: http://discord.kongslien.net/guide.html
|
[Invite Guide]: http://discord.kongslien.net/guide.html
|
||||||
[Google Console]: https://console.developers.google.com
|
[Google Console]: https://console.developers.google.com
|
||||||
[Soundcloud]: https://soundcloud.com/you/apps/new
|
[.NET Core SDK]: https://www.microsoft.com/net/core#windowscmd
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#NadekoBot Documentation
|
#NadekoBot Documentation
|
||||||
|
|
||||||
To invite NadekoBot to your server, click on the image bellow:
|
To invite public NadekoBot to your server, click on the image bellow:
|
||||||
|
|
||||||
[![img][img]](https://discordapp.com/oauth2/authorize?client_id=170254782546575360&scope=bot&permissions=66186303)
|
[![img][img]](https://discordapp.com/oauth2/authorize?client_id=170254782546575360&scope=bot&permissions=66186303)
|
||||||
|
|
||||||
@ -10,9 +10,7 @@ NadekoBot is an open source project, and it can be found on our [GitHub][GitHub]
|
|||||||
|
|
||||||
Here you can read current [Issues][Issues].
|
Here you can read current [Issues][Issues].
|
||||||
|
|
||||||
If you want to contribute, be sure to PR on the **[dev][dev]** branch.
|
If you want to contribute, be sure to PR on the **[1.4][1.4]** branch.
|
||||||
|
|
||||||
**NadekoBot 1.1 release currently does not support x86/32bit architecture.**
|
|
||||||
|
|
||||||
##Content
|
##Content
|
||||||
- [About](about.md)
|
- [About](about.md)
|
||||||
@ -21,13 +19,16 @@ If you want to contribute, be sure to PR on the **[dev][dev]** branch.
|
|||||||
- [Linux Guide](guides/Linux Guide.md)
|
- [Linux Guide](guides/Linux Guide.md)
|
||||||
- [OSX Guide](guides/OSX Guide.md)
|
- [OSX Guide](guides/OSX Guide.md)
|
||||||
- [Docker Guide](guides/Docker Guide.md)
|
- [Docker Guide](guides/Docker Guide.md)
|
||||||
|
- [From Source](guides/From Source.md)
|
||||||
- [Upgrading Guide](guides/Upgrading Guide.md)
|
- [Upgrading Guide](guides/Upgrading Guide.md)
|
||||||
- Commands
|
- Commands
|
||||||
- [Readme](Readme.md)
|
- [Readme](Readme.md)
|
||||||
- [Commands List](Commands List.md)
|
- [Commands List](Commands List.md)
|
||||||
- [Permissions System](Permissions System.md)
|
- Features Explained
|
||||||
- [JSON Explanations](JSON Explanations.md)
|
- [Permissions System](Permissions System.md)
|
||||||
- [Custom Reactions](Custom Reactions.md)
|
- [JSON Explanations](JSON Explanations.md)
|
||||||
|
- [Custom Reactions](Custom Reactions.md)
|
||||||
|
- [Placeholders](Placeholders.md)
|
||||||
- [Frequently Asked Questions](Frequently Asked Questions.md)
|
- [Frequently Asked Questions](Frequently Asked Questions.md)
|
||||||
- [Contribution Guide](Contribution Guide.md)
|
- [Contribution Guide](Contribution Guide.md)
|
||||||
- [Donate](Donate.md)
|
- [Donate](Donate.md)
|
||||||
@ -36,4 +37,4 @@ If you want to contribute, be sure to PR on the **[dev][dev]** branch.
|
|||||||
[NadekoBot Server]: https://discord.gg/nadekobot
|
[NadekoBot Server]: https://discord.gg/nadekobot
|
||||||
[GitHub]: https://github.com/Kwoth/NadekoBot
|
[GitHub]: https://github.com/Kwoth/NadekoBot
|
||||||
[Issues]: https://github.com/Kwoth/NadekoBot/issues
|
[Issues]: https://github.com/Kwoth/NadekoBot/issues
|
||||||
[dev]: https://github.com/Kwoth/NadekoBot/tree/dev
|
[1.4]: https://github.com/Kwoth/NadekoBot/tree/1.4
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
{
|
{
|
||||||
"projects": [ "Discord.Net/src", "src" ],
|
"sdk": { "version": "1.0.1" }
|
||||||
"sdk": {
|
|
||||||
"version": "1.0.0-preview2-1-003177"
|
|
||||||
}
|
|
||||||
}
|
}
|
25
license.md
25
license.md
@ -1,24 +1,7 @@
|
|||||||
This is free and unencumbered software released into the public domain.
|
Copyright 2017 Kwoth
|
||||||
|
|
||||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
distribute this software, either in source code form or as a compiled
|
|
||||||
binary, for any purpose, commercial or non-commercial, and by any
|
|
||||||
means.
|
|
||||||
|
|
||||||
In jurisdictions that recognize copyright laws, the author or authors
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
of this software dedicate any and all copyright interest in the
|
|
||||||
software to the public domain. We make this dedication for the benefit
|
|
||||||
of the public at large and to the detriment of our heirs and
|
|
||||||
successors. We intend this dedication to be an overt act of
|
|
||||||
relinquishment in perpetuity of all present and future rights to this
|
|
||||||
software under copyright law.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
||||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
||||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
For more information, please refer to <http://unlicense.org/>
|
|
@ -8,13 +8,16 @@ pages:
|
|||||||
- Linux Guide: guides/Linux Guide.md
|
- Linux Guide: guides/Linux Guide.md
|
||||||
- OSX Guide: guides/OSX Guide.md
|
- OSX Guide: guides/OSX Guide.md
|
||||||
- Docker Guide: guides/Docker Guide.md
|
- Docker Guide: guides/Docker Guide.md
|
||||||
|
- From Source: guides/From Source.md
|
||||||
- Upgrading Guide: guides/Upgrading Guide.md
|
- Upgrading Guide: guides/Upgrading Guide.md
|
||||||
- Commands:
|
- Commands:
|
||||||
- Readme: Readme.md
|
- Readme: Readme.md
|
||||||
- Commands List: Commands List.md
|
- Commands List: Commands List.md
|
||||||
- Permissions System: Permissions System.md
|
- Features Explained:
|
||||||
- JSON Explanations: JSON Explanations.md
|
- JSON Explanations: JSON Explanations.md
|
||||||
- Custom Reactions: Custom Reactions.md
|
- Permissions System: Permissions System.md
|
||||||
|
- Custom Reactions: Custom Reactions.md
|
||||||
|
- Placeholders: Placeholders.md
|
||||||
- Frequently Asked Questions: Frequently Asked Questions.md
|
- Frequently Asked Questions: Frequently Asked Questions.md
|
||||||
- Contribution Guide: Contribution Guide.md
|
- Contribution Guide: Contribution Guide.md
|
||||||
- ❤ Donate ❤: Donate.md
|
- ❤ Donate ❤: Donate.md
|
||||||
|
2
pack.ps1
Normal file
2
pack.ps1
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
dotnet pack "src\NadekoBot\NadekoBot.csproj" -c "Release" -o "../../artifacts" --no-build --version-suffix "$Env:BUILD" /p:BuildNumber="$Env:BUILD" /p:IsTagBuild="$Env:APPVEYOR_REPO_TAG"
|
||||||
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
98
release.ps1
Normal file
98
release.ps1
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
function GitHub-Release($versionNumber)
|
||||||
|
{
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
git pull
|
||||||
|
git push #making sure commit id exists on remote
|
||||||
|
|
||||||
|
$nl = [Environment]::NewLine
|
||||||
|
$env:NADEKOBOT_INSTALL_VERSION=$versionNumber
|
||||||
|
$gitHubApiKey = $env:GITHUB_API_KEY
|
||||||
|
$commitId = git rev-parse HEAD
|
||||||
|
$lastTag = git describe --tags --abbrev=0
|
||||||
|
$tag = "$lastTag..HEAD"
|
||||||
|
|
||||||
|
$clArr = (& 'git' 'log', $tag, '--oneline')
|
||||||
|
[array]::Reverse($clArr)
|
||||||
|
$changelog = $clArr | where { "$_" -notlike "*(POEditor.com)*" -and "$_" -notlike "*Merge branch*" -and "$_" -notlike "*Merge pull request*" -and "$_" -notlike "^-*" -and "$_" -notlike "*Merge remote tracking*" }
|
||||||
|
$changelog = [string]::join([Environment]::NewLine, $changelog)
|
||||||
|
|
||||||
|
$cl2 = $clArr | where { "$_" -like "*Merge pull request*" }
|
||||||
|
$changelog = "## Changes$nl$changelog"
|
||||||
|
if ($cl2 -ne $null)
|
||||||
|
{
|
||||||
|
$cl2 = [string]::join([Environment]::NewLine, $cl2)
|
||||||
|
$changelog = $changelog + "$nl ## Pull Requests Merged$nl$cl2"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host $changelog
|
||||||
|
|
||||||
|
dotnet publish -c Release --runtime win7-x64
|
||||||
|
|
||||||
|
# set-alias sz "$env:ProgramFiles\7-Zip\7z.exe"
|
||||||
|
# $source = "src\NadekoBot\bin\Release\PublishOutput\win7-x64"
|
||||||
|
# $target = "src\NadekoBot\bin\Release\PublishOutput\NadekoBot.7z"
|
||||||
|
|
||||||
|
# sz 'a' '-mx3' $target $source
|
||||||
|
|
||||||
|
& "C:\Program Files (x86)\Inno Setup 5\iscc.exe" "/O+" ".\NadekoBot.iss"
|
||||||
|
|
||||||
|
$artifact = "NadekoBot-setup-$versionNumber.exe";
|
||||||
|
|
||||||
|
$auth = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($gitHubApiKey + ":x-oauth-basic"));
|
||||||
|
Write-Host $changelog
|
||||||
|
$result = GitHubMake-Release $versionNumber $commitId $TRUE $gitHubApiKey $auth "" "$changelog"
|
||||||
|
$releaseId = $result | Select -ExpandProperty id
|
||||||
|
$uploadUri = $result | Select -ExpandProperty upload_url
|
||||||
|
$uploadUri = $uploadUri -creplace '\{\?name,label\}', "?name=$artifact"
|
||||||
|
Write-Host $releaseId $uploadUri
|
||||||
|
$uploadFile = [Environment]::GetFolderPath('MyDocuments') + "\projekti\NadekoInstallerOutput\$artifact"
|
||||||
|
|
||||||
|
$uploadParams = @{
|
||||||
|
Uri = $uploadUri;
|
||||||
|
Method = 'POST';
|
||||||
|
Headers = @{
|
||||||
|
Authorization = $auth;
|
||||||
|
}
|
||||||
|
ContentType = 'application/x-msdownload';
|
||||||
|
InFile = $uploadFile
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host 'Uploading artifact'
|
||||||
|
$result = Invoke-RestMethod @uploadParams
|
||||||
|
Write-Host 'Artifact upload finished.'
|
||||||
|
$result = GitHubMake-Release $versionNumber $commitId $FALSE $gitHubApiKey $auth "$releaseId"
|
||||||
|
git pull
|
||||||
|
Write-Host 'Done 🎉'
|
||||||
|
}
|
||||||
|
|
||||||
|
function GitHubMake-Release($versionNumber, $commitId, $draft, $gitHubApiKey, $auth, $releaseId, $body)
|
||||||
|
{
|
||||||
|
$releaseId = If ($releaseId -eq "") {""} Else {"/" + $releaseId};
|
||||||
|
|
||||||
|
Write-Host $versionNumber
|
||||||
|
Write-Host $commitId
|
||||||
|
Write-Host $draft
|
||||||
|
Write-Host $releaseId
|
||||||
|
Write-Host $body
|
||||||
|
|
||||||
|
$releaseData = @{
|
||||||
|
tag_name = $versionNumber;
|
||||||
|
target_commitish = $commitId;
|
||||||
|
name = [string]::Format("NadekoBot v{0}", $versionNumber);
|
||||||
|
body = $body;
|
||||||
|
draft = $draft;
|
||||||
|
prerelease = $releaseId -ne "";
|
||||||
|
}
|
||||||
|
|
||||||
|
$releaseParams = @{
|
||||||
|
Uri = "https://api.github.com/repos/Kwoth/NadekoBot/releases" + $releaseId;
|
||||||
|
Method = 'POST';
|
||||||
|
Headers = @{
|
||||||
|
Authorization = $auth;
|
||||||
|
}
|
||||||
|
ContentType = 'application/json';
|
||||||
|
Body = (ConvertTo-Json $releaseData -Compress)
|
||||||
|
}
|
||||||
|
return Invoke-RestMethod @releaseParams
|
||||||
|
}
|
@ -1,166 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
TITLE Downloading Latest Build of NadekoBot...
|
|
||||||
::Setting convenient to read variables which don't delete the windows temp folder
|
|
||||||
SET "root=%~dp0"
|
|
||||||
CD /D "%root%"
|
|
||||||
SET "rootdir=%cd%"
|
|
||||||
SET "build1=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Core\"
|
|
||||||
SET "build2=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Rest\"
|
|
||||||
SET "build3=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\"
|
|
||||||
SET "build4=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Commands\"
|
|
||||||
SET "build5=%root%NadekoInstall_Temp\NadekoBot\src\NadekoBot\"
|
|
||||||
SET "installtemp=%root%NadekoInstall_Temp\"
|
|
||||||
::Deleting traces of last setup for the sake of clean folders, if by some miracle it still exists
|
|
||||||
IF EXIST "%installtemp%" ( RMDIR "%installtemp%" /S /Q >nul 2>&1)
|
|
||||||
timeout /t 5
|
|
||||||
::Checks that both git and dotnet are installed
|
|
||||||
dotnet --version >nul 2>&1 || GOTO :dotnet
|
|
||||||
git --version >nul 2>&1 || GOTO :git
|
|
||||||
::Creates the install directory to work in and get the current directory because spaces ruins everything otherwise
|
|
||||||
:start
|
|
||||||
MKDIR "%root%NadekoInstall_Temp"
|
|
||||||
CD /D "%installtemp%"
|
|
||||||
::Downloads the latest version of Nadeko
|
|
||||||
ECHO Downloading Nadeko...
|
|
||||||
ECHO.
|
|
||||||
git clone -b dev --recursive --depth 1 --progress https://github.com/Kwoth/NadekoBot.git >nul
|
|
||||||
IF %ERRORLEVEL% EQU 128 (GOTO :giterror)
|
|
||||||
TITLE Installing NadekoBot, please wait...
|
|
||||||
ECHO.
|
|
||||||
ECHO Installing Discord.Net(1/4)...
|
|
||||||
::Building Nadeko
|
|
||||||
CD /D "%build1%"
|
|
||||||
dotnet restore >nul 2>&1
|
|
||||||
ECHO Installing Discord.Net(2/4)...
|
|
||||||
CD /D "%build2%"
|
|
||||||
dotnet restore >nul 2>&1
|
|
||||||
ECHO Installing Discord.Net(3/4)...
|
|
||||||
CD /D "%build3%"
|
|
||||||
dotnet restore >nul 2>&1
|
|
||||||
ECHO Installing Discord.Net(4/4)...
|
|
||||||
CD /D "%build4%"
|
|
||||||
dotnet restore >nul 2>&1
|
|
||||||
ECHO.
|
|
||||||
ECHO Discord.Net installation completed successfully...
|
|
||||||
ECHO.
|
|
||||||
ECHO Installing NadekoBot...
|
|
||||||
CD /D "%build5%"
|
|
||||||
dotnet restore >nul 2>&1
|
|
||||||
dotnet build --configuration Release >nul 2>&1
|
|
||||||
ECHO.
|
|
||||||
ECHO NadekoBot installation completed successfully...
|
|
||||||
::Attempts to backup old files if they currently exist in the same folder as the batch file
|
|
||||||
IF EXIST "%root%NadekoBot\" (GOTO :backupinstall) ELSE (GOTO :freshinstall)
|
|
||||||
:freshinstall
|
|
||||||
::Moves the NadekoBot folder to keep things tidy
|
|
||||||
ECHO.
|
|
||||||
ECHO Moving files, Please wait...
|
|
||||||
ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
|
|
||||||
:backupinstall
|
|
||||||
TITLE Backing up old files...
|
|
||||||
ECHO.
|
|
||||||
ECHO Moving and Backing up old files...
|
|
||||||
::Recursively copies all files and folders from NadekoBot to NadekoBot_Old
|
|
||||||
ROBOCOPY "%root%NadekoBot" "%root%NadekoBot_Old" /MIR >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
ECHO.
|
|
||||||
ECHO Old files backed up to NadekoBot_Old...
|
|
||||||
::Copies the credentials and database from the backed up data to the new folder
|
|
||||||
COPY "%root%NadekoBot_Old\src\NadekoBot\credentials.json" "%installtemp%NadekoBot\src\NadekoBot\credentials.json" >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
ECHO.
|
|
||||||
ECHO credentials.json copied...
|
|
||||||
ROBOCOPY "%root%NadekoBot_Old\src\NadekoBot\bin" "%installtemp%NadekoBot\src\NadekoBot\bin" /E >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
ECHO.
|
|
||||||
ECHO bin folder copied...
|
|
||||||
RD /S /Q "%root%NadekoBot_Old\src\NadekoBot\data\musicdata"
|
|
||||||
ECHO.
|
|
||||||
ECHO music cache cleared...
|
|
||||||
ROBOCOPY "%root%NadekoBot_Old\src\NadekoBot\data" "%installtemp%NadekoBot\src\NadekoBot\data" /E >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
ECHO.
|
|
||||||
ECHO Old data folder copied...
|
|
||||||
::Moves the setup Nadeko folder
|
|
||||||
RMDIR "%root%NadekoBot\" /S /Q >nul 2>&1
|
|
||||||
ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
|
|
||||||
:dotnet
|
|
||||||
::Terminates the batch script if it can't run dotnet --version
|
|
||||||
TITLE Error!
|
|
||||||
ECHO dotnet not found, make sure it's been installed as per the guides instructions!
|
|
||||||
ECHO Press any key to exit.
|
|
||||||
PAUSE >nul 2>&1
|
|
||||||
CD /D "%root%"
|
|
||||||
GOTO :EOF
|
|
||||||
:git
|
|
||||||
::Terminates the batch script if it can't run git --version
|
|
||||||
TITLE Error!
|
|
||||||
ECHO git not found, make sure it's been installed as per the guides instructions!
|
|
||||||
ECHO Press any key to exit.
|
|
||||||
PAUSE >nul 2>&1
|
|
||||||
CD /D "%root%"
|
|
||||||
GOTO :EOF
|
|
||||||
:giterror
|
|
||||||
ECHO.
|
|
||||||
ECHO Git clone failed, trying again
|
|
||||||
RMDIR "%installtemp%" /S /Q >nul 2>&1
|
|
||||||
GOTO :start
|
|
||||||
:copyerror
|
|
||||||
::If at any point a copy error is encountered
|
|
||||||
TITLE Error!
|
|
||||||
ECHO.
|
|
||||||
ECHO An error in copying data has been encountered, returning an exit code of %ERRORLEVEL%
|
|
||||||
ECHO.
|
|
||||||
ECHO Make sure to close any files, such as `NadekoBot.db` before continuing or try running the installer as an Administrator
|
|
||||||
PAUSE >nul 2>&1
|
|
||||||
CD /D "%root%"
|
|
||||||
GOTO :EOF
|
|
||||||
:64BIT
|
|
||||||
ECHO.
|
|
||||||
ECHO Your System Architecture is 64bit...
|
|
||||||
GOTO end
|
|
||||||
:32BIT
|
|
||||||
ECHO.
|
|
||||||
ECHO Your System Architecture is 32bit...
|
|
||||||
timeout /t 5
|
|
||||||
ECHO.
|
|
||||||
ECHO Getting 32bit libsodium.dll and opus.dll...
|
|
||||||
IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\libsodium.dll" (GOTO copysodium) ELSE (GOTO downloadsodium)
|
|
||||||
:copysodium
|
|
||||||
del "%root%NadekoBot\src\NadekoBot\libsodium.dll"
|
|
||||||
copy "%root%NadekoBot\src\NadekoBot\_libs\32\libsodium.dll" "%root%NadekoBot\src\NadekoBot\libsodium.dll"
|
|
||||||
ECHO libsodium.dll copied.
|
|
||||||
ECHO.
|
|
||||||
timeout /t 5
|
|
||||||
IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" (GOTO copyopus) ELSE (GOTO downloadopus)
|
|
||||||
:downloadsodium
|
|
||||||
SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\libsodium.dll"
|
|
||||||
powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/libsodium.dll -OutFile '%FILENAME%'"
|
|
||||||
ECHO libsodium.dll downloaded.
|
|
||||||
ECHO.
|
|
||||||
timeout /t 5
|
|
||||||
IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" (GOTO copyopus) ELSE (GOTO downloadopus)
|
|
||||||
:copyopus
|
|
||||||
del "%root%NadekoBot\src\NadekoBot\opus.dll"
|
|
||||||
copy "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" "%root%NadekoBot\src\NadekoBot\opus.dll"
|
|
||||||
ECHO opus.dll copied.
|
|
||||||
GOTO end
|
|
||||||
:downloadopus
|
|
||||||
SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\opus.dll"
|
|
||||||
powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/opus.dll -OutFile '%FILENAME%'"
|
|
||||||
ECHO opus.dll downloaded.
|
|
||||||
GOTO end
|
|
||||||
:end
|
|
||||||
::Normal execution of end of script
|
|
||||||
TITLE NadekoBot Installation complete!
|
|
||||||
CD /D "%root%"
|
|
||||||
RMDIR /S /Q "%installtemp%" >nul 2>&1
|
|
||||||
ECHO.
|
|
||||||
ECHO Installation complete!
|
|
||||||
ECHO.
|
|
||||||
timeout /t 5
|
|
||||||
del Latest.bat
|
|
@ -1,65 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
@TITLE NadekoBot
|
|
||||||
|
|
||||||
|
|
||||||
SET "root=%~dp0"
|
|
||||||
CD /D "%root%"
|
|
||||||
|
|
||||||
CLS
|
|
||||||
ECHO Welcome to NadekoBot Auto Restart and Update!
|
|
||||||
ECHO --------------------------------------------
|
|
||||||
ECHO 1.Auto Restart and Update with Dev Build (latest)
|
|
||||||
ECHO 2.Auto Restart and Update with Stable Build
|
|
||||||
ECHO 3.Run Auto Restart normally without Updating (will restart faster)
|
|
||||||
ECHO 4.To exit
|
|
||||||
ECHO.
|
|
||||||
|
|
||||||
CHOICE /C 1234 /M "Enter your choice:"
|
|
||||||
|
|
||||||
:: Note - list ERRORLEVELS in decreasing order
|
|
||||||
IF ERRORLEVEL 4 GOTO exit
|
|
||||||
IF ERRORLEVEL 3 GOTO autorun
|
|
||||||
IF ERRORLEVEL 2 GOTO stablear
|
|
||||||
IF ERRORLEVEL 1 GOTO latestar
|
|
||||||
|
|
||||||
:latestar
|
|
||||||
ECHO Auto Restart and Update with Dev Build (latest)
|
|
||||||
ECHO Bot will auto update on every restart!
|
|
||||||
CD /D "%~dp0NadekoBot\src\NadekoBot"
|
|
||||||
dotnet run --configuration Release
|
|
||||||
ECHO Updating...
|
|
||||||
SET "FILENAME=%~dp0\Latest.bat"
|
|
||||||
powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/scripts/Latest.bat -OutFile '%FILENAME%'"
|
|
||||||
ECHO NadekoBot Dev Build (latest) downloaded.
|
|
||||||
SET "root=%~dp0"
|
|
||||||
CD /D "%root%"
|
|
||||||
CALL Latest.bat
|
|
||||||
GOTO latestar
|
|
||||||
|
|
||||||
:stablear
|
|
||||||
ECHO Auto Restart and Update with Stable Build
|
|
||||||
ECHO Bot will auto update on every restart!
|
|
||||||
CD /D "%~dp0NadekoBot\src\NadekoBot"
|
|
||||||
dotnet run --configuration Release
|
|
||||||
ECHO Updating...
|
|
||||||
SET "FILENAME=%~dp0\Stable.bat"
|
|
||||||
powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/scripts/Stable.bat -OutFile '%FILENAME%'"
|
|
||||||
ECHO NadekoBot Stable build downloaded.
|
|
||||||
SET "root=%~dp0"
|
|
||||||
CD /D "%root%"
|
|
||||||
CALL Stable.bat
|
|
||||||
GOTO stablear
|
|
||||||
|
|
||||||
:autorun
|
|
||||||
ECHO Normal Auto Restart
|
|
||||||
ECHO Bot will not auto update on every restart!
|
|
||||||
timeout /t 3
|
|
||||||
CD /D "%~dp0NadekoBot\src\NadekoBot"
|
|
||||||
dotnet run --configuration Release
|
|
||||||
goto autorun
|
|
||||||
|
|
||||||
:Exit
|
|
||||||
SET "root=%~dp0"
|
|
||||||
CD /D "%root%"
|
|
||||||
del NadekoAutoRun.bat
|
|
||||||
CALL NadekoInstaller.bat
|
|
@ -1,9 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
@TITLE NadekoBot
|
|
||||||
CD /D "%~dp0NadekoBot\src\NadekoBot"
|
|
||||||
dotnet run --configuration Release
|
|
||||||
ECHO NadekoBot has been succesfully stopped, press any key to close this window.
|
|
||||||
TITLE NadekoBot - Stopped
|
|
||||||
CD /D "%~dp0"
|
|
||||||
PAUSE >nul 2>&1
|
|
||||||
del NadekoRunNormal.bat
|
|
@ -1,166 +0,0 @@
|
|||||||
@ECHO off
|
|
||||||
TITLE Downloading Stable Build of NadekoBot...
|
|
||||||
::Setting convenient to read variables which don't delete the windows temp folder
|
|
||||||
SET "root=%~dp0"
|
|
||||||
CD /D "%root%"
|
|
||||||
SET "rootdir=%cd%"
|
|
||||||
SET "build1=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Core\"
|
|
||||||
SET "build2=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Rest\"
|
|
||||||
SET "build3=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.WebSocket\"
|
|
||||||
SET "build4=%root%NadekoInstall_Temp\NadekoBot\Discord.Net\src\Discord.Net.Commands\"
|
|
||||||
SET "build5=%root%NadekoInstall_Temp\NadekoBot\src\NadekoBot\"
|
|
||||||
SET "installtemp=%root%NadekoInstall_Temp\"
|
|
||||||
::Deleting traces of last setup for the sake of clean folders, if by some miracle it still exists
|
|
||||||
IF EXIST "%installtemp%" ( RMDIR "%installtemp%" /S /Q >nul 2>&1)
|
|
||||||
timeout /t 5
|
|
||||||
::Checks that both git and dotnet are installed
|
|
||||||
dotnet --version >nul 2>&1 || GOTO :dotnet
|
|
||||||
git --version >nul 2>&1 || GOTO :git
|
|
||||||
::Creates the install directory to work in and get the current directory because spaces ruins everything otherwise
|
|
||||||
:start
|
|
||||||
MKDIR "%root%NadekoInstall_Temp"
|
|
||||||
CD /D "%installtemp%"
|
|
||||||
::Downloads the latest version of Nadeko
|
|
||||||
ECHO Downloading Nadeko...
|
|
||||||
ECHO.
|
|
||||||
git clone -b master --recursive --depth 1 --progress https://github.com/Kwoth/NadekoBot.git >nul
|
|
||||||
IF %ERRORLEVEL% EQU 128 (GOTO :giterror)
|
|
||||||
TITLE Installing NadekoBot, please wait...
|
|
||||||
ECHO.
|
|
||||||
ECHO Installing Discord.Net(1/4)...
|
|
||||||
::Building Nadeko
|
|
||||||
CD /D "%build1%"
|
|
||||||
dotnet restore >nul 2>&1
|
|
||||||
ECHO Installing Discord.Net(2/4)...
|
|
||||||
CD /D "%build2%"
|
|
||||||
dotnet restore >nul 2>&1
|
|
||||||
ECHO Installing Discord.Net(3/4)...
|
|
||||||
CD /D "%build3%"
|
|
||||||
dotnet restore >nul 2>&1
|
|
||||||
ECHO Installing Discord.Net(4/4)...
|
|
||||||
CD /D "%build4%"
|
|
||||||
dotnet restore >nul 2>&1
|
|
||||||
ECHO.
|
|
||||||
ECHO Discord.Net installation completed successfully...
|
|
||||||
ECHO.
|
|
||||||
ECHO Installing NadekoBot...
|
|
||||||
CD /D "%build5%"
|
|
||||||
dotnet restore >nul 2>&1
|
|
||||||
dotnet build --configuration Release >nul 2>&1
|
|
||||||
ECHO.
|
|
||||||
ECHO NadekoBot installation completed successfully...
|
|
||||||
::Attempts to backup old files if they currently exist in the same folder as the batch file
|
|
||||||
IF EXIST "%root%NadekoBot\" (GOTO :backupinstall) ELSE (GOTO :freshinstall)
|
|
||||||
:freshinstall
|
|
||||||
::Moves the NadekoBot folder to keep things tidy
|
|
||||||
ECHO.
|
|
||||||
ECHO Moving files, Please wait...
|
|
||||||
ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
|
|
||||||
:backupinstall
|
|
||||||
TITLE Backing up old files...
|
|
||||||
ECHO.
|
|
||||||
ECHO Moving and Backing up old files...
|
|
||||||
::Recursively copies all files and folders from NadekoBot to NadekoBot_Old
|
|
||||||
ROBOCOPY "%root%NadekoBot" "%root%NadekoBot_Old" /MIR >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
ECHO.
|
|
||||||
ECHO Old files backed up to NadekoBot_Old...
|
|
||||||
::Copies the credentials and database from the backed up data to the new folder
|
|
||||||
COPY "%root%NadekoBot_Old\src\NadekoBot\credentials.json" "%installtemp%NadekoBot\src\NadekoBot\credentials.json" >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
ECHO.
|
|
||||||
ECHO credentials.json copied...
|
|
||||||
ROBOCOPY "%root%NadekoBot_Old\src\NadekoBot\bin" "%installtemp%NadekoBot\src\NadekoBot\bin" /E >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
ECHO.
|
|
||||||
ECHO bin folder copied...
|
|
||||||
RD /S /Q "%root%NadekoBot_Old\src\NadekoBot\data\musicdata"
|
|
||||||
ECHO.
|
|
||||||
ECHO music cache cleared...
|
|
||||||
ROBOCOPY "%root%NadekoBot_Old\src\NadekoBot\data" "%installtemp%NadekoBot\src\NadekoBot\data" /E >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
ECHO.
|
|
||||||
ECHO Old data folder copied...
|
|
||||||
::Moves the setup Nadeko folder
|
|
||||||
RMDIR "%root%NadekoBot\" /S /Q >nul 2>&1
|
|
||||||
ROBOCOPY "%root%NadekoInstall_Temp" "%rootdir%" /E /MOVE >nul 2>&1
|
|
||||||
IF %ERRORLEVEL% GEQ 8 (GOTO :copyerror)
|
|
||||||
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
|
|
||||||
:dotnet
|
|
||||||
::Terminates the batch script if it can't run dotnet --version
|
|
||||||
TITLE Error!
|
|
||||||
ECHO dotnet not found, make sure it's been installed as per the guides instructions!
|
|
||||||
ECHO Press any key to exit.
|
|
||||||
PAUSE >nul 2>&1
|
|
||||||
CD /D "%root%"
|
|
||||||
GOTO :EOF
|
|
||||||
:git
|
|
||||||
::Terminates the batch script if it can't run git --version
|
|
||||||
TITLE Error!
|
|
||||||
ECHO git not found, make sure it's been installed as per the guides instructions!
|
|
||||||
ECHO Press any key to exit.
|
|
||||||
PAUSE >nul 2>&1
|
|
||||||
CD /D "%root%"
|
|
||||||
GOTO :EOF
|
|
||||||
:giterror
|
|
||||||
ECHO.
|
|
||||||
ECHO Git clone failed, trying again
|
|
||||||
RMDIR "%installtemp%" /S /Q >nul 2>&1
|
|
||||||
GOTO :start
|
|
||||||
:copyerror
|
|
||||||
::If at any point a copy error is encountered
|
|
||||||
TITLE Error!
|
|
||||||
ECHO.
|
|
||||||
ECHO An error in copying data has been encountered, returning an exit code of %ERRORLEVEL%
|
|
||||||
ECHO.
|
|
||||||
ECHO Make sure to close any files, such as `NadekoBot.db` before continuing or try running the installer as an Administrator
|
|
||||||
PAUSE >nul 2>&1
|
|
||||||
CD /D "%root%"
|
|
||||||
GOTO :EOF
|
|
||||||
:64BIT
|
|
||||||
ECHO.
|
|
||||||
ECHO Your System Architecture is 64bit...
|
|
||||||
GOTO end
|
|
||||||
:32BIT
|
|
||||||
ECHO.
|
|
||||||
ECHO Your System Architecture is 32bit...
|
|
||||||
timeout /t 5
|
|
||||||
ECHO.
|
|
||||||
ECHO Getting 32bit libsodium.dll and opus.dll...
|
|
||||||
IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\libsodium.dll" (GOTO copysodium) ELSE (GOTO downloadsodium)
|
|
||||||
:copysodium
|
|
||||||
del "%root%NadekoBot\src\NadekoBot\libsodium.dll"
|
|
||||||
copy "%root%NadekoBot\src\NadekoBot\_libs\32\libsodium.dll" "%root%NadekoBot\src\NadekoBot\libsodium.dll"
|
|
||||||
ECHO libsodium.dll copied.
|
|
||||||
ECHO.
|
|
||||||
timeout /t 5
|
|
||||||
IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" (GOTO copyopus) ELSE (GOTO downloadopus)
|
|
||||||
:downloadsodium
|
|
||||||
SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\libsodium.dll"
|
|
||||||
powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/libsodium.dll -OutFile '%FILENAME%'"
|
|
||||||
ECHO libsodium.dll downloaded.
|
|
||||||
ECHO.
|
|
||||||
timeout /t 5
|
|
||||||
IF EXIST "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" (GOTO copyopus) ELSE (GOTO downloadopus)
|
|
||||||
:copyopus
|
|
||||||
del "%root%NadekoBot\src\NadekoBot\opus.dll"
|
|
||||||
copy "%root%NadekoBot\src\NadekoBot\_libs\32\opus.dll" "%root%NadekoBot\src\NadekoBot\opus.dll"
|
|
||||||
ECHO opus.dll copied.
|
|
||||||
GOTO end
|
|
||||||
:downloadopus
|
|
||||||
SET "FILENAME=%~dp0\NadekoBot\src\NadekoBot\opus.dll"
|
|
||||||
powershell -Command "Invoke-WebRequest https://github.com/Kwoth/NadekoBot/raw/dev/src/NadekoBot/_libs/32/opus.dll -OutFile '%FILENAME%'"
|
|
||||||
ECHO opus.dll downloaded.
|
|
||||||
GOTO end
|
|
||||||
:end
|
|
||||||
::Normal execution of end of script
|
|
||||||
TITLE NadekoBot Installation complete!
|
|
||||||
CD /D "%root%"
|
|
||||||
RMDIR /S /Q "%installtemp%" >nul 2>&1
|
|
||||||
ECHO.
|
|
||||||
ECHO Installation complete!
|
|
||||||
ECHO.
|
|
||||||
timeout /t 5
|
|
||||||
del Stable.bat
|
|
@ -1,48 +0,0 @@
|
|||||||
using Discord.Commands;
|
|
||||||
using NadekoBot.Services;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace NadekoBot.Attributes
|
|
||||||
{
|
|
||||||
[System.AttributeUsage(AttributeTargets.Class)]
|
|
||||||
sealed class NadekoModuleAttribute : GroupAttribute
|
|
||||||
{
|
|
||||||
//modulename / prefix
|
|
||||||
private static Dictionary<string, string> modulePrefixes = null;
|
|
||||||
public static Dictionary<string, string> ModulePrefixes {
|
|
||||||
get {
|
|
||||||
if (modulePrefixes != null)
|
|
||||||
return modulePrefixes;
|
|
||||||
|
|
||||||
using (var uow = DbHandler.UnitOfWork())
|
|
||||||
{
|
|
||||||
return (modulePrefixes = uow.BotConfig
|
|
||||||
.GetOrCreate()
|
|
||||||
.ModulePrefixes
|
|
||||||
.ToDictionary(p => p.ModuleName, p => p.Prefix));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public NadekoModuleAttribute(string moduleName, string defaultPrefix) : base(GetModulePrefix(moduleName, defaultPrefix), moduleName)
|
|
||||||
{
|
|
||||||
//AppendSpace = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string GetModulePrefix(string moduleName, string defaultPrefix)
|
|
||||||
{
|
|
||||||
string prefix = null;
|
|
||||||
if (!ModulePrefixes.TryGetValue(moduleName, out prefix))
|
|
||||||
{
|
|
||||||
NadekoBot.ModulePrefixes.TryAdd(moduleName, defaultPrefix);
|
|
||||||
NLog.LogManager.GetCurrentClassLogger().Warn("Prefix not found for {0}. Will use default one: {1}", moduleName, defaultPrefix);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return prefix ?? defaultPrefix;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
using System.Threading.Tasks;
|
|
||||||
using Discord.Commands;
|
|
||||||
|
|
||||||
namespace NadekoBot.Attributes
|
|
||||||
{
|
|
||||||
public class OwnerOnlyAttribute : PreconditionAttribute
|
|
||||||
{
|
|
||||||
public override Task<PreconditionResult> CheckPermissions(ICommandContext context, CommandInfo executingCommand,IDependencyMap depMap) =>
|
|
||||||
Task.FromResult((NadekoBot.Credentials.IsOwner(context.User) || NadekoBot.Client.CurrentUser.Id == context.User.Id ? PreconditionResult.FromSuccess() : PreconditionResult.FromError("Not owner")));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace NadekoBot.DataStructures
|
namespace NadekoBot.Common
|
||||||
{
|
{
|
||||||
public class AsyncLazy<T> : Lazy<Task<T>>
|
public class AsyncLazy<T> : Lazy<Task<T>>
|
||||||
{
|
{
|
@ -1,9 +1,9 @@
|
|||||||
using Discord.Commands;
|
using System.Linq;
|
||||||
using NadekoBot.Services;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
using Discord.Commands;
|
||||||
|
using NadekoBot.Services.Impl;
|
||||||
|
|
||||||
namespace NadekoBot.Attributes
|
namespace NadekoBot.Common.Attributes
|
||||||
{
|
{
|
||||||
public class Aliases : AliasAttribute
|
public class Aliases : AliasAttribute
|
||||||
{
|
{
|
@ -1,8 +1,8 @@
|
|||||||
using Discord.Commands;
|
using System.Runtime.CompilerServices;
|
||||||
using NadekoBot.Services;
|
using Discord.Commands;
|
||||||
using System.Runtime.CompilerServices;
|
using NadekoBot.Services.Impl;
|
||||||
|
|
||||||
namespace NadekoBot.Attributes
|
namespace NadekoBot.Common.Attributes
|
||||||
{
|
{
|
||||||
public class Description : SummaryAttribute
|
public class Description : SummaryAttribute
|
||||||
{
|
{
|
@ -1,8 +1,8 @@
|
|||||||
using Discord.Commands;
|
using System.Runtime.CompilerServices;
|
||||||
using NadekoBot.Services;
|
using Discord.Commands;
|
||||||
using System.Runtime.CompilerServices;
|
using NadekoBot.Services.Impl;
|
||||||
|
|
||||||
namespace NadekoBot.Attributes
|
namespace NadekoBot.Common.Attributes
|
||||||
{
|
{
|
||||||
public class NadekoCommand : CommandAttribute
|
public class NadekoCommand : CommandAttribute
|
||||||
{
|
{
|
14
src/NadekoBot/Common/Attributes/NadekoModuleAttribute.cs
Normal file
14
src/NadekoBot/Common/Attributes/NadekoModuleAttribute.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using Discord.Commands;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.Attributes
|
||||||
|
{
|
||||||
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
|
sealed class NadekoModuleAttribute : GroupAttribute
|
||||||
|
{
|
||||||
|
public NadekoModuleAttribute(string moduleName) : base(moduleName)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
17
src/NadekoBot/Common/Attributes/OwnerOnlyAttribute.cs
Normal file
17
src/NadekoBot/Common/Attributes/OwnerOnlyAttribute.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord.Commands;
|
||||||
|
using NadekoBot.Services;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.Attributes
|
||||||
|
{
|
||||||
|
public class OwnerOnlyAttribute : PreconditionAttribute
|
||||||
|
{
|
||||||
|
public override Task<PreconditionResult> CheckPermissions(ICommandContext context, CommandInfo executingCommand, IServiceProvider services)
|
||||||
|
{
|
||||||
|
var creds = (IBotCredentials)services.GetService(typeof(IBotCredentials));
|
||||||
|
|
||||||
|
return Task.FromResult((creds.IsOwner(context.User) || context.Client.CurrentUser.Id == context.User.Id ? PreconditionResult.FromSuccess() : PreconditionResult.FromError("Not owner")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
using Discord.Commands;
|
using System.Runtime.CompilerServices;
|
||||||
using NadekoBot.Services;
|
using Discord.Commands;
|
||||||
using System.Runtime.CompilerServices;
|
using NadekoBot.Services.Impl;
|
||||||
|
|
||||||
namespace NadekoBot.Attributes
|
namespace NadekoBot.Common.Attributes
|
||||||
{
|
{
|
||||||
public class Usage : RemarksAttribute
|
public class Usage : RemarksAttribute
|
||||||
{
|
{
|
26
src/NadekoBot/Common/BotConfigEditType.cs
Normal file
26
src/NadekoBot/Common/BotConfigEditType.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
namespace NadekoBot.Common
|
||||||
|
{
|
||||||
|
public enum BotConfigEditType
|
||||||
|
{
|
||||||
|
BetflipMultiplier,
|
||||||
|
Betroll100Multiplier,
|
||||||
|
Betroll67Multiplier,
|
||||||
|
Betroll91Multiplier,
|
||||||
|
CurrencyGenerationChance,
|
||||||
|
CurrencyGenerationCooldown,
|
||||||
|
CurrencyName,
|
||||||
|
CurrencyPluralName,
|
||||||
|
CurrencySign,
|
||||||
|
DmHelpString,
|
||||||
|
HelpString,
|
||||||
|
CurrencyDropAmount,
|
||||||
|
CurrencyDropAmountMax,
|
||||||
|
MinimumBetAmount,
|
||||||
|
TriviaCurrencyReward,
|
||||||
|
XpPerMessage,
|
||||||
|
XpMinutesTimeout,
|
||||||
|
|
||||||
|
//ErrorColor, //after i fix the nadekobot.cs static variables
|
||||||
|
//OkColor
|
||||||
|
}
|
||||||
|
}
|
@ -1,13 +1,10 @@
|
|||||||
using Discord;
|
using System;
|
||||||
|
using Discord;
|
||||||
|
using NadekoBot.Extensions;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NLog;
|
using NLog;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace NadekoBot.DataStructures
|
namespace NadekoBot.Common
|
||||||
{
|
{
|
||||||
public class CREmbed
|
public class CREmbed
|
||||||
{
|
{
|
||||||
@ -36,18 +33,30 @@ namespace NadekoBot.DataStructures
|
|||||||
|
|
||||||
public EmbedBuilder ToEmbed()
|
public EmbedBuilder ToEmbed()
|
||||||
{
|
{
|
||||||
var embed = new EmbedBuilder()
|
var embed = new EmbedBuilder();
|
||||||
.WithTitle(Title)
|
|
||||||
.WithDescription(Description)
|
if (!string.IsNullOrWhiteSpace(Title))
|
||||||
.WithColor(new Discord.Color(Color));
|
embed.WithTitle(Title);
|
||||||
|
if (!string.IsNullOrWhiteSpace(Description))
|
||||||
|
embed.WithDescription(Description);
|
||||||
|
embed.WithColor(new Discord.Color(Color));
|
||||||
if (Footer != null)
|
if (Footer != null)
|
||||||
embed.WithFooter(efb => efb.WithIconUrl(Footer.IconUrl).WithText(Footer.Text));
|
embed.WithFooter(efb =>
|
||||||
embed.WithThumbnailUrl(Thumbnail)
|
{
|
||||||
.WithImageUrl(Image);
|
efb.WithText(Footer.Text);
|
||||||
|
if (Uri.IsWellFormedUriString(Footer.IconUrl, UriKind.Absolute))
|
||||||
|
efb.WithIconUrl(Footer.IconUrl);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (Thumbnail != null && Uri.IsWellFormedUriString(Thumbnail, UriKind.Absolute))
|
||||||
|
embed.WithThumbnailUrl(Thumbnail);
|
||||||
|
if(Image != null && Uri.IsWellFormedUriString(Image, UriKind.Absolute))
|
||||||
|
embed.WithImageUrl(Image);
|
||||||
|
|
||||||
if (Fields != null)
|
if (Fields != null)
|
||||||
foreach (var f in Fields)
|
foreach (var f in Fields)
|
||||||
{
|
{
|
||||||
|
if(!string.IsNullOrWhiteSpace(f.Name) && !string.IsNullOrWhiteSpace(f.Value))
|
||||||
embed.AddField(efb => efb.WithName(f.Name).WithValue(f.Value).WithIsInline(f.Inline));
|
embed.AddField(efb => efb.WithName(f.Name).WithValue(f.Value).WithIsInline(f.Inline));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,6 +73,12 @@ namespace NadekoBot.DataStructures
|
|||||||
{
|
{
|
||||||
var crembed = JsonConvert.DeserializeObject<CREmbed>(input);
|
var crembed = JsonConvert.DeserializeObject<CREmbed>(input);
|
||||||
|
|
||||||
|
if(crembed.Fields != null && crembed.Fields.Length > 0)
|
||||||
|
foreach (var f in crembed.Fields)
|
||||||
|
{
|
||||||
|
f.Name = f.Name.TrimTo(256);
|
||||||
|
f.Value = f.Value.TrimTo(1024);
|
||||||
|
}
|
||||||
if (!crembed.IsValid)
|
if (!crembed.IsValid)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1,13 +1,14 @@
|
|||||||
// License MIT
|
// License MIT
|
||||||
// Source: https://github.com/i3arnon/ConcurrentHashSet
|
// Source: https://github.com/i3arnon/ConcurrentHashSet
|
||||||
|
|
||||||
using ConcurrentCollections;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace System.Collections.Concurrent
|
namespace NadekoBot.Common.Collections
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a thread-safe hash-based unique collection.
|
/// Represents a thread-safe hash-based unique collection.
|
@ -1,14 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Immutable;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace NadekoBot.DataStructures
|
namespace NadekoBot.Common.Collections
|
||||||
{
|
{
|
||||||
|
|
||||||
public static class DisposableReadOnlyListExtensions
|
public static class DisposableReadOnlyListExtensions
|
||||||
{
|
{
|
||||||
public static IDisposableReadOnlyList<T> AsDisposable<T>(this IReadOnlyList<T> arr) where T : IDisposable
|
public static IDisposableReadOnlyList<T> AsDisposable<T>(this IReadOnlyList<T> arr) where T : IDisposable
|
@ -1,11 +1,11 @@
|
|||||||
using NadekoBot.Services.Database.Models;
|
using System.Collections;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using NadekoBot.Services.Database.Models;
|
||||||
|
|
||||||
namespace NadekoBot.DataStructures
|
namespace NadekoBot.Common.Collections
|
||||||
{
|
{
|
||||||
public class IndexedCollection<T> : IList<T> where T : IIndexed
|
public class IndexedCollection<T> : IList<T> where T : class, IIndexed
|
||||||
{
|
{
|
||||||
public List<T> Source { get; }
|
public List<T> Source { get; }
|
||||||
private readonly object _locker = new object();
|
private readonly object _locker = new object();
|
106
src/NadekoBot/Common/Collections/PoopyRingBuffer.cs
Normal file
106
src/NadekoBot/Common/Collections/PoopyRingBuffer.cs
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.Collections
|
||||||
|
{
|
||||||
|
public class PoopyRingBuffer : IDisposable
|
||||||
|
{
|
||||||
|
// readpos == writepos means empty
|
||||||
|
// writepos == readpos - 1 means full
|
||||||
|
|
||||||
|
private byte[] _buffer;
|
||||||
|
public int Capacity { get; }
|
||||||
|
|
||||||
|
private int ReadPos { get; set; } = 0;
|
||||||
|
private int WritePos { get; set; } = 0;
|
||||||
|
|
||||||
|
public int Length => ReadPos <= WritePos
|
||||||
|
? WritePos - ReadPos
|
||||||
|
: Capacity - (ReadPos - WritePos);
|
||||||
|
|
||||||
|
public int RemainingCapacity
|
||||||
|
{
|
||||||
|
get => Capacity - Length - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly SemaphoreSlim _locker = new SemaphoreSlim(1, 1);
|
||||||
|
|
||||||
|
public PoopyRingBuffer(int capacity = 81920 * 100)
|
||||||
|
{
|
||||||
|
this.Capacity = capacity + 1;
|
||||||
|
this._buffer = new byte[this.Capacity];
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Read(byte[] b, int offset, int toRead)
|
||||||
|
{
|
||||||
|
if (WritePos == ReadPos)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (toRead > Length)
|
||||||
|
toRead = Length;
|
||||||
|
|
||||||
|
if (WritePos > ReadPos)
|
||||||
|
{
|
||||||
|
Array.Copy(_buffer, ReadPos, b, offset, toRead);
|
||||||
|
ReadPos += toRead;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var toEnd = Capacity - ReadPos;
|
||||||
|
var firstRead = toRead > toEnd ?
|
||||||
|
toEnd :
|
||||||
|
toRead;
|
||||||
|
Array.Copy(_buffer, ReadPos, b, offset, firstRead);
|
||||||
|
ReadPos += firstRead;
|
||||||
|
var secondRead = toRead - firstRead;
|
||||||
|
if (secondRead > 0)
|
||||||
|
{
|
||||||
|
Array.Copy(_buffer, 0, b, offset + firstRead, secondRead);
|
||||||
|
ReadPos = secondRead;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return toRead;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Write(byte[] b, int offset, int toWrite)
|
||||||
|
{
|
||||||
|
while (toWrite > RemainingCapacity)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (toWrite == 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (WritePos < ReadPos)
|
||||||
|
{
|
||||||
|
Array.Copy(b, offset, _buffer, WritePos, toWrite);
|
||||||
|
WritePos += toWrite;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var toEnd = Capacity - WritePos;
|
||||||
|
var firstWrite = toWrite > toEnd ?
|
||||||
|
toEnd :
|
||||||
|
toWrite;
|
||||||
|
Array.Copy(b, offset, _buffer, WritePos, firstWrite);
|
||||||
|
var secondWrite = toWrite - firstWrite;
|
||||||
|
if (secondWrite > 0)
|
||||||
|
{
|
||||||
|
Array.Copy(b, offset + firstWrite, _buffer, 0, secondWrite);
|
||||||
|
WritePos = secondWrite;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WritePos += firstWrite;
|
||||||
|
if (WritePos == Capacity)
|
||||||
|
WritePos = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
_buffer = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
13
src/NadekoBot/Common/ModuleBehaviors/IEarlyBlocker.cs
Normal file
13
src/NadekoBot/Common/ModuleBehaviors/IEarlyBlocker.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.ModuleBehaviors
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Implemented by modules which block execution before anything is executed
|
||||||
|
/// </summary>
|
||||||
|
public interface IEarlyBlocker
|
||||||
|
{
|
||||||
|
Task<bool> TryBlockEarly(IGuild guild, IUserMessage msg);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord;
|
||||||
|
using Discord.WebSocket;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.ModuleBehaviors
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Implemented by modules which can execute something and prevent further commands from being executed.
|
||||||
|
/// </summary>
|
||||||
|
public interface IEarlyBlockingExecutor
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Try to execute some logic within some module's service.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Whether it should block other command executions after it.</returns>
|
||||||
|
Task<bool> TryExecuteEarly(DiscordSocketClient client, IGuild guild, IUserMessage msg);
|
||||||
|
}
|
||||||
|
}
|
7
src/NadekoBot/Common/ModuleBehaviors/IEarlyExecutor.cs
Normal file
7
src/NadekoBot/Common/ModuleBehaviors/IEarlyExecutor.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace NadekoBot.Common.ModuleBehaviors
|
||||||
|
{
|
||||||
|
public interface IEarlyExecutor
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
10
src/NadekoBot/Common/ModuleBehaviors/IINputTransformer.cs
Normal file
10
src/NadekoBot/Common/ModuleBehaviors/IINputTransformer.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.ModuleBehaviors
|
||||||
|
{
|
||||||
|
public interface IInputTransformer
|
||||||
|
{
|
||||||
|
Task<string> TransformInput(IGuild guild, IMessageChannel channel, IUser user, string input);
|
||||||
|
}
|
||||||
|
}
|
12
src/NadekoBot/Common/ModuleBehaviors/ILateBlocker.cs
Normal file
12
src/NadekoBot/Common/ModuleBehaviors/ILateBlocker.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord;
|
||||||
|
using Discord.WebSocket;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.ModuleBehaviors
|
||||||
|
{
|
||||||
|
public interface ILateBlocker
|
||||||
|
{
|
||||||
|
Task<bool> TryBlockLate(DiscordSocketClient client, IUserMessage msg, IGuild guild,
|
||||||
|
IMessageChannel channel, IUser user, string moduleName, string commandName);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
namespace NadekoBot.Common.ModuleBehaviors
|
||||||
|
{
|
||||||
|
public interface ILateBlockingExecutor
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
14
src/NadekoBot/Common/ModuleBehaviors/ILateExecutor.cs
Normal file
14
src/NadekoBot/Common/ModuleBehaviors/ILateExecutor.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord;
|
||||||
|
using Discord.WebSocket;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.ModuleBehaviors
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Last thing to be executed, won't stop further executions
|
||||||
|
/// </summary>
|
||||||
|
public interface ILateExecutor
|
||||||
|
{
|
||||||
|
Task LateExecute(DiscordSocketClient client, IGuild guild, IUserMessage msg);
|
||||||
|
}
|
||||||
|
}
|
@ -1,26 +1,21 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace NadekoBot.Services
|
namespace NadekoBot.Common
|
||||||
{
|
{
|
||||||
public class NadekoRandom : Random
|
public class NadekoRandom : Random
|
||||||
{
|
{
|
||||||
RandomNumberGenerator rng;
|
readonly RandomNumberGenerator _rng;
|
||||||
|
|
||||||
public NadekoRandom() : base()
|
public NadekoRandom() : base()
|
||||||
{
|
{
|
||||||
rng = RandomNumberGenerator.Create();
|
_rng = RandomNumberGenerator.Create();
|
||||||
}
|
|
||||||
|
|
||||||
private NadekoRandom(int Seed) : base(Seed)
|
|
||||||
{
|
|
||||||
rng = RandomNumberGenerator.Create();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override int Next()
|
public override int Next()
|
||||||
{
|
{
|
||||||
var bytes = new byte[sizeof(int)];
|
var bytes = new byte[sizeof(int)];
|
||||||
rng.GetBytes(bytes);
|
_rng.GetBytes(bytes);
|
||||||
return Math.Abs(BitConverter.ToInt32(bytes, 0));
|
return Math.Abs(BitConverter.ToInt32(bytes, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +24,7 @@ namespace NadekoBot.Services
|
|||||||
if (maxValue <= 0)
|
if (maxValue <= 0)
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
var bytes = new byte[sizeof(int)];
|
var bytes = new byte[sizeof(int)];
|
||||||
rng.GetBytes(bytes);
|
_rng.GetBytes(bytes);
|
||||||
return Math.Abs(BitConverter.ToInt32(bytes, 0)) % maxValue;
|
return Math.Abs(BitConverter.ToInt32(bytes, 0)) % maxValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,27 +35,27 @@ namespace NadekoBot.Services
|
|||||||
if (minValue == maxValue)
|
if (minValue == maxValue)
|
||||||
return minValue;
|
return minValue;
|
||||||
var bytes = new byte[sizeof(int)];
|
var bytes = new byte[sizeof(int)];
|
||||||
rng.GetBytes(bytes);
|
_rng.GetBytes(bytes);
|
||||||
var sign = Math.Sign(BitConverter.ToInt32(bytes, 0));
|
var sign = Math.Sign(BitConverter.ToInt32(bytes, 0));
|
||||||
return (sign * BitConverter.ToInt32(bytes, 0)) % (maxValue - minValue) + minValue;
|
return (sign * BitConverter.ToInt32(bytes, 0)) % (maxValue - minValue) + minValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void NextBytes(byte[] buffer)
|
public override void NextBytes(byte[] buffer)
|
||||||
{
|
{
|
||||||
rng.GetBytes(buffer);
|
_rng.GetBytes(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override double Sample()
|
protected override double Sample()
|
||||||
{
|
{
|
||||||
var bytes = new byte[sizeof(double)];
|
var bytes = new byte[sizeof(double)];
|
||||||
rng.GetBytes(bytes);
|
_rng.GetBytes(bytes);
|
||||||
return Math.Abs(BitConverter.ToDouble(bytes, 0) / double.MaxValue + 1);
|
return Math.Abs(BitConverter.ToDouble(bytes, 0) / double.MaxValue + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override double NextDouble()
|
public override double NextDouble()
|
||||||
{
|
{
|
||||||
var bytes = new byte[sizeof(double)];
|
var bytes = new byte[sizeof(double)];
|
||||||
rng.GetBytes(bytes);
|
_rng.GetBytes(bytes);
|
||||||
return BitConverter.ToDouble(bytes, 0);
|
return BitConverter.ToDouble(bytes, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
18
src/NadekoBot/Common/NoPublicBotPrecondition.cs
Normal file
18
src/NadekoBot/Common/NoPublicBotPrecondition.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord.Commands;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common
|
||||||
|
{
|
||||||
|
public class NoPublicBot : PreconditionAttribute
|
||||||
|
{
|
||||||
|
public override Task<PreconditionResult> CheckPermissions(ICommandContext context, CommandInfo command, IServiceProvider services)
|
||||||
|
{
|
||||||
|
#if GLOBAL_NADEKo
|
||||||
|
return Task.FromResult(PreconditionResult.FromError("Not available on the public bot"));
|
||||||
|
#else
|
||||||
|
return Task.FromResult(PreconditionResult.FromSuccess());
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace ConcurrentCollections
|
namespace NadekoBot.Common
|
||||||
{
|
{
|
||||||
public static class PlatformHelper
|
public static class PlatformHelper
|
||||||
{
|
{
|
147
src/NadekoBot/Common/Replacements/ReplacementBuilder.cs
Normal file
147
src/NadekoBot/Common/Replacements/ReplacementBuilder.cs
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using Discord;
|
||||||
|
using Discord.Commands;
|
||||||
|
using Discord.WebSocket;
|
||||||
|
using NadekoBot.Extensions;
|
||||||
|
using NadekoBot.Modules.Administration.Services;
|
||||||
|
using NadekoBot.Modules.Music.Services;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.Replacements
|
||||||
|
{
|
||||||
|
public class ReplacementBuilder
|
||||||
|
{
|
||||||
|
private static readonly Regex rngRegex = new Regex("%rng(?:(?<from>(?:-)?\\d+)-(?<to>(?:-)?\\d+))?%", RegexOptions.Compiled);
|
||||||
|
private ConcurrentDictionary<string, Func<string>> _reps = new ConcurrentDictionary<string, Func<string>>();
|
||||||
|
private ConcurrentDictionary<Regex, Func<Match, string>> _regex = new ConcurrentDictionary<Regex, Func<Match, string>>();
|
||||||
|
|
||||||
|
public ReplacementBuilder()
|
||||||
|
{
|
||||||
|
WithRngRegex();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplacementBuilder WithDefault(IUser usr, IMessageChannel ch, IGuild g, DiscordSocketClient client)
|
||||||
|
{
|
||||||
|
return this.WithUser(usr)
|
||||||
|
.WithChannel(ch)
|
||||||
|
.WithServer(client, g)
|
||||||
|
.WithClient(client);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplacementBuilder WithDefault(ICommandContext ctx) =>
|
||||||
|
WithDefault(ctx.User, ctx.Channel, ctx.Guild, (DiscordSocketClient)ctx.Client);
|
||||||
|
|
||||||
|
public ReplacementBuilder WithClient(DiscordSocketClient client)
|
||||||
|
{
|
||||||
|
_reps.TryAdd("%mention%", () => $"<@{client.CurrentUser.Id}>");
|
||||||
|
_reps.TryAdd("%shardid%", () => client.ShardId.ToString());
|
||||||
|
_reps.TryAdd("%time%", () => DateTime.Now.ToString("HH:mm " + TimeZoneInfo.Local.StandardName.GetInitials()));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplacementBuilder WithServer(DiscordSocketClient client, IGuild g)
|
||||||
|
{
|
||||||
|
|
||||||
|
_reps.TryAdd("%sid%", () => g == null ? "DM" : g.Id.ToString());
|
||||||
|
_reps.TryAdd("%server%", () => g == null ? "DM" : g.Name);
|
||||||
|
_reps.TryAdd("%server_time%", () =>
|
||||||
|
{
|
||||||
|
TimeZoneInfo to = TimeZoneInfo.Local;
|
||||||
|
if (g != null)
|
||||||
|
{
|
||||||
|
if (GuildTimezoneService.AllServices.TryGetValue(client.CurrentUser.Id, out var tz))
|
||||||
|
to = tz.GetTimeZoneOrDefault(g.Id) ?? TimeZoneInfo.Local;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TimeZoneInfo.ConvertTime(DateTime.UtcNow,
|
||||||
|
TimeZoneInfo.Utc,
|
||||||
|
to).ToString("HH:mm ") + to.StandardName.GetInitials();
|
||||||
|
});
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplacementBuilder WithChannel(IMessageChannel ch)
|
||||||
|
{
|
||||||
|
_reps.TryAdd("%channel%", () => (ch as ITextChannel)?.Mention ?? "#" + ch.Name);
|
||||||
|
_reps.TryAdd("%chname%", () => ch.Name);
|
||||||
|
_reps.TryAdd("%cid%", () => ch?.Id.ToString());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplacementBuilder WithUser(IUser user)
|
||||||
|
{
|
||||||
|
_reps.TryAdd("%user%", () => user.Mention);
|
||||||
|
_reps.TryAdd("%userfull%", () => user.ToString());
|
||||||
|
_reps.TryAdd("%username%", () => user.Username);
|
||||||
|
_reps.TryAdd("%userdiscrim%", () => user.Discriminator);
|
||||||
|
_reps.TryAdd("%id%", () => user.Id.ToString());
|
||||||
|
_reps.TryAdd("%uid%", () => user.Id.ToString());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplacementBuilder WithStats(DiscordSocketClient c)
|
||||||
|
{
|
||||||
|
_reps.TryAdd("%servers%", () => c.Guilds.Count.ToString());
|
||||||
|
_reps.TryAdd("%users%", () => c.Guilds.Sum(s => s.Users.Count).ToString());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplacementBuilder WithMusic(MusicService ms)
|
||||||
|
{
|
||||||
|
_reps.TryAdd("%playing%", () =>
|
||||||
|
{
|
||||||
|
var cnt = ms.MusicPlayers.Count(kvp => kvp.Value.Current.Current != null);
|
||||||
|
if (cnt != 1) return cnt.ToString();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var mp = ms.MusicPlayers.FirstOrDefault();
|
||||||
|
var title = mp.Value?.Current.Current?.Title;
|
||||||
|
return title ?? "No songs";
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return "error";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
_reps.TryAdd("%queued%", () => ms.MusicPlayers.Sum(kvp => kvp.Value.QueueArray().Songs.Length).ToString());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplacementBuilder WithRngRegex()
|
||||||
|
{
|
||||||
|
var rng = new NadekoRandom();
|
||||||
|
_regex.TryAdd(rngRegex, (match) =>
|
||||||
|
{
|
||||||
|
int from = 0;
|
||||||
|
int.TryParse(match.Groups["from"].ToString(), out from);
|
||||||
|
|
||||||
|
int to = 0;
|
||||||
|
int.TryParse(match.Groups["to"].ToString(), out to);
|
||||||
|
|
||||||
|
if (from == 0 && to == 0)
|
||||||
|
{
|
||||||
|
return rng.Next(0, 11).ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (from >= to)
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
|
return rng.Next(from, to + 1).ToString();
|
||||||
|
});
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplacementBuilder WithOverride(string key, Func<string> output)
|
||||||
|
{
|
||||||
|
_reps.AddOrUpdate(key, output, delegate { return output; });
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Replacer Build()
|
||||||
|
{
|
||||||
|
return new Replacer(_reps.Select(x => (x.Key, x.Value)).ToArray(), _regex.Select(x => (x.Key, x.Value)).ToArray());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
54
src/NadekoBot/Common/Replacements/Replacer.cs
Normal file
54
src/NadekoBot/Common/Replacements/Replacer.cs
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.Replacements
|
||||||
|
{
|
||||||
|
public class Replacer
|
||||||
|
{
|
||||||
|
private readonly IEnumerable<(string Key, Func<string> Text)> _replacements;
|
||||||
|
private readonly IEnumerable<(Regex Regex, Func<Match, string> Replacement)> _regex;
|
||||||
|
|
||||||
|
public Replacer(IEnumerable<(string, Func<string>)> replacements, IEnumerable<(Regex, Func<Match, string>)> regex)
|
||||||
|
{
|
||||||
|
_replacements = replacements;
|
||||||
|
_regex = regex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Replace(string input)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(input))
|
||||||
|
return input;
|
||||||
|
|
||||||
|
foreach (var item in _replacements)
|
||||||
|
{
|
||||||
|
if (input.Contains(item.Key))
|
||||||
|
input = input.Replace(item.Key, item.Text());
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var item in _regex)
|
||||||
|
{
|
||||||
|
input = item.Regex.Replace(input, (m) => item.Replacement(m));
|
||||||
|
}
|
||||||
|
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Replace(CREmbed embedData)
|
||||||
|
{
|
||||||
|
embedData.PlainText = Replace(embedData.PlainText);
|
||||||
|
embedData.Description = Replace(embedData.Description);
|
||||||
|
embedData.Title = Replace(embedData.Title);
|
||||||
|
|
||||||
|
if (embedData.Fields != null)
|
||||||
|
foreach (var f in embedData.Fields)
|
||||||
|
{
|
||||||
|
f.Name = Replace(f.Name);
|
||||||
|
f.Value = Replace(f.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (embedData.Footer != null)
|
||||||
|
embedData.Footer.Text = Replace(embedData.Footer.Text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
src/NadekoBot/Common/Shard0Precondition.cs
Normal file
19
src/NadekoBot/Common/Shard0Precondition.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord.Commands;
|
||||||
|
using Discord.WebSocket;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common
|
||||||
|
{
|
||||||
|
public class Shard0Precondition : PreconditionAttribute
|
||||||
|
{
|
||||||
|
public override Task<PreconditionResult> CheckPermissions(ICommandContext context, CommandInfo command, IServiceProvider services)
|
||||||
|
{
|
||||||
|
var c = (DiscordSocketClient)context.Client;
|
||||||
|
if (c.ShardId != 0)
|
||||||
|
return Task.FromResult(PreconditionResult.FromError("Must be ran from shard #0"));
|
||||||
|
|
||||||
|
return Task.FromResult(PreconditionResult.FromSuccess());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
13
src/NadekoBot/Common/ShardCom/IShardComMessage.cs
Normal file
13
src/NadekoBot/Common/ShardCom/IShardComMessage.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using Discord;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.ShardCom
|
||||||
|
{
|
||||||
|
public class ShardComMessage
|
||||||
|
{
|
||||||
|
public int ShardId { get; set; }
|
||||||
|
public ConnectionState ConnectionState { get; set; }
|
||||||
|
public int Guilds { get; set; }
|
||||||
|
public DateTime Time { get; set; }
|
||||||
|
}
|
||||||
|
}
|
28
src/NadekoBot/Common/ShardCom/ShardComClient.cs
Normal file
28
src/NadekoBot/Common/ShardCom/ShardComClient.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
using System.Net;
|
||||||
|
using System.Net.Sockets;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.ShardCom
|
||||||
|
{
|
||||||
|
public class ShardComClient
|
||||||
|
{
|
||||||
|
private int port;
|
||||||
|
|
||||||
|
public ShardComClient(int port)
|
||||||
|
{
|
||||||
|
this.port = port;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task Send(ShardComMessage data)
|
||||||
|
{
|
||||||
|
var msg = JsonConvert.SerializeObject(data);
|
||||||
|
using (var client = new UdpClient())
|
||||||
|
{
|
||||||
|
var bytes = Encoding.UTF8.GetBytes(msg);
|
||||||
|
await client.SendAsync(bytes, bytes.Length, IPAddress.Loopback.ToString(), port).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
40
src/NadekoBot/Common/ShardCom/ShardComServer.cs
Normal file
40
src/NadekoBot/Common/ShardCom/ShardComServer.cs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Sockets;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.ShardCom
|
||||||
|
{
|
||||||
|
public class ShardComServer : IDisposable
|
||||||
|
{
|
||||||
|
private readonly UdpClient _client;
|
||||||
|
|
||||||
|
public ShardComServer(int port)
|
||||||
|
{
|
||||||
|
_client = new UdpClient(port);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Start()
|
||||||
|
{
|
||||||
|
Task.Run(async () =>
|
||||||
|
{
|
||||||
|
var ip = new IPEndPoint(IPAddress.Any, 0);
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
var recv = await _client.ReceiveAsync();
|
||||||
|
var data = Encoding.UTF8.GetString(recv.Buffer);
|
||||||
|
var _ = OnDataReceived(JsonConvert.DeserializeObject<ShardComMessage>(data));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
_client.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
public event Func<ShardComMessage, Task> OnDataReceived = delegate { return Task.CompletedTask; };
|
||||||
|
}
|
||||||
|
}
|
9
src/NadekoBot/Common/TypeReaders/AddRemove.cs
Normal file
9
src/NadekoBot/Common/TypeReaders/AddRemove.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace NadekoBot.Common.TypeReaders
|
||||||
|
{
|
||||||
|
public enum AddRemove
|
||||||
|
{
|
||||||
|
Add = 0,
|
||||||
|
Rem = 1,
|
||||||
|
Rm = 1,
|
||||||
|
}
|
||||||
|
}
|
@ -1,17 +1,26 @@
|
|||||||
using Discord.Commands;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using NadekoBot.Modules.CustomReactions;
|
using Discord.Commands;
|
||||||
using NadekoBot.Services.Database.Models;
|
using NadekoBot.Modules.CustomReactions.Services;
|
||||||
|
using NadekoBot.Services;
|
||||||
|
|
||||||
namespace NadekoBot.TypeReaders
|
namespace NadekoBot.Common.TypeReaders
|
||||||
{
|
{
|
||||||
public class CommandTypeReader : TypeReader
|
public class CommandTypeReader : TypeReader
|
||||||
{
|
{
|
||||||
public override Task<TypeReaderResult> Read(ICommandContext context, string input)
|
public override Task<TypeReaderResult> Read(ICommandContext context, string input, IServiceProvider services)
|
||||||
{
|
{
|
||||||
|
var _cmds = ((INServiceProvider)services).GetService<CommandService>();
|
||||||
|
var _cmdHandler = ((INServiceProvider)services).GetService<CommandHandler>();
|
||||||
input = input.ToUpperInvariant();
|
input = input.ToUpperInvariant();
|
||||||
var cmd = NadekoBot.CommandService.Commands.FirstOrDefault(c =>
|
var prefix = _cmdHandler.GetPrefix(context.Guild);
|
||||||
|
if (!input.StartsWith(prefix.ToUpperInvariant()))
|
||||||
|
return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No such command found."));
|
||||||
|
|
||||||
|
input = input.Substring(prefix.Length);
|
||||||
|
|
||||||
|
var cmd = _cmds.Commands.FirstOrDefault(c =>
|
||||||
c.Aliases.Select(a => a.ToUpperInvariant()).Contains(input));
|
c.Aliases.Select(a => a.ToUpperInvariant()).Contains(input));
|
||||||
if (cmd == null)
|
if (cmd == null)
|
||||||
return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No such command found."));
|
return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No such command found."));
|
||||||
@ -22,31 +31,32 @@ namespace NadekoBot.TypeReaders
|
|||||||
|
|
||||||
public class CommandOrCrTypeReader : CommandTypeReader
|
public class CommandOrCrTypeReader : CommandTypeReader
|
||||||
{
|
{
|
||||||
public override async Task<TypeReaderResult> Read(ICommandContext context, string input)
|
public override async Task<TypeReaderResult> Read(ICommandContext context, string input, IServiceProvider services)
|
||||||
{
|
{
|
||||||
input = input.ToUpperInvariant();
|
input = input.ToUpperInvariant();
|
||||||
|
|
||||||
if (CustomReactions.GlobalReactions.Any(x => x.Trigger.ToUpperInvariant() == input))
|
var _crs = ((INServiceProvider)services).GetService<CustomReactionsService>();
|
||||||
|
|
||||||
|
if (_crs.GlobalReactions.Any(x => x.Trigger.ToUpperInvariant() == input))
|
||||||
{
|
{
|
||||||
return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input));
|
return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input));
|
||||||
}
|
}
|
||||||
var guild = context.Guild;
|
var guild = context.Guild;
|
||||||
if (guild != null)
|
if (guild != null)
|
||||||
{
|
{
|
||||||
CustomReaction[] crs;
|
if (_crs.GuildReactions.TryGetValue(guild.Id, out var crs))
|
||||||
if (CustomReactions.GuildReactions.TryGetValue(guild.Id, out crs))
|
|
||||||
{
|
{
|
||||||
if (crs.Any(x => x.Trigger.ToUpperInvariant() == input))
|
if (crs.Concat(_crs.GlobalReactions).Any(x => x.Trigger.ToUpperInvariant() == input))
|
||||||
{
|
{
|
||||||
return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input));
|
return TypeReaderResult.FromSuccess(new CommandOrCrInfo(input));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var cmd = await base.Read(context, input);
|
var cmd = await base.Read(context, input, services);
|
||||||
if (cmd.IsSuccess)
|
if (cmd.IsSuccess)
|
||||||
{
|
{
|
||||||
return TypeReaderResult.FromSuccess(new CommandOrCrInfo(((CommandInfo)cmd.Values.First().Value).Aliases.First()));
|
return TypeReaderResult.FromSuccess(new CommandOrCrInfo(((CommandInfo)cmd.Values.First().Value).Name));
|
||||||
}
|
}
|
||||||
return TypeReaderResult.FromError(CommandError.ParseFailed, "No such command or cr found.");
|
return TypeReaderResult.FromError(CommandError.ParseFailed, "No such command or cr found.");
|
||||||
}
|
}
|
40
src/NadekoBot/Common/TypeReaders/GuildDateTimeTypeReader.cs
Normal file
40
src/NadekoBot/Common/TypeReaders/GuildDateTimeTypeReader.cs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Discord.Commands;
|
||||||
|
using NadekoBot.Modules.Administration.Services;
|
||||||
|
|
||||||
|
namespace NadekoBot.Common.TypeReaders
|
||||||
|
{
|
||||||
|
public class GuildDateTimeTypeReader : TypeReader
|
||||||
|
{
|
||||||
|
public override Task<TypeReaderResult> Read(ICommandContext context, string input, IServiceProvider services)
|
||||||
|
{
|
||||||
|
var _gts = (GuildTimezoneService)services.GetService(typeof(GuildTimezoneService));
|
||||||
|
if (!DateTime.TryParse(input, out var dt))
|
||||||
|
return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "Input string is in an incorrect format."));
|
||||||
|
|
||||||
|
var tz = _gts.GetTimeZoneOrUtc(context.Guild.Id);
|
||||||
|
|
||||||
|
return Task.FromResult(TypeReaderResult.FromSuccess(new GuildDateTime(tz, dt)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GuildDateTime
|
||||||
|
{
|
||||||
|
public TimeZoneInfo Timezone { get; }
|
||||||
|
public DateTime CurrentGuildTime { get; }
|
||||||
|
public DateTime InputTime { get; }
|
||||||
|
public DateTime InputTimeUtc { get; }
|
||||||
|
|
||||||
|
private GuildDateTime() { }
|
||||||
|
|
||||||
|
public GuildDateTime(TimeZoneInfo guildTimezone, DateTime inputTime)
|
||||||
|
{
|
||||||
|
var now = DateTime.UtcNow;
|
||||||
|
Timezone = guildTimezone;
|
||||||
|
CurrentGuildTime = TimeZoneInfo.ConvertTime(now, TimeZoneInfo.Utc, Timezone);
|
||||||
|
InputTime = inputTime;
|
||||||
|
InputTimeUtc = TimeZoneInfo.ConvertTime(inputTime, Timezone, TimeZoneInfo.Utc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,15 +1,23 @@
|
|||||||
using Discord.Commands;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Discord.Commands;
|
||||||
|
using Discord.WebSocket;
|
||||||
|
|
||||||
namespace NadekoBot.TypeReaders
|
namespace NadekoBot.Common.TypeReaders
|
||||||
{
|
{
|
||||||
public class GuildTypeReader : TypeReader
|
public class GuildTypeReader : TypeReader
|
||||||
{
|
{
|
||||||
public override Task<TypeReaderResult> Read(ICommandContext context, string input)
|
private readonly DiscordSocketClient _client;
|
||||||
|
|
||||||
|
public GuildTypeReader(DiscordSocketClient client)
|
||||||
|
{
|
||||||
|
_client = client;
|
||||||
|
}
|
||||||
|
public override Task<TypeReaderResult> Read(ICommandContext context, string input, IServiceProvider _)
|
||||||
{
|
{
|
||||||
input = input.Trim().ToLowerInvariant();
|
input = input.Trim().ToLowerInvariant();
|
||||||
var guilds = NadekoBot.Client.GetGuilds();
|
var guilds = _client.Guilds;
|
||||||
var guild = guilds.FirstOrDefault(g => g.Id.ToString().Trim().ToLowerInvariant() == input) ?? //by id
|
var guild = guilds.FirstOrDefault(g => g.Id.ToString().Trim().ToLowerInvariant() == input) ?? //by id
|
||||||
guilds.FirstOrDefault(g => g.Name.Trim().ToLowerInvariant() == input); //by name
|
guilds.FirstOrDefault(g => g.Name.Trim().ToLowerInvariant() == input); //by name
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
namespace NadekoBot.Modules.Permissions
|
namespace NadekoBot.Common.TypeReaders.Models
|
||||||
{
|
{
|
||||||
public class PermissionAction
|
public class PermissionAction
|
||||||
{
|
{
|
@ -1,16 +1,24 @@
|
|||||||
using Discord.Commands;
|
using System;
|
||||||
using NadekoBot.Extensions;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Discord.Commands;
|
||||||
|
using NadekoBot.Extensions;
|
||||||
|
|
||||||
namespace NadekoBot.TypeReaders
|
namespace NadekoBot.Common.TypeReaders
|
||||||
{
|
{
|
||||||
public class ModuleTypeReader : TypeReader
|
public class ModuleTypeReader : TypeReader
|
||||||
{
|
{
|
||||||
public override Task<TypeReaderResult> Read(ICommandContext context, string input)
|
private readonly CommandService _cmds;
|
||||||
|
|
||||||
|
public ModuleTypeReader(CommandService cmds)
|
||||||
|
{
|
||||||
|
_cmds = cmds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Task<TypeReaderResult> Read(ICommandContext context, string input, IServiceProvider _)
|
||||||
{
|
{
|
||||||
input = input.ToUpperInvariant();
|
input = input.ToUpperInvariant();
|
||||||
var module = NadekoBot.CommandService.Modules.GroupBy(m => m.GetTopLevelModule()).FirstOrDefault(m => m.Key.Name.ToUpperInvariant() == input)?.Key;
|
var module = _cmds.Modules.GroupBy(m => m.GetTopLevelModule()).FirstOrDefault(m => m.Key.Name.ToUpperInvariant() == input)?.Key;
|
||||||
if (module == null)
|
if (module == null)
|
||||||
return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No such module found."));
|
return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No such module found."));
|
||||||
|
|
||||||
@ -20,10 +28,17 @@ namespace NadekoBot.TypeReaders
|
|||||||
|
|
||||||
public class ModuleOrCrTypeReader : TypeReader
|
public class ModuleOrCrTypeReader : TypeReader
|
||||||
{
|
{
|
||||||
public override Task<TypeReaderResult> Read(ICommandContext context, string input)
|
private readonly CommandService _cmds;
|
||||||
|
|
||||||
|
public ModuleOrCrTypeReader(CommandService cmds)
|
||||||
|
{
|
||||||
|
_cmds = cmds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Task<TypeReaderResult> Read(ICommandContext context, string input, IServiceProvider _)
|
||||||
{
|
{
|
||||||
input = input.ToLowerInvariant();
|
input = input.ToLowerInvariant();
|
||||||
var module = NadekoBot.CommandService.Modules.GroupBy(m => m.GetTopLevelModule()).FirstOrDefault(m => m.Key.Name.ToLowerInvariant() == input)?.Key;
|
var module = _cmds.Modules.GroupBy(m => m.GetTopLevelModule()).FirstOrDefault(m => m.Key.Name.ToLowerInvariant() == input)?.Key;
|
||||||
if (module == null && input != "actualcustomreactions")
|
if (module == null && input != "actualcustomreactions")
|
||||||
return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No such module found."));
|
return Task.FromResult(TypeReaderResult.FromError(CommandError.ParseFailed, "No such module found."));
|
||||||
|
|
@ -1,15 +1,16 @@
|
|||||||
using Discord.Commands;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using NadekoBot.Modules.Permissions;
|
using Discord.Commands;
|
||||||
|
using NadekoBot.Common.TypeReaders.Models;
|
||||||
|
|
||||||
namespace NadekoBot.TypeReaders
|
namespace NadekoBot.Common.TypeReaders
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used instead of bool for more flexible keywords for true/false only in the permission module
|
/// Used instead of bool for more flexible keywords for true/false only in the permission module
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PermissionActionTypeReader : TypeReader
|
public class PermissionActionTypeReader : TypeReader
|
||||||
{
|
{
|
||||||
public override Task<TypeReaderResult> Read(ICommandContext context, string input)
|
public override Task<TypeReaderResult> Read(ICommandContext context, string input, IServiceProvider _)
|
||||||
{
|
{
|
||||||
input = input.ToUpperInvariant();
|
input = input.ToUpperInvariant();
|
||||||
switch (input)
|
switch (input)
|
@ -1,24 +0,0 @@
|
|||||||
using Discord.Commands;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using static NadekoBot.Modules.Permissions.Permissions;
|
|
||||||
|
|
||||||
namespace NadekoBot.DataStructures
|
|
||||||
{
|
|
||||||
public struct ExecuteCommandResult
|
|
||||||
{
|
|
||||||
public readonly CommandInfo CommandInfo;
|
|
||||||
public readonly PermissionCache PermissionCache;
|
|
||||||
public readonly IResult Result;
|
|
||||||
|
|
||||||
public ExecuteCommandResult(CommandInfo commandInfo, PermissionCache cache, IResult result)
|
|
||||||
{
|
|
||||||
this.CommandInfo = commandInfo;
|
|
||||||
this.PermissionCache = cache;
|
|
||||||
this.Result = result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -702,7 +702,7 @@ namespace NadekoBot.Migrations
|
|||||||
column: "BotConfigId");
|
column: "BotConfigId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Repeaters_ChannelId",
|
name: "IX_Repeaters_channelId",
|
||||||
table: "Repeaters",
|
table: "Repeaters",
|
||||||
column: "ChannelId",
|
column: "ChannelId",
|
||||||
unique: true);
|
unique: true);
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
@ -31,7 +30,7 @@ namespace NadekoBot.Migrations
|
|||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_Repeaters_ChannelId",
|
name: "IX_Repeaters_channelId",
|
||||||
table: "Repeaters",
|
table: "Repeaters",
|
||||||
column: "ChannelId",
|
column: "ChannelId",
|
||||||
unique: true);
|
unique: true);
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
using System;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
|
@ -4,8 +4,6 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
using NadekoBot.Services.Database;
|
using NadekoBot.Services.Database;
|
||||||
using NadekoBot.Services.Database.Models;
|
|
||||||
using NadekoBot.Modules.Music.Classes;
|
|
||||||
|
|
||||||
namespace NadekoBot.Migrations
|
namespace NadekoBot.Migrations
|
||||||
{
|
{
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user