fixed /pfp and /nick

This commit is contained in:
JandereDev 2022-05-11 15:15:38 +02:00
parent 69e7459939
commit 79c5fcab71
No known key found for this signature in database
GPG key ID: 5D5E18ACB990F57A
2 changed files with 2 additions and 2 deletions

View file

@ -53,7 +53,7 @@ async function clearAvatar(member: Member) {
await axios.patch( await axios.patch(
`${member.client.apiURL}/servers/${member.server!._id}/members/${member._id.user}`, `${member.client.apiURL}/servers/${member.server!._id}/members/${member._id.user}`,
{ {
remove: "Avatar", remove: [ "Avatar" ],
}, },
{ {
headers: { headers: {

View file

@ -47,7 +47,7 @@ async function setNick(member: Member, newName: string|null) {
`${member.client.apiURL}/servers/${member.server!._id}/members/${member._id.user}`, `${member.client.apiURL}/servers/${member.server!._id}/members/${member._id.user}`,
{ {
nickname: newName || undefined, nickname: newName || undefined,
remove: !newName ? "Nickname" : undefined, remove: !newName ? [ "Nickname" ] : undefined,
}, },
{ {
headers: { headers: {