The easiest way is setting up and using a node.js server here Coding the discord bot for ease of access will require you to use JavaScript, although there are other ways to do it. There are js wrappers to communicate with your discord bot
The way I did this for MFSX was having the Discord bot run on Python and be executed from a home server I own. This way its up at all times. Python is rather simple to use, you could set up a Flask script that runs alongside your Python bot and have the Flask script communicate any data to the bot and the bot could do whatever it needs to do with that data.
I really recommend you checking out this tutorial since It explains very well all the things you need to set up a simple bot and explains each one of the points that the users are mentioning in this post.
I’ve never worked with node.js but I’m sure theres a way to set up an HTTP server, when you do that you can just have the game use the HttpService to communicate with the server directly, usually addresses like http://localhost:5000 for locally hosted webservers work from studio.
Hosting it locally wouldn’t allow for roblox to send requests to it, but you can try out glitch which offers free hosting for the server which will give you a URI to use