Constructors

Methods

  • Award a member using the built-in EXP system.

    Parameters

    • guildID: string

      ID of a guild.

    • memberID: string

      ID of a member.

    • amount: number

      Amount of experience.

    Returns Promise<number>

  • Award every member of a guild having a role using the built-in EXP system.

    Parameters

    • guildID: string

      ID of a guild.

    • roleID: number

      ID of a role.

    • amount: number

      Amount of experience.

    Returns Promise<void>

  • Bulk Award XP Members

    Parameters

    • guildID: string

      ID of the guild

    • options: BulkXPOptions

      Members to award XP

    Returns Promise<{
        totalsByUserId: {
            [key: string]: number;
        };
    }>

  • Bulk set XP Members

    Parameters

    • guildID: string

      ID of the guild

    • options: BulkXPOptions

      Members to set XP

    Returns Promise<{
        totalsByUserId: {
            [key: string]: number;
        };
    }>

  • Ban a guild member.

    Parameters

    • guildID: string

      ID of the guild the member is in.

    • memberID: string

      ID of the member to ban.

    • Optionalreason: string

      The reason of the ban.

    Returns Promise<BannedMember>

  • Create a guild category.

    Parameters

    • guildID: string

      ID of the guild to create a category in.

    • options: {
          groupId?: string;
          name: string;
      }

      Options to create a category.

      • OptionalgroupId?: string

        Group ID

        The ID of the group. If not provided, the category will be created in the "Server home" group from serverId.

      • name: string

        Name of the category

    Returns Promise<Category>

  • Create a channel category permission assigned to a user or role.

    Parameters

    • guildID: string

      ID of the guild where the channel is in

    • categoryID: number

      ID of the category

    • targetID: string | number

      ID of the user (string) or role (number) to assign the permission to

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

      Permission 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>

  • Create a channel in a specified guild.

    Type Parameters

    Parameters

    • guildID: string

      ID of a guild.

    • name: string

      Name of the new channel.

    • type: APIChannelCategories

      Type of the new channel. (e.g: chat)

    • Optionaloptions: CreateChannelOptions

      New channel's additional options.

    Returns Promise<T>

  • Create a guild group.

    Parameters

    • guildID: string

      The ID of the guild to create a group in.

    • options: {
          description?: string;
          emoteId?: number;
          isPublic?: boolean;
          name: string;
      }

      Create options

      • Optionaldescription?: string

        Description

        The description associated with the group

      • OptionalemoteId?: number

        The emote to associate with the group

      • OptionalisPublic?: boolean

        Is public

        Is this group open for anyone to join?

        false
        
      • name: string

        The name of the group

    Returns Promise<Group>

  • Create a guild role.

    Parameters

    • guildID: string

      ID of the server you want to create the role in.

    • options: {
          colors?: number[];
          isDisplayedSeparately?: boolean;
          isMentionable?: boolean;
          isSelfAssignable?: boolean;
          name: string;
          permissions: string[];
      }

      Create options

      • 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

      • OptionalisDisplayedSeparately?: boolean

        Display Separately

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

        false
        
      • OptionalisMentionable?: boolean

        Mentionable

        If set, this role can be mentioned

        false
        
      • OptionalisSelfAssignable?: 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

    Returns Promise<Role>

  • Delete a guild category.

    Parameters

    • guildID: string

      ID of the guild to create a category in.

    • categoryID: number

      ID of the category you want to read.

    Returns Promise<Category>

  • Delete a category permission.

    Parameters

    • guildID: string

      ID of the guild where the channel is in

    • categoryID: number

      ID of the category

    • targetID: string | number

      ID of the user or role to delete the permission from

    Returns Promise<void>

  • Delete a guild group

    Parameters

    • guildID: string

      ID of the guild where the group is in.

    • groupID: string

      ID of the group to delete.

    Returns Promise<void>

  • Delete a guild role.

    Parameters

    • guildID: string

      ID of the guild where the role to delete is in

    • roleID: number

      ID of the role to delete

    Returns Promise<void>

  • Edit a guild category.

    Parameters

    • guildID: string

      ID of the guild to create a category in.

    • categoryID: number

      ID of the category you want to read.

    • options: {
          name?: string;
          priority?: number;
      }

      Options to update a category.

      • Optionalname?: 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

    Returns Promise<Category>

  • Update a category permission.

    Parameters

    • guildID: string

      ID of the server the category is in

    • categoryID: number

      ID of the category

    • targetID: string | number

      ID of the user (string) or role (number) to assign the permission to.

    • 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>

  • Edit a guild group.

    Parameters

    • guildID: string

      The ID of the guild where the group to edit is in

    • groupID: string

      The ID of the group to edit.

    • options: {
          description?: string;
          emoteId?: number;
          isPublic?: boolean;
          name?: string;
      }

      Edit options

      • Optionaldescription?: string

        Description

        The description associated with the group Note - this property cannot be modified on a home group

      • OptionalemoteId?: number

        The emote to associate with the group

      • OptionalisPublic?: boolean

        Is public

        Is this group open for anyone to join? Note - this property cannot be modified on a home group

      • Optionalname?: string

        The name of the group

    Returns Promise<Group>

  • Edit a member.

    Parameters

    • guildID: string

      ID of the guild the member is in.

    • memberID: string

      ID of the member to edit.

    • options: EditMemberOptions

      Edit options.

    Returns Promise<void>

  • Edit a guild role.

    Parameters

    • guildID: string

      ID of the server

    • roleID: number

      ID of the role to edit

    • options: {
          colors?: number[];
          isDisplayedSeparately?: boolean;
          isMentionable?: boolean;
          isSelfAssignable?: boolean;
          name?: string;
          permissions?: string[];
          priority?: number;
      }

      Edit options

      • 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

      • OptionalisDisplayedSeparately?: boolean

        Display Separately

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

      • OptionalisMentionable?: boolean

        Mentionable

        If set, this role can be mentioned

      • OptionalisSelfAssignable?: boolean

        Self Assignable

        If set, this roll will be self assigned

      • Optionalname?: string

        Role name

        The role's name

      • Optionalpermissions?: 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!

    Returns Promise<Role>

  • Edit role permission.

    Parameters

    • guildID: string

      ID of the guild.

    • roleID: number

      ID of the role.

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

      Permission to edit.

      • permissions: Record<string, never>

        A JSON object of Enums/Permissions with true or false values.

    Returns Promise<Role>

  • This method is used to get a specific Guild.

    Note: Guild = Server

    Parameters

    • guildID: string

      The ID of the guild you'd like to get.

    Returns Promise<Guild>

  • Get a ban.

    Parameters

    • guildID: string

      ID of the guild.

    • memberID: string

      ID of the banned member.

    Returns Promise<BannedMember>

  • This method is used to get a list of guild ban.

    Parameters

    • guildID: string

      ID of the guild.

    Returns Promise<BannedMember[]>

  • Read a guild category.

    Parameters

    • guildID: string

      ID of the guild to create a category in.

    • categoryID: number

      ID of the category you want to read.

    Returns Promise<Category>

  • Get permission coming from a category.

    Parameters

    • guildID: string

      ID of the guild where the channel is in

    • categoryID: number

      ID of the category the permission is in

    • targetID: string | number

      ID of the user (string) or role (number) to get the permission for

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

    Returns Promise<Permission>

  • Get permissions of a category.

    Parameters

    • guildID: string

      ID of the server the category is in.

    • categoryID: number

      ID of the category the permissions are in

    Returns Promise<Permission[]>

  • Get role permissions from a specified category.

    Parameters

    • guildID: string

      ID of the guild where the channel is in

    • categoryID: number

      ID of the category the permissions are in

    Returns Promise<Permission[]>

  • Get user permissions from a specified category.

    Parameters

    • guildID: string

      ID of the guild where the channel is in

    • categoryID: number

      ID of the category the permissions are in

    Returns Promise<Permission[]>

  • Get a guild group.

    Parameters

    • guildID: string

      ID of the guild.

    • groupID: string

      ID of the group to get.

    Returns Promise<Group>

  • Get guild groups.

    Parameters

    • guildID: string

      ID of the guild.

    Returns Promise<Group[]>

  • This method is used to get a specific guild member.

    Parameters

    • guildID: string

      The ID of the Guild.

    • memberID: string

      The ID of the Guild Member to get.

    Returns Promise<Member>

  • Get guild member permissions.

    Parameters

    • guildID: string

      ID of the guild.

    • memberID: string

      ID of the member.

    Returns Promise<Permissions[]>

  • Get a list of role IDs of a specific member within a guild.

    Parameters

    • guildID: string

      ID of the guild the member is in.

    • memberID: string

      ID of the member to get roles from.

    Returns Promise<number[]>

  • This method is used to get a list of guild member.

    Parameters

    • guildID: string

      ID of the guild to get members.

    Returns Promise<Member[]>

  • Get a guild role.

    Parameters

    • guildID: string

      ID of the guild where the role is.

    • roleID: number

      ID of the role to get.

    Returns Promise<Role>

  • Get every guild roles from a guild.

    Parameters

    • guildID: string

      ID of the guild where roles are.

    Returns Promise<Role[]>

  • Get guild subscriptions.

    Parameters

    • guildID: string

      ID of the guild.

    • subscriptionID: string

      ID of the subscription to get.

    Returns Promise<Subscription>

  • Get guild subscriptions.

    Parameters

    • guildID: string

      ID of the guild.

    Returns Promise<Subscription[]>

  • Add a member to a group

    Parameters

    • groupID: string

      ID of a guild group.

    • memberID: string

      ID of a member.

    Returns Promise<void>

  • Add a role to a member

    Parameters

    • guildID: string

      ID of a guild.

    • memberID: string

      ID of a member.

    • roleID: number

      ID of a role.

    Returns Promise<void>

  • Remove a member from a group

    Parameters

    • groupID: string

      ID of a guild group.

    • memberID: string

      ID of a member.

    Returns Promise<void>

  • Remove a role from a member

    Parameters

    • guildID: string

      ID of a guild.

    • memberID: string

      ID of a member.

    • roleID: number

      ID of a role.

    Returns Promise<void>

  • Unban a guild member.

    Parameters

    • guildID: string

      ID of the guild the member was in.

    • memberID: string

      ID of the member to unban.

    Returns Promise<void>

  • Remove a member from a guild.

    Parameters

    • guildID: string

      The ID of the guild the member is in.

    • memberID: string

      The ID of the member to kick.

    Returns Promise<void>

  • Set a member's xp using the built-in EXP system.

    Parameters

    • guildID: string

      ID of a guild.

    • memberID: string

      ID of a member.

    • amount: number

      Total amount of experience.

    Returns Promise<number>