mirror of
https://github.com/danbulant/discord.js
synced 2026-05-26 05:22:15 +00:00
URI Encoding for reasons (#1606)
This commit is contained in:
parent
00eebd34cb
commit
66cc5b2b53
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ class APIRequest {
|
|||
const request = snekfetch[this.method](`${API}${this.path}`);
|
||||
|
||||
if (this.options.auth !== false) request.set('Authorization', this.getAuth());
|
||||
if (this.options.reason) request.set('X-Audit-Log-Reason', this.options.reason);
|
||||
if (this.options.reason) request.set('X-Audit-Log-Reason', encodeURIComponent(this.options.reason));
|
||||
if (!this.rest.client.browser) request.set('User-Agent', this.rest.userAgentManager.userAgent);
|
||||
|
||||
if (this.options.files) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue