EveCogs/rubylogging
Rosie Val 4471c21386 Fix RubyLogging crashes: __slots__ attribute injection and dead config key
_handle_message_delete_with_cache tried to stash cached attachment data as
message._cached_attachments, but discord.Message uses __slots__ and rejects
arbitrary attribute assignment — this crashed on_message_delete every time a
deleted message had cached attachments (42 times in 48h in production).
Fixed by looking the cache up by message id in self._attachment_cache
instead (same data, same spot _build_embed already checked, just accessed
legally), deferring eviction until after it's actually used.

Also removed two dead `accent = await config.accent_color()` calls —
accent_color was never a registered config key, so both crashed
unconditionally whenever the attachment-preservation feature actually ran,
and the fetched value was never even used afterward.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 23:50:10 +01:00
..
__init__.py rubylogging/__init__.py | 19 ++ 2026-05-22 21:04:03 +00:00
info.json feat: comprehensive audits + fixes for UserSlash & NewHelpMenu, new RubyLogging cog 2026-05-22 21:15:16 +00:00
rubylogging.py Fix RubyLogging crashes: __slots__ attribute injection and dead config key 2026-07-28 23:50:10 +01:00