fixed an error message
This commit is contained in:
parent
38ef0fea36
commit
55f6906b29
|
@ -890,6 +890,7 @@ class LeagueDisplayCommand(Command):
|
|||
description = "Displays the current standings for the given league. Use `--season X` or `-s X` to get standings from season X of that league."
|
||||
|
||||
async def execute(self, msg, command, flags):
|
||||
try:
|
||||
if league_exists(command.split("\n")[1].strip()):
|
||||
try:
|
||||
league = leagues.load_league_file(command.split("\n")[1].strip())
|
||||
|
@ -910,6 +911,8 @@ class LeagueDisplayCommand(Command):
|
|||
await msg.channel.send(embed=league.standings_embed())
|
||||
else:
|
||||
raise CommandError("Can't find that league, boss.")
|
||||
except IndexError:
|
||||
raise CommandError("League name goes on the second line now, boss.")
|
||||
|
||||
class LeagueLeadersCommand(Command):
|
||||
name = "leagueleaders"
|
||||
|
|
Loading…
Reference in a new issue