mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
add payload_json instead of the current iterator (#1015)
This commit is contained in:
committed by
Schuyler Cebulskie
parent
28ca83011c
commit
7c12fdcb56
@@ -37,7 +37,7 @@ class APIRequest {
|
||||
if (this.file && this.file.file) {
|
||||
apiRequest.attach('file', this.file.file, this.file.name);
|
||||
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) {
|
||||
apiRequest.send(this.data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user