Coder Social home page Coder Social logo

rebootbot's Introduction

Reboot Your DigitalOcean Droplet from Discord

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.

Deploy on Railway

Commands

  1. ^reboot: Reboots the DigitalOcean droplet associated with the variable digitalocean_droplet_id.
  2. ^test: Checks whether the bot is responsive.
  3. ^ping: Sends a text message to user_phone_number.

Environmental Variables You Need to Setup

  1. digitalocean_token: Find this in your DigitalOcean account. Click APIs and generate an API key.
  2. discord_token: This is the bot's discord token. Find it in your discord account.
  3. 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.
  4. digitalocean_droplet_id: The droplet ID of the droplet you want to reset.
  5. twilio_token: The auth token associated with your Twilio account.
  6. twilio_account: The account SID associated with your Twilio account.
  7. twilio_phone_number: The phone number associated with your Twilio account. This number will send the text message.
  8. user_phone_number: The phone number you want to be able to text/ping. This number will receive the text message.

Customizations

Customize the message in the text_message function and user name within the on_message event.

rebootbot's People

Contributors

invictus2010 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.