Update helpers.py
Add check for player update function
This commit is contained in:
parent
b2db159fd9
commit
c10fc7c22f
@ -1079,6 +1079,13 @@ class SelectUpdatePlayerTeam(discord.ui.Select):
|
||||
super().__init__(placeholder=f'Select an {which} team', options=options)
|
||||
|
||||
async def callback(self, interaction: discord.Interaction):
|
||||
if self.values[0] == self.player['franchise'] or self.values[0] == self.player['mlbclub']:
|
||||
await interaction.response.send_message(
|
||||
content=f'Thank you for the help, but it looks like somebody beat you to it! '
|
||||
f'**{player_desc(self.player)}** is already assigned to the **{self.player["mlbclub"]}**.'
|
||||
)
|
||||
return
|
||||
|
||||
view = Confirm(responders=[interaction.user], timeout=15)
|
||||
await interaction.response.edit_message(
|
||||
content=f'Should I update **{player_desc(self.player)}**\'s team to the **{self.values[0]}**?',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user