I recently made a discord bot and would like to know how I can integrate it to Roblox (beginner in web development). what I’m trying to achieve
by RegisteredCode on Roblox
I’m using discord.js, node(ofc), nodemon, and visual studio code to make my bot. Is this possible while hosting the bot locally? If so, how can I also do it in the cloud
Well, actually it’s impossible to make requests to the roblox servers. Only way to do that would be to have a website (preferably using express) and the bot would POST/PATCH/PUT data to the website. Later you would need to setup checks every x seconds (in the game) to the website (ex. Normally the data returned would be “{ riot: false }”, after triggering the command it would be “{ riot: true }”)
You cannot send post requests directly to the Roblox servers, however, you can fire requests from the Roblox server to your project. Suppose you are hosting your bot on a DNS server, you would have to make a quick hello world website (preferably using express), copy the link, and fire HTTP requests using that endpoint. As far as I am aware, making post requests directly to the Roblox server can’t be done unless you have a 3rd party database set up for the Roblox server and discord.js script to read. Too much work if you ask me but if you wish, go for it.