Normynator

[WIP] Discord Bot - roCORD

Recommended Posts

 

roCORD for rAthena

Hey everyone,

I am currently working on a Discord bot which allows interaction between a Discord server and an in game channel.

Support for Version 1 is now dropped!

 

Version 2 can be found under this link -> https://github.com/Normynator/roCORD/tree/development

Documentation about installation and configuration can be found here -> https://github.com/Normynator/roCORD/tree/development/docs

More updates on Version 2 will follow.

Spoiler

unknown.thumb.png.1504eb7f75ad84f36238bc6540a50493.png

Features:

  • Basic Discord to ingame channel and ingame channel to Discord.
  • Script command, which sends a message to the discord server.
  • Supports "rare_drop_announce". (Idea: Stolao)

Join the discord server!


Install:

  1. copy discordbot.cpp/.h into src/map/
  2. apply diffs (can be found in diffs/) onto existing files in src/
  3. (optional) configure channel
  4. configure bot by changing index.js (you need to providea token and define a discord channel id)
  5. start bot before starting rathena.

   or checkout the guide (https://github.com/Normynator/Ragnarok/blob/master/rAmods/discordbot/guides/GuideEN.md)

How to configure:

Basic Config:

	char* name = "#discord";     
	char* alias = "[Discord]";
	tmp_chn.color = channel_getColor("Blue");

(To see supported colors check channel.conf)

Script commands:

Command: 
  discord(<string>);
Sends a message to discord.

Ideas:

  • Multi channel support.

Working with:

rev 042b886

Check it out and help me find bugs:

https://github.com/Normynator/Ragnarok/edit/master/rA_mods/discordbot

If you have ideas for more features let me know!

If you find bugs feel free to open an issue or post it here.

Changelog:

Added a guide in english for Debian/Ubuntu.

 

Greetings Normynator

 

Edited by Normynator
  • Upvote 7
  • Love 3
  • MVP 2
  • Like 1

Share this post


Link to post
Share on other sites

Great job!
So people in-game can communicate to people in discord right? or vice versa since they can both see each other?

Edited by spinzaku

Share this post


Link to post
Share on other sites

People in a discord Server can write and it appears in ingame Channel, and People ingame write to channel and it appears in discord @spinzaku

Edited by Normynator

Share this post


Link to post
Share on other sites

@Normynator nice one. Make sure to drop the unicode prefixes from the ro client messages. It's the |00 you can see on your screenshot. 🙂

Share this post


Link to post
Share on other sites

installation guide is still hard to understand, can you please make diff from fresh git?

and to start bot what server need? python or nodejs? i have some experience in making discord bot, but it still confuse me

thanks rep up for you

Share this post


Link to post
Share on other sites
10 minutes ago, Litro Endemic said:

installation guide is still hard to understand, can you please make diff from fresh git?

and to start bot what server need? python or nodejs? i have some experience in making discord bot, but it still confuse me

thanks rep up for you

I will do that tomorrow 🙂

  • Love 1

Share this post


Link to post
Share on other sites
38 minutes ago, Litro Endemic said:

Somehow from game to discord chat, the first 3 letters of word is missing

Screenshot_2.thumb.png.1c045f4dbc2578c3e738f909f91122cb.png

I will have look at it. Thanks for letting me know!

Edited by Normynator

Share this post


Link to post
Share on other sites

@Normynator run emulator...

[Debug]: Calling discord_connect_timer
[Status]: Connecting to 127.0.0.1:1337
[Error]: make_connection: connect failed (socket #8, error 111: Connection refused)!

 

Share this post


Link to post
Share on other sites
2 hours ago, Haikenz said:

@Normynator run emulator...

[Debug]: Calling discord_connect_timer
[Status]: Connecting to 127.0.0.1:1337
[Error]: make_connection: connect failed (socket #8, error 111: Connection refused)!

 

Make sure the bridge is running on 127.0.0.1 at port 1337 before starting your emulator.

Share this post


Link to post
Share on other sites

Awesome release! So much appreciation for this one. I'll use it in my server! :)

Share this post


Link to post
Share on other sites

Are there any adverse effects as to when people use some very "long" character names?

Share this post


Link to post
Share on other sites

There is a security issue with the bridge on version 1. Please make sure to ONLY allow communication to port 1337 via localhost!

FIXED thanks to @Stolao for testing!

Make sure to use the newest version!

Edited by Normynator

Share this post


Link to post
Share on other sites

I've a question about this :

What is the purpose/advantage to build a bridge ? Isn't rAthena able to call Discord directly?

Edited by Vykimo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now