Problem about command handler

const discord = new CommandoClient({
token: Token,
commands: path.join(__dirname, 'prefix-commands'),
events: path.join(__dirname, 'events'),
groupCommands: true,
prefix: prefix,
owner: Owner,
defaultHelpCommand: true,
invite: 'https://discord.gg/some_invite',
options: {
maxShards: 'auto',
disableEveryone: true,
autoreconnect: true
}
});

discord.setup();
const discord = new CommandoClient({
token: Token,
commands: path.join(__dirname, 'prefix-commands'),
events: path.join(__dirname, 'events'),
groupCommands: true,
prefix: prefix,
owner: Owner,
defaultHelpCommand: true,
invite: 'https://discord.gg/some_invite',
options: {
maxShards: 'auto',
disableEveryone: true,
autoreconnect: true
}
});

discord.setup();
Error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
Error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
1 Reply
d.js docs
d.js docs2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.