cmbot icon indicating copy to clipboard operation
cmbot copied to clipboard

/afk

Open ItsJakeo opened this issue 12 years ago • 2 comments

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

ItsJakeo avatar Nov 20 '12 22:11 ItsJakeo

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.

atomjack avatar Nov 20 '12 22:11 atomjack

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 :)

ItsJakeo avatar Nov 21 '12 15:11 ItsJakeo