par exemple si je met c'est deux truc ensemble ca marche pas mais si j'en retire un sa marche: @bot.event async def on_message(message : discord.Message): if message.author.bot == True: return if "bonjour" in message.content or "salut" in message.content: await message.channel.send("bonjour") @bot.command() async def add(ctx, a : int, b : int): print("La fonction add est appelée avec les arguments a =", a, "et b =", b) await ctx.send(str(a + b))
bonjour petit probleme, je ne comprend pas pk quand j'utilse les @bot.command() plusieurs vois ca marche pas et quand j'en laisse que une ca marche
par exemple si je met c'est deux truc ensemble ca marche pas mais si j'en retire un sa marche:
@bot.event
async def on_message(message : discord.Message):
if message.author.bot == True:
return
if "bonjour" in message.content or "salut" in message.content:
await message.channel.send("bonjour")
@bot.command()
async def add(ctx, a : int, b : int):
print("La fonction add est appelée avec les arguments a =", a, "et b =", b)
await ctx.send(str(a + b))
stackoverflow.com/questions/49837578/on-message-and-bot-command-issue