Answer the question
In order to leave comments, you need to log in
How to call a function from one JS file in another?
I'm making a discord bot (well, how I do it... I'm trying), and when creating commands, they began to clutter up the on-line file with the code, there were a lot of commands. And accordingly, I decided that it is possible to place each command in a separate file, and then call them from the main one as a function for example (from C # experience). But in Google, on this matter, information is only about web pages, and I need to activate the code in another file from the main file so that it does its job, send a message, for example.
Maybe this is a difficult question, or even more like an order for a freelancer, but if it’s not difficult for you, tell me how to do it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question