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
I made a request on how to use send-message on the 40-ants gitter-chat, and a few steps were mentioned that would allow send-message to work correctly.
The steps that are mentioned are:
Make sure send-message is exported from the cl-telegram-bot/message package instead of cl-telegram-bot/bot (I see some other functions also need such refactoring.
Remove export of the make-chat function because now it waits some internal plist with response from telegram server.
Add another function make-private-chat which can be used to recreate chat object from remembered (in a database) chat_id, nickname and other params.
I plan to address each of these in this issue. I hope to not make more work for you.
Thank you for this project.
The text was updated successfully, but these errors were encountered:
I have completed the first two steps, I have a question about step 3.
I think that this function would look very similar to 'make-chat' at that point. I can possibly go ahead with doing this, but I feel that it would duplicate most of the code in that function.
From this point my 'send-message-to-user' function looks something like
Where i pull chat-id / username from a local datastore. I was tempted to do something like a simple lisp database, but creating this probably means storing data in the 'process' function, and retrieving it in the make-private-chat function.
The only downside to this I see is that function will not persist between bot restarts, and expand memory over time.
I'll submit the PR for the first two, looking forward to your response for how to deal with the third requirement. Thanks in advance.
Probably the best way to make some kind of generalized store protocol to save a mapping nickname -> chat-id . Default implementation of the store will keep data in the memory and user should have an ability to specify another store object which might save data to the file or a database.
I made a request on how to use send-message on the 40-ants gitter-chat, and a few steps were mentioned that would allow send-message to work correctly.
The steps that are mentioned are:
Make sure send-message is exported from the cl-telegram-bot/message package instead of cl-telegram-bot/bot (I see some other functions also need such refactoring.
Remove export of the make-chat function because now it waits some internal plist with response from telegram server.
Add another function make-private-chat which can be used to recreate chat object from remembered (in a database) chat_id, nickname and other params.
I plan to address each of these in this issue. I hope to not make more work for you.
Thank you for this project.
The text was updated successfully, but these errors were encountered: