feat(REST): enable setting default authPrefix (#7853)

This commit is contained in:
with-heart
2022-04-28 07:08:02 -04:00
committed by GitHub
parent df64d3ea38
commit 679dcda970
3 changed files with 8 additions and 1 deletions

View File

@@ -351,7 +351,7 @@ export class RequestManager extends EventEmitter {
throw new Error('Expected token to be set for this request, but none was present');
}
headers.Authorization = `${request.authPrefix ?? 'Bot'} ${this.#token}`;
headers.Authorization = `${request.authPrefix ?? this.options.authPrefix} ${this.#token}`;
}
// If a reason was set, set it's appropriate header