Class ServerMember

Server Member Class

Hierarchy

  • ServerMember

Constructors

Properties

id: {
    server: string;
    user: string;
}

Type declaration

  • server: string

    Description

    Server Id

  • user: string

    Description

    User Id

Accessors

  • get hoistedRole(): null | {
        colour?: null | string;
        hoist?: boolean;
        id: string;
        name?: string;
        permissions?: {
            a: number;
            d: number;
        };
        rank?: number;
    }
  • Member's currently hoisted role.

    Returns null | {
        colour?: null | string;
        hoist?: boolean;
        id: string;
        name?: string;
        permissions?: {
            a: number;
            d: number;
        };
        rank?: number;
    }

  • get orderedRoles(): {
        colour?: null | string;
        hoist?: boolean;
        id: string;
        name?: string;
        permissions?: {
            a: number;
            d: number;
        };
        rank?: number;
    }[]
  • Ordered list of roles for this member, from lowest to highest priority.

    Returns {
        colour?: null | string;
        hoist?: boolean;
        id: string;
        name?: string;
        permissions?: {
            a: number;
            d: number;
        };
        rank?: number;
    }[]

Methods

  • Ban this member from the server

    Parameters

    • options: {
          reason?: null | string;
      }

      Ban options

      • Optional reason?: null | string

        Description

        Ban reason

    Returns Promise<void>

  • Edit a member

    Parameters

    • data: {
          avatar?: null | string;
          nickname?: null | string;
          remove?: null | ("Nickname" | "Avatar" | "Roles" | "Timeout")[];
          roles?: null | string[];
          timeout?: null | string;
      }

      Changes

      • Optional avatar?: null | string

        Description

        Attachment Id to set for avatar

      • Optional nickname?: null | string

        Description

        Member nickname

      • Optional remove?: null | ("Nickname" | "Avatar" | "Roles" | "Timeout")[]

        Description

        Fields to remove from channel object

      • Optional roles?: null | string[]

        Description

        Array of role ids

      • Optional timeout?: null | string

        Description

        Timestamp this member is timed out until

    Returns Promise<void>

  • Get the permissions that this member has against a certain object

    Parameters

    • target: Channel | Server

      Target object to check permissions against

    Returns number

    Permissions that this member has

  • Check whether a member has a certain permission against a certain object

    Parameters

    • target: Channel | Server

      Target object to check permissions against

    • Rest ...permission: ("Video" | "Masquerade" | "ManageChannel" | "ManageServer" | "ManagePermissions" | "ManageRole" | "ManageCustomisation" | "KickMembers" | "BanMembers" | "TimeoutMembers" | "AssignRoles" | "ChangeNickname" | "ManageNicknames" | "ChangeAvatar" | "RemoveAvatars" | "ViewChannel" | "ReadMessageHistory" | "SendMessage" | "ManageMessages" | "ManageWebhooks" | "InviteOthers" | "SendEmbeds" | "UploadFiles" | "React" | "Connect" | "Speak" | "MuteMembers" | "DeafenMembers" | "MoveMembers" | "GrantAllSafe")[]

      Permission names to check for

    Returns boolean

    Whether the member has this permission

  • Checks whether the target member has a higher rank than this member.

    Parameters

    Returns boolean

    Whether this member is inferior to the target

Generated using TypeDoc