cmbot
cmbot copied to clipboard
/afk
Just wondering if there is a way to make the bot respond with "this user is marked away at the moment" or something when your name is tagged (@) after you mark yourself /afk. Like an away messeage per se. Its something I wanted to do with my original bot but never really got to it. Thanks
Sure, each user has an 'afk' property (ie options.cmbot.users[userid].afk). You could write a module that hooks into the onSpeak event, and have it look for @username's (using a regular expression), and then check those users (since you can tag more than one user at a time) to see if any of them are afk (ie, that above .afk property is true), and then speak (options.cmbot.bot.speak('so and so is afk');) or whatever.
Cool, I'll try it out but I'm not too familiar with your bot and the code. So if you get the time and want to do this up, I would appreciate it. I just need to study your code a bit :)