We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In every events it coming undefined instedof objects
code: (event handler)
const fs = require("fs"); const allevents = []; module.exports = async (client) => { const logs = require("discord-logs"); logs(client, { debug: true }) try { try { const stringlength = 69; console.log("\n") console.log(` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓`.bold.brightGreen) console.log(` ┃ `.bold.brightGreen + " ".repeat(-1 + stringlength - ` ┃ `.length) + "┃".bold.brightGreen) console.log(` The Events handler is starting [events.js] `.bold.blue) console.log(` ┃ `.bold.brightGreen + " ".repeat(-1 + stringlength - ` ┃ `.length) + "┃".bold.brightGreen) console.log(` ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`.bold.brightGreen) } catch { /* */ } let amount = 0; const load_dir = (dir) => { const event_files = fs.readdirSync(`./events/${dir}`).filter((file) => file.endsWith(".js")); for (const file of event_files) { try { const event = require(`../events/${dir}/${file}`) let eventName = file.split(".")[0]; allevents.push(eventName); client.on(eventName, event.bind(null, client)); amount++; } catch (e) { console.log(e) } } } await ["client", "guild"].forEach(e => load_dir(e)); console.log(`${amount} Events Loaded`.brightGreen); try { const stringlength2 = 69; console.log("\n") console.log(` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓`.bold.yellow) console.log(` ┃ `.bold.yellow + " ".repeat(-1 + stringlength2 - ` ┃ `.length) + "┃".bold.yellow) console.log(` ┃ `.bold.yellow + `Logging into the BOT...`.bold.yellow + " ".repeat(-1 + stringlength2 - ` ┃ `.length - `Logging into the BOT...`.length) + "┃".bold.yellow) console.log(` ┃ `.bold.yellow + " ".repeat(-1 + stringlength2 - ` ┃ `.length) + "┃".bold.yellow) console.log(` ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛`.bold.yellow) } catch { /* */ } } catch (e) { console.log(String(e.stack).bgRed) } };
event: (guildMemberRoleAdd)
module.exports = (member, role) => { console.log(member.user.tag+" acquired the role: "+ `${role.name}`); }``` console output
channelUpdate event handler registered. guildUpdate event handler registered. roleUpdate event handler registered. guildMemberUpdate event handler registered. userUpdate event handler registered. messageUpdate event handler registered. presenceUpdate event handler registered. voiceStateUpdate event handler registered
NIKU [.]#0746 acquired the role: undefined NIKU [.]#0746 acquired the role: undefined
And it showing me client name instead of the target name
The text was updated successfully, but these errors were encountered:
Try This #164
Sorry, something went wrong.
No branches or pull requests
In every events it coming undefined instedof objects
code: (event handler)
event: (guildMemberRoleAdd)
channelUpdate event handler registered.
guildUpdate event handler registered.
roleUpdate event handler registered.
guildMemberUpdate event handler registered.
userUpdate event handler registered.
messageUpdate event handler registered.
presenceUpdate event handler registered.
voiceStateUpdate event handler registered
NIKU [.]#0746 acquired the role: undefined
NIKU [.]#0746 acquired the role: undefined
The text was updated successfully, but these errors were encountered: