Options
All
  • Public
  • Public/Protected
  • All
Menu

Members resource

Hierarchy

  • MembersResource

Index

Constructors

constructor

Methods

addRole

  • addRole(guildId: string, memberId: string, roleId: string): Promise<never>
  • Adds a role to member

    Parameters

    • guildId: string

      ID of guild

    • memberId: string

      ID of member

    • roleId: string

      ID of role to add

    Returns Promise<never>

ban

  • ban(guildId: string, memberId: string, extra?: RESTPutAPIGuildBanJSONBody): Promise<never>
  • Bans a member

    Parameters

    • guildId: string

      ID of guild

    • memberId: string

      ID of member

    • Optional extra: RESTPutAPIGuildBanJSONBody

      Extra, reason for ban and since days of messages to remove

    Returns Promise<never>

edit

  • edit(guildId: string, memberId?: string, data: RESTPatchAPIGuildMemberJSONBody): Promise<APIGuildMember>
  • Edits a member

    Parameters

    • guildId: string

      ID of guild

    • memberId: string = '@me'

      ID of member

    • data: RESTPatchAPIGuildMemberJSONBody

      New data for member

    Returns Promise<APIGuildMember>

get

  • get(guildId: string, memberId: string): Promise<APIGuildMember>

getMany

  • getMany(guildId: string, query: RESTGetAPIGuildMembersSearchQuery): Promise<RESTGetAPIGuildMembersSearchResult>
  • Gets a list of members

    Parameters

    • guildId: string
    • query: RESTGetAPIGuildMembersSearchQuery

      Query for search

    Returns Promise<RESTGetAPIGuildMembersSearchResult>

kick

  • kick(guildId: string, memberId: string, reason?: string): Promise<never>
  • Kicks a member

    Parameters

    • guildId: string

      ID of guild

    • memberId: string

      ID of member

    • Optional reason: string

      Reason for kick

    Returns Promise<never>

removeRole

  • removeRole(guildId: string, memberId: string, roleId: string): Promise<never>
  • Removes a role from the member

    Parameters

    • guildId: string

      ID of guild

    • memberId: string

      ID of member

    • roleId: string

      ID of role

    Returns Promise<never>

setNickname

  • setNickname(guildId: string, memberId?: string, nick?: null | string): Promise<Required<RESTPatchAPICurrentGuildMemberNicknameJSONBody>>
  • Sets a members nickname

    Parameters

    • guildId: string

      ID of guild

    • memberId: string = '@me'
    • nick: null | string = null

      New nickname (null to reset)

    Returns Promise<Required<RESTPatchAPICurrentGuildMemberNicknameJSONBody>>

unban

  • unban(guildId: string, memberId: string): Promise<never>

Legend

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

Generated using TypeDoc