diff --git a/cogs/team.py b/cogs/team.py index 0234d1f..bca3525 100644 --- a/cogs/team.py +++ b/cogs/team.py @@ -263,6 +263,7 @@ class team(commands.Cog): )): if team not in teams_dict: await interaction.response.send_message("Invalid Team!", ephemeral=True) + return await interaction.response.defer() teamid = teams_dict[team] data = requests.get(f"https://mmolb.com/api/team/{teamid}").json() @@ -307,6 +308,7 @@ class team(commands.Cog): )): if team not in teams_dict: await interaction.response.send_message("Invalid Team!", ephemeral=True) + return await interaction.response.defer() teamid = teams_dict[team] data = requests.get(f"https://mmolb.com/api/team/{teamid}").json() @@ -356,6 +358,7 @@ class team(commands.Cog): async def teamstats(self, interaction: nextcord.Interaction, team: str): if team not in teams_dict: await interaction.response.send_message("Invalid Team!", ephemeral=True) + return await interaction.response.defer() teamid = teams_dict[team] loop = asyncio.get_event_loop()