Class ChannelWebhookCollection

Collection of Channel Webhooks

Hierarchy

Constructors

Properties

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

Type declaration

    • (id): HydratedChannelWebhook
    • Parameters

      • id: string

      Returns HydratedChannelWebhook

updateUnderlyingObject: SetStoreFunction<Record<string, HydratedChannelWebhook>>

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: ChannelWebhook

      Instance

    • context: unknown

      Context

    • Optional data: unknown

      Data

    Returns void

  • Get or create

    Parameters

    • id: string

      Id

    • data: {
          avatar?: null | {
              _id: string;
              content_type: string;
              deleted?: null | boolean;
              filename: string;
              message_id?: null | string;
              metadata: {
                  type: "File";
              } | {
                  type: "Text";
              } | {
                  height: number;
                  type: "Image";
                  width: number;
              } | {
                  height: number;
                  type: "Video";
                  width: number;
              } | {
                  type: "Audio";
              };
              object_id?: null | string;
              reported?: null | boolean;
              server_id?: null | string;
              size: number;
              tag: string;
              user_id?: null | string;
          };
          channel_id: string;
          id: string;
          name: string;
          permissions: number;
          token?: null | string;
      }

      Data

      • Optional avatar?: null | {
            _id: string;
            content_type: string;
            deleted?: null | boolean;
            filename: string;
            message_id?: null | string;
            metadata: {
                type: "File";
            } | {
                type: "Text";
            } | {
                height: number;
                type: "Image";
                width: number;
            } | {
                height: number;
                type: "Video";
                width: number;
            } | {
                type: "Audio";
            };
            object_id?: null | string;
            reported?: null | boolean;
            server_id?: null | string;
            size: number;
            tag: string;
            user_id?: null | string;
        }

        Description

        The avatar of the webhook

      • channel_id: string

        Description

        The channel this webhook belongs to

      • id: string

        Description

        Webhook Id

      • name: string

        Description

        The name of the webhook

      • permissions: number

        Format: uint64

        Description

        The permissions for the webhook

      • Optional token?: null | string

        Description

        The private token for the webhook

    Returns ChannelWebhook

Generated using TypeDoc