- Apply Diff https://github.com/gamingmagic/ROCORD-Rathena/commit/ceb7b5e42db5c690c7a8e86cf225c7ccc5af6ba4
- Install NPM
- Run rathena and Discord Bot
A Node.js-based Discord bot that relays messages between a Rathena server and Discord channels using webhooks.
- 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.
- Node.js v12.x or higher
- npm (Node Package Manager)
- A Discord bot token
- Discord webhooks for each language/channel
-
Clone the repository:
git clone https://github.com/gamingmagic/ROCORD-Rathena.git cd ROCORD-Rathena/discordbot/
-
Install the dependencies:
npm install npm install discord.js axios
-
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';
-
Start the bot:
node index.js or use PM2 for robust connection.
-
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
-
Video.Demo.mp4
-
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.
-
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
Feel free to fork this repository and submit pull requests. Contributions are welcome!
Normynator
This project is maintained by GamingMagic.