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

maps marche, corrections quizz, et autre fixes

parent f280b90f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -69,6 +69,8 @@ class Bot(Client): ...@@ -69,6 +69,8 @@ class Bot(Client):
return useless.genererSujet() return useless.genererSujet()
if texte == '!haddock': if texte == '!haddock':
return useless.haddock() return useless.haddock()
# renomer qqn
if '!rename' in texte: if '!rename' in texte:
texte = texte.replace('!rename ', '').split(';') texte = texte.replace('!rename ', '').split(';')
for user in self.fetchAllUsersFromThreads([thread_id]): for user in self.fetchAllUsersFromThreads([thread_id]):
...@@ -76,6 +78,8 @@ class Bot(Client): ...@@ -76,6 +78,8 @@ class Bot(Client):
self.changeNickname(nickname=texte[1], user_id=user.uid, thread_id=thread_id, thread_type=thread_type) self.changeNickname(nickname=texte[1], user_id=user.uid, thread_id=thread_id, thread_type=thread_type)
else: else:
return random.choice(['T\'es sur de ton coup là ?', 'chais pas qui c\'est...']) 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): if any(word.lower() in texte.lower() for word in Bot.what_liste):
return random.choice(Bot.what_liste) return random.choice(Bot.what_liste)
if '!memes ' in texte: if '!memes ' in texte:
...@@ -85,8 +89,8 @@ class Bot(Client): ...@@ -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 "]): if any(word.lower() in texte.lower() for word in ["let\'s go", "c'est parti", "go ", "allons "]):
return 'é zé bardi !' return 'é zé bardi !'
if any(word.lower() in texte.lower() for word in ['noice ', 'nice ', 'ok']): 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(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(emoji_size=EmojiSize.LARGE), thread_id=thread_id, thread_type=thread_type)
if '!kohlanta' in texte: if '!kohlanta' in texte:
texte = texte.replace('!kohlanta ', '') texte = texte.replace('!kohlanta ', '')
return useless.kohlanta(texte, channel) return useless.kohlanta(texte, channel)
...@@ -112,14 +116,14 @@ class Bot(Client): ...@@ -112,14 +116,14 @@ class Bot(Client):
return quizz.scoreboard() return quizz.scoreboard()
if 'reset' in texte: if 'reset' in texte:
return quizz.reset() return quizz.reset()
if 'indice' in quizz: if 'indice' in texte:
return quizz.indice() return quizz.indice()
if 'round' in texte: if 'round' in texte:
return quizz.get_round() return quizz.get_round()
if 'question' in texte: if 'question' in texte:
return quizz.get_question() return quizz.get_question()
if '!q ' in texte: 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 # meteo
if '!meteo' in texte: if '!meteo' in texte:
...@@ -141,7 +145,7 @@ class Bot(Client): ...@@ -141,7 +145,7 @@ class Bot(Client):
return 'Ousp, j\'ai glissé chef...' return 'Ousp, j\'ai glissé chef...'
if '!maps' in texte: if '!maps' in texte:
try: try:
usefull.maps(texte.replace('!maps ', '')) return usefull.maps(texte.replace('!maps ', ''))
except: except:
return 'Houston, on a un problème...' return 'Houston, on a un problème...'
if texte == '!about': if texte == '!about':
......
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