Release Notes - Version 0.2.0
Version 0.2.0 of the Scryfall Matrix Bot introduces significant enhancements to card rendering, search capabilities, and bot administration. This update focuses on providing a richer, more interactive experience within Matrix rooms while improving the bot's resilience and management features.
🚀 New Features
Advanced Card Search and Parsing
- Command Parsing: Added a robust command parser supporting advanced Scryfall syntax within the
[[ ]]brackets. - Filters and Selectors: Users can now filter searches by set code, collector number, and language using the
|pipe syntax (e.g.,[[Card Name|SET|CN|LANG]]) or keyword selectors (e.g.,set:lea,cn:1,lang:ja). - Advanced Scryfall Queries: Support for complex filters such as
oracle:,type:,rarity:,coloridentity:,cmc:,power:, andtoughness:.
Enhanced Card Rendering (Formatter)
- Symbology Integration: Full support for Scryfall mana symbols. Symbols are now automatically downloaded, cached, and rendered as inline images (emoticons) in Matrix messages.
- Double-Faced Card Support: Improved handling for double-faced and transforming cards. The bot now renders information and images for both the front and back faces.
- Comprehensive Card Info: Added rendering for Power/Toughness, Type Lines, and Flavor Text.
- Accessibility: Added
titleandaltattributes to all images (cards and symbols) for better tooltips and screen reader support.
Improved Image Handling and Caching
- Persistent Image Storage: Card images and symbols are now cached locally and their Matrix Content URIs (MXC) are stored in persistent JSON files (
data/card-images.jsonanddata/symbols.json) to minimize redundant uploads. - Optimized HTML Layout: Refined the HTML structure for card responses, ensuring images and text are ordered correctly for the best viewing experience across various Matrix clients.
- Automatic Resizing: Images are now handled with appropriate metadata to ensure they display at a reasonable size in room timelines.
Bot Management and Resilience
- User Ignoring: Added the ability to ignore specific users or patterns (using wildcards) via the
IGNORED_USERSenvironment variable. - Automatic Join: Replaced the standard mixin with a custom, more robust implementation for joining rooms from historic invitations upon startup.
- Homeserver Validation: The bot now validates homeserver connectivity and supported Matrix versions during the initialization sequence.
- Improved Error Handling: Enhanced resilience for Scryfall API lookups and Matrix synchronization, including better logging and fallback mechanisms for homeserver errors.
DevOps and Documentation
- Docker Integration: Streamlined the Docker workflow with a new
dev-deploy.jsscript for building and pushing development images. - Automated Workflows: Added GitHub Actions for both development and release Docker builds.
- Comprehensive Documentation: Added
AGENTS.mdand updated theREADME.mdwith detailed setup instructions, bot modes (Simple vs. AppService), and API documentation.
🛠 Technical Improvements
- Custom Caching Layer: Replaced
NodeCachewith a more tailored caching solution inscryfall.jsthat supports manual Garbage Collection (GC) and memory management. - Throttling: Implemented mandatory request throttling (100ms) to ensure compliance with Scryfall's API usage guidelines.
- Standardized User-Agent: The bot now identifies itself to Scryfall with a version-specific User-Agent string.
📝 Configuration Changes
- New Env Variables:
IGNORED_USERS: Comma-separated list of user IDs or wildcard patterns to ignore.CACHE_TTL/CACHE_MAX_MEMORY/CACHE_GC_INTERVAL: Fine-grained control over the internal API cache.DEBUG_MODE: Toggle detailed logging for troubleshooting.