Alzalia
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 8/11/2023 in #djs-questions
Edit a database when mute/warn is over
Oh ok, my bad đ
Have a nice day, and sorry for the mistake ^^
11 replies
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 8/11/2023 in #djs-questions
Edit a database when mute/warn is over
Okay I'm so sorry to bother you again, but I- I don't understand why that part doesn't work. Basically I try to access my database, well, to analyse it. Except it just... doesn't seem to know it's existence. What I don't understand is that it is used in my first warn/mute command and there is no problem at all, but here it just doesn't want to.
My code :
The error I get :
I declared Sanctions globally with
global.Sanctions = ...
but what I really don't understand is why would it work with my warn/mute command file but not this one ?11 replies
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 8/11/2023 in #djs-questions
Edit a database when mute/warn is over
okay perfect then, I will make that, thank you very much !
11 replies
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 8/11/2023 in #djs-questions
Edit a database when mute/warn is over
oooh, true true. Is it async ? (I don't have the right word I think but like, if I have two that will end before the end can I make two setTimeout or do I need to make them in order from nearest to furthest ?)
11 replies
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 8/11/2023 in #djs-questions
Edit a database when mute/warn is over
yes but the bigger interval the least precise the durations. If I do it every 5 minutes for example, first on at t0. I mute someone for 5min at t1. When the test happens at t5, there is still 1 minute to go. So it passes. But then, 1 min later... nothing, you need to wait t10 for the next message. Which, I mean, can be okay, but it would be best to have it precisely set...
But if you tell me there is no easy other way then nevermind I'll do it that way (thus a cronjob would be the easiest right ?)
11 replies
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 8/11/2023 in #djs-questions
Edit a database when mute/warn is over
(Unless I didn't understand what you meant, I'm quite new with javascript, and thus discord.js and node.js)
11 replies
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 8/11/2023 in #djs-questions
Edit a database when mute/warn is over
But that would need to analyse the database at least every minute wouldn't it ? Which would be quite resourceful ?
11 replies
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 8/11/2023 in #djs-questions
Edit a database when mute/warn is over
Discord.js is 14.12.1
Node.js is 18.13.0
11 replies
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 8/11/2023 in #djs-questions
Edit a database when mute/warn is over
So far, I've tried this (emitter file):
And the receiver file :
So I just... don't know what's wrong, or what can I do. There is no error message. The database isn't changed neither, so I guess it just never receives the event ? Thank you for your help, if there is any easier way (if this is even a way)...
11 replies
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 7/25/2023 in #djs-questions
Error after following the cooldown guide
well apparently not, thank you, how did I miss that ;-;
6 replies
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 7/25/2023 in #djs-questions
Error after following the cooldown guide
Do you mean in each individual command file ?
6 replies
DIAdiscord.js - Imagine an app
âąCreated by Alzalia on 7/24/2023 in #djs-questions
Keep the bot online
Okay, thank you very much ^^
4 replies