I'm trying to catch // this line
, but I can't seem to find where to put the catch to correctly catch it.
mutedList.forEach((i) => {
if (i.mutedEnd*1000 < new Date()){
console.log(i)
db.collection('muted').doc(i.userID).get().then((q) => {
db.collection('muted').doc(i.userID).update({
stillMuted: false
}).then(
bot.guilds.get(i.guildID).members.get(i.userID).removeRole(i.mutedRole) // this line | here
).catch((err) => {
bot.createMessage('717822384198910042',{ embed: {
title: 'ERROR',
description: '```js\n'+err.stack+'\n```',
color: hex
}});
})}
)}
})
I've tried where it is currently, and where I put a HERE