#Extended Client Login Function Error

1 messages · Page 1 of 1 (latest)

spare valley
#

I'm currently developing a framework and I hava a Base Class extending the Discord.js Client and the Main Class extending the Base Class, and I'm getting this error when invoking the login method from the Base Class.

/home/runner/biscord/node_modules/discord.js/src/rest/APIRequest.js:21
    this.fullUserAgent = `${UserAgent}${userAgentSuffix.length ? `, ${userAgentSuffix.join(', ')}` : ''}`;
                                                        ^

TypeError: Cannot read property 'length' of undefined
    at new APIRequest (/home/runner/biscord/node_modules/discord.js/src/rest/APIRequest.js:21:57)
    at RESTManager.request (/home/runner/biscord/node_modules/discord.js/src/rest/RESTManager.js:42:24)
    at Proxy.<anonymous> (/home/runner/biscord/node_modules/discord.js/src/rest/APIRouter.js:30:19)
    at WebSocketManager.connect (/home/runner/biscord/node_modules/discord.js/src/client/websocket/WebSocketManager.js:134:43)
    at Biscord.login (/home/runner/biscord/node_modules/discord.js/src/client/Client.js:254:21)
    at Object.<anonymous> (/home/runner/biscord/test/index.js:16:9)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
exit status 1

On the first version of my framework "Biscord", I also extended Client but didn't encounter this error.