Adds the barebone code necessary to get a Discord bot running#1
Adds the barebone code necessary to get a Discord bot running#1psionikangel wants to merge 1 commit intofeydan:mainfrom
Conversation
These files will allow a very basic Discord bot to run and answer to </slash commands> in a discord server to accomplish basic tasks (such as answering questions and starting a Satisfactory Dedicated Server) Signed-off-by: Jérémie Carpentier-Roy <jeremie.carpentier.roy@gmail.com>
| .setDescription('Start the satisfactory server!'), | ||
| async execute(interaction) { | ||
| await interaction.reply("Sending message to start Satisfactory Server!"); | ||
| ///////// Your code to start the Satisfactory Server here //////// |
There was a problem hiding this comment.
Since this is in the repo that contains a way to start the server by hitting an http endpoint, I wonder if it would be good to have a config.ts setting for the lambda/api gateway url -- then this command could just hit that url with an http client to start the server. Maybe have it as an optional implementation if the config is set for the start url. What do you think?
There was a problem hiding this comment.
Since I'm using GCP I removed all of my GCP-related code such as the centralised GCP config (And also because I use PubSub as the trigger for my GCP Cloud Functions so that's extra layer I have to deal with) from this file as this would have been pretty useless in your case since your whole setup is on AWS.
But you are correct that config should be centralised for easier access.
And in your particular case and having this command hit the URL is probably the simplest way to make it work.
There was a problem hiding this comment.
There is a small hiccup with this step. It's that the api url is generated after the resources have been deployed and the deployment does not affect local files. The deployment can output the api url once the deployment has completed and the user can then copy this value into the config file.
| You will need: | ||
|
|
||
| * A discord account | ||
| * A discord server that you manage (meaning you can add apps and bots to it) |
There was a problem hiding this comment.
It doesn't have to be part of this MR, but it would be nice as a future feature to integrate the creation of the micro instance that manages the bot into the cdk code. Eventually we could have a config variable boolean that could control whether you want the discord bot to be provisioned and deployed along with the other services. (this is just a note, nothing actionable here)
Update for v1.0
These files will allow a very basic Discord bot to run and answer
to </slash commands> in a discord server to accomplish basic tasks (such
as answering questions and starting a Satisfactory Dedicated Server)
Signed-off-by: Jérémie Carpentier-Roy jeremie.carpentier.roy@gmail.com