Bossk
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
45 replies
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
It had
once: true
45 replies
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
MY BAD!!!
45 replies
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
Now I'm having a really weird issue,
So I made file specifially to listen for a button click. This worked nicely when I had all the code in
index.js
Now it works ONCE, and then the interaction fails when clicked. Any obvious reason for this?45 replies
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
👍
45 replies
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
I added event handling.
My question now is, can I have 2 events in one file? I.e 2 different
module.exports
?
Doesn't seem to work for me. I tried having two events in one file but only one of them execute45 replies
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
Ahh!
45 replies
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
But how would I do the ready event in my other file since I can't access
client
45 replies
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
Thanks a ton for your help and everyone elses. Do you know of any examples of how above is done? I'm petty new, sorry ... : /
45 replies
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
So I would pass that client param to my second file?
45 replies
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
In my different file I want to do this:
45 replies
DIAdiscord.js - Imagine an app
•Created by Bossk on 8/21/2023 in #djs-questions
Use `client` in multiple files?
I realize that I need to read up more on the library, as I don't understand what you mean by "djs structure" xD
45 replies