bots/whisperbot.xbotlib/whisperbot.py

22 lines
715 B
Python
Raw Normal View History

2021-02-03 09:55:26 +01:00
from xbotlib import Bot
class WhisperBot(Bot):
"""Anonymous whispering in group chats.
In order to activate this bot you can invite it to your group chat. Once
invited, you can start a private chat with the bot and tell it you want it
to whisper your message into the group chat. The bot will then do this on
your behalf and not reveal your identity. This is nice when you want to
communicate with the group anonymously.
"""
help = "I whisper private messages into group chats 😌️"
def direct(self, message):
"""Receive private messages and whisper them into group chats."""
self.reply(f"*pssttt...* {message.content}", room=message.room)
WhisperBot()