telebot-ts API Documentation - v1.0.0
    Preparing search index...

    Function i18nFor

    • Retrieves the i18n session attached to a context by the i18n plugin.

      Parameters

      Returns I18nSession | undefined

      The session, or undefined if the plugin is not installed.

      app.on("message", async (update, context) => {
      const t = i18nFor(context)?.t("hello", { name: "Nam" });
      await context.reply(t ?? "no i18n");
      });