Add /reset-image command

This commit is contained in:
Cal Corum 2023-10-29 14:14:05 -05:00
parent e46955a16d
commit a5171d4e07

View File

@ -183,6 +183,17 @@ class Admins(commands.Cog):
await ctx.send(random_conf_gif())
@app_commands.command(name='reset-image', description='Force a refresh of a player\'s card images')
async def reset_image(self, interaction: discord.Interaction, player_id: int):
if not owner_only(interaction):
await interaction.response.send_message(random_no_gif())
return
await interaction.response.defer()
new_player = await db_post(f'players/{player_id}/image-reset')
player_embed = await get_card_embeds(get_blank_team_card(new_player))
await interaction.edit_original_response(content=None, embeds=player_embed)
@commands.hybrid_command(name='sync-sheets', help='Mod: Sync AI team sheets')
@commands.is_owner()
async def sync_sheets_command(self, ctx):