Git Product home page Git Product logo

requestah's Introduction

Requestah - Discord Bot for checking the health status of services

Commands

  • schedule - accepts: interval (cron), url, request type (GET, POST), expected status code:

    • if the executed request returns a status code different than the one given as the default one, a Discord channel gets notified and the job is being garbaged.
  • request - accepts: url, request type (GET, POST):

    • just a simple request towards an url - returns the status code (Discord curl 😄)
  • listscheduled:

    • lists all scheduled jobs
  • unschedule - accepts: ID (matched key in listscheduled):

    • stops a scheduled job

Create a command

POST 'https://discord.com/api/v10/applications/1036000679774396436/commands' 
header 'Authorization: Bot <BOT_TOKEN>' 
data {
    "name": "request",
    "description": "Make a http request",
    "options": [
        {
            "name": "url",
            "description": "URL address",
            "required": true,
            "type": 3
        }, 
        {
            "name": "type",
            "description": "Type of the HTTP request",
            "required": true,
            "type": 3,
            "choices": [
                {
                    "name": "GET",
                    "value": "get"
                }, 
                {
                    "name": "POST",
                    "value": "post"
                }
            ]
        },
        {
            "name": "status",
            "description": "Expected response code",
            "required": true,
            "type": 4
        }
    ]

}

requestah's People

Contributors

asynchroza avatar

Stargazers

V_Pohlupkov avatar

Watchers

Ivan Obreshkov avatar

requestah's Issues

handle undefined objects

Requestah
BOT
 — Today at 13:59
@here, 

    ⚠️ POST request to https://thehub-aubg.com/api/validate failed due to TypeError: Cannot read properties of undefined (reading 'code') ⚠️

    Scheduled job has been stopped. Schedule a new one when you resolve the issue!
@here, 

    ⚠️ POST request to https://thehub-aubg.com/api/validate FAILED ⚠️

    Scheduled job has been stopped. Schedule a new one when you resolve the issue!

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.