From 32136b51dceb7418572bd02dbcfaf2aedb94c8ad Mon Sep 17 00:00:00 2001 From: Sakimori Date: Mon, 4 Jan 2021 15:45:30 -0500 Subject: [PATCH] added error message to addplayer if pitcher/batter is not specified --- the_prestige.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/the_prestige.py b/the_prestige.py index 2199bad..94b48bc 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -386,14 +386,17 @@ class AddPlayerCommand(Command): new_player = games.player(ono.get_stats(player_name)) - if "batter" in command.split("\n")[0]: + if "batter" in command.split("\n")[0].lower(): if not team.add_lineup(new_player)[0]: await msg.channel.send("Too many batters 🎶") return - elif "pitcher" in command.split("\n")[0]: + elif "pitcher" in command.split("\n")[0].lower(): if not team.add_pitcher(new_player): await msg.channel.send("8 pitchers is quite enough, we think.") return + else: + await msg.channel.send("You have to tell us if you want a pitcher or a batter, boss. Just say so in the first line, with the command.") + return await msg.channel.send(embed=build_team_embed(team)) games.update_team(team)