SwitchbladeBot / switchblade

The open source Discord bot that solves all of your problems.
https://switchblade.xyz/
BSD 4-Clause "Original" or "Old" License
424 stars 224 forks source link

Atlassian Statuspage Notifications #992

Open pedrofracassi opened 4 years ago

pedrofracassi commented 4 years ago

Let users add status pages to watch and get notified when someting goes down

For example, running s!watchstatus status.discordapp.com would set the bot to start sending status messages when some part of Discord goes down. This would work for a plethora of web services, as most of the web already uses Atlassian's Statuspage.

In order to query the data, we can just append /api/v2/summary.json to the end of the statuspage URL, and we'd get JSON data. Here's Discord's status information in JSON: https://status.discordapp.com/api/v2/summary.json

We may have to create an external service that queries the statuspages from time to time and then sends notifications to the channels subscribed to them. I think we should have a database document for each statuspage, and then a list of channels subscribed to that statuspage on the same document.

{
  "id":  "0f54fx204jpt",
  "url": "http://status.discordapp.com",
  "channels": [
    {
      "serverId": 45843567489647367,
      "channelId": 43584684578657986
    },
    {
      ...
    }
  ]

}
pedrofracassi commented 4 years ago

https://status.atlassian.com/api