Compare commits

..

566 Commits
master ... 1.4

Author SHA1 Message Date
ce783c3f75
Merge pull request #4 from mattburchett/revert-3-1.9
Revert "1.9 2017/11/30"
2017-11-30 19:16:55 -06:00
0589728f58
Revert "1.9 2017/11/30" 2017-11-30 19:16:48 -06:00
be9352bc03
Merge pull request #3 from mattburchett/1.9
1.9 2017/11/30
2017-11-30 19:15:58 -06:00
af26fcfa5f Merge pull request #2 from mattburchett/weather2
Weather2
2017-09-21 10:00:47 -07:00
Matt
7a73869a9f Changing commas to slashes 2017-09-21 10:23:10 -05:00
Matt
b1987be30c Fixing again. 2017-09-21 10:17:02 -05:00
Matt
cdd5928028 Adding a line break, maybe 2017-09-21 09:55:15 -05:00
c3a93b17dc Merge pull request #1 from mattburchett/weather2
Weather2
2017-09-20 19:27:57 -07:00
unknown
55c4691933 Fixing 2017-09-20 21:27:14 -05:00
unknown
cf2532af9a Typo 2017-09-20 21:27:03 -05:00
unknown
89a6adb389 Fixing typo. 2017-09-20 21:19:43 -05:00
unknown
b66ba51e0d Fixing? 2017-09-20 21:09:39 -05:00
unknown
f20ccd01f4 Fixing? 2017-09-20 21:06:44 -05:00
unknown
8842a86b30 Adding Weather Changes to include Fehrenheit as well as Celsius? 2017-09-20 20:32:25 -05:00
Master Kwoth
038f17c3a4 Commands which have no command strings should no longer throw an exception 2017-09-17 08:33:16 +02:00
Master Kwoth
bdc6974451 Commands strings are now in data/command_strings.json. Database path no longer has ./ prefix and filename -> Data Source. Fixed permissions migration due to new EF behaviour. Although commands will now error if they don't have their entry in the command strings - needs fixing. 2017-09-17 07:28:48 +02:00
Master Kwoth
0234df0844 Merge pull request #1602 from shivaco/patch-2
Re-phrase, etc.
2017-09-16 21:10:09 +02:00
shivaco
68a92426c2 Re-phrased, added gif for using .permrole, etc. 2017-09-16 21:28:45 +06:00
shivaco
f5eaa4f335 Totally not noob at Markdowning 2017-09-16 21:23:56 +06:00
Master Kwoth
7923c32323 Merge pull request #1601 from shivaco/patch-2
Markdown edits and re-phrase
2017-09-16 10:36:03 +02:00
shivaco
cf5756e0a8 Some edits in Markdown and a bit of re-phrase 2017-09-16 14:12:53 +06:00
Master Kwoth
9f2d9d6710 version upped 2017-09-16 04:35:02 +02:00
Master Kwoth
6bea4b9f02 Upgraded to .net core 2.0 2017-09-16 02:10:22 +02:00
Master Kwoth
a127e43dc0 Version upped 2017-09-15 22:22:03 +02:00
Master Kwoth
9cff3b59c1 clubapps and clubbans now have ok color line 2017-09-15 22:19:31 +02:00
Master Kwoth
4841418cff Added .clubadmin, .autoboobs and .autobutts, cleaned up SongBuffer. 2017-09-15 22:17:31 +02:00
Master Kwoth
51f9ae9e3b Merge pull request #1593 from shivaco/patch-3
Fixed the mistype + added hyperlink
2017-09-15 19:38:19 +02:00
Master Kwoth
eef5ad0c36 Merge pull request #1598 from numbermaniac/1.4
FAQ.md: Grammar/spelling and sentence structure
2017-09-15 19:27:38 +02:00
numbermaniac
c3755055a1 FAQ.md: Grammar/spelling and sentence structure 2017-09-15 19:42:26 +10:00
Master Kwoth
16fd835d4b Caching anime and manga seraches. Club disband error message fixed. 2017-09-15 02:42:51 +02:00
Master Kwoth
25258a0c61 Possible fix for redis on linux. Setgame/SetStream and rotating statuses will now properly work across shards. 2017-09-14 19:37:41 +02:00
Master Kwoth
37412e4e73 Fixed shop role name. Fixed .xpglb (it will now show usernames and discriminators) 2017-09-13 21:15:49 +02:00
shivaco
494d8405b8 Fixed the mistype + added hyperlink 2017-09-13 23:19:07 +06:00
Master Kwoth
0a52676042 possible fix for null migration error 2017-09-13 08:12:07 +02:00
Master Kwoth
48adfc19af Fixed slow .xp and .xpglb 2017-09-13 05:10:26 +02:00
Master Kwoth
067297478e Removed leftover logs 2017-09-13 03:18:33 +02:00
Master Kwoth
a2c4695557 Global custom reactions now use redis pub/sub 2017-09-13 03:12:40 +02:00
Master Kwoth
438f68cde7 global nadeko won't cache nsfw images 2017-09-12 23:49:37 +02:00
Master Kwoth
46f9de01d6 Using redis to cache avatar images, reduced xp image size. 2017-09-12 22:27:51 +02:00
Master Kwoth
90b698f18e Fixed .clubapply help string 2017-09-12 08:14:58 +02:00
Master Kwoth
d51c28b73c .xpglb should be faster now. 2017-09-12 05:00:14 +02:00
Master Kwoth
f08fd3bdb1 1.8.4 2017-09-11 23:39:44 +02:00
Master Kwoth
ea0ca1471f Xp system fixes 2017-09-11 23:39:28 +02:00
Master Kwoth
4c591a69b1 Fixes to .xprr, leveling system 2017-09-11 22:43:32 +02:00
Master Kwoth
d658fe7414 Updated discord.net 2017-09-11 20:25:06 +02:00
Master Kwoth
81a7c6f398 Added .nsfwcc command to prevent memory leaks if nsfw is spammed a lot. 2017-09-11 19:30:02 +02:00
Master Kwoth
cdf15d6c01 Fixed club leaderboard 2017-09-11 19:20:18 +02:00
Master Kwoth
1a85825049 Fixed trivia, closes #1578 2017-09-11 19:12:49 +02:00
Master Kwoth
62c016c7cf 1.8.2 2017-09-11 01:49:51 +02:00
Master Kwoth
6c3025ecf1 Potential xp null error fix 2017-09-11 01:42:39 +02:00
Master Kwoth
927e98514a Fixed exclusion list after restarts, closes #1571 2017-09-11 00:21:14 +02:00
Master Kwoth
3de9a40ffd Fixed catfact thanks to twindragon, closes #1547 2017-09-11 00:01:31 +02:00
Master Kwoth
1af4679d9e When you guess a letter in hangman, updated message will now correctly show previous guesses. closes #1541 2017-09-10 23:48:34 +02:00
Master Kwoth
4adf85a9eb Possible fix for #1523, im not testing that though :D 2017-09-10 23:44:24 +02:00
Master Kwoth
531633b018 Possible trivia weirdness fix, #1522 2017-09-10 23:15:58 +02:00
Master Kwoth
76249c5b29 Made numbers 3 and 7 smaller in slot image because they were overflowing 2017-09-10 23:08:46 +02:00
Master Kwoth
771e0df064 closes #1500, #1433 2017-09-10 23:01:26 +02:00
Master Kwoth
2ab4274c22 Don't lose ignored channels if updating .antiraid #1402 2017-09-10 22:44:23 +02:00
Master Kwoth
6f12ad1478 Docs updates, closes #1570 2017-09-10 22:32:29 +02:00
Master Kwoth
b9f22df756 Fixed .xpex command help, .xpex channel will now default to current channel 2017-09-10 19:14:29 +02:00
Master Kwoth
6b896d8091 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-09-10 17:58:41 +02:00
Master Kwoth
268f9b0448 fixed .xpglb help string. Version upped to 1.8.1 2017-09-10 17:58:32 +02:00
Master Kwoth
5403105062 Merge pull request #1566 from shivaco/patch-2
Some mistypes
2017-09-10 17:25:44 +02:00
Master Kwoth
192667aa35 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-09-10 17:04:42 +02:00
Master Kwoth
af334a0b5c fixed club creation bug 2017-09-10 17:04:32 +02:00
shivaco
14490024ea FIx of some mistypes 2017-09-10 16:20:55 +06:00
Master Kwoth
88833bd5fc Merge pull request #1565 from numbermaniac/1.4
fix spelling of "client" in JSON Explanations.md
2017-09-10 06:30:55 +02:00
numbermaniac
9531fb7717 fix spelling of "client" in JSON Explanations 2017-09-10 14:16:11 +10:00
Master Kwoth
cd2a86c624 Updated commandlist 2017-09-10 04:00:56 +02:00
Master Kwoth
35176465b1 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-09-10 03:54:17 +02:00
Master Kwoth
306ff3a918 Merge branch 'xp-system' into 1.4 2017-09-10 03:53:56 +02:00
Master Kwoth
96d792f63b Xp and clubs finished. Need a lot of testing. Version upped to 1.8-beta 2017-09-10 03:52:34 +02:00
Master Kwoth
f61123ef92 Merge pull request #1545 from Deivedux/1.4
Fixed command prefixes in Permissions System doc
2017-08-30 20:15:17 +02:00
Deivedux
2aca71cd8a Update Permissions System.md 2017-08-30 20:56:44 +03:00
Master Kwoth
20fb253eb3 Removed .rrc because it's prohibited 2017-08-25 22:48:39 +02:00
Master Kwoth
5362821843 Version upped 2017-08-22 05:50:03 +02:00
Master Kwoth
19d710cdd4 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-08-22 05:49:04 +02:00
Master Kwoth
088d95340f Started work on the xp system 2017-08-22 05:48:45 +02:00
Master Kwoth
e5609a0708 .prefix bugfix, #1524 2017-08-22 05:47:57 +02:00
Master Kwoth
a612e50ea3 Merge pull request #1521 from alistairmackenzie/1.4
Fix typo in rategirl command.
2017-08-21 03:22:04 +02:00
Alistair Mackenzie
658597db9f Fix typo in rategirl command. Solves #1517 2017-08-21 02:08:57 +01:00
Master Kwoth
919c81d385 Fixed .wheel example 2017-08-16 22:05:06 +02:00
Master Kwoth
f255ed26dd .sad enable/disable string was swapped 2017-08-16 11:51:41 +02:00
Master Kwoth
03a86b0be9 Antispam can now take an extra parameter at the end which is the time of the mute. It will be ignored if punishment type isn't mute 2017-08-16 01:12:18 +02:00
Master Kwoth
fe3770270e Added .songautodelete/.sad command. 2017-08-15 23:54:54 +02:00
Master Kwoth
e50e71014e Upped version 2017-08-15 22:59:48 +02:00
Master Kwoth
d74a23d215 You can now gift items to waifus with '.gift' command 2017-08-14 07:25:32 +02:00
Master Kwoth
7a1895bf31 possible fix for flowerreaction event on public nadeko 2017-08-14 05:19:37 +02:00
Master Kwoth
70906ed5cb Added betflip and betroll multiplier to .bce, closes #1498 2017-08-13 04:24:20 +02:00
Master Kwoth
a98be21181 small error fix 2017-08-11 22:53:31 +02:00
Master Kwoth
1552d2c892 Fixed extra space in %target%, closes #1483 2017-08-11 14:02:48 +02:00
Master Kwoth
6c5ea68032 .antispam should now update when you use it with new parameters. Use no parameters to disable it if it exists, or run it with default values if it doesn't 2017-08-06 18:01:10 +02:00
Master Kwoth
0bf6459e6a if .tesar is enabled, .iam will remove all other self assignable roles except only one. #1402 2017-08-06 17:43:15 +02:00
Master Kwoth
f02ac7cd78 renamed hitbox to smashcast 2017-08-06 17:34:52 +02:00
Master Kwoth
e2d7ed343c Beam renamed to mixer. Version upped. 2017-08-06 16:07:48 +02:00
Master Kwoth
57dd324f3e You can no longer give your max role to other users with .sr 2017-08-06 15:59:29 +02:00
Master Kwoth
464118f792 having .crca enabled with %target% will replace target with everything that comes after the trigger wherever it is in the triggering message 2017-08-06 14:31:28 +02:00
Master Kwoth
10fdd36e87 fixed sfi and sfw not ignoring server admin when message is edited. #1444 2017-08-06 12:02:13 +02:00
Master Kwoth
1358878773 Fixed index for .qn 2017-08-06 11:49:27 +02:00
Master Kwoth
540209706d Added .qn and fixed .hangman bugs 2017-08-05 12:38:53 +02:00
Master Kwoth
79d3fca7e4 Fixed incorrect usage for .ttt 2017-08-05 10:51:46 +02:00
Master Kwoth
d12d70df1b Fixed connect4 weird wins 2017-08-05 10:46:38 +02:00
Master Kwoth
ce602b5b35 Version upped 2017-08-05 10:13:05 +02:00
Master Kwoth
38125509e5 fixed .weather min/max temperature 2017-08-05 10:12:20 +02:00
Master Kwoth
958eca2935 Nunchi fix, shop fix 2017-08-05 09:52:32 +02:00
Master Kwoth
dea9a935a4 Small nunchi fix, global nadeko improvement 2017-08-04 19:43:25 +02:00
Master Kwoth
47125ed687 connect4 bugfixes 2017-08-04 18:12:26 +02:00
Master Kwoth
ec7f69f1c0 connect4 game added. 2017-08-04 14:36:07 +02:00
Master Kwoth
94e4c89564 Updated commandlist 2017-08-03 20:19:43 +02:00
Master Kwoth
d9a446d874 Nunchi is much more fair and forgiving now. There are 5 seconds delays between rounds, and only one player can fail per round (multiple users can still get booted if they're inactive) 2017-08-03 20:19:09 +02:00
Master Kwoth
f3984c824e Nunchi game added. A bit confusing now. Will be polished further tomorrow. 2017-08-03 00:29:38 +02:00
Master Kwoth
e0be610ec0 .wheel command added (wheel of fortune gambling) 2017-08-02 22:07:19 +02:00
Master Kwoth
82aac891dd animal racing rewritten to be isolated. Please hunt bugs. 2017-08-01 00:11:36 +02:00
Master Kwoth
3097ef88a7 Fixed hangman error 2017-07-31 08:50:04 +02:00
Master Kwoth
f06ee47516 cleanup 2017-07-28 12:38:08 +02:00
Master Kwoth
d5978a0d66 .hangman completely rewritten. Should work almost the same, with some minor improvements (such as showing the category, and you can now guess the whole word at once) 2017-07-28 12:28:08 +02:00
Master Kwoth
53661b3337 Removed old stuff 2017-07-27 18:44:45 +02:00
Master Kwoth
2fe812c4ac Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-07-27 18:43:37 +02:00
Master Kwoth
fece28b66b Acrophobia completely rewritten. Works the same as before, only much more maintainable. It won't repost itself after 10 messages anymore though. 2017-07-27 18:43:15 +02:00
Master Kwoth
bf7585cd83 slight cleanup 2017-07-26 18:19:39 +02:00
Master Kwoth
f1e59d561d Update ResponseStrings.ru-RU.json (POEditor.com) 2017-07-26 18:09:29 +02:00
Master Kwoth
97b84ef469 Update ResponseStrings.ro-RO.json (POEditor.com) 2017-07-26 18:09:26 +02:00
Master Kwoth
a0496454bd Update ResponseStrings.pt-BR.json (POEditor.com) 2017-07-26 18:09:24 +02:00
Master Kwoth
ffd570511a Update ResponseStrings.pl-PL.json (POEditor.com) 2017-07-26 18:09:21 +02:00
Master Kwoth
ed623dd967 Update ResponseStrings.nb-NO.json (POEditor.com) 2017-07-26 18:09:19 +02:00
Master Kwoth
e10aee9c69 Update ResponseStrings.ko-KR.json (POEditor.com) 2017-07-26 18:09:16 +02:00
Master Kwoth
6294dc8679 Update ResponseStrings.ja-JP.json (POEditor.com) 2017-07-26 18:09:13 +02:00
Master Kwoth
89b810df54 Update ResponseStrings.it-IT.json (POEditor.com) 2017-07-26 18:09:11 +02:00
Master Kwoth
2d1b5dda96 Update ResponseStrings.id-ID.json (POEditor.com) 2017-07-26 18:09:08 +02:00
Master Kwoth
2a137004a5 Update ResponseStrings.he-IL.json (POEditor.com) 2017-07-26 18:09:05 +02:00
Master Kwoth
92bf9b88b4 Update ResponseStrings.de-DE.json (POEditor.com) 2017-07-26 18:09:03 +02:00
Master Kwoth
44b3223c1b Update ResponseStrings.fr-FR.json (POEditor.com) 2017-07-26 18:09:00 +02:00
Master Kwoth
81f0032262 Update ResponseStrings.nl-NL.json (POEditor.com) 2017-07-26 18:08:57 +02:00
Master Kwoth
d86c8ed41b Update ResponseStrings.da-DK.json (POEditor.com) 2017-07-26 18:08:55 +02:00
Master Kwoth
afda3e2046 Update ResponseStrings.cs-CZ.json (POEditor.com) 2017-07-26 18:08:52 +02:00
Master Kwoth
8e7935f893 Update ResponseStrings.zh-TW.json (POEditor.com) 2017-07-26 18:08:49 +02:00
Master Kwoth
5295704447 Update ResponseStrings.zh-CN.json (POEditor.com) 2017-07-26 18:08:47 +02:00
Master Kwoth
c738cb569e Update ResponseStrings.ar.json (POEditor.com) 2017-07-26 18:08:44 +02:00
Master Kwoth
263a95a6ad cleanup 2017-07-25 18:31:30 +02:00
Master Kwoth
e9cf57d46f .crdm was deleted by accident, it's back now 2017-07-23 09:52:45 +02:00
Master Kwoth
f773b0c6b6 .crca added. If you enable it on a custom reation, you can use the trigger word anywhere in the sentence in order to trigger that custom reaction. 2017-07-22 18:12:08 +02:00
Master Kwoth
1aa86937c8 small changes 2017-07-22 07:57:17 +02:00
Master Kwoth
f1b348406d Bugfixes 2017-07-21 07:10:17 +02:00
Master Kwoth
b9bb72f06d Streamrole is smarter, but possibly more expensive. It will rescan users when settings are changed. And when the bot is started. 2017-07-21 06:56:21 +02:00
Master Kwoth
d074444c26 commandlist updated 2017-07-21 03:05:13 +02:00
Master Kwoth
0d216ad78a .nsfwtbl added. You can now blacklist tags which are used in nsfw commands. 2017-07-21 03:04:44 +02:00
Master Kwoth
0131b7713e Make sure to assign new bot creds variable 2017-07-20 23:48:25 +02:00
Master Kwoth
613655eb95 You can now add CleverBotApiKey from cleverbot.com/api in order to use official cleverbot, instead of stupid program-o 2017-07-20 22:58:19 +02:00
Master Kwoth
cedaf73785 Sped up .streamrole initialization 5x, but it might error out if there are too many users streaming when the command is ran. 2017-07-20 20:03:11 +02:00
Master Kwoth
9163510eee .bce command added, you can now edit BotConfig without editing the database and restarting the bot. Cleanup 2017-07-20 05:10:39 +02:00
Master Kwoth
fe88611183 Fixed .shop pagination 2017-07-19 11:02:14 +02:00
Master Kwoth
4130317f40 .srkw, .srwl and .srbl commands added. 2017-07-19 10:38:14 +02:00
Master Kwoth
3f7f6cecbe Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-07-19 09:31:10 +02:00
Master Kwoth
50236d71d5 Fixed multi-shard bots 2017-07-19 09:31:00 +02:00
Master Kwoth
8612dc852e Merge pull request #1423 from Deivedux/1.4
Updated windows guides
2017-07-18 21:07:39 +02:00
Deivedux
8dd24443c0 Update Windows Guide.md
Added missing installation part for music features.
2017-07-18 21:30:27 +03:00
Deivedux
86743250cf Update Upgrading Guide.md
Windows part of the upgrading guide is now more straightforward.
2017-07-18 21:29:08 +03:00
Master Kwoth
661d026973 Updated imagesharp 2017-07-18 18:26:55 +02:00
Master Kwoth
55b1c3945b Updated commandlist. Goodbye clash of clans 👋 closes #1420 2017-07-18 04:25:30 +02:00
Master Kwoth
c054543d98 Huge refactor is over 2017-07-17 21:42:36 +02:00
Master Kwoth
618968d2e4 More refactoring 2017-07-17 04:37:51 +02:00
Master Kwoth
4e11a6c8bc More refactoring 2017-07-15 18:34:34 +02:00
Master Kwoth
b3243eb0e9 More cleanup 2017-07-15 15:08:34 +02:00
Master Kwoth
028606b080 More cleanup 2017-07-15 05:54:36 +02:00
Master Kwoth
ac5e4e7540 Version upped 2017-07-15 05:33:23 +02:00
Master Kwoth
30bafa8a89 More cleanup 2017-07-15 05:23:46 +02:00
Master Kwoth
4eca5be1d4 Huge cleanup,
rewrite of the NadekoBot.cs, way services are loaded has changed. Updated discord.net.
2017-07-15 05:04:16 +02:00
Master Kwoth
f239c46e20 Words should get filtered in edited messages too. 2017-07-14 18:39:21 +02:00
Master Kwoth
1c72d2864a Merge pull request #1397 from samdivaio/1.5-music-changes
Stop no longer resets current song index 0, formatting changes. Use `.srm all` to get pre-update `.stop` behavior (clears the queue and stops the player)
2017-07-14 17:52:44 +02:00
Master Kwoth
45ee3042bb Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-07-14 17:49:55 +02:00
Master Kwoth
17719dd8e2 finished .streamrole 2017-07-14 17:09:06 +02:00
samvaio
11b533c3b7 Done as per Kwoth. 2017-07-14 09:45:31 +05:30
Master Kwoth
b8573f11b5 Added .streamrole, needs testing. 2017-07-14 05:00:30 +02:00
samvaio
f26a7de704 Revert "Stop works as it used to before. Auto rpl disabled."
This reverts commit fd410bc856.
2017-07-14 00:54:23 +05:30
Master Kwoth
6124c3dce8 Merge pull request #1403 from hakufu/1.4
Add deny perm for addReactions on mute
2017-07-13 20:36:55 +02:00
hakufu
390a637c08 Add deny perm for addReactions on mute
Added the permission for the channel override when muting to also include the denial of "addReactions."
2017-07-13 14:08:51 -04:00
samvaio
202c5e98a5 Makeover to highlight the information.
Look is similar to early version of Nadeko.
2017-07-13 17:45:46 +05:30
samvaio
fd410bc856 Stop works as it used to before. Auto rpl disabled.
Bot no longer repeats playlist on default.

Bot now clears the queued songs list (playlist)
- if `.stop` command is used.
- if the last song of the queue is playing and `.next` command is used.
- if the the last song of the queue finished playing.
2017-07-13 17:36:49 +05:30
samvaio
c328ec68d3 Documents updated
macOS prerequisite info added
2017-07-13 17:34:28 +05:30
samvaio
4dbdce7f5d Merge pull request #15 from Kwoth/1.4
ups
2017-07-13 17:14:29 +05:30
Master Kwoth
67f0cfb717 Version upped 2017-07-13 04:09:38 +02:00
Master Kwoth
ed40bc99b2 .movesong works more intuitively now, and current song's index is now updated after songs are moved 2017-07-13 04:09:21 +02:00
Master Kwoth
b85cc023f2 format 2017-07-12 15:38:34 +02:00
Master Kwoth
467b482ff9 Added some stuff to stats sending 2017-07-12 04:13:50 +02:00
Master Kwoth
c0012e296e Some stats stuff for science 2017-07-12 03:39:44 +02:00
Master Kwoth
8a75c28d73 Small doc fixes 2017-07-12 02:02:17 +02:00
Master Kwoth
4b9977e5d6 Upped version 2017-07-11 20:22:24 +02:00
Master Kwoth
c1cf85b338 Fixed error when logging something related to a user who has no avatar, closes #1381 2017-07-11 20:22:06 +02:00
Master Kwoth
5e230fad22 using .n when rpl is disabled will stop the queue 2017-07-11 20:11:36 +02:00
Master Kwoth
0e4728d9c9 Fixed .play when queue is stopped. .play X will now also unstop the player 2017-07-11 19:52:10 +02:00
Master Kwoth
8f90410e2d Small refactor 2017-07-11 03:16:56 +02:00
Master Kwoth
ec94459722 Fixed soundcloud song length, closes #1380 2017-07-11 01:23:37 +02:00
Master Kwoth
ab3ad4f2fb Upped version 2017-07-10 21:56:53 +02:00
Master Kwoth
dc0176365b Fixed .convert, closes #1377 2017-07-10 21:35:45 +02:00
Master Kwoth
34b56c6353 Fixed .srm, closes #1373 2017-07-10 21:31:47 +02:00
Master Kwoth
9a744172a9 Fixed a bug where spamming .n would crash the music player, closes #1372 2017-07-10 21:21:45 +02:00
Master Kwoth
70f0f6af44 Fixed some links queueing random songs. closes #1368 2017-07-10 21:08:11 +02:00
Master Kwoth
3119a47007 Upped version 2017-07-10 19:40:55 +02:00
Master Kwoth
5db254e8f3 Fixed .lolban, closes #1340 2017-07-10 19:40:34 +02:00
Master Kwoth
f396fc78db Fixed shard number bold in unresponsive shard 2017-07-09 19:26:17 +02:00
Master Kwoth
9d778de7f2 fixed .ropl with %queued% and %playing% 2017-07-09 12:43:14 +02:00
Master Kwoth
3966629263 Upped version 2017-07-09 01:40:54 +02:00
Master Kwoth
f1a4a88730 Fixed song time on songs shorter than 1 minute 2017-07-09 01:39:47 +02:00
Master Kwoth
fad0b908c8 fixed .autoplay 2017-07-09 01:37:17 +02:00
Master Kwoth
9eab7d949f Possibly fix youtube-dl certificate error 2017-07-09 00:56:12 +02:00
Master Kwoth
f58e7ed7ac Fixed .warnlogall, updated commandlist 2017-07-08 15:27:48 +02:00
Master Kwoth
27f925fa63 Fixed userpresence and game changes readded to userpresence 2017-07-08 14:54:19 +02:00
Master Kwoth
aa01314b3a Embed field names and values will be trimmed to their acceptable length to prevent errors. closes #1355 2017-07-08 14:20:06 +02:00
Master Kwoth
72e7b04319 Fixed 100% cpu usage on single threaded systems. Totally my bad. 2017-07-08 13:42:16 +02:00
Master Kwoth
568cdfbd3c Fixed .save 2017-07-08 13:27:53 +02:00
Master Kwoth
4132565948 Fixed footer icon urls 2017-07-08 00:05:11 +02:00
Master Kwoth
96ae60378b 1.54b 2017-07-07 23:23:10 +02:00
Master Kwoth
4de7e38277 fixed trivia, and some other things 2017-07-07 23:22:34 +02:00
Master Kwoth
ab99801a37 version upped 2017-07-07 16:07:57 +02:00
Master Kwoth
994457f9af Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-07-07 15:52:38 +02:00
Master Kwoth
9e9f21d525 Update ResponseStrings.ro-RO.json (POEditor.com) 2017-07-07 15:48:42 +02:00
Master Kwoth
f3f934e05f Update ResponseStrings.pt-BR.json (POEditor.com) 2017-07-07 15:48:40 +02:00
Master Kwoth
bf860f9aa8 Update ResponseStrings.pl-PL.json (POEditor.com) 2017-07-07 15:48:37 +02:00
Master Kwoth
a49002a808 Update ResponseStrings.nb-NO.json (POEditor.com) 2017-07-07 15:48:35 +02:00
Master Kwoth
88e42e672b Update ResponseStrings.ko-KR.json (POEditor.com) 2017-07-07 15:48:32 +02:00
Master Kwoth
fcbf3a0918 Update ResponseStrings.ja-JP.json (POEditor.com) 2017-07-07 15:48:29 +02:00
Master Kwoth
cb04e987c3 Update ResponseStrings.it-IT.json (POEditor.com) 2017-07-07 15:48:27 +02:00
Master Kwoth
7f4970a5da Update ResponseStrings.id-ID.json (POEditor.com) 2017-07-07 15:48:24 +02:00
Master Kwoth
19246b9bf2 Update ResponseStrings.he-IL.json (POEditor.com) 2017-07-07 15:48:20 +02:00
Master Kwoth
b73e0d18e5 Update ResponseStrings.de-DE.json (POEditor.com) 2017-07-07 15:48:17 +02:00
Master Kwoth
d0c580f39a Update ResponseStrings.fr-FR.json (POEditor.com) 2017-07-07 15:48:14 +02:00
Master Kwoth
93b48ff3b0 Update ResponseStrings.nl-NL.json (POEditor.com) 2017-07-07 15:48:12 +02:00
Master Kwoth
b04e7cbd55 Update ResponseStrings.da-DK.json (POEditor.com) 2017-07-07 15:48:09 +02:00
Master Kwoth
fe175ecd43 Update ResponseStrings.cs-CZ.json (POEditor.com) 2017-07-07 15:48:06 +02:00
Master Kwoth
c7936335bf Update ResponseStrings.zh-TW.json (POEditor.com) 2017-07-07 15:48:04 +02:00
Master Kwoth
264e38c7a0 Update ResponseStrings.zh-CN.json (POEditor.com) 2017-07-07 15:48:01 +02:00
Master Kwoth
d782ceb9fa Update ResponseStrings.ar.json (POEditor.com) 2017-07-07 15:47:58 +02:00
Master Kwoth
e15045292f Fixed embeds 2017-07-07 15:45:21 +02:00
Master Kwoth
74ad7b32bd done testing 2017-07-07 13:40:17 +02:00
Master Kwoth
d55a9efe9b Don't use poopy buffer 2017-07-07 12:16:01 +02:00
Master Kwoth
9196c1e368 test try 3 2017-07-07 10:30:19 +02:00
Master Kwoth
a0a6de855d test try 2 2017-07-07 10:21:40 +02:00
Master Kwoth
6af90191c3 Test not sending data 2017-07-07 10:12:56 +02:00
Master Kwoth
793cbdf608 Fixed song spam for good 2017-07-07 09:54:25 +02:00
Master Kwoth
8331af2870 cleanup 2017-07-06 19:46:23 +02:00
Master Kwoth
a55f61aa8c Cleanup, should repull stream urls now, to prevent the link expired issue 2017-07-06 19:34:16 +02:00
Master Kwoth
5d6b0f44ae .q now uses youtube-dl 2017-07-06 19:30:22 +02:00
Master Kwoth
62326da5b5 Ytdl class 2017-07-06 19:25:38 +02:00
Master Kwoth
1694727ad9 Fixed .lo and .lopl 2017-07-06 19:20:00 +02:00
Master Kwoth
88945af60b Removed -ss param from ffmpeg for now, since i'm not using it 2017-07-05 22:27:54 +02:00
Master Kwoth
fb18c2ed32 Fixed discord.net errors 2017-07-05 21:22:55 +02:00
Master Kwoth
98e2b0ce37 More logs, player loop moved to a thread 2017-07-05 18:53:21 +02:00
Master Kwoth
fbedf5878b More logs 2017-07-05 18:39:54 +02:00
Master Kwoth
42923c5272 a lot of logs to pinpoint cpu usage on some systems 2017-07-05 18:15:46 +02:00
Master Kwoth
269a4e3157 Upgraded dicord.net 2017-07-05 17:38:38 +02:00
Master Kwoth
8f844d38d3 Removed leftover log 2017-07-05 17:05:29 +02:00
Master Kwoth
94bb6f15a7 danbooru fix 2017-07-05 17:02:40 +02:00
Master Kwoth
78be4598cf Repull video with it's uri if it's a youtube song, every time a song is played, #1334 2017-07-05 16:59:59 +02:00
Master Kwoth
ab07199a1e Fixed converter? 2017-07-05 16:41:51 +02:00
Master Kwoth
3a71f63754 Fixed music 2017-07-05 15:32:57 +02:00
Master Kwoth
4cf54c1b31 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-07-05 15:19:11 +02:00
Master Kwoth
9fddfe77c4 Shards will now show when they're unresponsive in .shardstats command 2017-07-05 15:16:06 +02:00
Master Kwoth
6b51dbd330 Added correct time guild time based on set .timezone to reminders confirmation message, and logs, close #1328 2017-07-05 13:41:50 +02:00
Master Kwoth
d0326ad680 readded %playing% and %queued% placeholders 2017-07-05 13:31:41 +02:00
Master Kwoth
d089a37bf0 You can now use %server_time% placeholder to get your server's time, if you've set your timezone 2017-07-05 13:17:59 +02:00
Master Kwoth
65b76ec48e .die should now stop all music players, #1329 2017-07-05 12:23:37 +02:00
Master Kwoth
221a30b576 Fixed .ow for some users 2017-07-05 12:02:02 +02:00
Master Kwoth
768c8b20ee Fixed volume, closes #1332 2017-07-05 11:47:35 +02:00
Master Kwoth
c244cb7de0 Commandlist and docs update 2017-07-05 11:46:29 +02:00
Master Kwoth
6591dd7c74 Bot will now show in the console when it joins or leaves a server 2017-07-05 11:43:36 +02:00
Master Kwoth
54a91b4a79 Dispose pcm 2017-07-05 11:23:31 +02:00
Master Kwoth
b4cf9fee84 closes #1321 2017-07-05 11:07:54 +02:00
Master Kwoth
507c9de136 Merge pull request #1330 from Kwoth/music-rework
Music rework
2017-07-04 23:52:34 +02:00
Master Kwoth
9bb8f3d666 .ms readded 2017-07-04 23:38:11 +02:00
Master Kwoth
c33c2bce60 Readded total playtime 2017-07-04 15:42:07 +02:00
Master Kwoth
d5903a1e25 Readded current time and song durations 2017-07-04 15:38:19 +02:00
Master Kwoth
8b72447b0f Removed testing delay 2017-07-04 15:32:38 +02:00
Master Kwoth
17158d5e80 Testing something 2017-07-04 13:05:23 +02:00
Master Kwoth
a6d432de7f Try ignoring errors 2017-07-04 12:38:01 +02:00
Master Kwoth
b1a4aa6a21 Fix 2017-07-04 11:27:48 +02:00
Master Kwoth
556174ec89 Restart ffmpeg if it crashes? Maybe i should reconsider file-based cache. Ffmpeg doesn't like being slowed down it seems 2017-07-04 11:23:34 +02:00
Master Kwoth
842b45178d Added reconnect arguments to ffmpeg 2017-07-04 10:16:18 +02:00
Master Kwoth
684dba0d9c added some debugging 2017-07-04 00:21:45 +02:00
Master Kwoth
fc941770e9 Removed spam 2017-07-03 23:59:56 +02:00
Master Kwoth
eba804b5ce Cleanup, improvements 2017-07-03 23:27:17 +02:00
Master Kwoth
f826fb97f6 Super weird fixes, i must've broke something else. Bot has to reconnect after restart now 2017-07-03 21:05:35 +02:00
Master Kwoth
89eabc7c14 Fixed crash 2017-07-03 20:29:32 +02:00
Master Kwoth
44859529d5 Cleanup and fixes 2017-07-03 20:26:17 +02:00
Master Kwoth
421431d01d pausing disabled again due to issues 2017-07-03 13:18:13 +02:00
Master Kwoth
99049a6ace Prebuffering time drastically decreased 2017-07-03 12:46:51 +02:00
Master Kwoth
a609e17717 .play help update, readded pausing when nobody is in voice channel, and also cleaning up music players if bot is kicked or leaves the server 2017-07-03 12:40:12 +02:00
Master Kwoth
3c9b68e739 Cleanup, .smp is reimplemented, and will now show in .lq too 2017-07-02 20:58:45 +02:00
Master Kwoth
9f3c04c93e you can now load only 1 playlist at a time using .load, because it's expensive 2017-07-02 19:20:04 +02:00
Master Kwoth
196f40e648 readded .sq and .lo and .lopl, also .lopl will now explicitly avoid files with .jpg and .png extension (usually album images) 2017-07-02 19:00:25 +02:00
Master Kwoth
728aeab809 Fixes. .lq will say at the top if it's stopped. .lq will also default to the page current song is playing from 2017-07-02 17:15:34 +02:00
Master Kwoth
1d1b7de20a Fixed playing small songs 2017-07-02 16:54:09 +02:00
Master Kwoth
322424b0a1 .move fixed, but it will cancel current song when moving 2017-07-02 16:27:30 +02:00
Master Kwoth
b33e4bdd80 fixed .play 2017-07-02 16:20:25 +02:00
Master Kwoth
45e4816033 (Re)added shuffle, rpl, rcs and autoplay to the top of the .lq 2017-07-02 15:44:00 +02:00
Master Kwoth
8e1c20624d Fixed bugs, added .play command which acts as .n 1 when used without arguments or as .q command when used with serach query 2017-07-02 14:49:37 +02:00
Master Kwoth
5015b6ad95 cleanup 2017-07-02 13:53:09 +02:00
Master Kwoth
0e73372c23 buffer is now 50MB 2017-07-02 13:19:05 +02:00
Master Kwoth
7de15bf444 magic numbers 2017-07-02 10:58:04 +02:00
Master Kwoth
bbe3ac66e3 Try reading more from ffmpeg 2017-07-02 10:44:30 +02:00
Master Kwoth
4d52566250 woops 2017-07-02 10:35:46 +02:00
Master Kwoth
f2d1b821d0 Trying to pinpoint song skipping 2017-07-02 10:33:47 +02:00
Master Kwoth
e792e7b39e removed -nostdin ffmpeg argument 2017-07-02 10:22:47 +02:00
Master Kwoth
42658355b1 music debug stuff 2017-07-02 09:55:26 +02:00
Master Kwoth
9bb72d9976 Shuffle will now show in .lq at the top, and instead of shuffling playlist, it will randomly jump to a song in the playlist. " 2017-07-02 08:03:24 +02:00
Master Kwoth
3731994061 Lot more work, fixes, addition, untested new implementations... 2017-07-01 21:22:11 +02:00
Master Kwoth
9889baf8bd Poopy buffer is back ^_^ Music lag fixes... 2017-07-01 17:16:03 +02:00
Master Kwoth
f8ad6dda50 small changes 2017-07-01 08:16:06 +02:00
Master Kwoth
d242952d4a Huge amount of work on the music rework. Around 60% done. Fixed bot getting stuck when server region is changed. 2017-07-01 08:15:58 +02:00
Master Kwoth
8f5c63a057 fixed .ropl toggle response 2017-06-30 05:40:17 +02:00
Master Kwoth
cb5fdde6d0 Fixed .guide links 2017-06-29 18:40:13 +02:00
Master Kwoth
728539528f drastic nsfw and safebooru improvements 2017-06-29 17:58:16 +02:00
Master Kwoth
db1581f67d fixed public bot compilation issue for good 2017-06-29 06:10:56 +02:00
Master Kwoth
3709f4b066 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-29 05:23:00 +02:00
Master Kwoth
1df7e4d3d0 custom reaction responses are no longer lowercase? 2017-06-29 05:07:48 +02:00
Master Kwoth
6b0889f845 Merge pull request #1316 from Poag/patch-4
Update Docker Guide.md
2017-06-28 11:20:22 +02:00
Poag
d7a0168fc5 Update Docker Guide.md 2017-06-28 10:13:10 +01:00
Master Kwoth
5fc9c18d98 You can now use .warnlog on yourself 2017-06-28 07:05:08 +02:00
Master Kwoth
b08ad7cb77 .warnlogall command added 2017-06-28 04:59:32 +02:00
Master Kwoth
e9365b7753 Added module name under the
command help when using .h
\

q
2017-06-28 03:48:55 +02:00
Master Kwoth
cbd2de284f .hangmanstop command added, updated commandlist 2017-06-28 03:42:02 +02:00
Master Kwoth
36069d7552 remove user's message when they vote in the polls. close #1313 2017-06-28 03:29:33 +02:00
Master Kwoth
cedf08b128 normal quote responses now have replacements too, not only embeds 2017-06-28 03:19:16 +02:00
Master Kwoth
ed3ccbf6d9 version upped to 1.51 2017-06-28 02:46:26 +02:00
Master Kwoth
942f15cf05 WHEW. Added placeholders in embeds and quotes, added docs about it to explained features. Wrote a placeholder system and fixed some bugs 2017-06-28 02:44:30 +02:00
Master Kwoth
aa5b7f96c7 Bot no longer awards itself currency in flower events. closes #1266 2017-06-27 01:01:17 +02:00
Master Kwoth
85a07d1cdd fixed string key 2017-06-25 11:13:07 +02:00
Master Kwoth
273af5ffe4 Slight change to the docs 2017-06-25 10:58:48 +02:00
Master Kwoth
8a4d76b8e6 removed .net sdk link in windows guide 2017-06-25 09:51:41 +02:00
Master Kwoth
721ad63add Removed semaphore 2017-06-25 08:00:52 +02:00
Master Kwoth
dca4bf39a0 Updated credentials_example.json 2017-06-25 07:11:27 +02:00
Master Kwoth
61a96d9c4f Merge branch 'shard-process' into 1.4 2017-06-25 07:06:46 +02:00
Master Kwoth
39e79843e1 Merge branch 'dev' into shard-process 2017-06-25 06:19:18 +02:00
Master Kwoth
e75f23557b Small addition to docs 2017-06-25 06:18:23 +02:00
Master Kwoth
ee8643bf29 You can now choose port
where shard communication is happening. JSON explanations with instructions on how to ed
it optional shard settings
2017-06-25 06:09:23 +02:00
Master Kwoth
902ddc70f6 triggered permissions are now translatable 2017-06-25 04:58:48 +02:00
Master Kwoth
ff56af3e73 .rar fixed, closes #1306 2017-06-25 03:56:23 +02:00
Master Kwoth
3f2eef5647 .ve now properly persists restarts 2017-06-25 02:39:31 +02:00
Master Kwoth
e1baa3942a .gc and stream follows should properly persist restarts 2017-06-25 02:35:37 +02:00
Master Kwoth
f11429b714 anilist api should work a bit better and is cleaner 2017-06-25 01:45:11 +02:00
Master Kwoth
e27e1005eb poll is now public poll, private poll removed 2017-06-24 07:23:59 +02:00
Master Kwoth
7ad5c5e02b Patreon rewards fix finished 2017-06-24 05:24:43 +02:00
Master Kwoth
a8f2ca60c2 Reenabled converter commands. Improved rewards reload on bots with multiple shards. 2017-06-24 01:41:24 +02:00
Master Kwoth
741538a982 Slightly faster startup and database access. Shard 0 will now report total guild count 2017-06-22 23:59:54 +02:00
Master Kwoth
bed3001ce1 Database should be faster, disabled unit converter temporarily 2017-06-22 22:16:58 +02:00
Master Kwoth
0aa65b2953 Fixes to remind and shardstats 2017-06-22 03:39:26 +02:00
Master Kwoth
2cad7f4475 small fixes 2017-06-22 00:47:29 +02:00
Master Kwoth
d3c598ae01 Command Timeout set to 60 2017-06-22 00:22:50 +02:00
Master Kwoth
ee72962ee5 Possible database lock fix 2017-06-22 00:12:29 +02:00
Master Kwoth
d2ea530c10 fix shard status nullrefs 2017-06-21 23:49:13 +02:00
Master Kwoth
f1bcbd91a3 Another one 2017-06-21 23:36:00 +02:00
Master Kwoth
4b57d874ba Fixed compile error 2017-06-21 23:34:29 +02:00
Master Kwoth
85e1839991 don't load owner channels 2017-06-21 23:31:47 +02:00
Master Kwoth
4862564c74 disabled private poll, removed shardid command 2017-06-21 23:12:24 +02:00
Master Kwoth
cb9f427927 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-21 15:15:17 +02:00
Master Kwoth
c709680413 fix 2017-06-21 15:14:08 +02:00
Master Kwoth
4b954df56d Update README.md 2017-06-20 22:01:27 +02:00
Master Kwoth
0f37e48869 Merge branch '1.4' into shard-process 2017-06-20 17:15:04 +02:00
Master Kwoth
5d136ffd2c need this to get proper timings on command executions 2017-06-20 17:14:55 +02:00
Master Kwoth
e5f1721c15 Merge pull request #1274 from samdivaio/1.4
credentials location info added
2017-06-20 15:46:14 +02:00
samvaio
e64104fa7a credentials location info added 2017-06-20 19:08:07 +05:30
Master Kwoth
9eec364ae6 Merge pull request #1273 from samdivaio/1.4
Docs and json changes
2017-06-20 15:15:57 +02:00
samvaio
f7168ab3db json file changes 2017-06-20 16:52:14 +05:30
samvaio
e7515c7adc Docs changes 2017-06-20 16:46:55 +05:30
samvaio
b788a5e95f Merge remote-tracking branch 'refs/remotes/Kwoth/1.4' into 1.4 2017-06-20 15:26:33 +05:30
Master Kwoth
449586c0e3 Merge branch '1.4' into shard-process 2017-06-20 04:33:24 +02:00
Master Kwoth
95a7da3200 woops 2017-06-20 04:27:50 +02:00
Master Kwoth
f26c7a32ec Fixed? word and invite filters 2017-06-20 04:25:23 +02:00
Master Kwoth
d5f4dcdf20 removed soundcloud id support 2017-06-20 04:24:24 +02:00
Master Kwoth
01cf59d83e Sharding over processes almost done 2017-06-20 04:23:11 +02:00
Master Kwoth
4684117654 Merge branch '1.4' into shard-process 2017-06-19 21:50:36 +02:00
Master Kwoth
808dca8ec4 nerfed prune speed a bit to hopefully prevent ratelimits? 2017-06-19 17:57:12 +02:00
Master Kwoth
b381ee00b6 Huge changes to make shards run in separate processes 2017-06-19 15:42:10 +02:00
Master Kwoth
abd2937708 added %img:YOUR_TAG% custom reactions placeholder to pull imgur images with that tag. 2017-06-17 15:23:51 +02:00
Master Kwoth
838da3d827 Connecting will now show how many shards connected so far 2017-06-17 14:51:09 +02:00
Master Kwoth
9114d1586b Don't download users 2017-06-17 14:07:15 +02:00
Master Kwoth
77754c7dec woops 2017-06-17 13:54:21 +02:00
Master Kwoth
936ee30e1f .prune makes more sense, and a rogue bug fixed 2017-06-17 13:25:02 +02:00
samvaio
fc13b2aa23 Merge remote-tracking branch 'refs/remotes/Kwoth/1.4' into 1.4 2017-06-17 16:46:42 +05:30
Master Kwoth
733f2bfe15 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-17 00:22:52 +02:00
Master Kwoth
277fbdbe4d .prune improved 2017-06-17 00:17:07 +02:00
samvaio
e17163170d Merge remote-tracking branch 'refs/remotes/Kwoth/1.4' into 1.4 2017-06-17 00:00:08 +05:30
Master Kwoth
884793c658 Merge pull request #1263 from xnaas/patch-3
Update CustomReactionsService.cs
2017-06-16 20:20:04 +02:00
xnaas
270600198b Update CustomReactionsService.cs
I'm a picky POS. :D
2017-06-16 13:19:29 -05:00
Master Kwoth
8801a7451b Disabled log commands on the public bot, added something for xnaas, closes #1245 2017-06-16 17:47:02 +02:00
Master Kwoth
6bc4bb7803 moved some stuff around 2017-06-16 01:55:14 +02:00
Master Kwoth
0cf1d328d3 filtered words are now paginated 2017-06-16 00:55:04 +02:00
Master Kwoth
f56b6f804a fixed issues and updated commandlist 2017-06-16 00:44:54 +02:00
Master Kwoth
3cfe783ac9 .$ should be now usable in dms 2017-06-16 00:43:35 +02:00
Master Kwoth
fa58bad149 fixed .qdel and greetdmmessage if it's an embed, thanks to gwen lol 2017-06-15 22:35:12 +02:00
Master Kwoth
3bf224ab57 .resetglobalperms .resetperms fixed 2017-06-15 20:20:34 +02:00
Master Kwoth
4e7b7a6ee5 invalid hex error 2017-06-15 20:04:15 +02:00
Master Kwoth
06693b9b34 another fix 2017-06-15 19:18:55 +02:00
Master Kwoth
809219acc3 global nadeko compilation issue 2017-06-15 19:16:50 +02:00
Master Kwoth
dd1d21e29c .scq fixed, local soundcloud api keys are no longer used, .scpl fix is coming soon™️ 2017-06-15 18:56:35 +02:00
Master Kwoth
b0966a7cd3 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-15 15:42:32 +02:00
Master Kwoth
e51d2bec23 removed some unneeeded prints 2017-06-15 15:29:41 +02:00
Master Kwoth
a0559b7130 patreon commands should be fixed 2017-06-15 13:09:55 +02:00
Master Kwoth
eb97c0b749 Merge pull request #1261 from samdivaio/patch-1
Create Linux Guide.md
2017-06-15 12:21:07 +02:00
samvaio
5da75c31b2 Create Linux Guide.md
Soundcloud api is no longer required.
2017-06-15 09:54:42 +05:30
Master Kwoth
f60bf271b2 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-15 02:35:13 +02:00
Master Kwoth
9ff0c929c2 fixed .rj 2017-06-15 02:34:59 +02:00
Master Kwoth
e7422c6db0 Merge pull request #1260 from samdivaio/1.4
1 4 documentation update
2017-06-15 01:47:42 +02:00
samvaio
a90ed6c33e goodbye soundcloud 2017-06-15 05:16:17 +05:30
samvaio
cdaf78cd27 Documents update 2017-06-15 04:53:51 +05:30
samvaio
f100da8918 Merge remote-tracking branch 'refs/remotes/Kwoth/1.4' into 1.4 2017-06-15 00:05:35 +05:30
Master Kwoth
182ade0ad7 .waifulb now has pages 2017-06-14 17:28:57 +02:00
Master Kwoth
3d76207887 .lsar is now paginated 2017-06-14 17:19:27 +02:00
Master Kwoth
eadcde8397 .prune @someone x fixed 2017-06-14 12:37:23 +02:00
Master Kwoth
7aa06f3631 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-14 01:23:09 +02:00
Master Kwoth
eeaf1a001e Added CurrencyDropAmountMax field which, if set, makes your currency generation drop random amount of flowers between DropAmount and DropAmountMax, inclusive 2017-06-14 01:21:31 +02:00
Master Kwoth
1c3c65921c Merge pull request #1255 from samdivaio/1.4
1.4.x Documents
2017-06-13 17:25:38 +02:00
samvaio
173a13f341 ;/ 2017-06-13 20:35:35 +05:30
samvaio
703381255b minor 2017-06-13 20:29:32 +05:30
samvaio
d3e20f5564 MacOS is changed to macOS 2017-06-13 20:27:34 +05:30
samvaio
3304746f1a Guides update for 1.4.x 2017-06-13 20:22:31 +05:30
Master Kwoth
1fa23c095a Fixed missing key 2017-06-13 15:40:31 +02:00
Master Kwoth
0d56f57ee5 fixed? stream notifications 2017-06-13 14:25:00 +02:00
Master Kwoth
320c7c0fc3 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-13 14:21:35 +02:00
Master Kwoth
f71801cbe6 .qs command added 2017-06-13 14:21:24 +02:00
Master Kwoth
fb52e90e57 Merge pull request #1254 from Poag/patch-3
Specified version numbers for containers
2017-06-13 11:26:52 +02:00
Poag
c97f5da647 Create Upgrading Guide.md 2017-06-13 08:07:14 +01:00
Poag
abb332e99f Create Docker Guide.md 2017-06-13 08:04:30 +01:00
Master Kwoth
48fff57d7a .lsar formatting fix 2017-06-13 03:09:01 +02:00
Master Kwoth
6c2b497ff1 Commandlist really updated now. .listervers is properly paginated now 2017-06-13 03:02:21 +02:00
Master Kwoth
e6792ebf50 Commandslist updated 2017-06-13 02:55:42 +02:00
Master Kwoth
caa5c42fae Removed 'culture info is...' from the console 2017-06-13 02:52:44 +02:00
Master Kwoth
b0af0fbb08 Using .h on non-existant command will once again show an error. 2017-06-13 02:50:01 +02:00
Master Kwoth
28115aa2b7 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-13 02:40:57 +02:00
Master Kwoth
877ef81296 Added the ability to specify time of day for repeaters. 2017-06-13 02:40:41 +02:00
Master Kwoth
891afbe7e7 .timezone command added 2017-06-13 01:40:39 +02:00
Master Kwoth
afb2e515d7 Merge pull request #1251 from Poag/patch-1
Formatting uber broken.
2017-06-12 16:47:15 +02:00
Poag
125d0231c1 Formatting uber broken. 2017-06-12 15:34:37 +01:00
Master Kwoth
fb1a09f4b0 Merge pull request #1250 from Poag/patch-3
Added instructions on upgrading Dockerised nadeko.
2017-06-12 16:11:22 +02:00
Poag
dd56e24c42 Added instructions on upgrading Dockerised nadeko. 2017-06-12 15:09:46 +01:00
Master Kwoth
2ff55a49fb .ve (verbose errors) command added. Server-based toggle. 2017-06-12 14:26:14 +02:00
Master Kwoth
21a72c182e Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-12 11:30:54 +02:00
Master Kwoth
87236661b3 Fixed pokemon module 2017-06-12 11:30:31 +02:00
Master Kwoth
7617c8ac39 Merge pull request #1249 from Poag/patch-3
Updated for 1.4
2017-06-12 10:35:18 +02:00
Poag
75d3b0197d Updated for 1.4 2017-06-12 08:33:23 +01:00
Master Kwoth
628963f1a2 Fixed ~omdb search when plot is too long 2017-06-11 23:48:46 +02:00
Master Kwoth
4329cc2742 Fixed issues with editing the .db file 2017-06-11 21:08:47 +02:00
Master Kwoth
c1fba53151 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-11 16:57:57 +02:00
Master Kwoth
20a96ecf92 .setnick command added closes #1195 2017-06-11 16:57:40 +02:00
Master Kwoth
649c400cb7 .setnick command added 2017-06-11 16:54:10 +02:00
Master Kwoth
8b7b534619 safebooru shows direct link to the image now too, closes #1212 2017-06-11 16:35:02 +02:00
Master Kwoth
c5e36caabc nsfw searches now post a link if it's a webm 2017-06-11 16:31:43 +02:00
Master Kwoth
e69776beb1 .drawnew added 2017-06-11 16:07:27 +02:00
Master Kwoth
11250a6d0d Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-11 15:18:20 +02:00
Master Kwoth
41af8b9622 license update 2017-06-11 15:18:00 +02:00
Master Kwoth
bfc78bf010 license update 2017-06-11 15:15:06 +02:00
Master Kwoth
dc10f4f80b change
test
2017-06-11 15:12:07 +02:00
Master Kwoth
b771786cb6 More doc updates 2017-06-11 14:32:35 +02:00
Master Kwoth
c2799f9145 Fixed messups
modified:   NadekoBot.iss
	modified:   docs/Readme.md
	modified:   docs/index.md
	modified:   src/NadekoBot/Modules/Help/Help.cs
2017-06-11 14:26:26 +02:00
Master Kwoth
2bc6052a5b Updates links to docs, updated windows guide, added from source guide 2017-06-11 13:42:48 +02:00
Master Kwoth
ab6c3a7408 Commandlist updated for 1.41 2017-06-11 10:54:08 +02:00
Master Kwoth
0a36ecf066 Updating fixes. 2017-06-11 02:43:13 +02:00
Master Kwoth
64f841052b Bot should update properly now. Credentials shouldn't be replaced by updates. 2017-06-11 02:26:19 +02:00
Master Kwoth
052bf21435 Republish, version is 1.41.1 now 2017-06-11 01:14:35 +02:00
Master Kwoth
0eba3c946c script fixed 2017-06-10 23:52:44 +02:00
Master Kwoth
6a0a749c67 Version changed to 1.41, scripts removed 2017-06-10 23:51:22 +02:00
Master Kwoth
da85372fae fixed last commit 2017-06-10 15:14:00 +02:00
Master Kwoth
c2230ac5eb music error fix 2017-06-10 09:18:49 +02:00
Master Kwoth
b705a6ad11 Changelog order is now from oldest to newest 2017-06-10 08:55:58 +02:00
Master Kwoth
7d5afdd234 Bot will no longer reconnect the channel between songs 2017-06-10 08:19:40 +02:00
Master Kwoth
29483d4909 Finished work on release script 2017-06-10 01:12:54 +02:00
Master Kwoth
4d9c6db90c Merge pull request #1247 from xnaas/patch-2
Update Upgrading Guide.md
2017-06-09 22:09:00 +02:00
xnaas
7b9b314aaf Create Upgrading Guide.md
Touched up some language.
2017-06-09 13:26:33 -05:00
Master Kwoth
73cbfc6725 Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-09 19:47:39 +02:00
Master Kwoth
85fa412155 Merge pull request #1246 from xnaas/patch-1
Update Upgrading Guide.md
2017-06-09 19:10:48 +02:00
xnaas
2031f7e3a9 Update Upgrading Guide.md
Since 0.9.x shouldn't even be functional anymore, I removed it and updated it for migrating from 1.3x and older.
2017-06-09 12:06:38 -05:00
Master Kwoth
f572a2a33e Improved install script and made a release script 2017-06-09 18:47:50 +02:00
Master Kwoth
ce5a2c776b Merge branch '1.4' of https://github.com/Kwoth/NadekoBot into 1.4 2017-06-07 08:34:35 +02:00
Master Kwoth
9cf199433f fixed .delmsgoncmd and commands ran stat 2017-06-07 08:34:03 +02:00
Master Kwoth
7c7f932fff Update ResponseStrings.ru-RU.json (POEditor.com) 2017-06-07 05:12:53 +02:00
Master Kwoth
c4444f04a0 Update ResponseStrings.pt-BR.json (POEditor.com) 2017-06-07 05:12:51 +02:00
Master Kwoth
8b820e0a05 Update ResponseStrings.nb-NO.json (POEditor.com) 2017-06-07 05:12:48 +02:00
Master Kwoth
e7192b90a0 Update ResponseStrings.ko-KR.json (POEditor.com) 2017-06-07 05:12:46 +02:00
Master Kwoth
130e757afd Update ResponseStrings.de-DE.json (POEditor.com) 2017-06-07 05:12:43 +02:00
Master Kwoth
6fe479f47c Update ResponseStrings.fr-FR.json (POEditor.com) 2017-06-07 05:12:41 +02:00
Master Kwoth
103e77b003 Update ResponseStrings.nl-NL.json (POEditor.com) 2017-06-07 05:12:38 +02:00
Master Kwoth
177f6d8999 Update ResponseStrings.da-DK.json (POEditor.com) 2017-06-07 05:12:36 +02:00
Master Kwoth
83955758a4 Update ResponseStrings.cs-CZ.json (POEditor.com) 2017-06-07 05:12:33 +02:00
Master Kwoth
8c7cf11875 Update ResponseStrings.zh-TW.json (POEditor.com) 2017-06-07 05:12:31 +02:00
Master Kwoth
4a21c33a91 Update ResponseStrings.ar.json (POEditor.com) 2017-06-07 05:12:28 +02:00
Master Kwoth
3ae47b2034 removed random file 2017-06-06 19:48:27 +02:00
Master Kwoth
332a8b75a0 Fixed .d, added command_errors to gitignore 2017-06-06 09:28:01 +02:00
Master Kwoth
7f29c15973 Update ResponseStrings.ro-RO.json (POEditor.com) 2017-06-06 05:59:34 +02:00
Master Kwoth
6988bdeb80 Update ResponseStrings.pl-PL.json (POEditor.com) 2017-06-06 05:59:31 +02:00
Master Kwoth
370ce140df Update ResponseStrings.ja-JP.json (POEditor.com) 2017-06-06 05:59:29 +02:00
Master Kwoth
d75a39c1c5 Update ResponseStrings.it-IT.json (POEditor.com) 2017-06-06 05:59:27 +02:00
Master Kwoth
73c33c1fe0 Update ResponseStrings.ru-RU.json (POEditor.com) 2017-06-06 05:40:03 +02:00
Master Kwoth
3595581fe0 Update ResponseStrings.ro-RO.json (POEditor.com) 2017-06-06 05:40:00 +02:00
Master Kwoth
c7f5aae500 Update ResponseStrings.pt-BR.json (POEditor.com) 2017-06-06 05:39:57 +02:00
Master Kwoth
5c881979a7 Update ResponseStrings.pl-PL.json (POEditor.com) 2017-06-06 05:39:55 +02:00
Master Kwoth
56fe63dc96 Update ResponseStrings.nb-NO.json (POEditor.com) 2017-06-06 05:39:52 +02:00
Master Kwoth
f615715236 Update ResponseStrings.ko-KR.json (POEditor.com) 2017-06-06 05:39:50 +02:00
Master Kwoth
bde9df7d01 Update ResponseStrings.ja-JP.json (POEditor.com) 2017-06-06 05:39:48 +02:00
Master Kwoth
2f47f292ce Update ResponseStrings.it-IT.json (POEditor.com) 2017-06-06 05:39:45 +02:00
Master Kwoth
5011ddf9bd Update ResponseStrings.id-ID.json (POEditor.com) 2017-06-06 05:39:43 +02:00
Master Kwoth
eda4160e6d Update ResponseStrings.he-IL.json (POEditor.com) 2017-06-06 05:39:40 +02:00
Master Kwoth
96e1f02aa8 Update ResponseStrings.de-DE.json (POEditor.com) 2017-06-06 05:39:38 +02:00
Master Kwoth
e892818100 Update ResponseStrings.fr-FR.json (POEditor.com) 2017-06-06 05:39:35 +02:00
Master Kwoth
b0ad33337d Update ResponseStrings.nl-NL.json (POEditor.com) 2017-06-06 05:39:33 +02:00
Master Kwoth
9502e235bd Update ResponseStrings.da-DK.json (POEditor.com) 2017-06-06 05:39:30 +02:00
Master Kwoth
112065a6c2 Update ResponseStrings.cs-CZ.json (POEditor.com) 2017-06-06 05:39:27 +02:00
Master Kwoth
b3947146f0 Update ResponseStrings.zh-TW.json (POEditor.com) 2017-06-06 05:39:25 +02:00
Master Kwoth
d095e4e2a2 Update ResponseStrings.zh-CN.json (POEditor.com) 2017-06-06 05:39:23 +02:00
Master Kwoth
4cdeb4b1cf Update ResponseStrings.ar.json (POEditor.com) 2017-06-06 05:39:20 +02:00
Master Kwoth
697b240ee3 Forgot semicolon 2017-06-06 05:19:59 +02:00
Master Kwoth
0a5d9e66d6 few more async events 2017-06-06 05:02:06 +02:00
Master Kwoth
9efd41c25d fixed omdb 2017-06-06 02:13:43 +02:00
Master Kwoth
fa29131818 Made events run async where needed, fixed .startevent flowerreaction and running commands in DMs 2017-06-06 00:46:58 +02:00
Master Kwoth
ec5a5c42a9 removed post build script, it did nothing 2017-06-05 08:23:32 +02:00
Master Kwoth
0465c75f7a Install script welcome page 2017-06-05 08:07:26 +02:00
Master Kwoth
3433a75125 Bot won't crash right away when token is incorrect. It will show an error message and exit on key press. 2017-06-05 07:42:00 +02:00
Master Kwoth
53b45c1fdb Improved installation script a bit 2017-06-05 07:39:06 +02:00
Master Kwoth
d391e42fa7 added french and german 2017-06-05 02:08:42 +02:00
Master Kwoth
f92fd23cab commented out format checking, since noone except me would want to run it, i guess? 2017-06-05 01:56:07 +02:00
Master Kwoth
cc212626f7 strings readded 2017-06-05 01:48:33 +02:00
Master Kwoth
bb96a01877 Install script finished 2017-06-04 11:40:34 +02:00
Master Kwoth
747a834e60 More work on the installer, cleanup, back to MIT because i read unlicensed is illegal in some countries 🤦 2017-06-04 05:09:19 +02:00
Master Kwoth
ff07777a38 Installer almost done, icon added, version upped to 1.41-beta, slightly cleaned up .csproj 2017-06-03 23:58:02 +02:00
Master Kwoth
524452e72e Changed some commands names to avoid conflicts 2017-06-02 03:44:59 +02:00
Master Kwoth
25a977545c QoL changes 2017-06-01 10:11:05 +02:00
Master Kwoth
20826448ec add package sources 2017-06-01 09:38:46 +02:00
Master Kwoth
4306bdfe75 Merge branch 'dev' into 1.4 2017-06-01 05:22:12 +02:00
Master Kwoth
1fa0aa3450 Finished the work on 1.4, need to test everything now 2017-06-01 05:12:00 +02:00
Master Kwoth
3890816fa7 Bot will log command errors to a file so that I can prevent them from happening 2017-05-30 07:03:35 +02:00
Master Kwoth
6dd002002d Prefix stuff almost complete, and i just realized permissions are getting screwed because of this 2017-05-30 06:54:59 +02:00
root
7704569c36 Perms added to custom reactions, actually commit 2017-05-30 02:51:56 +02:00
Master Kwoth
2d9fc9893b limit increased to 10 2017-05-30 02:05:11 +02:00
Master Kwoth
bb897fc43d Aliasing fixed, finishing up almost 2017-05-30 01:53:16 +02:00
Master Kwoth
6d27271d4a Only a few things with permissions left, and prefixes 2017-05-29 06:13:22 +02:00
Master Kwoth
dfb4c778d2 All modules compile, except log commands. Working on todos now 2017-05-28 01:51:22 +02:00
Master Kwoth
a4973ffbb3 Administration almost done, logcommands left 2017-05-27 19:42:23 +02:00
Master Kwoth
355425bf80 Games done, admin half done 2017-05-27 10:19:27 +02:00
Master Kwoth
3797fbd439 Version upped 2017-05-25 16:11:21 +02:00
Master Kwoth
351ebabd64 CustomReactions almost done 2017-05-25 04:24:43 +02:00
Master Kwoth
9e3dc6d5a1 gambling fixed 2017-05-24 22:28:16 +02:00
Master Kwoth
c183e8ad58 music and clash of clans readded 2017-05-24 06:43:00 +02:00
Master Kwoth
2df415341c Utility and nsfw work 2017-05-23 01:59:31 +02:00
Master Kwoth
d08bc60be5 merged dev 2017-05-19 20:48:28 +02:00
Master Kwoth
2344624838 Merged with dev 2017-05-17 14:28:50 +02:00
Master Kwoth
87983d97c3 Forgot to cache if SetSettings is used 2017-05-15 16:05:52 +02:00
Master Kwoth
0587189963 >gc is bot owner only on public nadeko now 2017-05-15 14:32:40 +02:00
Master Kwoth
0222726315 init music service 2017-05-14 21:49:58 +02:00
Master Kwoth
a6d3b0bd07 Moved a part of music logic to a music service 2017-05-14 21:00:35 +02:00
Master Kwoth
558796809c Moved greet/bye stuff to a service 2017-05-10 16:08:31 +02:00
Master Kwoth
91e7663e31 Merge remote-tracking branch 'origin/dev' into 1.4 2017-05-10 11:34:53 +02:00
Master Kwoth
8408a17450 Moved _strings, added some extension methods 2017-05-08 13:43:38 +02:00
Master Kwoth
13dea118a9 Merge remote-tracking branch 'origin/dev' into 1.4 2017-05-07 15:00:51 +02:00
Master Kwoth
f6bdb98c41 improved how .rh works 2017-05-03 09:49:35 +02:00
Master Kwoth
8f894e095b Moved some logic to commandhandler, to be able to use it externally easier 2017-05-02 20:16:34 +02:00
Master Kwoth
f5523c8469 Merge branch 'dev' into 1.4 2017-05-02 11:02:09 +02:00
Master Kwoth
9579ab7902 iuser to iguilduser 2017-05-01 10:58:58 +02:00
Kwoth
54f51a8ce1 more Iuser to IGuildUser 2017-04-25 06:53:03 +02:00
Kwoth
1c6e67ccf5 Changed some IUser to IGuildUser 2017-04-25 04:27:58 +02:00
Kwoth
185008e33b Fixed package version invalid 2017-04-17 23:45:40 +02:00
Kwoth
aaf8db6356 Attempt at version suffix 2017-04-17 23:41:07 +02:00
Kwoth
ac7cd2b140 Does this fix? 2017-04-17 21:44:24 +02:00
Kwoth
c0c2386ee8 Attempt at proper versioning? 2017-04-17 21:39:52 +02:00
Kwoth
87069bf44c First try in publishing nadeko to myget 2017-04-17 20:52:01 +02:00
Kwoth
4b4eb88ac8 response strings moved to .json format in data/strings folder 2017-04-16 23:31:12 +02:00
Kwoth
f3d00d6da8 Merge remote-tracking branch 'origin/dev' into 1.4 2017-04-15 02:55:18 +02:00
Kwoth
b0f555eaea 1.4-alpha builds and runs, for now 2017-04-15 02:54:19 +02:00
Kwoth
70a5d6603d Removed discord.net submodule 2017-04-13 03:06:52 +02:00
533 changed files with 67235 additions and 76275 deletions

5
.gitignore vendored
View File

@ -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
View File

@ -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
View 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
View 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
View 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;

View File

@ -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

View File

@ -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/)

