|
@@ -132,18 +132,21 @@ class MUCBot(sleekxmpp.ClientXMPP):
|
|
|
# self.send_msg(self, msg, ":), %s." % msg['mucnick'])
|
|
|
self.send_msg(f, ':) {0}.'.format(msg['mucnick']))
|
|
|
|
|
|
+ # if 'bip' in msg['body']
|
|
|
+ # TODO: bip
|
|
|
+
|
|
|
if '?' in msg['body']:
|
|
|
- if 'who are you' in msg['body']:
|
|
|
- self.send_msg(f, "I am the chatbot from De La Convivialité des Espaces Discrets")
|
|
|
- self.send_msg(f, "check this http://convivialite-espaces-discrets.net ;)")
|
|
|
+ if 'qui es-tu' in msg['body']:
|
|
|
+ self.send_msg(f, "Je suis cedbot, le chatbot qui vie dans l'espance transitionel de la convivialité des espaces discrets")
|
|
|
+ self.send_msg(f, "plus d'infos : http://convivialite-espaces-discrets.net ;)")
|
|
|
else:
|
|
|
self.send_msg(f, "humm ...")
|
|
|
- self.send_msg(f, "it seems that you asked me a question")
|
|
|
- self.send_msg(f, "but i'm not able to understand it ... yet :/")
|
|
|
- self.send_msg(f, "I'm just a bot after all")
|
|
|
- self.send_msg(f, "but I'll try to learn how to answer you")
|
|
|
- self.send_msg(f, "please come back later")
|
|
|
- self.send_msg(f, "i'll tell you when i'm ready :)")
|
|
|
+ self.send_msg(f, "J'ai l'impression que vous m'avez posé une question")
|
|
|
+ self.send_msg(f, "mais je ne suis pas (encore) capable d'y répondre ... :/")
|
|
|
+ self.send_msg(f, "Je ne suis qu'un bot après tout ¯\_(ツ)_/¯")
|
|
|
+ self.send_msg(f, "mais je vais essayer d'en apprendre plus pour pouvoir vous répondre")
|
|
|
+ self.send_msg(f, "revenez plus tard avec la même question")
|
|
|
+ # self.send_msg(f, "i'll tell you when i'm ready :)")
|
|
|
self.learn(msg['body'], msg['mucnick'])
|
|
|
|
|
|
def muc_online(self, presence):
|
|
@@ -161,7 +164,7 @@ class MUCBot(sleekxmpp.ClientXMPP):
|
|
|
if presence['muc']['nick'] != self.nick:
|
|
|
f = presence['from'].bare
|
|
|
print('------ from : %s' % f)
|
|
|
- self.send_msg(f, 'Hello {0}'.format(presence['muc']['nick']))
|
|
|
+ self.send_msg(f, 'Salut {0}'.format(presence['muc']['nick']))
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|