Class ChannelWebhookCollection

Collection of Channel Webhooks

Hierarchy (View Summary)

Constructors

Properties

client: Client
getUnderlyingObject: (id: string) => 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

    • Optionaldata: 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;
          creator_id: string;
          id: string;
          name: string;
          permissions: number;
          token?: null
          | string;
      }

      Data

      • Optionalavatar?:
            | 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;
            }

        The avatar of the webhook

      • channel_id: string

        The channel this webhook belongs to

      • creator_id: string

        User that created this webhook

      • id: string

        Webhook Id

      • name: string

        The name of the webhook

      • permissions: number

        Format: uint64

        The permissions for the webhook

      • Optionaltoken?: null | string

        The private token for the webhook

    Returns ChannelWebhook