@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Function userOf

    • ctx.user with a non-optional type — for flows and conversations, whose ctx is typed as the minimal RuntimeMessage. Throws UserDataError('UNAVAILABLE') when the context was not built by a Bot.

      Parameters

      Returns UserData

      flow('idioma')
      .ask('¿Idioma?', 'lang')
      .do(async (ctx, c) => { await userOf(ctx).set('lang', c.state.lang) })