MV How to call a custom js file

Hello guys!
We have a script code that we managed to work copypasteing it into a "script", putting the code raw in the game. Then we are trying putting that same code inside a js file, then we added the js file in the plugins. But we don't know how to call that. We tried "Plugin command" and put the filename, but it doesn't work.

Thanks!
Solved! If anyone needs, here the solution:
We put "var dialogosAleatorios = function () {" at the start, then we called it like a function in the script.
Did you call the function dialogosAleatorios as an object of the js file, as for example "jsfilename.dialogosAleatorios()"? Is the jsfilename you call the same name?

Original thread: https://forums.rpgmakerweb.com/threads/how-to-call-a-custom-js-file.136935/