diff --git a/bot.py b/bot.py index a0cd194b717d7da3675fac1b1110ba2cd474caed..5db21b0af3c424e785fc5f1504c89117780ce86b 100755 --- a/bot.py +++ b/bot.py @@ -19,6 +19,9 @@ class Bot(Client): log.info("{} from {} in {}".format(message_object, thread_id, thread_type.name)) + if 'Ah' in message_object.text: + self.sendLocalImage('images/ah.png', thread_id=thread_id, thread_type=thread_type) + to_send = Bot.tests(message_object.text, self.fetchThreadInfo(thread_id)[thread_id].name) if (author_id != self.uid or 'BOT :' not in message_object.text) and to_send is not None: self.send(Message('BOT :' + to_send), thread_id=thread_id, thread_type=thread_type) @@ -52,7 +55,7 @@ class Bot(Client): return useless.genererSujet() if texte == '!haddock': return useless.haddock() - if texte == '!kohlanta': + if '!kohlanta' in texte: texte = texte.replace('!kohlanta ', '') return useless.kohlanta(texte, channel) if texte == '!pipo': diff --git a/images/ah.png b/images/ah.png new file mode 100644 index 0000000000000000000000000000000000000000..e2147f8b9f7131a1191112bddf48bff5adcd075b Binary files /dev/null and b/images/ah.png differ