ubot2/doc/example-plugins/repeat.py
Jeff Ammons c81bdfec99 Fix unicode error in py2.7 for example plugin
Strings should now be passed to the plugins as unicode values in py2.7
so we have to make sure that we don't convert those into ascii by using
python str instead of u'' strings.
2016-06-05 13:49:00 -07:00

12 lines
342 B
Python

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