Setting up WizBot From Source¶
Table of Contents |
---|
Installing with the CLI Installer |
Setup (CLI) |
Launching WizBot (CLI) |
Installing WizBot Manually |
Setup |
Launching WizBot |
Updating WizBot |
Installing with the CLI Installer¶
This is the recommended way of installing WizBot from source. If you don't want to use the installer, skip to Installing WizBot Manually.
Prerequisites (CLI)¶
- Windows 8 or later
- dotNET core 3.1 SDK (restart Windows after installation)
- Git (select this option during the installation process)
- Redis
- Windows 64 bit: Download and install the latest msi. Don't forget to add it to the path environment variable during the installation process.
- Windows 32 bit: Skip this step
- Create a Discord Bot application and invite the bot to your server.
Optional If you want WizBot to play music, do the following:
- Install Visual C++ 2010 (x86) and Visual C++ 2017 (both are required - restart Windows after installation)
- youtube-dl - Click on
Windows.exe
(on the top left corner) and download the file. Then move it toC:\youtube-dl
. If the folderyoutube-dl
doesn't exist, create one.
Setup (CLI)¶
- Download the CLI installer. Move it to where you want WizBot's files to be.
- Right click the file and extract it.
- Right click the
WizBotInstaller.bat
file and open it as Administrator - After the admin check, you should see main menu with the options below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
- Run Option
1
to download WizBot (type 1 and press Enter). Once it's done, it should take you back to the main menu. - Run Option
4
to set up your credentials. Paste the info as requested. - If your Windows is 32-bit, run Option
14
now. Otherwise, ignore this step. - WizBot should be ready to launch. Run Option
2
to test it out. If everything goes well, WizBot should appear as online on your Discord server and respond to commands. Once you're done with testing, type.die
to shut it down and return to the installer's main menu.
If you don't want the music features, you can launch WizBot with Option 3
and have fun with your newly created bot. Otherwise, follow the steps below.
- If you haven't downloaded
youtube-dl.exe
and moved it toC:\youtube-dl
yet, then do it now. - If your Windows is 32-bit, run Option
13
. Otherwise, ignore this step. - Run Option
5
to downloadffmpeg
. - Run Option
9
to addyoutube-dl.exe
to your system's path environment variable. - That's it. You're done. Launch WizBot with Option
3
and have fun sharing music with your friends.
Launching WizBot (CLI)¶
- Just open the CLI installer and run Option
2
or3
. Easy as that.
Installing WizBot Manually¶
This is the "hard" way of installing WizBot. If you're here, we are assuming you know what the hell you're doing.
Prerequisites¶
- Windows 7 or later
- dotNET core 3.1 SDK (restart Windows after installation)
- Git (select this option during the installation process)
- Redis
- Windows 64 bit: Download and install the latest msi. Don't forget to add it to the path environment variable during the installation process.
- Windows 32 bit: Download redis-server.exe and store it somewhere accessible.
- Create a Discord Bot application and invite the bot to your server.
Optional
If you want WizBot to play music, do the following:
- Notepad++ (makes it easier to edit your credentials)
- Install Visual C++ 2010 (x86) and Visual C++ 2017 (both are required - restart Windows after installation)
- youtube-dl - Click on
Windows.exe
(on the top left corner) and download the file. Store it somewhere accessible. - ffmpeg - Download the Static, Release build for your system and architecture. Extract it, then find and copy the
ffmpeg.exe
file to somewhere accessible. - For 32-bit Windows, download libsodium and (lib)opus and store them somewhere accessible.
Setup¶
- Open command prompt (
cmd.exe
) and run the following command to download the source: git clone -b 1.9 https://gitlab.com/Wizkiller96/WizBot
- On Windows Explorer, go to
WizBot/src/WizBot
and edit thecredentials.json
file according to this guide. - Add these 2 arguments to your credentials file:
1 2 |
|
- Move
youtube-dl.exe
andffmpeg.exe
intowizBot/src/wizBot
(or add them to your PATH environment variable, if you know how) - For 32-bit Windows, replace
libsodium.dll
andopus.dll
inwizBot/src/wizBot
with the ones you've downloaded.
Launching WizBot¶
- For 32-bit Windows, run the
redis-server.exe
you have downloaded. You must have this window open while using WizBot. - On command prompt, move to the correct directory:
cd WizBot/src/WizBot
- Build and run WizBot:
dotnet run -c Release
- If everything goes well, WizBot should start up and show as online in your Discord server.
Updating WizBot¶
If you have not made custom edits to the source code.
- If you're using the CLI installer, shut your bot down and run Option
1
. That's it. - If you've installed manually, open command prompt (
cmd.exe
) - Move to WizBot's root folder:
cd WizBot
- Update WizBot:
git pull
If you have made custom edits to the source code.
- Open command prompt (
cmd.exe
) - Move to WizBot's root folder:
cd WizBot
- Stash your changes:
git stash save "give me a nice name dd-mm-yyyy"
or justgit stash
- Update WizBot:
git pull
- Apply your stash:
git stash apply
orgit stash apply stash@{n}
(wheren
is the ID of the stash)
Other useful commands:
git status
to check the changes you've madegit stash list
to see the list of saved stashes and their corresponding IDgit stash drop stash@{n}
to delete a specific stashgit stash pop stash@{n}
to apply and delete a specific stash
Last update: November 14, 2020