grammyjs / conversations

Conversational interfaces for grammY.
https://grammy.dev/plugins/conversations
MIT License
53 stars 17 forks source link

Require functions passed to `conversation.external` to return serializable values #112

Closed Loskir closed 4 weeks ago

Loskir commented 3 months ago

https://github.com/grammyjs/conversations/blob/9725eca88865f91e33537b12babf16ecb49af605/src/conversation.ts#L1173

Would be cool on a type level if possible. If not — return serialized and unserialized values so that the user notices it in runtime (and so that it's consistent between initial run and replays). Or maybe show a warning / throw an error if the value is not serializable