mirror of
https://github.com/nichkara/InfinitumBotty.git
synced 2026-06-11 14:41:58 +02:00
made glossary is only asked for when .? is at the beginning of the message
This commit is contained in:
@@ -25,11 +25,11 @@ class GlossaryModule(PrivMsgObserverPrototype):
|
|||||||
|
|
||||||
def update_on_priv_msg(self, data, connection: Connection):
|
def update_on_priv_msg(self, data, connection: Connection):
|
||||||
msg = data['message']
|
msg = data['message']
|
||||||
if not -1 == msg.find(GlossaryModule._REMOVE_EXPLANATION):
|
if msg.startswith(GlossaryModule._REMOVE_EXPLANATION):
|
||||||
self._remove_query(data, connection)
|
self._remove_query(data, connection)
|
||||||
elif not -1 == msg.find(GlossaryModule._ADD_EXPLANATION):
|
elif msg.startswith(GlossaryModule._ADD_EXPLANATION):
|
||||||
self._add_query(data, connection)
|
self._add_query(data, connection)
|
||||||
elif not -1 == msg.find(GlossaryModule._QUERY_EXPLANATION):
|
elif msg.startswith(GlossaryModule._QUERY_EXPLANATION):
|
||||||
self._answer_query(data, connection)
|
self._answer_query(data, connection)
|
||||||
|
|
||||||
def _answer_query(self, data, connection: Connection):
|
def _answer_query(self, data, connection: Connection):
|
||||||
|
|||||||
@@ -25,3 +25,11 @@ Yana ; TEST
|
|||||||
Neuling78 ; GURKENESSIG
|
Neuling78 ; GURKENESSIG
|
||||||
Yana ; TEST
|
Yana ; TEST
|
||||||
Yana ; TEST
|
Yana ; TEST
|
||||||
|
baerbel ; TEST
|
||||||
|
TommyRainbow ; BLA
|
||||||
|
TommyRainbow ; BLA
|
||||||
|
TommyRainbow ; X
|
||||||
|
baerbel ; GITTERPOMMES
|
||||||
|
baerbel ; NASE
|
||||||
|
TommyRainbow ; TEST
|
||||||
|
TommyRainbow ; LALALALALALA
|
||||||
|
|||||||
Reference in New Issue
Block a user