MrAugu / simple-discordjs-dashboard

Simplest discord bot dashboard in NodeJS.
MIT License
247 stars 97 forks source link

Update dashboard.js #17

Closed Myst82015 closed 4 years ago

Myst82015 commented 4 years ago

Changes accordingly to the Issue of m0ri-wk Link: https://github.com/MrAugu/simple-discordjs-dashboard/issues/16

Changes in Line 147 and 170:

const member = guild.members.cache.get(req.user.id);

to:

const member = await guild.members.fetch(req.user.id);

Myst82015 commented 4 years ago

Nevermind I tested it with : const member = guild.members.cache.get(req.user.id); it works perfectly fine..........

m0ri-wk commented 4 years ago

The reason for that change is it doesn't alway work due to the changes discord made recently. Somethings it will fail to get the cached result.