diff --git a/bot.py b/bot.py index 765dc45e0ccb5d2e844c4d88089751f520bd3429..98d17c02f7c2206e0830ae7cc57f653697be37b3 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':