UNPKG

v11-discord.js

Version:

A powerful library for interacting with the Discord API - patched by molo#7947

26 lines (20 loc) 576 B
const Constants = require('../../util/Constants'); class UserAgentManager { constructor() { this.build(this.constructor.DEFAULT); } set({ url, version } = {}) { this.build({ url: url || this.constructor.DFEAULT.url, version: version || this.constructor.DEFAULT.version, }); } build(ua) { this.userAgent = `DiscordBot (${ua.url}, ${ua.version}) Node.js/${process.version}`; } } UserAgentManager.DEFAULT = { url: Constants.Package.homepage.split('#')[0], version: Constants.Package.version, }; module.exports = UserAgentManager;