How can I achieve Discord to Roblox commands

Hey there everybody. A little issue on my hand. I’m trying to create a few commands which I can perform from Discord (or by being out-of-game). And yes, I do know a few stuff about how I can achieve it, but not the perfect idea.

What I’m thinking is that I could use the express and discord.js package. But, I’m not sure if noblox would be needed for this case.

Using discord.js to send information to a localhost (by express) and receiving the information by using HttpService.

“Plugins may also communicate with other software running on the same computer through the localhost and 127.0.0.1 hosts.”

This is what the API has to say, but is it possible to use localhost in-games?

I’m trying to achieve a normal kick system for now (I’ll be able to do the rest once I get the basic).

That’s all. Thanks.

1 Like

To put it simply, no, it is not possible to use localhost in the actual game. This is because, in Studio, it runs off of your IP and your server, so it is able to communicate with it (although not in the coop test). As a recommendation, and from someone who uses Discord to Roblox communication, I recommend glitch. Now, this one has its limits unless you want to pay, but you can limit the amount that the app is used, (4000 an hour max I believe, with the free version). So, it would be Discord → Glitch → Roblox and it can also be used the other way around, but I believe simply using webhooks will work for the Roblox → Discord

I know how to do Roblox → Discord using webhooks. But that was the only thing I was worried about. Is there no other way, around glitch?

Well, there are probably other websites you can use to store and retrieve the data, but I believe that is more of a pain than it should be (and it would also probably not be free). The best thing would be a website like glitch or glitch itself.

I see. Well that answers my confusion. Thank you. I’ll be choosing your post as solution (till I find another better solution (if I do find it)).

I think I may be able to use Trello instead of localhost as it is a public website where localhost is just stored on your computer. Still, appreciate your help.

One question. How can I send information to https://apis.roblox.com/messaging-service/v1/universes/{universeId}/topics/{topic} from my bot?

I’ve found a neat solution with an entire essay of explanation. If anybody comes across this post, make sure to check it out!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.