mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(GuildsAPI): add removeMember() (#9576)
This commit is contained in:
@@ -1123,6 +1123,22 @@ export class GuildsAPI {
|
||||
}) as Promise<RESTPatchAPIGuildMemberResult>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a member from a guild
|
||||
*
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member}
|
||||
* @param guildId - The id of the guild
|
||||
* @param userId - The id of the user
|
||||
* @param options - The options for removing the guild member
|
||||
*/
|
||||
public async removeMember(
|
||||
guildId: Snowflake,
|
||||
userId: Snowflake,
|
||||
{ reason, signal }: Pick<RequestData, 'reason' | 'signal'> = {},
|
||||
) {
|
||||
return this.rest.delete(Routes.guildMember(guildId, userId), { reason, signal });
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a role to a guild member
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user