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

userlist

parent 5d7374f9
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -28,7 +28,7 @@ class Bot(Client): ...@@ -28,7 +28,7 @@ class Bot(Client):
to_send = self.tests(message_object.text, thread_id=thread_id, thread_type=thread_type, author_id=author_id, channel=self.fetchThreadInfo(thread_id)[thread_id].name) to_send = self.tests(message_object.text, thread_id=thread_id, thread_type=thread_type, author_id=author_id, channel=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(to_send), thread_id=thread_id, thread_type=thread_type)
self.trigger_double_mots(message_object.text, thread_id, thread_type) self.trigger_double_mots(message_object.text, thread_id, thread_type)
self.shitpostbot5000() self.shitpostbot5000()
...@@ -116,6 +116,9 @@ class Bot(Client): ...@@ -116,6 +116,9 @@ class Bot(Client):
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...'])
elif texte == '!userlist':
return "la liste des gens dans le groupe :\n\n" "".join([user.name for user in self.fetchAllUsersFromThreads([self.fetchThreadInfo(thread_id)[thread_id]])])
# réinviter le dernier mec kické du group # réinviter le dernier mec kické du group
elif texte == '!reinvite': elif texte == '!reinvite':
if 'thread_id' in Bot.kicked: if 'thread_id' in Bot.kicked:
...@@ -160,7 +163,7 @@ class Bot(Client): ...@@ -160,7 +163,7 @@ class Bot(Client):
else: else:
self.sendLocalImage(useless.Shitpostbot5000.random(texte), thread_id=thread_id, thread_type=thread_type) self.sendLocalImage(useless.Shitpostbot5000.random(texte), thread_id=thread_id, thread_type=thread_type)
# pour rigoler # générateur de memes
elif any(words in texte for words in ['!memes templates', '!memes help', '!help memes']): elif any(words in texte for words in ['!memes templates', '!memes help', '!help memes']):
return useless.Memes.get_templates() return useless.Memes.get_templates()
elif '!memes ' in texte: elif '!memes ' in texte:
......
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