Skip to content
Extraits de code Groupes Projets
Valider 56396ad9 rédigé par Loïc Wikle DUBARD's avatar Loïc Wikle DUBARD
Parcourir les fichiers

ah.png + kohlanta correction

parent 722512dc
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -19,6 +19,9 @@ class Bot(Client): ...@@ -19,6 +19,9 @@ class Bot(Client):
log.info("{} from {} in {}".format(message_object, thread_id, thread_type.name)) 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) 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: 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) self.send(Message('BOT :' + to_send), thread_id=thread_id, thread_type=thread_type)
...@@ -52,7 +55,7 @@ class Bot(Client): ...@@ -52,7 +55,7 @@ class Bot(Client):
return useless.genererSujet() return useless.genererSujet()
if texte == '!haddock': if texte == '!haddock':
return useless.haddock() return useless.haddock()
if texte == '!kohlanta': if '!kohlanta' in texte:
texte = texte.replace('!kohlanta ', '') texte = texte.replace('!kohlanta ', '')
return useless.kohlanta(texte, channel) return useless.kohlanta(texte, channel)
if texte == '!pipo': if texte == '!pipo':
......
images/ah.png

72,6 ko

0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter