Files
nadekobot/docs/guides/windows-guide.md

7.2 KiB

Migration from 2.x

⚠ If you're already hosting NadekoBot, You MUST update to latest version of 2.x and run your bot at least once before switching over to v3.

Windows migration instructions

Setting Up NadekoBot on Windows With the Updater

Table of Contents
Prerequisites
Setup
Starting the Bot
Updating Nadeko
Manually Installing the Prerequisites from the Updater

Note: If you want to make changes to Nadeko's source code, please follow the From Source guide instead.

If you have Windows 7 or a 32-bit system, please refer to the From Source guide.

Prerequisites

Optional

Setup

  • Download and run the NadekoBot v3 Updater.
  • Click on the + at the top left to create a new bot. NadekoBot Updater
  • Give your bot a name and then click Go to setup at the lower right. Create a new bot
  • Click on DOWNLOAD at the lower right Bot Setup
  • Click on Install next to Redis.
  • If you will use the music module, click on Install next to FFMPEG and Youtube-DL.
  • If any dependencies fail to install, you can temporarily disable your Windows Defender/AV until you install them. If you don't want to, then read the last section of this guide.
  • When installation is finished, click on CREDS to the left of RUN at the lower right.
  • Follow the guide on how to Set up the credentials.json file.

Starting the bot

  • Either click on RUN button in the updater or run the bot via its desktop shortcut.

Updating Nadeko

  • Make sure Nadeko is closed and not running
    (Run .die in a connected server to ensure it's not running).
  • Open NadekoBot Updater
  • Click on your bot at the upper left (looks like a spy).
  • Click on Check for updates.
  • If updates are available, you will be able to click on the Update button.
  • Launch the bot
  • You've updated and are running again, easy as that!

Manual Prerequisite Installation

You can still install them manually:

  • Redis Installer - Download and run the .msi file
  • ffmpeg-32bit | ffmpeg-64bit - Download the appropriate version for your system (32 bit if you're running a 32 bit OS, or 64 if you're running a 64bit OS). Unzip it, and move ffmpeg.exe to a path that's in your PATH environment variable. If you don't know what that is, then just move the ffmpeg.exe file to NadekoBot/system
  • youtube-dl - Click to download the file. Then put youtube-dl.exe in a path that's in your PATH environment variable. If you don't know what that is, then just move the youtube-dl.exe file to NadekoBot/system

Windows From Source

Prerequisites

Install these before proceeding or your bot will not work!

  • .net 5 - needed to compile and run the bot
  • git - needed to clone the repository (you can also download the zip manually and extract it, but this guide assumes you're using git)
  • redis - to cache things needed by some features and persist through restarts
Installation Instructions

Open PowerShell (press windows button on your keyboard and type powershell, it should show up; alternatively, right click the start menu and select Windows PowerShell), and navigate to the location where you want to install the bot (for example cd ~/Desktop/)

  1. git clone https://gitlab.com/kwoth/nadekobot -b v3 --depth 1
  2. dotnet publish -c Release -o output/ src/NadekoBot/
  3. cd output && cp creds_example.yml creds.yml
  4. Open creds.yml with your favorite text editor (Please don't use Notepad or WordPad. You can use Notepad++, VSCode, Atom, Sublime, or something similar)
  5. Enter your bot's token
  6. Run the bot dotnet NadekoBot.dll
  7. 🎉
Update Instructions

Open PowerShell as described above and run the following commands:

  1. Navigate to your bot's folder, for example cd ~/Desktop/nadekobot/src/NadekoBot
  2. Pull the latest updates (this will fail if you have custom code changes).
    • If you don't have custom code changes, just run git pull
    • If you do have custom code changes, You have 3 options
      • Undo all changes with git checkout -- * && git pull
      • Stash changes and try to re-apply them git stash && git pull && git stash apply
      • Commit your changes and resolve merge conflicts git add . && git commit -m "My commit message" && git pull
  3. Re-run the bot dotnet run -c Release

⚠ You're expected to understand that your database will be in bin/Release/<framework>/data/, and if <framework> gets changed in the future, you will have to move your database manually.

Music prerequisites

In order to use music commands, you need ffmpeg and youtube-dl installed.

  • ffmpeg-32bit | ffmpeg-64bit - Download the appropriate version for your system (32 bit if you're running a 32 bit OS, or 64 if you're running a 64bit OS). Unzip it, and move ffmpeg.exe to a path that's in your PATH environment variable. If you don't know what that is, just move the ffmpeg.exe file to NadekoBot/output.
  • youtube-dl - Click to download the file, then move youtube-dl.exe to a path that's in your PATH environment variable. If you don't know what that is, just move the youtube-dl.exe file to NadekoBot/system.