Class EmojiCollection

Collection of Emoji

Hierarchy

Constructors

Properties

#objects: ReactiveMap<string, Emoji> = ...
#storage: ObjectStorage<HydratedEmoji> = ...
client: Client
getUnderlyingObject: ((id: string) => HydratedEmoji)

Type declaration

    • (id: string): HydratedEmoji
    • Parameters

      • id: string

      Returns HydratedEmoji

updateUnderlyingObject: SetStoreFunction<Record<string, HydratedEmoji>>

Methods

  • Create a new instance of an object

    Parameters

    • id: string

      Id

    • type: "user" | "server" | "channel" | "bot" | "channelUnread" | "channelWebhook" | "emoji" | "message" | "serverMember" | "session"

      Type

    • instance: Emoji

      Instance

    • context: unknown

      Context

    • Optional data: unknown

      Data

    Returns void

  • Execute a provided function over each key, value pair in the map

    Returns

    Iterable

    Parameters

    • cb: ((value: Emoji, key: string, map: ReactiveMap<string, Emoji>) => void)

      Callback for each pair

        • (value: Emoji, key: string, map: ReactiveMap<string, Emoji>): void
        • Parameters

          • value: Emoji
          • key: string
          • map: ReactiveMap<string, Emoji>

          Returns void

    Returns void

  • Get or create

    Parameters

    • id: string

      Id

    • data: {
          _id: string;
          animated?: boolean;
          creator_id: string;
          name: string;
          nsfw?: boolean;
          parent: {
              id: string;
              type: "Server";
          } | {
              type: "Detached";
          };
      }

      Data

      • _id: string

        Description

        Unique Id

      • Optional animated?: boolean

        Description

        Whether the emoji is animated

      • creator_id: string

        Description

        Uploader user id

      • name: string

        Description

        Emoji name

      • Optional nsfw?: boolean

        Description

        Whether the emoji is marked as nsfw

      • parent: {
            id: string;
            type: "Server";
        } | {
            type: "Detached";
        }

        Description

        What owns this emoji

    • isNew: boolean = false

      Whether this object is new

    Returns Emoji

Generated using TypeDoc