Constructors

  • Parameters

    Returns Util

Methods

  • Parameters

    • embeds: {
          author?: {
              icon_url?: string;
              name?: string;
              url?: string;
          };
          color?: number;
          description?: string;
          fields?: {
              inline: boolean;
              name: string;
              value: string;
          }[];
          footer?: {
              icon_url?: string;
              text: string;
          };
          image?: {
              url?: string;
          };
          thumbnail?: {
              url?: string;
          };
          timestamp?: string;
          title?: string;
          url?: string;
      }[]

    Returns Embed[]

  • Parameters

    Returns {
        author?: {
            icon_url?: string;
            name?: string;
            url?: string;
        };
        color?: number;
        description?: string;
        fields?: {
            inline: boolean;
            name: string;
            value: string;
        }[];
        footer?: {
            icon_url?: string;
            text: string;
        };
        image?: {
            url?: string;
        };
        thumbnail?: {
            url?: string;
        };
        timestamp?: string;
        title?: string;
        url?: string;
    }[]

  • Parameters

    • length: number = 18

    Returns string

  • Parameters

    Returns boolean

  • Parameters

    • collect: {
          data?: object;
          event: string;
      }
      • Optionaldata?: object
      • event: string

    Returns Promise<void>

  • Type Parameters

    Parameters

    • data: {
          archivedAt?: string;
          archivedBy?: string;
          categoryId?: number;
          createdAt: string;
          createdBy: string;
          groupId: string;
          id: string;
          messageId?: string;
          name: string;
          parentId?: string;
          priority?: number;
          rootId?: string;
          serverId: string;
          topic?: string;
          type: ServerChannelType;
          updatedAt?: string;
          visibility?: null | "private" | "public";
      }
      • OptionalarchivedAt?: string

        Archived at Format: date-time

        The ISO 8601 timestamp that the channel was archived at, if relevant

      • OptionalarchivedBy?: string

        Archived by

        The ID of the user who archived this channel

      • OptionalcategoryId?: number

        The category that the channel exists in. Only relevant for server channels

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the channel was created at

      • createdBy: string

        Created by

        The ID of the user who created this channel

      • groupId: string

        Group ID

        The ID of the group

      • id: string

        Channel ID Format: uuid

        The ID of the channel

      • OptionalmessageId?: string

        Message ID Format: uuid

        The ID of the message that this channel was created off of. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present

      • name: string

        The name of the channel

      • OptionalparentId?: string

        Channel ID Format: uuid

        ID of the immediate parent channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present

      • Optionalpriority?: number

        Priority

        The priority of the channel will determine its position relative to other categories in the group. The higher the value, the higher up it will be displayed in the UI. Returned values can be null, in which case sorting will be done by createdAt in ascending order. Due to legacy issues, sending a null value is not possible

      • OptionalrootId?: string

        Channel ID Format: uuid

        ID of the root channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present

      • serverId: string

        Server ID

        The ID of the server

      • Optionaltopic?: string

        The topic of the channel. Not applicable to threads

      • type: ServerChannelType

        The type of channel. This will determine what routes to use for creating content in a channel. For example, if this "chat", then one must use the routes for creating channel messages

      • OptionalupdatedAt?: string

        Updated at Format: date-time

        The ISO 8601 timestamp that the channel was updated at, if relevant

      • Optionalvisibility?: null | "private" | "public"

        What users can access the channel. Only applicable to server channels. If not present, this channel will respect normal permissions. public is accessible to everyone, even those who aren't of the server. private is only accessible to explicitly mentioned users. Currently, threads cannot be public and other channels cannot be private. Additionally, private threads can only exist with an associated messageId that is for a private message

    Returns T

  • Parameters

    • data: {
          bumpedAt?: string;
          channelId: string;
          content: string;
          createdAt: string;
          createdBy: string;
          groupId: string;
          id: number;
          isLocked: boolean;
          isPinned: boolean;
          mentions?: {
              channels?: {
                  id: string;
              }[];
              everyone?: boolean;
              here?: boolean;
              roles?: {
                  id: number;
              }[];
              users?: {
                  id: string;
              }[];
          };
          serverId: string;
          title: string;
          updatedAt?: string;
      } | {
          bumpedAt?: string;
          channelId: string;
          createdAt: string;
          createdBy: string;
          groupId: string;
          id: number;
          isLocked: boolean;
          isPinned: boolean;
          serverId: string;
          title: string;
          updatedAt?: string;
      }

    Returns ForumThread<ForumChannel>

  • Parameters

    • data: {
          about?: string;
          avatar?: string;
          banner?: string;
          createdAt: string;
          defaultChannelId?: string;
          id: string;
          isVerified?: boolean;
          name: string;
          ownerId: string;
          timezone?: string;
          type?: ServerType;
          url?: string;
      }
      • Optionalabout?: string

        Description

        The description associated with the server

      • Optionalavatar?: string

        Avatar Format: media-uri

        The avatar image associated with the server

      • Optionalbanner?: string

        Banner Format: media-uri

        The banner image associated with the server

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the server was created at

      • OptionaldefaultChannelId?: string

        Channel ID Format: uuid

        The channel ID of the default channel of the server. This channel is defined as the first chat or voice channel in the left sidebar of a server in our UI. This channel is useful for sending welcome messages, though note that a bot may not have permissions to interact with this channel depending on how the server is configured.

      • id: string

        Server ID

        The ID of the server

      • OptionalisVerified?: boolean

        Is verified

        The verified status of the server

      • name: string

        Server name

        The name given to the server

      • ownerId: string

        Created by

        The ID of the user who created this server

      • Optionaltimezone?: string

        Timezone

        The timezone associated with the server

      • Optionaltype?: ServerType

        Server type

        The type of server designated from the server's settings page

      • Optionalurl?: string

        Server URL

        The URL that the server can be accessible from. For example, a value of "Guilded-Official" means the server can be accessible from https://www.guilded.gg/Guilded-Official

    Returns Guild

  • Parameters

    • data: {
          createdAt: string;
          groupId: string;
          id: number;
          name: string;
          priority?: number;
          serverId: string;
          updatedAt?: string;
      }
      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the category was created at

      • groupId: string

        Group ID

        The ID of the group

      • id: number

        The ID of the category

      • name: string

        Name of the category

      • Optionalpriority?: number

        Priority

        The priority of the category will determine its position relative to other categories in the group. The higher the value, the higher up it will be displayed in the UI. Returned values can be null, in which case sorting will be done by createdAt in descending order. Due to legacy issues, sending a null value is not possible

      • serverId: string

        Server ID

        The ID of the server

      • OptionalupdatedAt?: string

        Updated at Format: date-time

        The ISO 8601 timestamp that the category was updated at, if relevant

    Returns Category

  • Parameters

    • data: {
          archivedAt?: string;
          archivedBy?: string;
          avatar?: string;
          createdAt: string;
          createdBy: string;
          description?: string;
          emoteId?: number;
          id: string;
          isHome?: boolean;
          isPublic: boolean;
          name: string;
          serverId: string;
          updatedAt?: string;
          updatedBy?: string;
      }
      • OptionalarchivedAt?: string

        Archived at Format: date-time

        The ISO 8601 timestamp that the group was archived at, if relevant

      • OptionalarchivedBy?: string

        Archived by

        The ID of the user who archived this group

      • Optionalavatar?: string

        Avatar Format: media-uri

        The avatar image associated with the group

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the group was created at

      • createdBy: string

        Created by

        The ID of the user who created this group

      • Optionaldescription?: string

        Description

        The description associated with the group

      • OptionalemoteId?: number

        The emote to associate with the group

      • id: string

        Group ID

        The ID of the group

      • OptionalisHome?: boolean

        Is home

        If true, this is the server's home group

      • isPublic: boolean

        Is public

        Is this group open for anyone to join?

        false
        
      • name: string

        The name of the group

      • serverId: string

        Server ID

        The ID of the server

      • OptionalupdatedAt?: string

        Updated at Format: date-time

        The ISO 8601 timestamp that the group was updated at, if relevant

      • OptionalupdatedBy?: string

        Updated by

        The ID of the user who updated this group

    Returns Group

  • Parameters

    • data: {
          cost: number;
          createdAt: string;
          description?: string;
          roleId?: number;
          serverId: string;
          type: ServerSubscriptionTierType;
      }
      • cost: number

        The cost of the tier in cents USD per month

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the server subscription tier was created at

      • Optionaldescription?: string

        Description

        The description associated with the server subscription tier

      • OptionalroleId?: number

        Role ID

        The ID of the role

      • serverId: string

        Server ID

        The ID of the server

      • type: ServerSubscriptionTierType

        Server subscription tier type

        The type of the server subscription tier. This field is case sensitive!!

    Returns Subscription

  • Parameters

    • guildID: string
    • memberID: string
    • member: {
          isOwner: boolean;
          joinedAt: string;
          nickname?: string;
          roleIds: number[];
          user: {
              avatar?: string;
              banner?: string;
              createdAt: string;
              id: string;
              name: string;
              status?: {
                  content?: string;
                  emoteId: number;
              };
              type?: UserType;
          };
      }
      • isOwner: boolean

        Is owner

        false
        
      • joinedAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the member was created at

      • Optionalnickname?: string

        Nickname

      • roleIds: number[]

        Role IDs

      • user: {
            avatar?: string;
            banner?: string;
            createdAt: string;
            id: string;
            name: string;
            status?: {
                content?: string;
                emoteId: number;
            };
            type?: UserType;
        }
        • Optionalavatar?: string

          Avatar Format: media-uri

          The avatar image associated with the user

        • Optionalbanner?: string

          Banner Format: media-uri

          The banner image associated with the user

        • createdAt: string

          Created at Format: date-time

          The ISO 8601 timestamp that the user was created at

        • id: string

          User ID Format: user-id

          The ID of the user

        • name: string

          User name

          The user's name

        • Optionalstatus?: {
              content?: string;
              emoteId: number;
          }
          • Optionalcontent?: string

            Content Format: status markdown

            The content of the user status. The supported markdown for this content only includes reactions and plaintext for now

          • emoteId: number

            Emote ID

        • Optionaltype?: UserType

          User type

          The type of user. If this property is absent, it can assumed to be of type user

    Returns Member

  • Type Parameters

    Parameters

    • data: {
          channelId: string;
          content?: string;
          createdAt: string;
          createdBy: string;
          createdByWebhookId?: string;
          embeds?: {
              author?: {
                  icon_url?: string;
                  name?: string;
                  url?: string;
              };
              color?: number;
              description?: string;
              fields?: {
                  inline: boolean;
                  name: string;
                  value: string;
              }[];
              footer?: {
                  icon_url?: string;
                  text: string;
              };
              image?: {
                  url?: string;
              };
              thumbnail?: {
                  url?: string;
              };
              timestamp?: string;
              title?: string;
              url?: string;
          }[];
          groupId?: string;
          hiddenLinkPreviewUrls?: string[];
          id: string;
          isPinned: boolean;
          isPrivate?: boolean;
          isSilent: boolean;
          mentions?: {
              channels?: {
                  id: string;
              }[];
              everyone?: boolean;
              here?: boolean;
              roles?: {
                  id: number;
              }[];
              users?: {
                  id: string;
              }[];
          };
          replyMessageIds?: string[];
          serverId?: string;
          type: ChatMessageType;
          updatedAt?: string;
      }
      • channelId: string

        Channel ID Format: uuid

        The ID of the channel

      • Optionalcontent?: string

        Content Format: chat markdown

        The content of the message

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the message was created at

      • createdBy: string

        Created by

        The ID of the user who created this message (Note: If this event has createdByWebhookId present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA)

      • OptionalcreatedByWebhookId?: string

        Created by Webhook ID

        The ID of the webhook who created this message, if it was created by a webhook

      • Optionalembeds?: {
            author?: {
                icon_url?: string;
                name?: string;
                url?: string;
            };
            color?: number;
            description?: string;
            fields?: {
                inline: boolean;
                name: string;
                value: string;
            }[];
            footer?: {
                icon_url?: string;
                text: string;
            };
            image?: {
                url?: string;
            };
            thumbnail?: {
                url?: string;
            };
            timestamp?: string;
            title?: string;
            url?: string;
        }[]
      • OptionalgroupId?: string

        Group ID

        The ID of the group

      • OptionalhiddenLinkPreviewUrls?: string[]

        Hidden content link preview URLs

        Links in content to prevent unfurling as a link preview when displaying in Guilded

      • id: string

        Message ID Format: uuid

        The ID of the message

      • isPinned: boolean

        Is pinned

        false
        
      • OptionalisPrivate?: boolean

        Is private

        If set, this message will only be seen by those mentioned or replied to

      • isSilent: boolean

        Is silent

        If set, this message did not notify mention or reply recipients

        false
        
      • Optionalmentions?: {
            channels?: {
                id: string;
            }[];
            everyone?: boolean;
            here?: boolean;
            roles?: {
                id: number;
            }[];
            users?: {
                id: string;
            }[];
        }
        • Optionalchannels?: {
              id: string;
          }[]

          Channels

          Info on mentioned channels

        • Optionaleveryone?: boolean

          Everyone

          If

          was mentioned

        • Optionalhere?: boolean

          Here

          If

          was mentioned

        • Optionalroles?: {
              id: number;
          }[]

          Roles

          Info on mentioned roles

        • Optionalusers?: {
              id: string;
          }[]

          Users

          Info on mentioned users

      • OptionalreplyMessageIds?: string[]

        Message IDs that were replied to

      • OptionalserverId?: string

        Server ID

        The ID of the server

      • type: ChatMessageType

        Type

        The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated.

      • OptionalupdatedAt?: string

        Updated at Format: date-time

        The ISO 8601 timestamp that the message was updated at, if relevant

    • Optionalparams: MessageConstructorParams

    Returns Message<T>

  • Parameters

    • data: {
          botUserId?: string;
          colors?: number[];
          createdAt: string;
          icon?: string;
          id: number;
          isBase: boolean;
          isDisplayedSeparately: boolean;
          isMentionable: boolean;
          isSelfAssignable: boolean;
          name: string;
          permissions: string[];
          priority?: number;
          serverId: string;
          updatedAt?: string;
      }
      • OptionalbotUserId?: string

        Bot user ID Format: user-id

        The bot user ID this role has been defined for. Roles with this populated can only be deleted by kicking the bot

      • Optionalcolors?: number[]

        An array of integer values corresponding to the decimal RGB representation for a color. The first color is solid, and a second color indicates a gradient

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the role was created at

      • Optionalicon?: string

        Role icon URL Format: media-uri

        The URL of the role icon

      • id: number

        Role ID

        The ID of the role

      • isBase: boolean

        Is Base

        The default role users are given when joining the server. Base roles are tied directly to the server and cannot be created or deleted

        false
        
      • isDisplayedSeparately: boolean

        Display Separately

        If set, the role will be displayed separately in the channel member list

        false
        
      • isMentionable: boolean

        Mentionable

        If set, this role can be mentioned

        false
        
      • isSelfAssignable: boolean

        Self Assignable

        If set, this roll will be self assigned

        false
        
      • name: string

        Role name

        The role's name

      • permissions: string[]

        Permissions must be a collection of valid permissions as defined in the Enums/Permissions section

      • Optionalpriority?: number

        Priority

        The priority the role will be in relation to other roles in the server. The higher the value, the more precedence the role has over lower priority roles, and the higher up it will be displayed in the UI. Values can be zero or negative!

      • serverId: string

        Server ID

        The ID of the server

      • OptionalupdatedAt?: string

        Updated at Format: date-time

        The ISO 8601 timestamp that the role was updated at, if relevant

    Returns Role

  • Parameters

    • user: {
          avatar?: string;
          banner?: string;
          createdAt: string;
          id: string;
          name: string;
          status?: {
              content?: string;
              emoteId: number;
          };
          type?: UserType;
      }
      • Optionalavatar?: string

        Avatar Format: media-uri

        The avatar image associated with the user

      • Optionalbanner?: string

        Banner Format: media-uri

        The banner image associated with the user

      • createdAt: string

        Created at Format: date-time

        The ISO 8601 timestamp that the user was created at

      • id: string

        User ID Format: user-id

        The ID of the user

      • name: string

        User name

        The user's name

      • Optionalstatus?: {
            content?: string;
            emoteId: number;
        }
        • Optionalcontent?: string

          Content Format: status markdown

          The content of the user status. The supported markdown for this content only includes reactions and plaintext for now

        • emoteId: number

          Emote ID

      • Optionaltype?: UserType

        User type

        The type of user. If this property is absent, it can assumed to be of type user

    Returns User