yolkbot
    Preparing search index...

    Class Challenges

    Represents an account's challenges, including methods to refresh, reroll, and claim them.

    Index

    Constructors

    Methods

    Properties

    Constructors

    • Creates a Challenges instance

      Parameters

      • api: API

        The API instance to use for requests

      • account: Account

        The Account instance to use for data and authentication

      Returns Challenges

    Methods

    • Claims the reward for a completed challenge with the game's server

      Parameters

      • challengeId: number

        The ID of the challenge to claim

      Returns Promise<
          | { eggReward: number; ok: true; updatedChallenges: AccountChallenge[] }
          | { error: APIError | ChallengeClaimError; ok: false },
      >

      The claim result

    • Imports raw challenge data into the challenge list

      Parameters

      Returns void

    Properties

    account: Account

    The associated Account instance

    api: API

    The associated API instance

    list: AccountChallenge[] = []

    The list of challenges the Account has