ubot2/doc/example-plugins/repeat.py

13 lines
342 B
Python
Raw Normal View History

from __future__ import unicode_literals
# don't convert to ascii in py2.7 when creating string to return
2014-11-17 21:22:37 -08:00
crontable = []
outputs = []
2014-11-17 21:22:37 -08:00
def process_message(data):
if data['channel'].startswith("D"):
outputs.append([data['channel'], "from repeat1 \"{}\" in channel {}".format(
data['text'], data['channel'])]
)