Closed mandar1jn closed 4 years ago
This is because klasa does not yet support discord v 12
downgrade your d.js version
@Sank6 Changing the discord.js version from v12 to v11 produces an error:
/rbd/pnpm-volume/41f6e4db-5c97-4272-ae39-f47b9c614acf/node_modules/.github.com/dirigeants/klasa/7fbd351c1276a171fdc854bc99f05b5ef89eb32b/node_modules/klasa/src/lib/extensions/KlasaGuild.js:3 module.exports = Structures.extend('Guild', Guild => { ^ TypeError: Cannot read property 'extend' of undefined
Hmm that's odd. Contact Klasa support. I think that might be an issue on their side.
@Sank6 I managed to get it to work with discord.js v12 and stripping klasa of the #settings in packages.js, but there was another problem when I try to publish a bot an error occurs and the logs shows this: [2020-04-14 21:20:34] Error [ERR_UNHANDLED_ERROR]: Unhandled error. (Uncaught Promise Error: [2020-04-14 21:20:34] TypeError: req.app.get(...).users.get is not a function
, do you know what this is if it is already connected to mongodb and the rest?
Yeah, you still need the settings package. It manages the MongoDB
@Sank6 I wanted to say that everything was already connected, the only error is when trying to publish the bot or enter your profile in /me
If you want to see my project enter here https://listebots.glitch.me
Yes, that's because it uses the settings part of Klasa for those endpoints, which is why those errors happen.
And what can I do to fix it? if i add the #settings in package.json it generates the error i wrote above 😞
@Sank6 Can you read the issue i added in the other repository in:
Yep Same error
@Sank6 I think i fixed it, I replaced UserStore
with UserManager
It works now! I think the packages aren't updated to V12 all Store
became Manager
TypeError: this.users.get is not a function this error now.
@SynCode05 Me too
Glad to see we're making progress.
@SynCode05 what file is the UserStore
in?
@Mairoooon, start the bot you should see a directory at Object.
@SynCode05 It worked for me when I removed #settings from klasa in package.json, everything worked but this.user.get
error occurs...
Fixed it: 27fccda. It was a Klasa error that was fixed in the master branch as you said, and a missed bit of d.js v12 code on my side. Should work now. Re-install your dependencies.
When I start everything I get this error: discordbotlist@3.0.0 start C:\Users\Marijn\Desktop\Discord-Bot-Listing
C:\Users\Marijn\Desktop\Discord-Bot-Listing\node_modules\klasa\src\lib\extensions\KlasaUserStore.js:7 class KlasaUserStore extends UserStore { ^
TypeError: Class extends value undefined is not a constructor or null at Object. (C:\Users\Marijn\Desktop\Discord-Bot-Listing\node_modules\klasa\src\lib\extensions\KlasaUserStore.js:7:30)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object. (C:\Users\Marijn\Desktop\Discord-Bot-Listing\node_modules\klasa\src\lib\Client.js:25:24)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! discordbotlist@3.0.0 start:
node src/index.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the discordbotlist@3.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Marijn\AppData\Roaming\npm-cache_logs\2020-04-12T07_00_22_644Z-debug.log
This is because klasa does not yet support discord v 12