Communitation between a discord bot and roblox

The easiest way is setting up and using a node.js server here Coding the discord bot for ease of access will require you to use JavaScript, although there are other ways to do it. There are js wrappers to communicate with your discord bot


EDIT: link has been fixed

2 Likes

That link gives me “Oops! That page doesn’t exist or is private.”

2 Likes

Your link is broken, please fix it.

1 Like

@OP and @Venonum, the link has been fixed

2 Likes

Alright. I will check out Express in a sec

Alright, I got the Express running, now how do I access it from Roblox?

1 Like

The way I did this for MFSX was having the Discord bot run on Python and be executed from a home server I own. This way its up at all times. Python is rather simple to use, you could set up a Flask script that runs alongside your Python bot and have the Flask script communicate any data to the bot and the bot could do whatever it needs to do with that data.

You can use https://glitch.com/. There are some awesome tutorials on YT too.

2 Likes

The bot is based on Node.js, and I saddly don’t have a server

As I said earlier, firstly I want to see if it looks ok localy, then I will host it somewhere

1 Like

I really recommend you checking out this tutorial since It explains very well all the things you need to set up a simple bot and explains each one of the points that the users are mentioning in this post.

Yes, I’ve already readen that but I don’t want a Roblox account for that.

1 Like

I’ve never worked with node.js but I’m sure theres a way to set up an HTTP server, when you do that you can just have the game use the HttpService to communicate with the server directly, usually addresses like http://localhost:5000 for locally hosted webservers work from studio.

And I need it to work from game saddly

1 Like

Hosting it locally wouldn’t allow for roblox to send requests to it, but you can try out glitch which offers free hosting for the server which will give you a URI to use

Oh, alright then I’ll try it out

Eh, I’ve heard that projects go off after 5 mins of not being used, is that right?

From what i’ve found, it takes 2 minutes to go to sleep after being idle

That’s bad. What else could I use?

There are many free web hosting servers, like Microsoft Azure. Searching for them is easy