Discord Requests

That is incorrect. My solution uses Roblox’s open cloud, and does not touch web sockets or long-term polling at all. It uses Roblox’s own APIs, and is much simpler than what you describe.

Yes, so in the roblox code you do:

local HttpService = game:GetService("HttpService");
print("Result:", HttpService:RequestAsync({
	Url = "http://111.111.111.111:3000",
	Headers = {
		IAmAHeader = "nice"
	},

	Body = "very nice!!!",
	
	Method = "POST"
}));

Then please enlight me. How would the server be up-to-date? I thought MessageService was a one way thing.

I don’t believe that’s what the OP requires, does he? I thought the OP just needed to send an event to the game from a Discord bot, and have the game act accordingly.

Just getting a connect fail error

Here’s my code
image

I see, I just checked, and you are right. @FireManGuy4321 use his method if you don’t require the server to be up-to-date and only send a message. I read the topic wrong!

1 Like

Can you show me your node code? Did you run the node script?

Note: Try to run the script empty, without anything else for now. Then we will implement the code on the bot

Change the URI to “http://localhost:3000

Also await won’t work since it has to be an async function

You can use heroku to work this out

image

Since he is running a discord bot I think he already has a server

1 Like

Wait wait, localhost doens’t work. But host it somewhere like Vercel.

So

are you running the script currently? And if so is it only the code I sent you (for now)? (and is the node script erroring?)

I’m currently trying to find the universe ID of my Game from @typechecked code

  1. Find the experience you want to publish on Create - Roblox.

  2. Click the Gear button, and then click Configure experience. The universeId is in the redirected URL. For example, in the URL Roblox, the universeId is 123456.

1 Like

Also, before you use MessagingService, just be aware that there is a limit. (You will probably never reach it, but it is there)

image

I’ve got everything setup in although it isn’t sending to the Roblox Game.
Bot Code:
image

Roblox Code:
image

Is there any errors or other output on either side?

Not on Roblox or my Bot. Everything is fine.