MemberShorter
Signature
export declare class MemberShorter extends BaseShorterProperties
0No properties.
Methods
19Methods
resolve(guildId: string, resolve: GuildMemberResolvable): Promise<GuildMemberStructure | undefined>;Resolves a member in the guild based on the provided GuildMemberResolvable.
guildId- The ID of the guild.
resolve- The GuildMemberResolvable to resolve.
A Promise that resolves to the resolved member.
search(guildId: string, query: RESTGetAPIGuildMembersSearchQuery): Promise<GuildMemberStructure[]>;Searches for members in the guild based on the provided query.
guildId- The ID of the guild.
query- The query parameters for searching members.
A Promise that resolves to an array of matched members.
unban(guildId: string, memberId: string, reason?: string): Promise<undefined>;Unbans a member from the guild.
guildId- The ID of the guild.
memberId- The ID of the member to unban.
reason- The reason for unbanning the member.
ban(guildId: string, memberId: string, options?: BanOptions): Promise<void>;Bans a member from the guild.
guildId- The ID of the guild.
memberId- The ID of the member to ban.
options- The options for banning the member.
kick(guildId: string, memberId: string, reason?: string): Promise<void>;Kicks a member from the guild.
guildId- The ID of the guild.
memberId- The ID of the member to kick.
reason- The reason for kicking the member.
edit(guildId: string, memberId: string, body: RESTPatchAPIGuildMemberJSONBody | RESTPatchAPICurrentGuildMemberJSONBody, reason?: string): Promise<GuildMemberStructure>;Edits a member in the guild.
guildId- The ID of the guild.
memberId- The ID of the member to edit.
body- The data to update the member with.
reason- The reason for editing the member.
A Promise that resolves to the edited member.
add(guildId: string, memberId: string, body: RESTPutAPIGuildMemberJSONBody): Promise<GuildMemberStructure | undefined>;Adds a member to the guild.
guildId- The ID of the guild.
memberId- The ID of the member to add.
body- The request body for adding the member.
A Promise that resolves to the added member.
fetch(guildId: string, memberId: string, force?: boolean): Promise<GuildMemberStructure>;Fetches a member from the guild.
guildId- The ID of the guild.
memberId- The ID of the member to fetch.
force- Whether to force fetching the member from the API even if it exists in the cache.
A Promise that resolves to the fetched member.
raw(guildId: string, memberId: string, force?: boolean): Promise<APIGuildMember>;list(guildId: string, query?: RESTGetAPIGuildMembersQuery, force?: boolean): Promise<GuildMemberStructure[]>;Lists members in the guild based on the provided query.
guildId- The ID of the guild.
query- The query parameters for listing members.
force- Whether to force listing members from the API even if they exist in the cache.
A Promise that resolves to an array of listed members.
addRole(guildId: string, memberId: string, id: string): Promise<undefined>;Adds a role to a guild member.
guildId- The ID of the guild.
memberId- The ID of the member to add the role to.
id- The ID of the role to add.
removeRole(guildId: string, memberId: string, id: string): Promise<undefined>;Removes a role from a guild member.
guildId- The ID of the guild.
memberId- The ID of the member to remove the role from.
id- The ID of the role to remove.
listRoles(guildId: string, memberId: string, force?: boolean): Promise<GuildRoleStructure[]>;sortRoles(guildId: string, memberId: string, force?: boolean): Promise<GuildRoleStructure[]>;permissions(guildId: string, memberId: string, force?: boolean): Promise<PermissionsBitField>;presence(memberId: string): ReturnCache<(Omit<GatewayPresenceUpdate, "user"> & { id: string; user_id: string;} & { guild_id: string;}) | undefined>;voice(guildId: string, memberId: (string & {}) | '@me', force?: boolean): Promise<VoiceStateStructure>;timeout(guildId: string, memberId: string, time: number | null, reason?: string): Promise<GuildMemberStructure>;Timeouts a member from the guild.
guildId- The ID of the guild.
memberId- The ID of the member to timeout.
time- The time in milliseconds to timeout the member for.
reason- The reason for the timeout.
hasTimeout(member: Exclude<GuildMemberResolvable, string>): false | number;Checks if a member has a timeout.
member- The member to check.
The time left until the timeout expires, in milliseconds, or false if the member does not have a timeout.