Refactor AI response processing to correctly handle custom emojis and stickers.
Custom emojis are now converted to Discord's `<:name:id>` format for proper display.
Custom stickers are identified and their IDs are extracted to be sent as separate attachments, removing them from the main content.
This ensures Gurt can properly utilize learned custom emojis and stickers in its responses.
This commit introduces two main enhancements to Gurt's capabilities:
1. **Tenor GIF Integration:**
* The AI can now request Tenor GIFs via a `request_tenor_gif_query` field in its response schema.
* `api.py` handles these requests by searching Tenor (using the new `TENOR_API_KEY` from config) and appending the GIF URL to the AI's message content.
* System prompts have been updated to instruct the AI on how to request GIFs.
2. **Custom Emoji & Sticker Learning and Usage:**
* Introduces an `EmojiManager` (in the new `gurt/emojis.py`) to store and manage mappings of custom emoji/sticker names to their URLs. This data is persisted to `EMOJI_STORAGE_FILE`.
* Gurt now automatically learns custom emojis and stickers (and their URLs) from user messages via the `on_message` listener in `listeners.py`.
* The AI can be prompted to use these learned emojis/stickers by referencing their `:name:`.
* `api.py` processes AI responses to identify known custom emojis/stickers. For stickers, their URL is appended to the content if mentioned.
* A `learnemoji` command has been added for manually teaching Gurt emojis/stickers, although automatic learning is the primary mechanism.
* System prompts are updated to guide the AI on using custom emojis/stickers.