View File

@ -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
View 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) }

View File

@ -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`

View File

@ -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

View File

@ -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?
---------- ----------

View File

@ -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

View File

@ -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
View 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)

View File

@ -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

View File

@ -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/>

View File

@ -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`

View 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

View File

@ -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/

View File

@ -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

View File

@ -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.*

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,3 @@
{ {
"projects": [ "Discord.Net/src", "src" ], "sdk": { "version": "1.0.1" }
"sdk": {
"version": "1.0.0-preview2-1-003177"
}
} }

View File

@ -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/>

View File

@ -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
View 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
View 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
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
}
}
}

View File

@ -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")));
}
}

View File

@ -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>>
{ {

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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
{ {

View 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)
{
}
}
}

View 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")));
}
}
}

View File

@ -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
{ {

View 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
}
}

View File

@ -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,19 +33,31 @@ 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)
{ {
embed.AddField(efb => efb.WithName(f.Name).WithValue(f.Value).WithIsInline(f.Inline)); if(!string.IsNullOrWhiteSpace(f.Name) && !string.IsNullOrWhiteSpace(f.Value))
embed.AddField(efb => efb.WithName(f.Name).WithValue(f.Value).WithIsInline(f.Inline));
} }
return embed; return embed;
@ -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;

View File

@ -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.

