Skip to content

datenshicommunity/ROCORD-Rathena

 
 

Repository files navigation

Discord Channel

ROCORD-Rathena

  1. Apply Diff https://github.com/gamingmagic/ROCORD-Rathena/commit/ceb7b5e42db5c690c7a8e86cf225c7ccc5af6ba4
  2. Install NPM
  3. Run rathena and Discord Bot

Discord TCP Relay Bot

A Node.js-based Discord bot that relays messages between a Rathena server and Discord channels using webhooks.

Features

  • Listens to TCP connections and forwards messages to Discord channels.
  • Supports multiple languages and different webhooks for each language.
  • Provides real-time updates of server messages to designated Discord channels.

Requirements

  • Node.js v12.x or higher
  • npm (Node Package Manager)
  • A Discord bot token
  • Discord webhooks for each language/channel

Installation

  1. Clone the repository:

    git clone https://github.com/gamingmagic/ROCORD-Rathena.git
    cd ROCORD-Rathena/discordbot/
  2. Install the dependencies:

    npm install
    npm install discord.js axios
  3. Configure the bot:

    Edit the index.js file and replace the placeholders with your actual Discord bot token and webhook URLs:

    const BOT_TOKEN = 'YOUR_ACTUAL_BOT_TOKEN';
    const MainWebhookURL = 'YOUR_MAIN_WEBHOOK';
    const englishWebhookURL = 'YOUR_ENGLISH_WEBHOOK';
    const filipinoWebhookURL = 'YOUR_FILIPINO_WEBHOOK';
    const malaysianWebhookURL = 'YOUR_MALAYSIAN_WEBHOOK';
    const indonesianWebhookURL = 'YOUR_INDONESIAN_WEBHOOK';
    const brazilWebhookURL = 'YOUR_BRAZIL_WEBHOOK';

Usage

  1. Start the bot:

    node index.js
    or use PM2 for robust connection.
  2. Bot commands:

    • To send a reply message, use the command in Discord:

      /reply <username> <message>
      
    • To request something, use the command in Discord:

      @request <message> -- Ingame Commands
      
    • Whisper Channel - Ingame

      #main
      #enlishg
      #support
      #brazil
      #Filipino
      

image

Video.Demo.mp4
  1. TCP Server:

    The bot starts a TCP server on the specified IP and port. You can send messages to the server, and it will relay them to the appropriate Discord channels based on the prefixes in the message content.

Bot Configuration

  • Activity Status:

    The bot sets its activity status every 5 minutes. You can customize this status in the bot.js file:

    setInterval(() => bot.user.setPresence({
        activity: { name: 'domain.com/wiki' },
        status: 'online'
    }), 300000); // 5 minutes

Contribution

Feel free to fork this repository and submit pull requests. Contributions are welcome!

Original Author

Normynator


This project is maintained by GamingMagic.

About

ROCORD-Rathena

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.0%
  • Perl 0.6%
  • CMake 0.4%
  • M4 0.3%
  • Makefile 0.2%
  • Shell 0.2%
  • Other 0.3%