Multiple manual tasks

Hello, I am trying to create multiple manual tasks, however the task does not execute. I don't know if I am doing anything wrong, but it just does not run like it should. The terminal says the task is created successfully but never runs after the delay.
No description
11 Replies
SylveonDev
SylveonDevOP5d ago
@Helpers :leafHiya:
Favna
Favna5d ago
Since you're using JavaScript as opposed to TypeScript I'm gonna go on a whim here and say that you probably have some kind of syntax error causing the file to not be loaded. The obvious advice is to very strongly recommend learning and switching to typescript as with any complex project like this you will shoot yourself in the foot sooner or later by not doing so. You can validate if it gets loaded by logging this.container.stores.get('scheduled-tasks').values() from any command. Some other unrelated notes - •catch ( (err) => { throw err; ); is completely useless. You're just rethrowing the exact same error. You can remove it entirely. - I strongly recommend you look into setting up a code formatter like prettier. Your code formatting is inconsistent at the moment. - Unless you're using @sapphire/eslint-config which still needs updating, you're using an ESLint version before v9 OR you're ESLint is not running / you're not running it. I can tell because you have an .eslintrc.json instead of eslint.config.js. Setup ESLint properly and install the ESLint vscode extension. As a matter of fact, ESLint can to a minor extend also detect syntax errors so it may even be able to confirm my suspicion above. - I would recommend you create a src folder and put all the JS files in there. Keep your root clean instead of cluttering it up - You have a tsconfig file but you don't use TS (yet, hopefully) - Adding to that, you could set it up with compiler options allowJs and checkJs and other required config and you'll at least get some basic syntax checking and possibly find the issue - I recommend switching away from nvm as your node version manager. It's a slow tool that famously has major bugs under zsh and other non bash shells and it also doesn't run natively under Windows. NodeJS these days themselves recommends using https://github.com/Schniz/fnm
SylveonDev
SylveonDevOP4d ago
I will check if it loaded later after work. As with switching to typescript I've been wanting to for so long now but the huge amount of files the bot has is a big demotivator. I don't use nvm, I installed nodejs raw from homebrew. I have nvm installed for old apps that run v14 but the current version is system.
Favna
Favna4d ago
I would start with the allowJs and checkJs then. That's a small step but it's at least something.
SylveonDev
SylveonDevOP4d ago
Yes, I did have that on at some point but I turned it off for some reason. I'll enable that later
Favna
Favna4d ago
Ah yeah now I remember. I knew your name rang a faint bell. I remarked a similar thing back in July 2024. You had sort of a similar problem back then but then it was that the README wasnt accurate https://discord.com/channels/737141877803057244/1267252607995609212
SylveonDev
SylveonDevOP4d ago
Hi, I checked it and it seems to have registered
No description
SylveonDev
SylveonDevOP4d ago
@Boomeravna :hmm:
Favna
Favna3d ago
I honestly don't know, sorry. I recommend you use a debugger to step through the code.
SylveonDev
SylveonDevOP3d ago
Alright @Favna I just realized something It it supposed to say circular instead of ManualTask?
Favna
Favna3d ago
not sure. never did figure out when it shows.

Did you find this page helpful?