Update players.py

Injury gif updates
This commit is contained in:
Cal Corum 2023-04-22 16:19:38 -05:00
parent 622f49920b
commit f05270e066

View File

@ -3096,21 +3096,30 @@ class Players(commands.Cog):
logging.info(f'injury rating: {rating.value}p{games.value} / array: {injury_list}[{injury_roll - 2}] / result: {injury_result}')
if isinstance(injury_result, int):
await interaction.edit_original_response(
content=random_gif(random_from_list(['salute', 'press f', 'pay respects']))
)
try:
await interaction.edit_original_response(
content=random_gif(random_from_list(['salute', 'press f', 'pay respects']))
)
except Exception as e:
logging.info(f'failed to post funny gif')
injury_string += f'With a roll of {injury_roll}, the injury length is **{injury_result} ' \
f'game{"s" if injury_result > 1 else ""}**.'
elif injury_result == 'REM':
await interaction.edit_original_response(
content=random_gif(random_from_list(['could be worse', 'not too bad']))
)
try:
await interaction.edit_original_response(
content=random_gif(random_from_list(['could be worse', 'not too bad']))
)
except Exception as e:
logging.info(f'failed to post funny gif')
injury_string += f'With a roll of {injury_roll}, the injury length is **REMAINDER OF GAME** for batters ' \
f'or **FATIGUED** for pitchers'
else:
await interaction.edit_original_response(
content=random_gif(random_from_list(['it is fine', 'nothing to see here', 'i wasn\'t worried']))
)
try:
await interaction.edit_original_response(
content=random_gif(random_from_list(['it is fine', 'nothing to see here', 'i wasn\'t worried']))
)
except Exception as e:
logging.info(f'failed to post funny gif')
injury_string += f'With a roll of {injury_roll}, the player is **OKAY** - no injury!'
embed = await self.get_dice_embed(