fixes #185: no second line will now print an error message

This commit is contained in:
Sakimori 2021-02-04 01:28:33 -05:00
parent cdcfbc706c
commit 9f5e2bb19a

View file

@ -823,6 +823,9 @@ Plays a league with a given name, provided that league has been saved on the web
except ValueError: except ValueError:
await msg.channel.send("Chief, we need a games per hour number between 1 and 12. We think that's reasonable.") await msg.channel.send("Chief, we need a games per hour number between 1 and 12. We think that's reasonable.")
return return
except IndexError:
await msg.channel.send("We need a games per hour number in the second line.")
return
if league_exists(league_name): if league_exists(league_name):
league = leagues.load_league_file(league_name) league = leagues.load_league_file(league_name)
@ -1120,11 +1123,12 @@ commands = [
LeagueScheduleCommand(), LeagueScheduleCommand(),
LeagueTeamScheduleCommand(), LeagueTeamScheduleCommand(),
LeagueRegenerateScheduleCommand(), LeagueRegenerateScheduleCommand(),
LeagueForceStopCommand(),
CreditCommand(), CreditCommand(),
RomanCommand(), RomanCommand(),
HelpCommand(), HelpCommand(),
StartDraftCommand(), StartDraftCommand(),
DraftPlayerCommand(), DraftPlayerCommand()
] ]
client = discord.Client() client = discord.Client()