Represents a server on Guilded.

Example

new Server(client, rawServer);

Hierarchy

Constructors

  • Parameters

    • client: Client

      The client the server belongs to.

    • raw: APIServer

      The raw data of the server.

    • Optional cache: boolean

      Whether to cache the server.

    Returns Server

Properties

about?: string

The description of the server.

avatar?: string

The avatar of the server.

banner?: string

The banner of the server.

The manager of bans that belong to the server.

client: Client
createdAt: Date

The date the server was created.

defaultChannelId?: string

The ID of the server's default channel.

id: string
isVerified?: boolean

Whether the server is verified.

The manager of members that belong to the server.

name: string

The name of the server.

ownerId: string

The ID of the user the server belongs to.

The manager of roles that belong to the server.

timezone?: string

The timezone of the server.

type?: ServerType

The type of the server.

url?: string

The vanity URL of the server.

Accessors

  • get defaultChannel(): undefined | Channel
  • The server's default channel.

    Returns undefined | Channel

  • get isCached(): boolean
  • Whether the server is cached.

    Returns boolean

  • get isClan(): boolean
  • Whether the server is a clan server.

    Returns boolean

  • get isCommunity(): boolean
  • Whether the server is a community server.

    Returns boolean

  • get isFriends(): boolean
  • Whether the server is a friends server.

    Returns boolean

  • get isGuild(): boolean
  • Whether the server is a guild server.

    Returns boolean

  • get isOrganization(): boolean
  • Whether the server is a organization server.

    Returns boolean

  • get isOther(): boolean
  • Whether the server is a other type.

    Returns boolean

  • get isStreaming(): boolean
  • Whether the server is a streaming server.

    Returns boolean

  • get isTeam(): boolean
  • Whether the server is a team server.

    Returns boolean

  • get owner(): undefined | ServerMember
  • The server member the server belongs to.

    Returns undefined | ServerMember

Methods

  • Create a channel in the server.

    Returns

    The created channel.

    Example

    server.createChannel({ name: 'Chat', type: 'chat' });
    

    Parameters

    Returns Promise<Channel>

  • Fetch the server.

    Returns

    The fetched server.

    Example

    server.fetch();
    

    Parameters

    • Optional options: FetchOptions

      The options to fetch the server with.

    Returns Promise<Server>

  • Fetch the server's default channel.

    Returns

    The fetched channel.

    Example

    server.fetchDefaultChannel();
    

    Parameters

    • Optional options: FetchOptions

      The options to fetch the channel with.

    Returns undefined | Promise<Channel>

  • Fetch the server member the server belongs to.

    Returns

    The fetched server member.

    Example

    server.fetchOwner();
    

    Parameters

    • Optional options: FetchOptions

      The options to fetch the server member with.

    Returns Promise<ServerMember>

  • Leave the server.

    Returns

    The server.

    Example

    server.leave();
    

    Returns Promise<void>