discordjs / Commando

Official command framework for discord.js
Apache License 2.0
494 stars 243 forks source link

Cannot read property 'extend' of undefined #155

Closed SmokeDR closed 6 years ago

SmokeDR commented 6 years ago

My bot was working fine and all of a sudden when i went to run it again i got this error:

`C:\Users\Damien\Documents\cronbot\node_modules\discord.js-commando\src\extensions\guild.js:5

module.exports = Structures.extend('Guild', Guild => { ^

TypeError: Cannot read property 'extend' of undefined at Object. (C:\Users\Damien\Documents\cronbot\node_modules\discord.js-commando\src\extensions\guild.js:5:29) at Module._compile (internal/modules/cjs/loader.js:678:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10) at Module.load (internal/modules/cjs/loader.js:589:32) at tryModuleLoad (internal/modules/cjs/loader.js:528:12) at Function.Module._load (internal/modules/cjs/loader.js:520:3) at Module.require (internal/modules/cjs/loader.js:626:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. (C:\Users\Damien\Documents\cronbot\node_modules\discord.js-commando\src\index.js:4:17) at Module._compile (internal/modules/cjs/loader.js:678:30)`

kyranet commented 6 years ago

You need to install discord.js master as Commando uses custom structures.

npm i discordjs/discord.js
SmokeDR commented 6 years ago

I've installed discord.js and discord.js-commando, I just got back into coding so i'm rusty.

Gawdl3y commented 6 years ago

No, you specifically need the master branch of discord.js (it's v12.0.0-dev).