Closed zbrox closed 4 months ago
Poise context consists of serenity context plus information about the channel and author etc of the command invocation. Poise's reply functions are wrappers around serenity's message post functions, with the channel ID pre-populated. But you can still use serenity's own functions, mainly ChannelId.send_message, to send messages outside of a command invocation context, where poise Context cannot be available, like the event handler
I'm trying to figure out how to handle events outside of commands, like leaving certain reactions on messages for example, and still use already built functions I have to post messages in response to said events. Plenty of those require the poise context but the current event handler is using the serenity context.
Am I missing something obvious? Is there an established way to do such a thing?