Constructors

Methods

  • Archive a channel.

    Parameters

    • channelID: string

      ID of the channel to archive

    Returns Promise<void>

  • Bulk create/update calendar rsvps.

    Parameters

    • channelID: string

      ID of the Calendar channel.

    • eventID: number

      ID of a calendar event.

    • memberIDs: string[]

      List of multiple member ids.

    • options: EditCalendarRSVPOptions

      Update options.

    Returns Promise<void>

  • Bulk delete every reaction from a target.

    Parameters

    • channelID: string

      ID of a channel.

    • channelType: "ChannelMessage"

      Type of channel.

    • targetID: string | number

      Target to remove reactions from it.

    • Optionalfilter: {
          emoteId?: number;
      }

      Filter options.

      • OptionalemoteId?: number
        90000000
        

    Returns Promise<void>

  • Mark a list item as completed.

    Parameters

    • channelID: string

      ID of a "Lists" channel.

    • itemID: string

      ID of a list item.

    Returns Promise<void>

  • Create a new announcement within an announcement channel.

    Parameters

    • channelID: string

      ID of the Announcement channel.

    • options: {
          content: string | Record<string, never>;
          title: string;
      }

      Announcement creation options.

      • content: string | Record<string, never>

        Content

        The content of the announcement

      • title: string

        Title

        The title of the announcement

    Returns Promise<Announcement>

  • Create a comment inside an announcement.

    Parameters

    • channelID: string

      ID of the Announcement channel.

    • announcementID: string

      ID of the announcement to create the comment in.

    • options: {
          content: string;
      }

      Comment creation options.

      • content: string

        Content Format: long-form markdown

        The content of the announcement comment

    Returns Promise<AnnouncementComment>

  • Create a comment inside a calendar event.

    Parameters

    • channelID: string

      The ID of a "Calendar" channel.

    • eventID: number

      The ID of a calendar event.

    • options: CreateCalendarCommentOptions

      Comment options, includes content, and more.

    Returns Promise<CalendarComment>

  • Create an event into a "Calendar" channel.

    Parameters

    • channelID: string

      ID of a "Calendar" channel.

    • options: CreateCalendarEventOptions

      Event options.

    • OptionalcreateSeries: {
          endDate?: string;
          endsAfterOccurrences?: number;
          every?: {
              count: number;
              interval: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoEveryInterval;
          };
          on?: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoOn[];
          type: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoType;
      }

      (optional) Create a series. (event's repetition)

      • OptionalendDate?: string

        Ends at Format: date-time

        The ISO 8601 timestamp that the event ends at. Used to control the end date of the event repeat (only used when type is custom; if used with endsAfterOccurrences, the earliest resultant date of the two will be used)

      • OptionalendsAfterOccurrences?: number

        Occurrences

        Used to control the end date of the event repeat (only used when type is custom; if used with endDate, the earliest resultant date of the two will be used)

      • Optionalevery?: {
            count: number;
            interval: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoEveryInterval;
        }

        Apply further clarification to your events. This must have type set to custom

        • count: number

          Count

          How often between your interval the event should repeat. For example, 1 would be every interval, 2 would be every second occurrence of the interval

        • interval: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoEveryInterval

          Interval

          Coupled with count, this indicates the time range you are repeating your event over

      • Optionalon?: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoOn[]

        Used to control the day of the week that the event should repeat on (only used when type is custom and when every.interval is week)

      • type: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoType

        Repeat Type

        How often you want your event to repeat (important note: this will repeat for the next 365 days unless custom is defined)

        once
        @enum {string}

    Returns Promise<CalendarEvent>

  • The Guilded API only allows series on the event's creation.

    Use createCalendarEvent and set the createSeries property to create a series.

    Returns Error

  • Create a doc in a "Docs" channel.

    Parameters

    • channelID: string

      ID pf a "Docs" channel.

    • options: CreateDocOptions

      Doc's options.

    Returns Promise<Doc>

  • Create a comment in a doc.

    Parameters

    • channelID: string

      ID of the docs channel.

    • docID: number

      ID of the doc.

    • options: CreateDocCommentOptions

      Create options.

    Returns Promise<DocComment>

  • Add a comment to a forum thread.

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • threadID: number

      ID of a forum thread.

    • options: CreateForumCommentOptions

      Comment's options.

    Returns Promise<ForumThreadComment>

  • Create a forum thread in a specified forum channel.

    Type Parameters

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • options: CreateForumThreadOptions

      Thread's options including title & content.

    Returns Promise<ForumThread<T>>

  • Create a new item in a list channel.

    Parameters

    • channelID: string

      ID of a "Lists" channel.

    • content: string | Record<string, never>

      String content of the new item.

    • Optionalnote: {
          content: string | Record<string, never>;
      }

      Add a note to the new item.

      • content: string | Record<string, never>

        Note

        The note of the list item

    Returns Promise<ListItem>

  • Add a new user permission to a channel.

    Parameters

    • guildID: string

      ID of the guild the channel is in

    • channelID: string

      ID of the channel

    • targetID: string | number

      ID of the user or role to assign the permission to

    • options: {
          permissions: Record<string, never>;
      } | {
          permissions: Record<string, never>;
      }

      Create options

      Warning: targetID must have the correct type (number=role, string=user).

    Returns Promise<Permission>

  • Add a reaction to a specified object from a channel.

    Parameters

    • channelID: string

      ID of a channel that supports reaction.

    • channelType: ChannelReactionTypes

      Type of the selected channel. (e.g: "ChannelMessage")

    • targetID: string | number

      ID of the object you'd like to add the reaction to. (e.g: a message ID)

    • reaction: number

      ID of the reaction to add.

    Returns Promise<void>

  • Add a reaction to a target from a subcategory (e.g: a comment from Forum Thread)

    Parameters

    • channelID: string

      ID of a channel that supports reaction.

    • subcategoryType: ChannelSubcategoryReactionTypes

      Type of the selected subcategory. (e.g: "CalendarEvent")

    • subcategoryID: string | number

      ID of the subcategory you selected.

    • targetID: string | number

      ID of the target you'd like to add the reaction to. (e.g: a comment id)

    • reaction: number

      ID of the reaction to add.

    Returns Promise<void>

  • Delete a channel.

    Parameters

    • channelID: string

      ID of the channel to delete.

    Returns Promise<void>

  • Delete an announcement.

    Parameters

    • channelID: string

      ID of an Announcement channel.

    • announcementID: string

      ID of the announcement to delete.

    Returns Promise<void>

  • Delete an announcement comment.

    Parameters

    • channelID: string

      ID of an Announcement channel.

    • announcementID: string

      ID of the announcement where the comment is in.

    • commentID: number

      ID of the comment to delete.

    Returns Promise<void>

  • Delete a comment from a calendar event.

    Parameters

    • channelID: string

      ID of the channel containing the event.

    • eventID: number

      ID of the event containing the comment.

    • commentID: number

      ID of the comment to delete.

    Returns Promise<void>

  • Delete an event from a "Calendar" channel.

    Parameters

    • channelID: string

      ID of a "Calendar" channel.

    • eventID: number

      ID of a calendar event.

    Returns Promise<void>

  • Delete a CalendarEventSeries.

    Parameters

    • channelID: string

      ID of the channel.

    • eventID: number

      ID of the event.

    • seriesID: string

      ID of the series.

    Returns Promise<void>

  • Delete an RSVP from a calendar event.

    Parameters

    • channelID: string

      ID of a "Calendar" channel.

    • eventID: number

      ID of a calendar event.

    • memberID: string

      ID of a member.

    Returns Promise<void>

  • Delete a doc from a "Docs" channel.

    Parameters

    • channelID: string

      ID of a "Docs" channel.

    • docID: number

      ID of a doc.

    Returns Promise<void>

  • Delete a doc comment.

    Parameters

    • channelID: string

      ID of the docs channel.

    • docID: number

      ID of the doc.

    • commentID: number

      ID of the comment to delete.

    Returns Promise<void>

  • Delete a forum thread comment.

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • threadID: number

      ID of a forum thread.

    • commentID: number

      ID of a forum thread comment.

    Returns Promise<void>

  • Delete a forum thread from a specific forum channel

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • threadID: number

      ID of a forum thread.

    Returns Promise<void>

  • Delete an item from a list channel.

    Parameters

    • channelID: string

      ID of a "Lists" channel.

    • itemID: string

      ID of a list item.

    Returns Promise<void>

  • Delete a specific message.

    Parameters

    • channelID: string

      ID of the channel containing the message.

    • messageID: string

      ID of the message you'd like to delete.

    Returns Promise<void>

  • Delete a channel permission.

    Parameters

    • guildID: string

      ID of the guild where the channel is in

    • channelID: string

      ID of the channel

    • targetID: string | number

      ID of the target user (string) or role (number)

      Warning: targetID must have the correct type (number=role, string=user).

    Returns Promise<void>

  • Remove a reaction from a specified message.

    Parameters

    • channelID: string

      ID of a channel that supports reaction.

    • channelType: ChannelReactionTypes

      Type of the selected channel. (e.g: "ChannelMessage")

    • targetID: string | number

      ID of the target you'd like to add the reaction to. (e.g: a message ID)

    • reaction: number

      ID of the reaction.

    • OptionaltargetUserID: string

      ID of the user to remove reaction from. (works only on Channel Messages | default: @me)

    Returns Promise<void>

  • Remove a reaction from a target from a subcategory (e.g: a comment from Forum Thread)

    Parameters

    • channelID: string

      ID of a channel that supports reaction.

    • subcategoryType: ChannelSubcategoryReactionTypes

      Type of the selected subcategory. (e.g: "CalendarEvent")

    • subcategoryID: string | number

      ID of the subcategory you selected.

    • targetID: string | number

      ID of the target you'd like to remove the reaction from. (e.g: a comment id)

    • reaction: number

      ID of the reaction to add.

    Returns Promise<void>

  • Edit a channel.

    Type Parameters

    Parameters

    • channelID: string

      ID of the channel to edit.

    • options: EditChannelOptions

      Channel edit options.

    Returns Promise<T>

  • Edit an existing announcement.

    Parameters

    • channelID: string

      ID of the Announcement channel.

    • announcementID: string

      ID of the announcement to edit.

    • options: {
          content?: string | Record<string, never>;
          title?: string;
      }

      Edit options

      • Optionalcontent?: string | Record<string, never>

        Content

        The content of the announcement

      • Optionaltitle?: string

        Title

        The title of the announcement

    Returns Promise<Announcement>

  • Edit an announcement comment.

    Parameters

    • channelID: string

      ID of an Announcement channel.

    • announcementID: string

      ID of an announcement where the comment is in.

    • commentID: number

      ID of the comment to edit.

    • options: {
          content: string;
      }

      Edit options.

      • content: string

        Content Format: long-form markdown

        The content of the announcement comment

    Returns Promise<AnnouncementComment>

  • Edit an existing calendar event comment.

    Parameters

    • channelID: string

      The ID of a "Calendar" channel.

    • eventID: number

      The ID of an event from the channel.

    • commentID: number

      The ID of the comment to edit.

    • options: EditCalendarCommentOptions

      Edit options.

    Returns Promise<CalendarComment>

  • Edit an event from a "Calendar" channel.

    Parameters

    • channelID: string

      ID of a "Calendar" channel.

    • eventID: number

      ID of a calendar event.

    • options: EditCalendarEventOptions

      Edit options.

    Returns Promise<CalendarEvent>

  • Edit a CalendarEventSeries.

    Parameters

    • channelID: string

      ID of the channel.

    • eventID: number

      ID of the event.

    • seriesID: string

      ID of the series.

    • options: undefined | {
          endDate?: string;
          endsAfterOccurrences?: number;
          every?: {
              count: number;
              interval: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoEveryInterval;
          };
          on?: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoOn[];
          type: PathsChannelsChannelIdEventsPostRequestBodyApplicationJsonRepeatInfoType;
      }

      Edit repetition options.

    Returns Promise<void>

  • Add/Edit an RSVP in a calendar event.

    Parameters

    • channelID: string

      ID of a "Calendar" channel.

    • eventID: number

      ID of a calendar event.

    • memberID: string

      ID of a member.

    • options: EditCalendarRSVPOptions

      Edit options.

    Returns Promise<CalendarEventRSVP>

  • Edit a doc from a "Docs" channel.

    Parameters

    • channelID: string

      ID of a "Docs" channel.

    • docID: number

      ID of a doc.

    • options: EditDocOptions

      Edit options.

    Returns Promise<Doc>

  • Edit a doc comment.

    Parameters

    • channelID: string

      ID of the docs channel.

    • docID: number

      ID of the doc.

    • commentID: number

      ID of the comment to edit.

    • options: EditDocCommentOptions

      Edit options.

    Returns Promise<DocComment>

  • Edit a forum thread's comment.

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • threadID: number

      ID of a forum thread.

    • commentID: number

      ID of a thread comment.

    • Optionaloptions: EditForumCommentOptions

      Edit options.

    Returns Promise<ForumThreadComment>

  • Edit a forum thread from a specified forum channel.

    Type Parameters

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • threadID: number

      ID of a forum thread.

    • options: EditForumThreadOptions

      Edit options.

    Returns Promise<ForumThread<T>>

  • Edit an item from a list channel.

    Parameters

    • channelID: string

      ID of a "Lists" channel.

    • itemID: string

      ID of a list item.

    • Optionaloptions: {
          content?: string;
          note?: null | {
              content: string;
          };
      }

      Edit options.

      • Optionalcontent?: string
      • Optionalnote?: null | {
            content: string;
        }

    Returns Promise<ListItem>

  • Edit a specific message coming from a specified channel.

    Type Parameters

    Parameters

    • channelID: string

      The ID of the channel.

    • messageID: string

      The ID of the message you'd like to edit.

    • newMessage: EditMessageOptions

      object containing new message's options.

    • Optionalparams: MessageConstructorParams

      Optional parameters.

    Returns Promise<Message<T>>

  • Update a channel permission.

    Parameters

    • guildID: string

      ID of the guild the channel is in

    • channelID: string

      ID of the channel

    • targetID: string | number

      ID of the target user (string) or role (number)

    • options: {
          permissions: Record<string, never>;
      }

      Edit options

      Warning: targetID must have the correct type (number=role, string=user).

      • permissions: Record<string, never>

        A JSON object of Enums/Permissions with true, false or null values. Permission list can only contain relevant permissions for the channel type

    Returns Promise<Permission>

  • This method is used to get a guild channel.

    Parameters

    • channelID: string

      The ID of the channel to get.

    Returns Promise<AnyChannel>

  • Get a specific announcement from a channel.

    Parameters

    • channelID: string

      ID of an Announcement channel.

    • announcementID: string

      ID of the announcement to get.

    Returns Promise<Announcement>

  • Get a specific comment from an announcement.

    Parameters

    • channelID: string

      ID of an Announcement channel.

    • announcementID: string

      ID of the announcement where the comment is in.

    • commentID: number

      ID of the comment to get.

    Returns Promise<AnnouncementComment>

  • Get comments from an announcement.

    Parameters

    • channelID: string

      ID of an Announcement channel.

    • announcementID: string

      ID of an announcement.

    Returns Promise<AnnouncementComment[]>

  • Get a list of announcements from a channel.

    Parameters

    • channelID: string

      ID of an Announcement channel.

    • Optionalfilter: {
          before?: string;
          limit?: number;
      }

      Filter to apply.

      • Optionalbefore?: string
        2021-06-15T20:15:00.706Z
        
      • Optionallimit?: number
        25
        

    Returns Promise<Announcement[]>

  • This method is used to get a specific calendar event.

    Note: this method requires a "Calendar" channel.

    Parameters

    • channelID: string

      ID of a Calendar channel.

    • eventID: number

      ID of a Calendar event.

    Returns Promise<CalendarEvent>

  • This method is used to get a specific event comment coming from a calendar. Note: this method doesn't cache scheduled events due to the API's restrictions.

    Parameters

    • channelID: string

      ID of a "Calendar" channel.

    • eventID: number

      ID of an event containing the comment to get.

    • commentID: number

      ID of the comment to get.

    Returns Promise<CalendarComment>

  • This method is used to get a list of CalendarEventComment Note: due to API's restrictions, we're not able to cache scheduled events from this method.

    Parameters

    • channelID: string

      ID of a "Calendar" channel.

    • eventID: number

      ID of the event containing comments.

    Returns Promise<CalendarComment[]>

  • This method is used to get a list of CalendarEvent

    Parameters

    Returns Promise<CalendarEvent[]>

  • This method is used to get a specific CalendarEventRSVP.

    Note: this method requires a Calendar channel.

    Parameters

    • channelID: string

      ID of a Calendar channel

    • eventID: number

      ID of a Calendar Event

    • memberID: string

      ID of a Guild Member

    Returns Promise<CalendarEventRSVP>

  • This method is used to get a list of CalendarEventRSVP.

    Parameters

    • channelID: string

      ID of a "Calendar" channel.

    • eventID: number

      ID of a calendar event.

    Returns Promise<CalendarEventRSVP[]>

  • This method is used to get a channel doc.

    Note: This method requires a "Docs" channel.

    Parameters

    • channelID: string

      ID of the Docs channel.

    • docID: number

      ID of the channel doc.

    Returns Promise<Doc>

  • Get a specific comment from a doc.

    Parameters

    • channelID: string

      ID of the channel containing the doc.

    • docID: number

      ID of the doc the comment is in.

    • commentID: number

      ID of the comment to get.

    Returns Promise<DocComment>

  • Get every comment from a doc.

    Parameters

    • channelID: string

      ID of the channel containing the doc.

    • docID: number

      ID of the doc the comment is in.

    Returns Promise<DocComment[]>

  • This method is used to get a list of "Channel" Doc.

    Parameters

    • channelID: string

      ID of a "Docs" channel.

    • Optionalfilter: {
          before?: string;
          limit?: number;
      }

      Object to filter the output.

      • Optionalbefore?: string
      • Optionallimit?: number

    Returns Promise<Doc[]>

  • This method is used to get a specific forum thread comment.

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • threadID: number

      ID of a Forum thread.

    • commentID: number

      ID of a Forum thread comment.

    Returns Promise<ForumThreadComment>

  • This method is used to get a list of ForumThreadComment.

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • threadID: number

      ID of a Forum Thread.

    Returns Promise<ForumThreadComment[]>

  • This method is used to get a specific forum thread.

    Note: This method requires a "Forum" channel.

    Parameters

    • channelID: string

      ID of a specific Forum channel.

    • threadID: number

      ID of the specific Forum Thread.

    Returns Promise<ForumThread<ForumChannel>>

  • This method is used to get a specific list item.

    Parameters

    • channelID: string

      ID of a "List" channel.

    • itemID: string

      ID of a list item.

    Returns Promise<ListItem>

  • This method is used to get a list of ListItem.

    Parameters

    • channelID: string

      ID of a "List" channel.

    Returns Promise<ListItem[]>

  • This method is used to get a channel message.

    Type Parameters

    Parameters

    • channelID: string

      The ID of the channel containing the message.

    • messageID: string

      The ID of the message to get.

    • Optionalparams: MessageConstructorParams

      Optional parameters.

    Returns Promise<Message<T>>

  • This method is used to get a list of Message

    Parameters

    Returns Promise<Message<TextChannel>[]>

  • Get the permissions of a user or role for a specified channel.

    Parameters

    • guildID: string

      ID of the guild the channel is in

    • channelID: string

      ID of the channel

    • targetID: string | number

      ID of the user or role to get the permission

      Warning: targetID must have the correct type (number=role, string=user).

    Returns Promise<Permission>

  • Parameters

    • guildID: string
    • channelID: string

    Returns Promise<Permission[]>

  • Get existing channel permissions for a specified role.

    Parameters

    • guildID: string

      ID of the guild where the channel is in

    • channelID: string

      ID of the channel

    Returns Promise<Permission[]>

  • Get the permissions of every user in the guild for a specified channel.

    Parameters

    • guildID: string

      ID of the guild where the channel is in

    • channelID: string

      ID of the channel

    Returns Promise<Permission[]>

  • Lock a forum thread.

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • threadID: number

      ID of a forum thread.

    Returns Promise<void>

  • Pin a forum thread.

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • threadID: number

      ID of a forum thread.

    Returns Promise<void>

  • Pin a message.

    Parameters

    • channelID: string

      ID of the channel where the message to pin is in

    • messageID: string

      ID of the message to pin

    Returns Promise<void>

  • Restore a channel.

    Parameters

    • channelID: string

      ID of the channel to restore

    Returns Promise<void>

  • Mark a list item as uncompleted.

    Parameters

    • channelID: string

      ID of a "Lists" channel.

    • itemID: string

      ID of a list item.

    Returns Promise<void>

  • Unlock a forum thread.

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • threadID: number

      ID of a forum thread.

    Returns Promise<void>

  • Unpin a forum thread.

    Parameters

    • channelID: string

      ID of a "Forums" channel.

    • threadID: number

      ID of a forum thread.

    Returns Promise<void>

  • Unpin a message.

    Parameters

    • channelID: string

      ID of the channel where the message to unpin is in

    • messageID: string

      ID of the message to unpin

    Returns Promise<void>