| @@ -16,20 +16,24 @@ async def on_message(message): | |||||
| if message.author == client.user: | if message.author == client.user: | ||||
| print("Ne pas repondre, auteur = bot") | print("Ne pas repondre, auteur = bot") | ||||
| return | return | ||||
| # Exemple : si "happy birthday" est contenu dans le message = repondre | # Exemple : si "happy birthday" est contenu dans le message = repondre | ||||
| if 'Happy birthday' in message.content.lower(): | if 'Happy birthday' in message.content.lower(): | ||||
| await message.channel.send('Happy Birthday!') | 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'): | if message.content.startswith('!relooking'): | ||||
| with open('../original.jpg', 'rb') as f: | with open('../original.jpg', 'rb') as f: | ||||
| try: | try: | ||||
| await client.user.edit(avatar=f.read()) | 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 : | 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 | @client.event | ||||
| async def on_ready(): | async def on_ready(): | ||||