View File

@ -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

View File

@ -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();

View 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;
}
}
}

View 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);
}
}

View File

@ -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);
}
}

View File

@ -0,0 +1,7 @@
namespace NadekoBot.Common.ModuleBehaviors
{
public interface IEarlyExecutor
{
}
}

View 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);
}
}

View 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);
}
}

View File

@ -0,0 +1,7 @@
namespace NadekoBot.Common.ModuleBehaviors
{
public interface ILateBlockingExecutor
{
}
}

View 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);
}
}

View File

@ -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);
} }
} }

View 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
}
}
}

View File

@ -1,6 +1,6 @@
using System; using System;
namespace ConcurrentCollections namespace NadekoBot.Common
{ {
public static class PlatformHelper public static class PlatformHelper
{ {

View 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());
}
}
}

View 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);
}
}
}

View 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());
}
}
}

View 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; }
}
}

View 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);
}
}
}
}

View 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; };
}
}

View File

@ -0,0 +1,9 @@
namespace NadekoBot.Common.TypeReaders
{
public enum AddRemove
{
Add = 0,
Rem = 1,
Rm = 1,
}
}

View File

@ -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.");
} }

View 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);
}
}
}

View File

@ -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

View File

@ -1,4 +1,4 @@
namespace NadekoBot.Modules.Permissions namespace NadekoBot.Common.TypeReaders.Models
{ {
public class PermissionAction public class PermissionAction
{ {

View File

@ -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."));

View File

@ -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)

View File

@ -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;
}
}
}

View File

@ -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);

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -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
{ {

View File

@ -1,6 +1,4 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations namespace NadekoBot.Migrations
{ {

View File

@ -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
{ {

View File

@ -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);

View File

@ -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
{ {

View File

@ -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

View File

@ -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
{ {

View File

@ -1,6 +1,4 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations namespace NadekoBot.Migrations
{ {

View File

@ -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
{ {

View File

@ -1,6 +1,4 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations namespace NadekoBot.Migrations
{ {

View File

@ -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
{ {

View File

@ -1,6 +1,4 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations namespace NadekoBot.Migrations
{ {

View File

@ -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
{ {

View File

@ -1,6 +1,4 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations namespace NadekoBot.Migrations
{ {

View File

@ -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
{ {

View File

@ -1,6 +1,4 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace NadekoBot.Migrations namespace NadekoBot.Migrations
{ {

View File

@ -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
{ {

View File

@ -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

View File

@ -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
{ {

View File

@ -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

View File

@ -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
{ {

View File

@ -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

View File

@ -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