mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +00:00
22 lines
587 B
JavaScript
22 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;
|