A C++ Discord bot built using the dpp library. This project includes moderation and utility commands.
You need a C++ compiler that supports C++20, the libsodium library, openSSL, dpp, spdlog and 7-Zip.
The CMakePresets.json file provides two presets: 64-bit compilation in debug mode and 64-bit compilation in release mode.
- Install Visual Studio:
- Download and install Visual Studio from the Visual Studio website.
- During installation, select the "Desktop development with C++" workload. This will install the compiler and CMake.
- Install vcpkg:
- Choose a directory to install
vcpkg, such asC:\dev\vcpkg. Avoid paths with spaces likeProgram Files. - Using Windows Terminal, clone and bootstrap
vcpkg:
git clone https://github.com/microsoft/vcpkg.git; cd vcpkg; .\bootstrap-vcpkg.bat- Put the path to your
vcpkginstallation as a system environment variable and restart your terminal.
- Install the dependencies:
- Execute the following in a terminal:
vcpkg install libsodium:x64-windows dpp:x64-windows spdlog:x64-windows
- Install 7-Zip:
- Go to the official site of 7-Zip and download and install it.
- Set Environment Variable:
- In your system environment variables, create a new variable:
- Variable name:
CMAKE_TOOLCHAIN_FILE - Variable value:
[path-to-vcpkg]/scripts/buildsystems/vcpkg.cmake
- Variable name:
- Add the path to your 7-Zip installation in the system paths.
- Restart your terminal session for the new environment variable to take effect.
- Clone the Repository: Run the following command in a PowerShell, Windows Terminal or Bash session:
git clone https://github.com/Omega493/ishmael.git- Set Up Build Environment:
- Open the cloned folder in Visual Studio, select the preset and press Control-Shift-B to build.
- Locate the Executable:
The executable will be in the
binaryDirspecified in the preset../build/windows/<preset_name>/Ishmael.exe
The program is a single executable named Ishmael.
- Make sure you have a
secrets.encfile in the same directory as the executable. It should be of the following format:
BOT_TOKEN=
DEV_GUILD_ID=
OWNER_ID=To get the BOT_TOKEN head over to Discord Developer Portal. To get the DEV_GUILD_ID and OWNER_TOKEN you need to have "Developer Mode" enabled in your Discord client. Make sure it is encrypted using XChaCha20-Poly1305 AEAD. You can encrypt the text file using my other tool.
-
Make sure the program has write access to the directory where it is currently located. Logging and creation of
guild_settings.jsonwill fail otherwise. -
Run the program. As the
secretsmap is initialized, you'll be prompted to enter the secret key to the file. Just type the key or paste it in the field.