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."
|
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):
|
async def execute(self, msg, command, flags):
|
||||||
|
try:
|
||||||
if league_exists(command.split("\n")[1].strip()):
|
if league_exists(command.split("\n")[1].strip()):
|
||||||
try:
|
try:
|
||||||
league = leagues.load_league_file(command.split("\n")[1].strip())
|
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())
|
await msg.channel.send(embed=league.standings_embed())
|
||||||
else:
|
else:
|
||||||
raise CommandError("Can't find that league, boss.")
|
raise CommandError("Can't find that league, boss.")
|
||||||
|
except IndexError:
|
||||||
|
raise CommandError("League name goes on the second line now, boss.")
|
||||||
|
|
||||||
class LeagueLeadersCommand(Command):
|
class LeagueLeadersCommand(Command):
|
||||||
name = "leagueleaders"
|
name = "leagueleaders"
|
||||||
|
|
Loading…
Reference in a new issue