Is there disnake cogs alternative in discord.js?

:3
20 Replies
d.js toolkit
d.js toolkit7mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
treble/luna
treble/luna7mo ago
elaborate
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Fluffy
FluffyOP7mo ago
No description
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Fluffy
FluffyOP7mo ago
i'm started using discord.js like week ago, but didn't found any information about disnake cog alternatives in d.js
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Fluffy
FluffyOP7mo ago
oh wait, that's my bad
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Fluffy
FluffyOP7mo ago
ohhh, sorry my bad my English is very bad and not only English 🧠
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Fluffy
FluffyOP7mo ago
soo... disnake cogs is like modules. just simple code separation, so you don't will gonna have 6k+ lines of code in one file
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Bruno
Bruno7mo ago
split the code into separate files
Samtino
Samtino7mo ago
from what i see on the disnake docs (i dont use python, thus ive never used cogs before)...it just seems like some python-ism you can definetly replicate your own version of this. the first example of a "cog" is a welcome message. DJS has a similar event system so you can do the same thing as in the cog with a client.on("guildMemberAdd", (member) => {}) but the process for doing so is up to you, rather than built into DJS for the most part, DJS is just the tools to do things. actual command and/or file structure is up to you
Fluffy
FluffyOP7mo ago
Thank you, but cogs is method of code organization
Unknown User
Unknown User7mo ago
Message Not Public
Sign In & Join Server To View
Fluffy
FluffyOP7mo ago
I should explain that in first message of the post
Samtino
Samtino7mo ago
ya, no, no such things as cogs exists in DJS. as i said, the file structure and organization is up to you
Fluffy
FluffyOP7mo ago
okey, thank you everyone for helping me and sorry for my stupid brain :3

Did you find this page helpful?