async def _do_execute(self, cmd: Command): league = LeagueMgr().league if league is None: await cmd.channel.send( 'Error: The current event (`{0}`) does not exist.'.format(Config.LEAGUE_NAME) ) return try: match_info = matchinfo.parse_args(cmd.args) except necrobot.exception.ParseException as e: await cmd.channel.send( 'Error parsing inputs: {0}'.format(e) ) return league.match_info = match_info league.commit() await cmd.channel.send( 'Set the default match rules for `{0}` to {1}.'.format(league.schema_name, match_info.format_str) )
async def _do_execute(self, cmd: Command): league = LeagueMgr().league if league is None: await self.client.send_message( cmd.channel, 'Error: The current event (`{0}`) does not exist.'.format(Config.LEAGUE_NAME) ) return try: match_info = matchinfo.parse_args(cmd.args) except necrobot.exception.ParseException as e: await self.client.send_message(cmd.channel, e) return match_info.race_info.condor_race = True league.match_info = match_info league.commit() await self.client.send_message( cmd.channel, 'Set the default match rules for `{0}` to {1}.'.format(league.schema_name, match_info.format_str) )