Class: Server
The base class for all structures.
Extends
Constructors
Constructor
new Server(
client,data):Server
Parameters
| Parameter | Type |
|---|---|
client | Client |
data | { } |
Returns
Server
Overrides
Properties
analytics
analytics:
boolean=false
banner
banner:
Attachment|null=null
bans
bans:
ServerBanManager
cachedAt
cachedAt:
number
Inherited from
categories
categories:
object[] |null=null
channelIds
channelIds:
string[] =[]
channels
channels:
ServerChannelManager
client
protectedreadonlyclient:Client
Inherited from
createdAt
createdAt:
Date
createdTimestamp
createdTimestamp:
number
defaultPermissions
defaultPermissions:
bigint
description
description:
string|null=null
discoverable
discoverable:
boolean=false
emojis
emojis:
EmojiManager
flags
flags:
number=0
icon
icon:
Attachment|null=null
id
readonlyid:string
Inherited from
invites
invites:
ServerInviteManager
members
members:
MemberManager
name
name:
string
nsfw
nsfw:
boolean=false
ownerId
ownerId:
string
roles
roles:
RoleManager
Methods
_clone()
_clone():
this
Helper to quickly clone a structure
Returns
this
Inherited from
_patch()
_patch(
data,clear?):void
Updates the server instance with new data without losing the object reference.
Parameters
| Parameter | Type |
|---|---|
data | { } |
clear? | ("Description" | "Icon" | "Categories" | "SystemMessages" | "Banner")[] |
Returns
void
edit()
edit(
options):Promise<Server>
Edits this server.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | ServerEditOptions | The fields to update. |
Returns
Promise<Server>
equals()
equals(
other):boolean
Compares this object with another to see if they represent the same entity.
Parameters
| Parameter | Type |
|---|---|
other | string | Base |
Returns
boolean
Inherited from
fetchAuditLogs()
fetchAuditLogs(
options?):Promise<Collection<string,AuditLogEntry>>
Fetch audit logs for this server
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | FetchAuditLogsOptions | Query params |
Returns
Promise<Collection<string, AuditLogEntry>>
fetchMembers()
fetchMembers(
options?):Promise<Collection<string,Member>>
Fetches multiple members from this server.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | FetchMembersOptions | Filter options for the fetch request. |
Returns
Promise<Collection<string, Member>>
A Collection of the fetched members.
leave()
leave():
Promise<never>
Leaves the server
Returns
Promise<never>
toString()
toString():
string
Returns the UUID string when the object is cast to a string.
Returns
string