You can use this bot to reboot your DigitalOcean droplet from Discord and text someone in an emergency (like PagerDuty).
My gaming community's server is hosted on DigitalOcean and we have less technically inclined team members who want to be able to assist with server resets when needed. This lets them reboot the droplet with ^reboot
and also lets them ping me in an emergency with ^ping
.
^reboot
: Reboots the DigitalOcean droplet associated with the variabledigitalocean_droplet_id
.^test
: Checks whether the bot is responsive.^ping
: Sends a text message touser_phone_number
.
digitalocean_token
: Find this in your DigitalOcean account. Click APIs and generate an API key.discord_token
: This is the bot's discord token. Find it in your discord account.discord_allowed_role_id
: This is the role of Discord users who can command the bot. Find it in Discord Server Settings -> Roles. Copy the role id.digitalocean_droplet_id
: The droplet ID of the droplet you want to reset.twilio_token
: The auth token associated with your Twilio account.twilio_account
: The account SID associated with your Twilio account.twilio_phone_number
: The phone number associated with your Twilio account. This number will send the text message.user_phone_number
: The phone number you want to be able to text/ping. This number will receive the text message.
Customize the message in the text_message
function and user name within the on_message
event.