grammyjs / conversations

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

feat: `conversation.session` #27

Closed mi3lix9 closed 2 years ago

mi3lix9 commented 2 years ago

It would be easier to access session from conversation to get the latest session version.

For example if we have nested conversations:

function conv(conversation, session) { 
  const { a, b } = subConv(conversation,  session);
  ctx.session.a = a;
}

function subConv(conversation, session) {
  const data = ;// get data from database using ID or whatever 
  return data;
}
KnorpelSenf commented 2 years ago

Please review #47.