GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

StatsCommand   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 14
Duplicated Lines 0 %
Metric Value
dl 0
loc 14
rs 10
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A match() 0 5 2
A default() 0 5 2
1
import config
2
3
from . import BotCommand
4
5
6
class StatsCommand(BotCommand):
7
    command = '/stats'
8
9
    @classmethod
10
    def match(cls, message):
11
        if message.from_user.id not in config.administrators:
12
            return False
13
        return super(StatsCommand, cls).match(message)
14
15
    def default(self, message):
16
        msg = ''
17
        for key, value in self.bot.db.root.stats.items():
18
            msg += '{}: {}\n'.format(key.replace('_', ' ').capitalize(), value)
19
        self.bot.say(message, msg)
20