Skip to main content
Module

x/biscuit/mod.ts>Member

A Discord library that is easy to use but reliable on its core 🥠
Latest
class Member
implements Model
Re-export
import { Member } from "https://deno.land/x/biscuit@0.2.4/mod.ts";

Constructors

new
Member(
session: Session,
guildId: Snowflake,
)

Properties

optional
avatarHash: bigint

the member's guild avatar hash optimized as a bigint

optional
communicationDisabledUntilTimestamp: number

when the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out

deaf: boolean

whether the user is deafened in voice channels

guildId: Snowflake

the choosen guild id

readonly
id: Snowflake

shorthand to User.id

readonly
joinedAt: Date

gets the joinedAt timestamp as a Date

joinedTimestamp: number

when the user joined the guild

mute: boolean

whether the user is muted in voice channels

optional
nickname: string

this user's guild nickname

readonly
nicknameOrUsername: string

gets the nickname or the username

pending: boolean

whether the user has not yet passed the guild's Membership Screening requirements

optional
premiumSince: number

when the user started boosting the guild

roles: Snowflake[]

array of role object ids

readonly
session: Session

the session that instantiated this member

user: User

the user this guild member represents

Methods

addRole(roleId: Snowflake, reason?: string): Promise<void>

adds a role to this member

avatarURL(options: avatarOptions): string

gets the members's guild avatar, not to be confused with Member.user.avatarURL()

ban(options: CreateGuildBan): Promise<Member>

bans a member from this guild and delete previous messages sent by the member

edit(options: ModifyGuildMember): Promise<Member>

edits member's nickname, roles, etc

kick(options: { reason?: string; }): Promise<Member>

kicks a member from this guild

removeRole(roleId: Snowflake, options?: { reason?: string; }): Promise<void>

removes a role from this member

toString(): string
unban(): Promise<void>

unbans a member from this guild