You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
565 B
10 lines
565 B
const mongooes= require('mongoose');
|
|
const UserData = require('../models/user');
|
|
const GuildSettings = require('../models/guild');
|
|
|
|
module.exports = async(message, msg, args, cmd, prefix, mention, client) => {
|
|
let tu = await UserData.findOne({uid: mention.id});
|
|
let tg = message.guild ? await GuildSettings.findOne({gid: message.guild.id}) : null;
|
|
if (tg && tg.nostatus) {return;}
|
|
if (tu) {if (tu.statusmsg.length) {return message.reply(`That user ${tu.statustype === 'dnd' ? 'wishes not to be disturbed' : 'is AFK'}. Reason: ${tu.statusmsg}`);}}
|
|
}; |