Update main.py

This commit is contained in:
Marsisus 2024-11-08 11:33:23 +01:00 committed by GitHub
parent a1ef0184df
commit 89fea91e81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -13,6 +13,8 @@ bot = discord.Client( intents=intents)
tree = app_commands.CommandTree(bot)
exclusions = ["dire", "dis", "disons", "dites", "dîtes", "dit"]
load_dotenv()
# Événement lorsque le bot est prêt
@bot.event
@ -29,13 +31,14 @@ async def on_ready():
# réagir a un message
@bot.event
async def on_message(message):
#if message.author == bot.user:
#return
if message.author == bot.user:
return
if "quoi" in message.content[-10:].lower():
await message.channel.send(f"quoicoubeh {message.author.mention} !")
if "j'aime" in message.content.lower()[:6]:
await message.author.edit(nick=f'{message.content[6:]}')
if "dis" in message.content.lower():
return;
for i in range(len(message.content.split())):
if len(message.content.split()[i]) < 4:
continue