mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
23 lines
587 B
JavaScript
23 lines
587 B
JavaScript
const Constants = require('../../util/Constants');
|
|
|
|
class UserAgentManager {
|
|
constructor(restManager) {
|
|
this.restManager = restManager;
|
|
this._userAgent = {
|
|
url: 'https://github.com/hydrabolt/discord.js',
|
|
version: Constants.Package.version,
|
|
};
|
|
}
|
|
|
|
set(info) {
|
|
this._userAgent.url = info.url || 'https://github.com/hydrabolt/discord.js';
|
|
this._userAgent.version = info.version || Constants.Package.version;
|
|
}
|
|
|
|
get userAgent() {
|
|
return `DiscordBot (${this._userAgent.url}, ${this._userAgent.version})`;
|
|
}
|
|
}
|
|
|
|
module.exports = UserAgentManager;
|