Options
All
  • Public
  • Public/Protected
  • All
Menu

Guilds resource

Hierarchy

  • GuildsResource

Index

Constructors

constructor

Methods

createRole

  • createRole(guildId: string, data: RESTPostAPIGuildRoleJSONBody): Promise<APIRole>
  • Creates a new role

    Parameters

    • guildId: string

      ID of guild

    • data: RESTPostAPIGuildRoleJSONBody

      Data for new role

    Returns Promise<APIRole>

deleteRole

  • deleteRole(guildId: string, roleId: string): Promise<never>

edit

  • edit(guildId: string, data: RESTPatchAPIGuildJSONBody): Promise<APIGuild>
  • Edit a guild

    Parameters

    • guildId: string

      ID of guild

    • data: RESTPatchAPIGuildJSONBody

      Data to edit with

    Returns Promise<APIGuild>

editRole

  • editRole(guildId: string, roleId: string, data: RESTPatchAPIGuildRoleJSONBody): Promise<APIRole>
  • Edits an existing role

    Parameters

    • guildId: string

      ID of guild

    • roleId: string

      ID of role

    • data: RESTPatchAPIGuildRoleJSONBody

      New data for role

    Returns Promise<APIRole>

get

  • get(guildId: string, withCount?: boolean): Promise<APIGuild>
  • Gets a guild

    Parameters

    • guildId: string

      ID of guild

    • withCount: boolean = false

      Whether or not to add approximation counts

    Returns Promise<APIGuild>

getAuditLogs

  • getAuditLogs(guildId: string, query: RESTGetAPIAuditLogQuery): Promise<APIAuditLog>
  • Gets audit-log entries

    Parameters

    • guildId: string

      ID of guild

    • query: RESTGetAPIAuditLogQuery

    Returns Promise<APIAuditLog>

getRoles

  • getRoles(guildId: string): Promise<RESTGetAPIGuildRolesResult>

leave

  • leave(guildId: string): Promise<never>

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Static method

Generated using TypeDoc