From 82dd72267b96936800d8dbb61d481e2fe29239e3 Mon Sep 17 00:00:00 2001 From: TheBidouilleur Date: Wed, 15 Jul 2020 21:49:45 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'bot.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bot.py b/bot.py index 858b296..ceb75a4 100644 --- a/bot.py +++ b/bot.py @@ -16,20 +16,24 @@ async def on_message(message): if message.author == client.user: print("Ne pas repondre, auteur = bot") return + + # Exemple : si "happy birthday" est contenu dans le message = repondre if 'Happy birthday' in message.content.lower(): await message.channel.send('Happy Birthday!') - if message.content.startswith('!adrien'): - await message.channel.send('La prison, la prison cheh') + if message.content.startswith('!reaction'): + await message.channel.send('Je place une reaction sur le message auteur') + await message.add_reaction(':smile:662985629256122378') + if message.content.startswith('!relooking'): with open('../original.jpg', 'rb') as f: try: await client.user.edit(avatar=f.read()) - await message.channel.send('je suis la plus belle maintenant') + await message.channel.send('Je suis un bot magnifique') except discord.errors.HTTPException : - await message.channel.send('te chauffe pas, discord aime pas que tu changes d avatar aussi rapidement') + await message.channel.send('Discord vient de bloquer le changement d avatar') @client.event async def on_ready():