Channel check for draft

This commit is contained in:
Cal Corum 2023-03-28 11:10:44 -05:00
parent e406ecd1bc
commit 84fa202360

View File

@ -775,6 +775,14 @@ class Players(commands.Cog):
@group_gauntlet.command(name='start', description='Start a new Gauntlet run')
@app_commands.checks.has_any_role(PD_PLAYERS_ROLE_NAME)
async def gauntlet_start_command(self, interaction: discord.Interaction, event_name: Literal['Paper Sluggers']):
if 'hello' not in interaction.channel.name:
await interaction.response.send_message(
content='The draft will probably take you about 15 minutes. Why don\'t you head to your private '
'channel to run the draft?',
ephemeral=True
)
return
await interaction.response.defer()
main_team = get_team_by_owner(interaction.user.id)
draft_team = get_team_by_abbrev(f'Gauntlet-{main_team["abbrev"]}')