Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

The .hat list command only displayed hat names as text. Users had no visual reference for what hats looked like before selecting one.

Changes

  • Show a preview image for every available hat in the list
  • Each hat gets its own embed with the hat name as the title and preview image attached
  • Default hat is marked with ⭐
  • Uses existing _get_hat_path helper to resolve hat file location
  • Gracefully degrades to text-only if hat image unavailable
  • Added new .hat flip x/y/none command to flip the hat horizontally or vertically
  • Updated .hat position to allow negative values and values > 1.0 for partial off-screen positioning
  • Updated .hat reset to also reset flip settings
  • Preview embed now shows flip status
# Send a preview for each hat
hat_names = list(hats.keys())
for idx, name in enumerate(hat_names):
    is_default = " ⭐" if name == default_hat else ""
    embed = discord.Embed(
        title=f"🎅 {name}{is_default}",
        color=discord.Color.red(),
    )
    hat_path = await self._get_hat_path(name)
    if hat_path:
        file = discord.File(hat_path, filename="hat_preview.png")
        embed.set_image(url="attachment://hat_preview.png")
        msg = await ctx.send(embed=embed, file=file)

New Commands

  • .hat flip x - Toggle horizontal flip
  • .hat flip y - Toggle vertical flip
  • .hat flip none - Reset both flips

Position Enhancement

  • .hat position -0.2 0.0 - Position hat partially off the left side
  • Values outside 0.0-1.0 range now allowed for creative positioning
Original prompt

For the hat cog, .hat list should show a preview of the hat being selected.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add preview display for selected hats in .hat list Add hat preview image to .hat list command Dec 5, 2025
Copilot AI requested a review from psykzz December 5, 2025 11:24
@psykzz
Copy link
Owner

psykzz commented Dec 5, 2025

@copilot this needs to show every hat not just the first or default

1 similar comment
@psykzz
Copy link
Owner

psykzz commented Dec 5, 2025

@copilot this needs to show every hat not just the first or default

Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 5, 2025

@copilot this needs to show every hat not just the first or default

Updated in ce44f2a - .hat list now sends a separate embed with preview image for each hat.

Copilot AI changed the title Add hat preview image to .hat list command Add hat preview images to .hat list command Dec 5, 2025
@psykzz
Copy link
Owner

psykzz commented Dec 5, 2025

@copilot - We need to also be able to flip the image on x or y

  • We also need to be able to set negative numbers that might have the image cropped off the screen

Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 5, 2025

@copilot - We need to also be able to flip the image on x or y

  • We also need to be able to set negative numbers that might have the image cropped off the screen

Added in bea4f16:

  • New .hat flip x/y/none command to flip the hat horizontally or vertically (toggle behavior)
  • Position values now allow negative numbers and values > 1.0 to position the hat partially off-screen (e.g., .hat position -0.2 0.0)

Copilot AI changed the title Add hat preview images to .hat list command Add hat preview images and flip/position enhancements to hat cog Dec 5, 2025
Copilot AI requested a review from psykzz December 5, 2025 12:23
@psykzz psykzz marked this pull request as ready for review December 5, 2025 12:23
@psykzz psykzz merged commit 713558e into main Dec 5, 2025
1 check passed
@psykzz psykzz deleted the copilot/add-hat-preview-feature branch December 5, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants