Git Product home page Git Product logo

captainhook's Introduction

Reboot Your DigitalOcean Droplet from Discord

You can use this bot to interact with your DigitalOcean droplets from Discord.

My Cloud Labs are hosted on DigitalOcean and we are building a bot so that users can self-service their labs and reset the environments when need be.

Deploy on Railway

Commands

!start <droplet_id>: starts the droplet with the ID droplet_id. !stop <droplet_id>: attempts graceful shutdown of the droplet with the ID droplet_id. !reboot <droplet_id>: attempts rebooting the droplet with the ID droplet_id. !test: Checks whether the bot is responsive.

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. DISCORD_GUILD: The ID of the Discord Server you want to connect to.

TODO

  • implement startall (or startlab) / stopall (or stoplab) function
  • implement forcedshutdown
  • implement vpn generation/QR code command?
  • implement copying of the whole stack for individuals
  • hard reset option (in case a user bricked something)
  • whisper/private message person requesting command
  • add VPN sending over private message
  • refactor prettify function to use client.command() and context PRIO 10000
  • BUILD LAB services

captainhook's People

Contributors

maikroservice avatar invictus2010 avatar gameddadel avatar

Forkers

gameddadel

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.