    def handle_command(self, user, command):
        # type: (User, str) -> None
        '''
        Handles a given command from a user.
        '''
        key, args = self.parse_command(command)
        logging.info('Handling command {0} for {1}'.format(key, user['name']))
        cmd = self.commands[key]
        if cmd['fn'](self, user, args):
            if cmd['success_msg']:
                self.chat.message_user(user, cmd['success_msg'])
        else:
            if cmd['failure_msg']:
                self.chat.message_user(user, cmd['failure_msg'])
Handles a given command from a user.
securitybot/bot.py