If you want to receive events in real time, look at my second reply.
There seems to be some confusion, this is not a Webhook proxy. This is a WebSocket proxy. WebSockets are used for real time communication between a client and a server, discord uses WebSockets for connecting to their gateway, which is what allows you to receive all the events discord sends (Message created, user banned, etc) in real time.
This is a WebSocket proxy I’ve made to allow you to easily connect to any WebSocket server.
This was made because I figured people would want to connect to Discord, however it can connect to any WebSocket server. This also complies with Discord’s ToS because you are consuming their gateway.
This will allow you to receive near real-time events from Discord (or any WebSocket server you connect to), such as messages, bans, deleted messages, etc.
Setting up the server
You have to have Node installed before doing the below steps.
You’ll want to download my github repo and copy the Node-JS folder somewhere.
Inside of that folder, you’ll want to run
npm i in your command line to install all the dependencies.
From there, you can run
node . to start the server.
Inside of the
index.js file, there will be a few options you can change.
Port will change the port that the WebSocket proxy will listen on, this allows you to run multiple proxies without any issues.
IdleTimeout will change how long until the WebSocket proxy will close the connection from inactivity.
Authentication will prevent unauthorized access by adding a password.
maxMessagesPerRecieve will set the max amount of messages sent everytime Roblox requests for messages.
You’ll want to create a new ModuleScript and paste the source of the WebSocket module into it.
Any scripts that want to use it will have to require it.
The module API is a bit big to post here, so I’ve posted it on the github here.
As for connecting with Discord, I’ve made an example here. This is a fairly rough example, but it shows how to use the module and does connect to Discord. This only captures messages, however you can capture a lot more by checking Discord’s documentation.
If you need any help setting this up, any issues, bugs, need clarification, etc feel free to tell me here or in DMs.