hoshii / Exports / Server

Server

Represents a server

Hierarchy

  • Base<string>

    Server

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Server(data, client)

Create a new Server

Parameters

NameTypeDescription
dataRawServerThe raw data of the server
clientClientThe client

Overrides

Base.constructor

Defined in

lib/structures/Server.ts:123open in new window

Properties

_clientMember

Private Optional _clientMember: ServerMember

The client member of the server

Defined in

lib/structures/Server.ts:46open in new window


about

Optional about: string

The about info of the server

Defined in

lib/structures/Server.ts:51open in new window


avatar

Optional avatar: string

The avatar of the server

Defined in

lib/structures/Server.ts:56open in new window


Optional banner: string

The banner of the server

Defined in

lib/structures/Server.ts:61open in new window


channels

channels: TypedCollection<string, RawServerChannel, AnyChannel, []>

A collection of cached channels

Defined in

lib/structures/Server.ts:66open in new window


client

client: Client

The bot client

Inherited from

Base.client

Defined in

lib/structures/Base.ts:13open in new window


creaetdAt

creaetdAt: Date

The date the server was created at

Defined in

lib/structures/Server.ts:71open in new window


defaultChannelID

Optional defaultChannelID: string

The ID of the default channel

Defined in

lib/structures/Server.ts:76open in new window


id

id: string

The ID of the item

Inherited from

Base.id

Defined in

lib/structures/Base.ts:16open in new window


isVerified

isVerified: boolean

Whether the server is verified

Defined in

lib/structures/Server.ts:81open in new window


members

members: TypedCollection<string, RawServerMember, ServerMember, [serverID: string]>

A collection of cached server members

Defined in

lib/structures/Server.ts:86open in new window


name

name: string

The name of the server

Defined in

lib/structures/Server.ts:96open in new window


ownerID

ownerID: string

The ID of the owner of the server

Defined in

lib/structures/Server.ts:101open in new window


timezone

Optional timezone: string

The timezone of the server

Defined in

lib/structures/Server.ts:106open in new window


type

Optional type: ServerCategories

The type of the server

Defined in

lib/structures/Server.ts:111open in new window


url

Optional url: string

The URL of the server

Defined in

lib/structures/Server.ts:116open in new window

Accessors

owner

get owner(): User | ServerMember | Promise<ServerMember>

The owner of the server

Returns

User | ServerMember | Promise<ServerMember>

Defined in

lib/structures/Server.ts:145open in new window

Methods

createMemberBan

createMemberBan(memberID, reason?): Promise<ServerMemberBan>

Create a member ban

Parameters

NameTypeDescription
memberIDstringThe ID of the member
reason?stringThe reason for the ban

Returns

Promise<ServerMemberBan>

Defined in

lib/structures/Server.ts:159open in new window


removeMemberBan

removeMemberBan(memberID): Promise<void>

Remove a member ban

Parameters

NameTypeDescription
memberIDstringThe ID of the member

Returns

Promise<void>

Defined in

lib/structures/Server.ts:171open in new window


toJSON

toJSON(): ServerData

Returns the JSON representation of the item

Returns

ServerData

Overrides

Base.toJSON

Defined in

lib/structures/Server.ts:175open in new window


update

Protected update(data): void

Parameters

NameType
dataRawServer

Returns

void

Overrides

Base.update

Defined in

lib/structures/Server.ts:192open in new window

Last Updated:
Contributors: Reinhardt