Discord bot module for MTA. This module lets you setup a mta discord bot that does not require NodeJS setup or sockets module. You just need to setup a bot on discord developer site and get the token.
Note:
- This module is still in development and may be incomplete, unstable, and/or broken. It can crash your MTA server, use at your own risk.
- Only x64 (64-bit) is supported. I'll add support for 32-bit if I get the time.
- Simply grab the DLL or SO file from Release and follow installation steps from the "Installing the module" section at the bottom of this doc
- Visual Studio 2019 (Windows) or Latest GCC/G++ compilers and dev-essentials (Linux)
- CMake (apt install cmake OR Get it for windows here)
- OpenSSL (apt install libssl-dev OR Get it for windows here)
- Clone the repository (git clone https://github.com/DizzasTeR/mta-discord-bot.git)
- Go into the cloned dir (cd mta-discord-bot)
- Create a build dir and enter it (mkdir build && cd build)
- Issue the CMake command to configure and generate project files (cmake ..)
- After the CMake command, you should have Visual Studio solution which you can open and build
- If build succeeded, you should have DDiscord.dll in build/bot/Release/DDiscord.dll
- Issue a make command (make)
- If build succeeded, you should have libDDiscord.so in build/bot/libDDiscord.so
- Copy the built module (DDiscord.dll or libDDiscord.so depending on your operating system)
- Paste it in YOUR_MTA_SERVER_DIRECTORY/x64/modules/ (Create the folders if they don't exist)
- Copy the built module (DDiscord32.dll or libDDiscord32.so depending on your operating system)
- Paste it in YOUR_MTA_SERVER_DIRECTORY/mods/deathmatch/modules/ (Create the folders if they don't exist)
- You have the following ways
- Inside the server config, search for module
- You can see example code in the config to load modules on server start-up
- Example:
<!-- 64-bit -->
<module src="DDiscord.dll"/>
<!-- 32-bit -->
<module src="DDiscord32.dll"/>
OR
<!-- 64-bit -->
<module src="libDDiscord.so"/>
<!-- 32-bit -->
<module src="libDDiscord32.so"/>
- Run loadmodule DDiscord.dll OR loadmodule libDDiscord.so depending on your OS to load the module