Skip to content

Commit

Permalink
fix: destruct user in kickUser as appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
insertish committed Dec 1, 2023
1 parent a132446 commit b39a22b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/classes/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,13 @@ export class Server {
*/
async kickUser(user: string | User | ServerMember) {
return await this.#collection.client.api.delete(
`/servers/${this.id as ""}/members/${userId}`
`/servers/${this.id as ""}/members/${
typeof user === "string"
? user
: user instanceof User
? user.id
: user.id.user
}`
);
}

Expand Down

0 comments on commit b39a22b

Please sign in to comment.