This commit is contained in:
Adrien Bourmault 2022-02-04 22:26:00 +01:00
parent 4136a25f08
commit 4bf2e16038
No known key found for this signature in database
GPG Key ID: 6EB408FE0ACEC664
1 changed files with 9 additions and 0 deletions

View File

@ -6,6 +6,8 @@ from argparse import ArgumentParser
import slixmpp
from hintTables import wordtable
class MUCBot(slixmpp.ClientXMPP):
@ -86,6 +88,13 @@ class MUCBot(slixmpp.ClientXMPP):
for stanza objects and the Message stanza to see
how it may be used.
"""
for hint in wordtable:
if hint in msg['body']:
self.send_message(mto=msg['from'].bare,
mbody="%s, ça a l'air d'être une commande... mais je ne l'ai pas saisie." % msg['mucnick'],
mtype='groupchat')
if msg['mucnick'] != self.nick and self.nick in msg['body']:
self.send_message(mto=msg['from'].bare,
mbody="%s, je n'ai pas compris (je suis un peu bête) mais j'ai bien lu!" % msg['mucnick'],