working bot with example plugins
This commit is contained in:
parent
7a5480f1a5
commit
f7d7db682b
5 changed files with 138 additions and 0 deletions
9
plugins/example/counter.py
Normal file
9
plugins/example/counter.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
import time
|
||||
crontable = []
|
||||
outputs = []
|
||||
|
||||
#crontable.append([.5,"add_number"])
|
||||
crontable.append([5,"say_time"])
|
||||
|
||||
def say_time():
|
||||
outputs.append(["D030GJLM2", time.time()])
|
9
plugins/example/repeat.py
Normal file
9
plugins/example/repeat.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
import time
|
||||
crontable = []
|
||||
outputs = []
|
||||
|
||||
def process_message(data):
|
||||
print data
|
||||
if data['channel'].startswith("D"):
|
||||
outputs.append([data['channel'], "from repeat1: " + data['text']])
|
||||
|
9
plugins/example/repeat2.py
Normal file
9
plugins/example/repeat2.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
import time
|
||||
crontable = []
|
||||
outputs = []
|
||||
|
||||
def process_message(data):
|
||||
print data
|
||||
if data['channel'].startswith("D"):
|
||||
outputs.append([data['channel'], "from repeat2: " + data['text']])
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue