Replies: 1 comment 2 replies
-
This should ideally be in https://github.com/telegraf/session. Anyhow, All adapters support taking an existing client. In which case, you could create a Kysely instance first, and reuse the underlying driver reference from Kysely with Telegraf Sessions. Would that work for you? Depending on the Sessions package to initialise your Kysely instance seems like a sketchy dependency tree. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This idea proposes exposing the Kysely client that KyselyStore and its dependents (Postgres, MySQL, SQLite) rely on.
It is quite common when constructing Telegram bots for a developer to interact with a database to hold and retrieve state and information that the bot needs. It would hence be helpful if the Kysely client that is used by the relevant Telegraf SessionStores is accessible via a readonly property, so that it could be reused by the developer for their own needs.
Similar changes could be made to the other SessionStores.
Beta Was this translation helpful? Give feedback.
All reactions