Fork me on GitHub

Brisingr: Server Status Module

This module is useful for users to display the latest server issues regarding their region’s server for League of Legends.

It requires 2 libraries that should already have came with Python (urllib2 and json).

Syntax is pretty simple: !status [region] – it will display the English translation if there is one. It grabs the status directly from Riot’s site So whatever you see there is what the bot will pull (always grabs the latest update under Game Section)

This module will be included in version 1.2 of the bot when it is released as well.

Simply copy and paste the code below into a new file or download my copy which can be found below the code.

import urllib2
import json

def on_load(bot):
    bot.add_command('status', status)

def on_exit(bot):

def status(bot, user, channel, args):
    if len(args) < 1:

    shard = ''

    region = args[0].lower()

    full_url = shard + region

    response = urllib2.urlopen(full_url)

    json_response =

    incidents = json_response.count("content") - 1

    readable_json = json.loads(json_response)

        content = str(readable_json['services'][1]['incidents'][0]['updates'][0]['content'].encode('utf8'))
        content = "There are no reported issues at this time."

    content_replace = content.replace('rn', "")

    bot.send_msg(channel, "%s Server Status: %s" % (region.upper(), content_replace))