fix(ClientUser): Fix modifying self

#9318 djs
This commit is contained in:
Elysia 2023-04-07 20:36:46 +07:00
parent bf0fde611c
commit f2d3989b61

View File

@ -145,7 +145,7 @@ class ClientUser extends User {
async edit({ username, avatar }) {
const data = await this.client.api
.users('@me')
.patch({ username, avatar: avatar && (await DataResolver.resolveImage(avatar)) });
.patch({ data: { username, avatar: avatar && (await DataResolver.resolveImage(avatar)) } });
this.client.token = data.token;
const { updated } = this.client.actions.UserUpdate.handle(data);