Class Clan

Properties

id: number
name: string

Methods

  • Add a player to the current clan's whitelist. If the player is already in the whitelist this will change their rank or title.

    Parameters

    • player: string | number

      Player id or name

    • OptionalrankName: string

      Rank to give the player. If not provided they will be given the lowest rank

    • title: string = ""

      Title to give the player. If not provided, will be blank

    Returns boolean

    Success

  • Check that this clan is the player's current clan

    Returns boolean

    Whether this is the current clan

  • Determine the monster that is currently in the current clan's fax machine if any

    Returns null | Monster

    The current fax monster

  • Return the amount of meat in the current clan's coffer

    Returns number

    Amount of meat

  • List available ranks (name, degree and id) from the current clan

    Returns Rank[]

    List of ranks

  • Put items in the stash

    Parameters

    • items: Item[]

      Items to put in the stash

    Returns Item[]

    Items successfully put in the stash

  • Parameters

    • items: Map<Item, number>

    Returns Map<Item, number>

  • Add the given amount of meat to the current clan's coffer.

    Parameters

    • amount: number

      Amount of meat to put in coffer

    Returns boolean

    Success

  • Remove a player from the current clan's whitelist

    Parameters

    • player: string | number

      Player id or name

    Returns boolean

    Success

  • Take items from the stash

    This function will also take equivalent foldables if the original item cannot be found

    Parameters

    • items: Item[]

      Items to take

    Returns Item[]

    Items successfully taken

  • Parameters

    • items: Map<Item, number>

    Returns Map<Item, number>

  • Return the monster that is currently in the current clan's fax machine if any

    Type Parameters

    • T

    Parameters

    • items: Item[]
    • callback: ((borrowedItems: Item[]) => T)
        • (borrowedItems): T
        • Parameters

          • borrowedItems: Item[]

          Returns T

    Returns T

  • Type Parameters

    • T

    Parameters

    • items: Map<Item, number>
    • callback: ((borrowedItems: Map<Item, number>) => T)
        • (borrowedItems): T
        • Parameters

          • borrowedItems: Map<Item, number>

          Returns T

    Returns T

  • Get list of clans to which the player is whitelisted

    Returns Clan[]

    List of clans

  • Join a clan

    Parameters

    • clanIdOrName: string | number

      Clan id or name

    Returns Clan

    Instance of joined clan

  • Execute callback as a member of a clan and then restore prior membership

    Type Parameters

    • T

    Parameters

    • clanIdOrName: string | number

      Clan id or name

    • callback: ((clan: Clan) => T)

      Actions to carry out while member of specified can

        • (clan): T
        • Parameters

          Returns T

    Returns T

    Return value from callback

  • Execute callback with items from a clan stash and then restore those items to the stash

    During the execution of the callback, player will not be in the stash clan

    Type Parameters

    • T

    Parameters

    • clanIdOrName: string | number

      Clan id or name

    • items: Item[]
    • callback: ((borrowedItems: Item[]) => T)
        • (borrowedItems): T
        • Parameters

          • borrowedItems: Item[]

          Returns T

    Returns T

  • Type Parameters

    • T

    Parameters

    • clanIdOrName: string | number
    • items: Map<Item, number>
    • callback: ((borrowedItems: Map<Item, number>) => T)
        • (borrowedItems): T
        • Parameters

          • borrowedItems: Map<Item, number>

          Returns T

    Returns T