Would it be possible to connect to a websocket with roblox? I don't need directly, like say GetAsync my website with the javascript websocket, but it doesn't keep the connection. If you wanna know what I'm using this for it is a "Roblox hosted discord bot" I've already got a working version and it does what I need it to, but a way to do some type of connection with a websocket or someting would boost this a lot.
Here is the "websocket" connection I attempted
local http = game:GetService("HttpService")
spawn(function()
while wait(3) do
http:GetAsync("private_url")
end
end)
The reason that failed is because of two reasons
- For the bot to stay online/etc it'd have to be constant connection
- I have to wait 1-2 seconds until I can connect to the websocket

3 comments
You only have access to the protocols http and https you cannot use any other protocols
The ROBLOX HTTPService cannot have a keep alive(maybe) but once it completes it's request, it is terminated immediately. Why can't you just run a server on your computer, portforward them? ISP problems? server problems? I might able to fix 'em
I don't have the tools to do so, this isn't my laptop since mine broke so I don't wanna download stuff, but this laptop is also too slow for any of the normal bot creation tools (vs,node,etc)