Apprenez à utiliser les converters | Devenez un expert de discord.py V2 Partie 3.5

Поділитися
Вставка

КОМЕНТАРІ • 3

  • @KarlRollet
    @KarlRollet Рік тому

    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

    • @KarlRollet
      @KarlRollet Рік тому

      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))

    • @codeavecdave
      @codeavecdave  Рік тому

      stackoverflow.com/questions/49837578/on-message-and-bot-command-issue