tests/mention_plugin/mention.py
raw| 1 | from errbot import BotPlugin |
| 2 | |
| 3 | |
| 4 | class MentionTestPlugin(BotPlugin): |
| 5 | def callback_mention(self, msg, people): |
| 6 | if self.bot_identifier in people: |
| 7 | self.send(msg.frm, "Somebody mentioned me!", msg) |
| 8 | return |
| 9 | self.send( |
| 10 | msg.frm, "Somebody mentioned %s!" % ",".join(p.person for p in people), msg |
| 11 | ) |