Git Product home page Git Product logo

mta-discord-bot's Introduction

MTA Discord Module

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.

Installation

  • 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

Build Guidelines

Requirements

Building

  • 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 ..)

Building - Windows

  • 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

Building - Linux

  • Issue a make command (make)
  • If build succeeded, you should have libDDiscord.so in build/bot/libDDiscord.so

Installing the module

64-bit

  • 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)

32-bit

  • 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)

Loading the module

  • You have the following ways

MTA server config

  • 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"/>

Load from server console

  • Run loadmodule DDiscord.dll OR loadmodule libDDiscord.so depending on your OS to load the module

mta-discord-bot's People

Contributors

dizzaster avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.