Is there a possible way to connect a discord bot to roblox studio?

Im wondering if there is a way I can make a bot run a function in roblox studio through discord. Lets say I wanted to run a function called kill to kill a player. Would I be able to say in discord ,run kill or is it impossible to connect through studio with discord? If there is are there any APIs? I’m not asking for code Im just looking to be pointed in the right direction.


You can use HttpService:PostAsync() along with HttpService:EncodeJSON to send JSON data to discord’s webhook api.


Thanks! I didnt know roblox studio had something of that sort! Thanks for pointing it out!

There’s no way to bind a function to a socket or setup a webhook that would let you do Discord -> Studio the way you want. If you wanted to go in Discord and type

kill Player1

And have Studio be “listening” for this, then you have to use “long-polling” and send multiple GET requests to an endpoint and check for queued commands.

If you wanted to do something and studio and send it to Discord, that is more feasible without polling and you can POST or GET to a webhook in Discord.

1 Like

Ok, thanks for pointing that out! Ill look into it!

It’s not that hard to host a bot for free with a 500mb cap storage space that can listen to commands like this.

I’m not sure how that is in response to me saying you have to long-poll in Studio to listen to commands. You can’t use a socket.