Skip to content
New issue

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

TypeError #35

Closed
mkevenaar opened this issue May 4, 2022 · 5 comments
Closed

TypeError #35

mkevenaar opened this issue May 4, 2022 · 5 comments
Milestone

Comments

@mkevenaar
Copy link
Owner

TypeError: Cannot read properties of undefined (reading 'send')
at Module.execute (file:///usr/src/bot/src/events/guildMemberAdd.js:64:25)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)

@mkevenaar mkevenaar added the bug label May 4, 2022
@mkevenaar mkevenaar added this to the 0.1.0 milestone May 4, 2022
@davidzwa
Copy link
Collaborator

davidzwa commented May 4, 2022

We need to know what the input variables on this line are:

let welcomeChannel = await client.tools.resolveChannel(channelName, guild);

Because the code itself looks ok. Maybe somewhere before member.guild or guildData?.addons?.welcome.channel === channelName is not set?

@mkevenaar
Copy link
Owner Author

mkevenaar commented May 4, 2022

If the guild did not configure the welcome messages, there won't be an entry in the database. The welcome.channel is empty at that time.

Check if channel is empty and return nothing if it is?

@davidzwa
Copy link
Collaborator

davidzwa commented May 4, 2022

Lets converse in English 😉

Yep validating this on startup (and otherwise crashing hard immediately) sounds best!

@mkevenaar
Copy link
Owner Author

Translated! :)

@mkevenaar
Copy link
Owner Author

🎉 This issue has been resolved in version 0.1.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants