modular-bot-framework-for-t.../modules/module-v2-example/index.py

19 lines
374 B
Python

class Counter:
def __init__(self):
self.counter = 0
def call_count(self):
self.counter += 1
return self.counter
c = Counter()
def get_num():
return c.call_count()
def process(message, path):
if message.text == "!v2-testing":
return f"Testing successful - call number {get_num()}", None
else:
return None, None