The server member router for the Guilded REST API.

Example

new ServerMemberRouter(rest);

Hierarchy

Constructors

Properties

Methods

  • Add a role to a server member on Guilded.

    Example

    serverMembers.addRole('abc', 'abc', 123);
    

    Parameters

    • serverId: string

      The ID of the server the member belongs to.

    • memberId: string

      The ID of the server member to add the role to.

    • roleId: number

      The ID of the role to add to the server member.

    Returns Promise<void>

  • Award XP to a server member on Guilded.

    Returns

    The total amount of XP the server member has.

    Example

    serverMembers.awardXp('abc', 'abc', 100);
    

    Parameters

    • serverId: string

      The ID of the server the member belongs to.

    • memberId: string

      The ID of the server member to award XP to.

    • amount: number

      The amount of XP to award to the server member.

    Returns Promise<number>

  • Fetch a server member from Guilded.

    Returns

    The fetched server member.

    Example

    serverMembers.fetch('abc', 'abc');
    

    Parameters

    • serverId: string

      The ID of the server the member belongs to.

    • memberId: string

      The ID of the server member to fetch.

    Returns Promise<APIServerMember>

  • Fetch server members from Guilded.

    Returns

    The fetched server members.

    Example

    serverMembers.fetch('abc');
    

    Parameters

    • serverId: string

      The ID of the server the members belong to.

    Returns Promise<APIServerMember[]>

  • Fetch a list of roles that a server member has on Guilded.

    Returns

    The IDs of roles the server member has.

    Example

    serverMembers.fetchRoles('abc', 'abc');
    

    Parameters

    • serverId: string

      The ID of the server the member belongs to.

    • memberId: string

      The ID of the server member to fetch the roles for.

    Returns Promise<number[]>

  • Fetch a social link for a server member on Guilded.

    Returns

    The fetched social link.

    Example

    serverMembers.fetchSocialLink('abc', 'abc', 'youtube');
    

    Parameters

    • serverId: string

      The ID of the server the member belongs to.

    • memberId: string

      The ID of the server member to fetch the social link for.

    • type: string

      The type of social link to fetch.

    Returns Promise<APISocialLink>

  • Kick a server member on Guilded.

    Example

    serverMembers.kick('abc', 'abc');
    

    Parameters

    • serverId: string

      The ID of the server the member belongs to.

    • memberId: string

      The ID of the server member to kick.

    Returns Promise<void>

  • Remove the nickname of a server member on Guilded.

    Example

    serverMembers.removeNickname('abc', 'abc');
    

    Parameters

    • serverId: string

      The ID of the server the member belongs to.

    • memberId: string

      The ID of the server member to edit.

    Returns Promise<void>

  • Remove a role from a server member on Guilded.

    Example

    serverMembers.removeRole('abc', 'abc', 123);
    

    Parameters

    • serverId: string

      The ID of the server the member belongs to.

    • memberId: string

      The ID of the server member to remove the role from.

    • roleId: number

      The ID of the role to remove from the server member.

    Returns Promise<void>

  • Set the nickname of a server member on Guilded.

    Returns

    The nickname that was set.

    Example

    serverMembers.setNickname('abc', 'abc', 'nickname');
    

    Parameters

    • serverId: string

      The ID of the server the member belongs to.

    • memberId: string

      The ID of the server member to edit.

    • nickname: string

      The nickname of the server member.

    Returns Promise<string>

  • Set XP of a server member on Guilded.

    Returns

    The total amount of XP the server member has.

    Example

    serverMembers.setXp('abc', 'abc', 100);
    

    Parameters

    • serverId: string

      The ID of the server the member belongs to.

    • memberId: string

      The ID of the server member to set XP for.

    • amount: number

      The total XP of the server member.

    Returns Promise<number>