default_member_permissions

if ('default_member_permissions' in command) { ^ TypeError: Cannot use 'in' operator to search for 'default_member_permissions' in ping
3 Replies
d.js docs
d.js docs3y 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.
Youssef
YoussefOP3y ago
$
Youssef
YoussefOP3y ago
node.js v18.4.0 └── [email protected] no ? @muchnameless why ?
client.once(event.name, (...args) => event.execute(...args, client));
^

TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function
client.once(event.name, (...args) => event.execute(...args, client));
^

TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function
if (event.once) {
client.once(event.name, (...args) => event.execute(...args, client));
} else {
client.on(event.name, (...args) => event.execute(...args, client));
}
if (event.once) {
client.once(event.name, (...args) => event.execute(...args, client));
} else {
client.on(event.name, (...args) => event.execute(...args, client));
}
event class
module.exports = class Event {
/**
* @param {object} event
* @param {keyof import('discord.js').ClientEvents} event.name
* @param {boolean} command.once
*/

constructor({
name,
once,
}) {
this.name = name;
this.once = once;
}

};
module.exports = class Event {
/**
* @param {object} event
* @param {keyof import('discord.js').ClientEvents} event.name
* @param {boolean} command.once
*/

constructor({
name,
once,
}) {
this.name = name;
this.once = once;
}

};
ok, can u help with this? what i should I define it? it just a prop learn js? this is make me laugh so hard 😂😭 anyway i fixed the error by myself ..

Did you find this page helpful?