diff --git a/.dist/guild.js b/.dist/guild.js index e7c1e5b..815c2f7 100644 --- a/.dist/guild.js +++ b/.dist/guild.js @@ -128,15 +128,12 @@ class Guild { noti ], ["button", "", "submit", _ => { - fetch(this.info.api + "/users/@me/guilds/settings", { + // + fetch(this.info.api + `/users/@me/guilds/${this.id}/settings/`, { method: "PATCH", headers: this.headers, body: JSON.stringify({ - "guilds": { - [this.id]: { - "message_notifications": noti - } - } + "message_notifications": noti }) }); this.message_notifications = noti; diff --git a/webpage/guild.ts b/webpage/guild.ts index c8d6c20..f3a4d28 100644 --- a/webpage/guild.ts +++ b/webpage/guild.ts @@ -139,15 +139,12 @@ class Guild{ noti ], ["button","","submit",_=>{ - fetch(this.info.api+"/users/@me/guilds/settings",{ + // + fetch(this.info.api+`/users/@me/guilds/${this.id}/settings/`,{ method:"PATCH", headers:this.headers, body:JSON.stringify({ - "guilds":{ - [this.id]:{ - "message_notifications": noti - } - } + "message_notifications": noti }) }) this.message_notifications=noti;