Skip to content

Allow Discord users to start or stop a specific EC2 instance.

Notifications You must be signed in to change notification settings

codeeno/discord-ec2-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord EC2 Bot

Small script I made in order to allow users on my Discord server to start/stop my Valheim server in order to reduce costs.

Usage

The bot, once running, can be interacted with via the !server command. Possible commands:

  • start - Starts the EC2 instance
  • stop - Stops the EC2 instance
  • status - Prints whether or not the instance is currently running or stopped.

Setup

Install the dependencies:

$ pip3 install -r requirements.txt

Copy .env file:

$ mv .env.sample .env

Adjust the values in the .env file.

  • The TOKEN value is the access token of your Discord bot.
  • The SERVER_NAME value needs to correspond this the value of the Name tag of the EC2-Instance that is to be started/stopped.
  • The AWS values are your usual AWS credentials and region.

Run the script:

$ python3 main.py

About

Allow Discord users to start or stop a specific EC2 instance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages