9.2 KiB
9.2 KiB
Thanks to @Flatbread and @Mirai for making this guide
Setting Up NadekoBot on Windows
Prerequisites
-
- Google Account
-
- Soundcloud Account (if you want soundcloud support)
-
- 7zip (or whatever you are using, WinRar)
-
- Windows 8 or later
####Guide
- Make sure you have installed both Git and the .NET Core SDK.
- Create a new folder anywhere you like and name it
Nadeko. - Next, Right-Click on this link and select Save link as and save the file
NadekoInstaller.batinside theNadekofolder that we created earlier. (Please DO NOT rename the fileNadekoInstaller.bat.) - Once that's done, right-click on
NadekoInstaller.batto run it as Administrator. - From the options,
- Choose
1to get the most recent build. - Choose
2to get the stable build.
- Choose
- Wait a while for the file to finish installing, it'll display it's progress in the command prompt.
- You should now have a new folder named
NadekoBotinside theNadekofolder we previously created. - Once Installation is completed, press any key to close the command prompt.

####Creating DiscordBot application
- Go to the Discord developer application page.
- 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 Userand confirm that you do want to add a bot to this app. - Keep this window open for now.

####Setting up credentials.json file
- In our
NadekoBotfolder you should see asrcfolder, then anotherNadekoBotfolder, in this final folder, you should see a.jsonfile namedcredentials.json. (Note: If you do not see a.jsonaftercredentials.json, do not add the.json. You most likely have "Hide file extensions" enabled.) - If you mess up the setup of
credentials.json, renamecredentials_example.jsontocredentials.json. - Open the file with Notepad++.
- In there you will see fields such as
Token,ClientId,BotIdandOwnerIDs. - In your applications page (the window you were asked to keep open earlier), under the
Bot Usersection, you will seeToken:click to reveal, click to reveal the token. - Copy your bot's token, and on the
"Token"line of yourcredentials.json, paste your bot token between the quotation marks. - Copy the
Client IDon the page and replace the12312123part of theClientIdline with it. - Again, copy the same
Client IDand replace thenullpart of theBotIdline 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#3535will 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 is105635576866156544) on theOwnerIdssection with your user ID shown earlier. - Save
credentials.json(make sure you aren't saving it ascredentials.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.

####Inviting your bot to your server
- Invite Guide
- Copy your
Client IDfrom your applications page. - Replace the
12345678in this linkhttps://discordapp.com/oauth2/authorize?client_id=12345678&scope=bot&permissions=66186303with yourClient 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.

####Starting the bot
- Go to the
Nadekofolder that we have created earlier, and run theNadekoInstaller.batfile as Administrator. - From the options,
- Choose
3to run the bot normally. (with normal-run the bot will shutdown and will stay offline if it disconnects by the use of.diecommand until you manually run it again. Useful if you want to test the bot.) - Choose
4to run the bot with auto restart. (with auto restart the bot will restart itself if it disconnects by the use of.diecommand. Useful if you want to have restart function for any reason.)
- Choose
####Updating NadekoBot
- Make sure the bot is closed and is not running (Run
.diein a connected server to ensure it's not running). - Once that's checked, go to the
Nadekofolder. - Run the
NadekoInstaller.batfile. - From the options,
- Choose
1to get the most recent build. - Choose
2to get the stable build.
- Choose
- 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.
- You've updated and are running again, easy as that!
Setting Up NadekoBot For Music
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
Nadekofolder that we have created earlier, and run theNadekoInstaller.batfile as Administrator. - From the options select
6Install 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
3to run the bot normally just to test music. (optional) ffmpeginstallation for Music is now complete.
Manual ffmpeg setup
- Create a folder named
ffmpegin 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
7zipand place the FOLDERffmpeg-xxxxx-git-xxxxx-xxxx-staticinside C:\ffmpeg - Before proceeding, check out this gif to set up
ffmpegPATH correctly
(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 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 APIandCustom Search API. Under theYouTube APIssection, enableYouTube Data API. - Under the "Google Maps APIs" section, enable
Google Maps Geocoding APIandGoogle Maps Time Zone API. - On the left tab, access
Credentials. ClickCreate Credentialsbutton. Click onAPI Key. A new window will appear with yourGoogle API key. - Copy the key.
- Open up
credentials.json. - For
"GoogleAPIKey", paste your API key inbetween the quotation marks, like how theTokenandClientIdshould be set up.
- Follow these steps on how to setup Soundcloud API key:
- Go to 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