ex_gram icon indicating copy to clipboard operation
ex_gram copied to clipboard

Save all outgoing messages from bot.

Open prtngn opened this issue 1 year ago • 1 comments

I need all outgoing messages to be saved in the database. How can this be implemented with minimal costs?

prtngn avatar Mar 01 '23 11:03 prtngn

That's a good question, and a use case that I haven't thought yet.

I think that the best way to handle this would be to improve #97 and add a telemetry message on executed methods.

It would be somewhere near here: https://github.com/rockneurotiko/ex_gram/blob/master/lib/ex_gram/macros/executer.ex#L48 and it would send a telemetry event like [:ex_gram, :method, :executed] with at least the method, body and result in the metadata

rockneurotiko avatar Mar 03 '23 13:03 rockneurotiko