CF Workers Telegram Bot - v12.6.20
    Preparing search index...

    Function getBalance

    • Get the balance for a user, initializing it if it doesn't exist

      Parameters

      • userId: number

        the telegram user ID

      • kv: KVNamespace

        the KV namespace

      Returns Promise<number>

      the user's balance