2023-05-03 21:08:01 +03:00
|
|
|
class Counter:
|
|
|
|
def __init__(self):
|
|
|
|
self.counter = 0
|
|
|
|
|
|
|
|
def call_count(self):
|
|
|
|
self.counter += 1
|
2023-05-03 21:47:33 +03:00
|
|
|
return self.counter
|
2023-05-03 21:08:01 +03:00
|
|
|
|
|
|
|
c = Counter()
|
|
|
|
|
|
|
|
def get_num():
|
|
|
|
return c.call_count()
|
|
|
|
|
|
|
|
def process(message, path):
|
|
|
|
if message.text == "!v2-testing":
|
2023-05-03 21:47:33 +03:00
|
|
|
return f"Testing successful - call number {get_num()}"
|