7.3 KiB
Thanks to @Flatbread and Mirai for making this guide
Setting Up NadekoBot on Windows
Prerequisites
-
- NET Framework 4.5.2 (or 4.6)
-
- Google Account
-
- Soundcloud Account (if you want soundcloud support)
-
- 7zip (or whatever you are using, WinRar)
####Guide
- Create a folder, name it
Nadeko
. - Head to Releases* and download
WINDOWS.-.nadeupdater.7z
. - Copy
WINDOWS.-.nadeupdater.7z
to theNadeko
(folder we created before) and extract everything. - You will see a file
NadekoUpdater.bat
and a folderpublish
after extraction. - Run/Launch/Open the file
NadekoUpdater.bat
and you will see it running in cmd.exe asking you with 3 options 1-3.-
- Stable release - current stable release, but might not contain all the newest Nadeko updates.
-
- Newest release - release with all features/upgrades.
-
- Exit
-
- Press
2
on your keyboard and hitEnter
. Typey
and hitEnter
again. Downloading might take a while, so just be patient and wait. When download is done, press3
on your keyboard and close the updater. - You should have a new folder named
NadekoBot
inside theNadeko
folder we previously created.
####Creating DiscordBot application
- Go to 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.
- Once the application is created, click on
Create a Bot User
and confirm it. - Keep this window open for now.
####Setting up Credentials.json file
- In our
NadekoBot
folder you should have.json
file namedcredentials_example.json
. (Note: If you do not see a .json aftercredentials_example.json
, do not add the**.json**
. You most likely have"Hide file extensions"
enabled.) - Rename
credentials_example.json
tocredentials.json
. - Open the file with your Notepad++.
- In there you will see fields like
Token
,ClientId
,BotId
,OwnerIDs
. - In your DiscordApp, under
Bot User
part, you will see theToken:click to reveal
part, click to reveal it. - Copy your bot's token, and put it between
" "
in yourcredentials.json
file. - Copy
Client ID
and replace it with the example one in yourcredentials.json
. - Copy
Bot ID
and replace it with the example one in yourcredentials.json
. - Save your
credentials.json
but keep it open. We need to put yourUser ID
and owner.
####Inviting your bot to your server
- Invite Guide
- Create a new server in Discord.
- Copy your
Client ID
from your DiscordApp. - Replace
12345678
in this linkhttps://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303
with yourClient ID
. - Link should look like this:
https://discordapp.com/oauth2/authorize?client_id=**YOUR_CLENT_ID**&scope=bot&permissions=66186303
. - Go to newly created link and pick the server we created, and click
Authorize
. - Bot should be added to your server.
####Starting the bot
- Enter your
NadekoBot
folder that should be (hopefully) in yourNadeko
folder. - Run
NadekoBot.exe
(Note: There isNadekoBot.exe
andNadekoBot.exe.config
, dont run the second one) - Your bot should now be online in the server we added him to.
- Note: Your bot will be offline in case you close
NadekoBot.exe
.
####Setting up OwnerIds
- In the server where your bot is, in a text channel, type
.uid
- Your
User ID
should show, copy it. - Close
NadekoBot.exe
- Replace your
User ID
in thecredentials.json
between[ ]
and save the changes. - Run
NadekoBot.exe
again. - Now you are the bot owner.
- You can add
User IDs
from the other users by separating IDs with a comma if you want to have more owners.
*Alternatively, you can download nadekobot from [Releases][Releases] and extract the zip yourself. That is what updater does, except it makes it easier for you to update because it doesn't overwrite important files.If you are downloading releases you will have to be careful about your config, credentials, and other files you edited in order to preserve your data every time you update.
Setting Up NadekoBot For Music
Prerequisites
-
- FFMPEG installed.
-
- Setting up API keys.
-
Follow these steps on how to setup Google API keys:
- Go to 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
andCustom Search Api
. Under theYouTube APIs
section, enableYouTube Data API
. - On the left tab, access
Credentials
. ClickCreate Credentials
button. Click onAPI Key
, and thenServer Key
in the new window that appears. Enter in a name for theServer Key
. A new window will appear with yourGoogle API key
. - Copy the key.
- Open up
credentials.json
. - For
"GoogleAPIKey"
, fill in with the new key we copied.
-
Follow these steps on how to setup Soundcloud API key:
- Go to Soundcloud.
- Enter a name for the app and create it.
- You will see a page with the title of your app, and a field labeled
Client ID
. Copy the ID. - In
credentials.json
, fill in"SoundcloudClientID"
with the copied ID.
-
Restart your computer.
####Manual ffmpeg
setup
Do this step in case you were not able to install ffmpeg
with the installer.
- 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 folderffmpeg-xxxxx-git-xxxxx-xxxx-static
inside C:\ffmpeg - Before proceeding, check out this gif to set up
ffmpeg
PATH correctly 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.