Update MathRunObserver.py

Commands should be all lower case
Extended help message
This commit is contained in:
ThomasWeis
2022-04-28 11:35:28 +02:00
parent 439a2c4104
commit 833a8a9167

View File

@@ -6,11 +6,11 @@ from time import sleep
class MathRunObserver(PrivMsgObserverPrototype): class MathRunObserver(PrivMsgObserverPrototype):
@staticmethod @staticmethod
def cmd(): def cmd():
return ['.s', '.startMath', '.stopMath'] return ['.s', '.startmath', '.stopmath']
@staticmethod @staticmethod
def help(): def help():
return 'startMath startet eine Reihe von Aufgaben. StopMath beendet sie.' return '.startmath startet eine Reihe von Aufgaben. .stopmath beendet sie. Lösungen mit ".s Lösung" eingeben.'
def __init__(self): def __init__(self):
super().__init__() super().__init__()
@@ -23,7 +23,7 @@ class MathRunObserver(PrivMsgObserverPrototype):
def update_on_priv_msg(self, data, connection: Connection): def update_on_priv_msg(self, data, connection: Connection):
if data['message'].find('.s ') != -1 : if data['message'].find('.s ') != -1 :
self.solution(data, connection) self.solution(data, connection)
if data['message'].find('.startMath') != -1: if data['message'].find('.startmath') != -1:
self.start_math(data, connection) self.start_math(data, connection)
def solution(self, data, connection): def solution(self, data, connection):