discordjs / Commando

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

TypeError: Cannot read property 'extend' of undefined #416

Closed start2018 closed 2 years ago

start2018 commented 2 years ago

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

TypeError: Cannot read property 'extend' of undefined at Object. (D:\tools\magicjipange-master\node_modules\discord.js-commando\src\extensions\message.js:7:29) 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) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:94:18) at Object. (D:\tools\magicjipange-master\node_modules\discord.js-commando\src\registry.js:5:25) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)

already installed discord.js and this error happens. Every modules are up-to-date. Nodejs version :16.7.0 / NPM version: 7.20.3

MarcusOtter commented 2 years ago

Also getting this. EDIT: Seems intentional, this is deprecated as of DiscordJS 13.0 The authors of this repository should make that clear.

Read: https://github.com/discordjs/Commando/issues/414 https://github.com/discordjs/Commando/issues/413 https://github.com/discordjs/guide/pull/711

start2018 commented 2 years ago

Downgraded to discord.js@12.x . Works like a charm.

ghost commented 2 years ago

Commando is deprecated and doesn't work with Discord.js v13.