fix: error

- Documents
- Enums
- Checkupdate function
- Update UserAgent
This commit is contained in:
March 7th
2022-06-11 20:13:52 +07:00
parent 64d7900302
commit c9f1010e54
8 changed files with 94 additions and 66 deletions

View File

@@ -4,7 +4,7 @@ const https = require('node:https');
const { setTimeout } = require('node:timers');
const FormData = require('form-data');
const fetch = require('node-fetch');
const { UserAgent } = require('../util/Constants');
const { randomUA } = require('../util/Constants');
let agent = null;
@@ -18,7 +18,7 @@ class APIRequest {
this.retries = 0;
const { userAgentSuffix } = this.client.options;
this.fullUserAgent = `${UserAgent}${userAgentSuffix.length ? `, ${userAgentSuffix.join(', ')}` : ''}`;
this.fullUserAgent = `${randomUA()}${userAgentSuffix.length ? `, ${userAgentSuffix.join(', ')}` : ''}`;
let queryString = '';
if (options.query) {