mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
URI Encoding for reasons (#1606)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user