hoshii / Exports / ServerMember
ServerMember
Represents a user
Hierarchy
↳
ServerMember
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new ServerMember(data
, client
, serverID
)
Create a new ServerMember
Parameters
Name | Type | Description |
---|---|---|
data | RawServerMember | The raw data of the member |
client | Client | The client |
serverID | string | The ID of the server the member is in |
Overrides
Defined in
lib/structures/ServerMember.ts:68
Properties
_data
• Private
_data: RawServerMember
The raw data of the member
Defined in
lib/structures/ServerMember.ts:35
avatar
• avatar: string
The avatar of the user
Inherited from
Defined in
banner
• banner: string
The banner of the user
Inherited from
Defined in
bot
• bot: boolean
Whether the user is a bot
Inherited from
Defined in
client
• client: Client
The bot client
Inherited from
Defined in
createdAt
• createdAt: Date
The date the user was created at
Inherited from
Defined in
id
• id: string
The ID of the item
Inherited from
Defined in
isOwner
• isOwner: boolean
Whether the member is the owner of the server
Defined in
lib/structures/ServerMember.ts:40
joinedAt
• joinedAt: Date
The date the member joined the server
Defined in
lib/structures/ServerMember.ts:45
name
• name: string
The name of the user
Inherited from
Defined in
nickname
• nickname: string
The nickname of the member
Defined in
lib/structures/ServerMember.ts:50
roleIDs
• roleIDs: number
[]
An array of role IDs the member has
Defined in
lib/structures/ServerMember.ts:55
serverID
• serverID: string
The ID of the server the member is in
Defined in
lib/structures/ServerMember.ts:60
type
• type: UserTypes
The type of the user
Inherited from
Defined in
Accessors
server
• get
server(): Server
| Promise
<Server
>
The server the member is in
Returns
Defined in
lib/structures/ServerMember.ts:88
user
• get
user(): User
The user data of the member
Returns
Defined in
lib/structures/ServerMember.ts:98
Methods
addGroup
▸ addGroup(groupID
): Promise
<void
>
Add a member to a group
Parameters
Name | Type | Description |
---|---|---|
groupID | string | The ID of the group |
Returns
Promise
<void
>
Defined in
lib/structures/ServerMember.ts:115
addRole
▸ addRole(roleID
): Promise
<void
>
Add a role to a member
Parameters
Name | Type | Description |
---|---|---|
roleID | number | The ID of the role |
Returns
Promise
<void
>
Defined in
lib/structures/ServerMember.ts:124
award
▸ award(amount
): Promise
<number
>
Award the member the built-in XP system
Parameters
Name | Type | Description |
---|---|---|
amount | number | The amount of XP to award |
Returns
Promise
<number
>
Defined in
lib/structures/ServerMember.ts:133
createBan
▸ createBan(reason?
): Promise
<ServerMemberBan
>
Create a ban for the member
Parameters
Name | Type | Description |
---|---|---|
reason? | string | The reason for the ban |
Returns
Promise
<ServerMemberBan
>
Defined in
lib/structures/ServerMember.ts:141
edit
▸ edit(options
): Promise
<void
>
Edit the member
Parameters
Name | Type | Description |
---|---|---|
options | ServerMemberEditOptions | The options to edit the member with |
Returns
Promise
<void
>
Defined in
lib/structures/ServerMember.ts:154
getSocialLink
▸ getSocialLink(socialMediaName
): Promise
<SocialLink
>
Get the social link of the member
Parameters
Name | Type | Description |
---|---|---|
socialMediaName | string | The name of the social media |
Returns
Promise
<SocialLink
>
Defined in
lib/structures/ServerMember.ts:163
remove
▸ remove(): Promise
<void
>
Remove the member from the server
Returns
Promise
<void
>
Defined in
lib/structures/ServerMember.ts:175
removeBan
▸ removeBan(): Promise
<void
>
Remove a member ban
Returns
Promise
<void
>
Defined in
lib/structures/ServerMember.ts:183
removeGroup
▸ removeGroup(groupID
): Promise
<void
>
Remove a member from a group
Parameters
Name | Type | Description |
---|---|---|
groupID | string | The ID of the group |
Returns
Promise
<void
>
Defined in
lib/structures/ServerMember.ts:192
removeRole
▸ removeRole(roleID
): Promise
<void
>
Remove a role from a member
Parameters
Name | Type | Description |
---|---|---|
roleID | number | The ID of the role |
Returns
Promise
<void
>
Defined in
lib/structures/ServerMember.ts:201
setXP
▸ setXP(total
): Promise
<number
>
Set the member XP using the built-in XP system
Parameters
Name | Type | Description |
---|---|---|
total | number | The total XP to set |
Returns
Promise
<number
>
Defined in
lib/structures/ServerMember.ts:214
toJSON
▸ toJSON(): ServerMemberData
Returns the JSON representation of the item
Returns
Overrides
Defined in
lib/structures/ServerMember.ts:218
update
▸ Protected
update(data
): void
Parameters
Name | Type |
---|---|
data | RawServerMember |
Returns
void