Class Ban

Represents a complete Ban Object on iFunny

Hierarchy

Constructors

Properties

#client: Client<boolean>

Client instance attached to the Object

#endpointUrl: string = Endpoints.account

Endpoint url the object will request to

#payload: APIBan

The payload of the object.

#user: User

The user attached to the Ban

Accessors

  • get endpointUrl(): string
  • Endpoint url for requests to update the payload

    Returns string

  • set endpointUrl(value: string): void
  • Parameters

    • value: string

    Returns void

  • get expiresIn(): number
  • How long (in miliseconds) until the Ban expires

    Returns number

  • get payload(): Payload
  • Get the payload of the object

    Returns Payload

  • set payload(payload: Partial<Payload>): void
  • Updates the payload of the object.

    Returns

    The current instance

    Parameters

    • payload: Partial<Payload>

      The payload to merge into the current instance

    Returns void

  • get reason(): "other" | "abuse_harassment" | "child_pornography" | "hardcore" | "hate_speech" | "bot_spam" | "threats_of_harm" | "death_gore"
  • The reason for the Ban

    Returns "other" | "abuse_harassment" | "child_pornography" | "hardcore" | "hate_speech" | "bot_spam" | "threats_of_harm" | "death_gore"

  • get type(): "chat_access" | "comment_creation" | "content_creation" | "profile_access" | "repubing" | "smiling" | "subscribing" | "other" | "collective_shadow"
  • The type of ban

    Returns "chat_access" | "comment_creation" | "content_creation" | "profile_access" | "repubing" | "smiling" | "subscribing" | "other" | "collective_shadow"

Methods

  • Gets the value from the payload from its key

    Returns

    Type Parameters

    • P extends APIBan

    • K extends string | number | symbol

    Parameters

    • key: K

      The key to get the value of

    Returns Nullify<P[K]>

Generated using TypeDoc