Merge pull request #44 from esSteres/master

Do exactly what I described in #42
This commit is contained in:
Sakimori 2020-12-27 04:35:55 -05:00 committed by GitHub
commit ad99c4e4ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,13 +192,17 @@ class ShowTeamCommand(Command):
template = "m;showteam [name]"
description = "You can view any saved team with this command"
async def execute(self, msg, command):
team = games.get_team(command.strip())
team_name = command.strip()
team = games.get_team(team_name)
if team is not None:
await msg.channel.send(embed=build_team_embed(team))
else:
await msg.channel.send("Can't find that team, boss. Typo?")
teams = games.search_team(team_name.lower())
if len(teams) == 1:
await msg.channel.send(embed=build_team_embed(teams[0]))
else:
await msg.channel.send("Can't find that team, boss. Typo?")
class ShowAllTeamsCommand(Command):
name = "showallteams"