diff --git a/commands/social/afk.js b/commands/social/afk.js index 923c2a8..f687e00 100644 --- a/commands/social/afk.js +++ b/commands/social/afk.js @@ -33,6 +33,8 @@ module.exports = { tu.statussetat = new Date(); let tempDate = new Date(); tu.statusclearat = tempDate.setHours(tempDate.getHours() + 12); + tu.markModified("statussetat"); + tu.markModified("statusclearat"); tu.save(); require('../../util/cachestatus')(message.author.id, tempDate.setHours(tempDate.getHours() + 12)); return message.reply(`I set your ${tu.statusclearmode === 'auto' ? 'automatically' : 'manually'}-clearing AFK message to: ${reason.trim()}`); diff --git a/commands/social/dnd.js b/commands/social/dnd.js index 53dbc0e..775ca6a 100644 --- a/commands/social/dnd.js +++ b/commands/social/dnd.js @@ -33,6 +33,8 @@ module.exports = { tu.statussetat = new Date(); let tempDate = new Date(); tu.statusclearat = tempDate.setHours(tempDate.getHours() + 12); + tu.markModified("statussetat"); + tu.markModified("statusclearat"); tu.save(); require('../../util/cachestatus')(message.author.id, tempDate.setHours(tempDate.getHours() + 12)); return message.reply(`I set your ${tu.statusclearmode === 'auto' ? 'automatically' : 'manually'}-clearing Do not Disturb message to: ${reason.trim()}`); diff --git a/util/mention.js b/util/mention.js index 959d2c6..d2d83b3 100644 --- a/util/mention.js +++ b/util/mention.js @@ -12,7 +12,7 @@ module.exports = async(message, msg, args, cmd, prefix, mention, client) => { if (tu && tu.statusmsg.length) { if (!client.misc.statusPings.has(message.guild.id)) {client.misc.statusPings.set(message.guild.id, new Discord.Collection());} client.misc.statusPings.get(message.guild.id).set(mention.id, new Date()); - let m = await message.channel.send(`That user ${tu.statustype === 'dnd' ? 'wishes not to be disturbed' : 'is AFK'}. Reason: ${tu.statusmsg}.${tu.statssetat ? ` \`(This status was set ${moment(tu.statussetat.getTime()).fromNow()})\`` : ''}`); + let m = await message.channel.send(`That user ${tu.statustype === 'dnd' ? 'wishes not to be disturbed' : 'is AFK'}. Reason: ${tu.statusmsg}.${tu.statussetat ? ` \`(This status was set ${moment(tu.statussetat.getTime()).fromNow()})\`` : ''}`); await require('../util/wait')(10000); m.delete().catch((e) => {console.log(e);}); //console.log(m);