Base
↳ Member
client
, guildID
, member
): Member
Constructs a new instance of the constructor.
Name | Type | Description |
---|---|---|
client | YorClient | The client object. |
guildID | string | The ID of the guild. |
member | APIInteractionGuildMember | The member object. |
Member
Private
API: GuildsAPI
YorClient
Optional
joinedTimestamp: number
Optional
nickname: string
APIInteractionGuildMember
& { guildID
: string
}
User
data?
): Promise
<void
>
Bans a user with optional additional data.
Name | Type | Description |
---|---|---|
data? | RESTPutAPIGuildBanJSONBody & { reason : string } | The optional additional data for banning the user. It can include properties like delete_message_seconds and reason . |
Promise
<void
>
A promise that resolves when the user is successfully banned.
string
Returns the display name for the member.
string
The display name of the member.
data
): Promise
<APIGuildMember
>
Edits a guild member.
Name | Type | Description |
---|---|---|
data | RESTPatchAPIGuildMemberJSONBody & { reason? : string } | The data to edit the guild member with. It should include the reason as a string if provided. |
Promise
<APIGuildMember
>
A promise that resolves with the edited guild member object.
Promise
<Guild
>
Fetches a guild using the guild ID.
Promise
<Guild
>
A Promise that resolves with the fetched Guild object.
undefined
| Date
Returns the joined date of the user as a Date object.
undefined
| Date
reason?
): Promise
<unknown
>
Kick a member from the guild.
Name | Type | Description |
---|---|---|
reason? | string | The reason for the kick, optional. |
Promise
<unknown
>
A promise that resolves with the result of the kick.