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.default()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 2
dl 0
loc 5
rs 9.4286
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