Communitation between a discord bot and roblox

Hello, recently I wanted to send some data to a discord bot (NOT a webhook) but I don’t know if that’s even possible for free, any idea? Any help appreciated!

2 Likes

This would require an external web server to handle requests and the discord bot (using node.js, etc.). It can be hosted locally for free, just that you have to keep your computer on 24/7, or alternatively, there are free web hosting services, but they’re only for a limited time. Getting a VPS (Virtual Private Server) is really cheap anyway and I don’t know of any other way to do this.

A suggestion that came into my mind is to use a webhook that’ll send messages to a channel and the discord bot will handle an event for any sent messages and do whatever you want with it. Frankly, I don’t know if the bot will handle events for created messages from a webhook, but it’s worth a try. Running the discord bot would require hosting anyway, where you’d need a VPS or host it locally on your computer (which is way more expensive than using a VPS because of the power bill you’d have at the end of the month)

2 Likes

Eh, firstly I wanna see how it works localy and if it’s good i would move it to something else, but i don’t know how I would communicate with the bot (Can’t use normal text commands as it would cause problems.)

2 Likes

Depending on how you intend to program your Discord Automation, there are a few possibilities that you could link your bot-app to ROBLOX via HttpService. However, depending on what programming method you utilize, and if Google updates their Cache, it might become more complicated over time.

2 Likes

Could you give me some examples of how I would do it? Also happy birthday!

2 Likes

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.

1 Like

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