How to change this program

index.js is the main file, loader.js is the file that loads guild commands

Hey, @Residual2023528 welcome to the forums!

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:

1 Like

The problem is that your loadCommands function is not exported. You can either add the word export before the const declaring the function. Or you can add an export statement at the end of the file. For this it will be in the format of

export <item(s) to export>

So in this case it would be

export loadCommands

So can I ask you about this? I don’t even know where the error is.

I think its because the secret that is holding your discord token is named something other than token. Also remember it is case sensitive

Thank you, I already know where I went wrong xd, the robot can go online normally

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.