mirror of
https://github.com/danbulant/discord.js
synced 2026-06-10 02:02:40 +00:00
add payload_json instead of the current iterator (#1015)
This commit is contained in:
parent
28ca83011c
commit
7c12fdcb56
1 changed files with 1 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ class APIRequest {
|
||||||
if (this.file && this.file.file) {
|
if (this.file && this.file.file) {
|
||||||
apiRequest.attach('file', this.file.file, this.file.name);
|
apiRequest.attach('file', this.file.file, this.file.name);
|
||||||
this.data = this.data || {};
|
this.data = this.data || {};
|
||||||
for (const key in this.data) if (this.data[key]) apiRequest.field(key, this.data[key]);
|
apiRequest.field('payload_json', JSON.stringify(this.data));
|
||||||
} else if (this.data) {
|
} else if (this.data) {
|
||||||
apiRequest.send(this.data);
|
apiRequest.send(this.data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue