A Discord bot which uses the Google Cloud API to provision a Compute Engine instance.
My friend and I, we love playing Minecraft. What we don't like is going through the painful process of starting a server via the GCP console. So, I went ahead and built this Discord bot to automate that process.
• Typing in !server status
gives the current status of the server.
• Typing in !server start
starts the GCP Compute Engine instance. Typing in !server start
again returns the Compute Engine instance external IP address, afaik the Google Cloud API does not send a response when the server gets started so you have to manually call the API again. You can use a timer also to automate it partially.
• Typing in !server stop
stops the GCP Compute Engine instance.
git clone https://github.com/kashifulhaque/discord-bot-for-gcp.git
command.cd discord-bot-for-gcp
commanddummy-discord-config.json
to discord-config.json
and open the file. Paste the token in the required place.dummy-GCP_config.json
with the JSON file you downloaded.npm install
or yarn install
[If you have yarn installed] to get all the required dependencies.npm start
or yarn start
[If you have yarn installed] to start the Discord botIf you face any problems, feel free to create an Issue from the Issues tab. I will try to respond as early as possible.