114 lines
5.7 KiB
Markdown
114 lines
5.7 KiB
Markdown
+++
|
|
title = "Windows Guide"
|
|
description = "How to set up EllieBot on Windows"
|
|
weight = 3
|
|
+++
|
|
|
|
{{% notice style="note" title="Notice on windows installer" %}}
|
|
~~There is an easier way in the works but this will take time to make, sorry about that. - Toastie~~
|
|
|
|
This way of installing and using Ellie is nearly ready so keep and eye out for that part of the guide. - Toastie
|
|
{{% /notice %}}
|
|
|
|
## Creating your own Discord bot
|
|
|
|
This guide will show you how to create your own discord bot, invite it to your server, and obtain the credentials needed to run it.
|
|
|
|
1. Go to [the Discord developer application page][Discord].
|
|
2. Log in with your Discord account.
|
|
3. Click **New Application**.
|
|
4. Fill out the `Name` field however you like, accept the terms, and confirm.
|
|
5. Go to the **Bot** tab on the left sidebar.
|
|
6. Click on the `Add a Bot` button and confirm that you do want to add a bot to this app.
|
|
7. **Optional:** Add bot's avatar and description.
|
|
8. Copy your Token to `creds.yml` as shown above.
|
|
9. Scroll down to the **`Privileged Gateway Intents`** section
|
|
- You MUST enable the following:
|
|
- **PRESENCE INTENT**
|
|
- **SERVER MEMBERS INTENT**
|
|
- **MESSAGE CONTENT INTENT**
|
|
|
|
### Inviting your bot to your server
|
|
|
|

|
|
|
|
- On the **General Information** tab, copy your `Application ID` from your [applications page][Discord].
|
|
- Replace the `YOUR_CLIENT_ID_HERE` in this link:
|
|
`https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=66186303` with your `Client ID`
|
|
- The link should now look something like this:
|
|
`https://discord.com/oauth2/authorize?client_id=123123123123&scope=bot&permissions=66186303`
|
|
- Access that newly created link, pick your Discord server, click `Authorize` and confirm with the captcha at the end
|
|
- The bot should now be in your server
|
|
|
|
|
|
[Discord]: https://discord.com/developers/applications/me
|
|
|
|
### Windows From Source
|
|
|
|
##### Prerequisites
|
|
|
|
**Install these before proceeding or your bot will not work!**
|
|
- [.net 8](https://dotnet.microsoft.com/en-us/download) - needed to compile and run the bot
|
|
- [git](https://git-scm.com/downloads) - needed to clone the repository (you can also download the zip manually and extract it, but this guide assumes you're using git)
|
|
- [Redis] (OPTIONAL)- 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://toastielab.dev/EllieBotDevs/elliebot -b v6 --depth 1`
|
|
2. `cd EllieBot`
|
|
3. `dotnet publish -c Release -o output/ src/EllieBot/`
|
|
4. `cd output`
|
|
5. `cp creds_example.yml creds.yml`
|
|
6. 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)
|
|
7. [Enter your bot's token](../Features/creds-guide)
|
|
8. Run the bot `dotnet EllieBot.dll`
|
|
9. 🎉
|
|
|
|
##### Update Instructions
|
|
|
|
Open PowerShell as described above and run the following commands:
|
|
|
|
1. Stop the bot
|
|
- ⚠️ Make sure you don't have your database, credentials or any other EllieBot folder open in some application, this might prevent some of the steps from executing succesfully
|
|
2. Navigate to your bot's folder, example:
|
|
- `cd ~/Desktop/EllieBot`
|
|
3. Pull the new version, and make sure you're on the v6 branch
|
|
- *⚠️ the first 3 lines can be omitted if you're already on v6. If you're updating from v5, you must run them*
|
|
- `git remote set-branches origin '*'`
|
|
- `git fetch -v --depth=1`
|
|
- `git checkout v6`
|
|
- `git pull`
|
|
- ⚠️ If this fails, you may want to stash or remove your code changes if you don't know how to resolve merge conflicts
|
|
4. **Backup** old output in case your data is overwritten
|
|
- `cp -r -fo output/ output-old`
|
|
5. Build the bot again
|
|
- `dotnet publish -c Release -o output/ src/EllieBot/`
|
|
6. Remove old strings and aliases to avoid overwriting the updated versions of those files
|
|
- ⚠ If you've modified said files, back them up instead
|
|
- `rm output-old/data/aliases.yml`
|
|
- `rm -r output-old/data/strings`
|
|
7. Copy old data
|
|
- `cp -Recurse .\output-old\data\ .\output\ -Force`
|
|
8. Copy creds.yml
|
|
- `cp output-old/creds.yml output/`
|
|
9. Run the bot
|
|
- `cd output`
|
|
- `dotnet EllieBot.dll`
|
|
|
|
🎉 Enjoy
|
|
|
|
#### Music prerequisites
|
|
In order to use music commands, you need ffmpeg and yt-dlp 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 `EllieBot/output`.
|
|
- [youtube-dlp] - Click to download the `yt-dlp.exe` file, then move `yt-dlp.exe` to a path that's in your PATH environment variable. If you don't know what that is, just move the `yt-dlp.exe` file to `EllieBot/system`.
|
|
|
|
[Notepad++]: https://notepad-plus-plus.org/
|
|
[.net]: https://dotnet.microsoft.com/download/dotnet/8.0
|
|
[Redis]: https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.msi
|
|
[Visual C++ 2010 (x86)]: https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe
|
|
[Visual C++ 2017 (x64)]: https://aka.ms/vs/15/release/vc_redist.x64.exe
|
|
[ffmpeg-32bit]: https://ellie.gcoms.xyz/dl/ffmpeg-32.zip
|
|
[ffmpeg-64bit]: https://ellie.gcoms.xyz/dl/ffmpeg-64.zip
|
|
[youtube-dlp]: https://github.com/yt-dlp/yt-dlp/releases
|