Server
Represents a server
Hierarchy
Base
<string
>↳
Server
Table of contents
Constructors
Properties
- _clientMember
- about
- avatar
- banner
- channels
- client
- creaetdAt
- defaultChannelID
- id
- isVerified
- members
- name
- ownerID
- timezone
- type
- url
Accessors
Methods
Constructors
constructor
• new Server(data
, client
)
Create a new Server
Parameters
Name | Type | Description |
---|---|---|
data | RawServer | The raw data of the server |
client | Client | The client |
Overrides
Defined in
Properties
_clientMember
• Private
Optional
_clientMember: ServerMember
The client member of the server
Defined in
about
• Optional
about: string
The about info of the server
Defined in
avatar
• Optional
avatar: string
The avatar of the server
Defined in
banner
• Optional
banner: string
The banner of the server
Defined in
channels
• channels: TypedCollection
<string
, RawServerChannel
, AnyChannel
, []>
A collection of cached channels
Defined in
client
• client: Client
The bot client
Inherited from
Defined in
creaetdAt
• creaetdAt: Date
The date the server was created at
Defined in
defaultChannelID
• Optional
defaultChannelID: string
The ID of the default channel
Defined in
id
• id: string
The ID of the item
Inherited from
Defined in
isVerified
• isVerified: boolean
Whether the server is verified
Defined in
members
• members: TypedCollection
<string
, RawServerMember
, ServerMember
, [serverID: string]>
A collection of cached server members
Defined in
name
• name: string
The name of the server
Defined in
ownerID
• ownerID: string
The ID of the owner of the server
Defined in
timezone
• Optional
timezone: string
The timezone of the server
Defined in
type
• Optional
type: ServerCategories
The type of the server
Defined in
url
• Optional
url: string
The URL of the server
Defined in
Accessors
owner
• get
owner(): User
| ServerMember
| Promise
<ServerMember
>
The owner of the server
Returns
User
| ServerMember
| Promise
<ServerMember
>
Defined in
Methods
createMemberBan
▸ createMemberBan(memberID
, reason?
): Promise
<ServerMemberBan
>
Create a member ban
Parameters
Name | Type | Description |
---|---|---|
memberID | string | The ID of the member |
reason? | string | The reason for the ban |
Returns
Promise
<ServerMemberBan
>
Defined in
removeMemberBan
▸ removeMemberBan(memberID
): Promise
<void
>
Remove a member ban
Parameters
Name | Type | Description |
---|---|---|
memberID | string | The ID of the member |
Returns
Promise
<void
>
Defined in
toJSON
▸ toJSON(): ServerData
Returns the JSON representation of the item
Returns
Overrides
Defined in
update
▸ Protected
update(data
): void
Parameters
Name | Type |
---|---|
data | RawServer |
Returns
void