fix url bugs and improve account switcher
This commit is contained in:
parent
0fe2966ad1
commit
5148e1b77b
19 changed files with 186 additions and 175 deletions
|
@ -79,7 +79,7 @@ class Message {
|
|||
break;
|
||||
}
|
||||
}
|
||||
fetch(this.info.api.toString() + "/channels/" + this.channel.id + "/messages/" + this.id + "/reactions/" + encodeURIComponent(emoji) + "/@me", {
|
||||
fetch(this.info.api + "/channels/" + this.channel.id + "/messages/" + this.id + "/reactions/" + encodeURIComponent(emoji) + "/@me", {
|
||||
method: remove ? "DELETE" : "PUT",
|
||||
headers: this.headers,
|
||||
});
|
||||
|
@ -184,14 +184,14 @@ class Message {
|
|||
return build;
|
||||
}
|
||||
async edit(content) {
|
||||
return await fetch(this.info.api.toString() + "/channels/" + this.channel.snowflake + "/messages/" + this.id, {
|
||||
return await fetch(this.info.api + "/channels/" + this.channel.snowflake + "/messages/" + this.id, {
|
||||
method: "PATCH",
|
||||
headers: this.headers,
|
||||
body: JSON.stringify({ content: content })
|
||||
});
|
||||
}
|
||||
delete() {
|
||||
fetch(`${this.info.api.toString()}/channels/${this.channel.snowflake}/messages/${this.id}`, {
|
||||
fetch(`${this.info.api}/channels/${this.channel.snowflake}/messages/${this.id}`, {
|
||||
headers: this.headers,
|
||||
method: "DELETE",
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue