Parent: #382
Problem
discord::Handler stores adapter: OnceLock<Arc<dyn ChatAdapter>> and initializes it lazily on the first message() event via get_or_init(). This works but is slightly fragile — if ready() fires but no message ever arrives, the adapter is never created.
Suggested fix
Initialize the DiscordAdapter in the ready() handler where ctx.http is already available. This provides a cleaner lifecycle and guarantees the adapter exists as soon as the bot is connected.
Severity: nit — no functional impact, purely code hygiene.
Parent: #382
Problem
discord::Handlerstoresadapter: OnceLock<Arc<dyn ChatAdapter>>and initializes it lazily on the firstmessage()event viaget_or_init(). This works but is slightly fragile — ifready()fires but no message ever arrives, the adapter is never created.Suggested fix
Initialize the
DiscordAdapterin theready()handler wherectx.httpis already available. This provides a cleaner lifecycle and guarantees the adapter exists as soon as the bot is connected.Severity: nit — no functional impact, purely code hygiene.