You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
opening an issue to discuss a feature proposal. I've already found a workaround, but I thought to start a discussion about this use case & a more kosher api for it.
I have a bot which I would like to start proactively - for a user (me) where the id is known ahead of time. this bot is a ChatBot and keeps state, messaging me every so often with a question which I respond to. so I want it to message me even if I haven't messaged it since the last restart.
after doing some digging my workaround is to just simulate sending it a message during application start:
is this use case valid enough that maybe ChatBot should support it in a non-hacky manner?
I'm not exactly sure what the api would look like if so. maybe some function like ChatBot.start(chatbot_behavior, chat_id) (ChatBot.start(MyBot, @chat_id_me) in the example above), which would call Chat.Session.Supervisor.start_child/2 ?
hope this made sense!
The text was updated successfully, but these errors were encountered:
Repository owner
locked and limited conversation to collaborators
Nov 9, 2023
hello again :)
opening an issue to discuss a feature proposal. I've already found a workaround, but I thought to start a discussion about this use case & a more kosher api for it.
I have a bot which I would like to start proactively - for a user (me) where the id is known ahead of time. this bot is a
ChatBot
and keeps state, messaging me every so often with a question which I respond to. so I want it to message me even if I haven't messaged it since the last restart.after doing some digging my workaround is to just simulate sending it a message during application start:
is this use case valid enough that maybe
ChatBot
should support it in a non-hacky manner?I'm not exactly sure what the api would look like if so. maybe some function like
ChatBot.start(chatbot_behavior, chat_id)
(ChatBot.start(MyBot, @chat_id_me)
in the example above), which would callChat.Session.Supervisor.start_child/2
?hope this made sense!
The text was updated successfully, but these errors were encountered: