Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

[REQ] Discord to ROBLOX connection?

So.. I was trying to make a DISCORD to ROBLOX connection..

Keep in mind I already have the knowledge to make a ROBLOX to DISCORD connection, which is basically making chat or stuff from ROBLOX into DISCORD.

Using something like the following.

local Data = {
	['username'] = ""
}

however, I am trying to make it so that any information that is coming from DISCORD goes into ROBLOX in like a print at least. I need this for a project that I am trying to make and it would be very helpful. Thank you.

I have some experience in LUA but i'm quite confused on the method in this. Therefore any easy kind of method for this would be appreciated in it's simplest form such as short code if possible.

Regards, Recursion.

5 comments

0

No offense, but I dont think that would be much help as it just tells me how to getasync itself. I get confused because of the arguments mainly. In getAsync it's URL, boolean url being the webhook whereas PostAsync is URL, CONTENT url being webhook. So I'm kind of confused. More information would be appreciated

0

You're gonna have to host your own webserver which queries chat requests from Discord into a Database which your Roblox script will HTTPRequest to every so often. Thats the only way to do this.

0

Alright. I already own a webserver. Not sure how to do all that though. Mind helping on it more? Thank you.

0

Technichally requests are not allowed, so adding the "[REQ]" tag may get it closed. As for the question, I was wondering the same thing myself.

2 answers

It's easy for Roblox --> Discord because Discord offers an API that lets you connect to one data source: your chatroom. But going the opposite direction (Discord --> Roblox) is not as simple.

Remember, you can have multiple Roblox games running at the same time on different Roblox servers, but Discord has a single server that hosts your chatroom (at least as far as we are concerned from an API user standpoint). This is because a Discord webhook, in this case, creates a "one-to-many" connection. One Discord chatroom is connected to many Roblox games using the webhook.

To go the other direction, you would need to write a library that takes advantage of the Discord API from within Roblox Lua. Just to put the scope of this project into perspective, take a look at this Lua-based Discord library, Discordia.

This discussion is preserved as it was. New answers, comments, and votes are closed.