From 6dcad7fe3ded98c09d8126365a969c1e27e671fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Wikle=20DUBARD?= <loic97429@gmail.com> Date: Mon, 19 Aug 2019 17:10:53 +0200 Subject: [PATCH] maps marche, corrections quizz, et autre fixes --- bot.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/bot.py b/bot.py index 765dc45..98d17c0 100755 --- a/bot.py +++ b/bot.py @@ -69,6 +69,8 @@ class Bot(Client): return useless.genererSujet() if texte == '!haddock': return useless.haddock() + + # renomer qqn if '!rename' in texte: texte = texte.replace('!rename ', '').split(';') for user in self.fetchAllUsersFromThreads([thread_id]): @@ -76,6 +78,8 @@ class Bot(Client): self.changeNickname(nickname=texte[1], user_id=user.uid, thread_id=thread_id, thread_type=thread_type) else: return random.choice(['T\'es sur de ton coup là ?', 'chais pas qui c\'est...']) + + # pour rigoler if any(word.lower() in texte.lower() for word in Bot.what_liste): return random.choice(Bot.what_liste) if '!memes ' in texte: @@ -85,8 +89,8 @@ class Bot(Client): if any(word.lower() in texte.lower() for word in ["let\'s go", "c'est parti", "go ", "allons "]): return 'é zé bardi !' if any(word.lower() in texte.lower() for word in ['noice ', 'nice ', 'ok']): - # self.send(Message(text="👍", emoji_size=EmojiSize.LARGE), thread_id=thread_id, thread_type=thread_type) - self.send(Message(emoji_size=EmojiSize.LARGE), thread_id=thread_id, thread_type=thread_type) + self.send(Message(text="👍", emoji_size=EmojiSize.LARGE), thread_id=thread_id, thread_type=thread_type) + # self.send(Message(emoji_size=EmojiSize.LARGE), thread_id=thread_id, thread_type=thread_type) if '!kohlanta' in texte: texte = texte.replace('!kohlanta ', '') return useless.kohlanta(texte, channel) @@ -112,14 +116,14 @@ class Bot(Client): return quizz.scoreboard() if 'reset' in texte: return quizz.reset() - if 'indice' in quizz: + if 'indice' in texte: return quizz.indice() if 'round' in texte: return quizz.get_round() if 'question' in texte: return quizz.get_question() if '!q ' in texte: - return quizz.answer(text.replace('!q ', ''), self.fetchUserInfo(author_id)[author_id].name) + return quizz.answer(texte.replace('!q ', ''), self.fetchUserInfo(author_id)[author_id].name) # meteo if '!meteo' in texte: @@ -141,7 +145,7 @@ class Bot(Client): return 'Ousp, j\'ai glissé chef...' if '!maps' in texte: try: - usefull.maps(texte.replace('!maps ', '')) + return usefull.maps(texte.replace('!maps ', '')) except: return 'Houston, on a un problème...' if texte == '!about': -- GitLab