'Cannot read properties of undefined (reading 'get') and ensure
So I have this problem when working on old project here's the code for the get and ensure one, I'm using djs 13 currently
client.Jobremind = new CronJob("*/5 * * * * *", async function(){
let data = client.afkDB.get("REMIND")
if(!data) {
client.afkDB.ensure("REMIND", {
REMIND: []
});
data = [];
}
var reminds_now = data.REMIND.filter(v=>{
return v.time - (Date.now() - v.timestamp) <= 0
})
picture below the code is the error
Appreciate those who can help and thanks for your time for reading this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

