Bonjour à tous,
Je me suis mis à la programmation d'un bot Discord en python (le confinement toussa toussa).
import discord
from discord.ext import commands
TOKEN = TOP SECRET
descriptionbot = "Bonjour, c'est moi le bot aux gants blancs"
prefixe = "§"
bot = commands.Bot(command_prefix=prefixe, description=descriptionbot)
@bot.event
async def on_ready():
print("Bot en ligne !!!")
return
@bot.command()
async def jour(ctx):
await ctx.send("nuit")
return
@bot.command()
async def nuit(ctx):
await ctx.send("jour")
return
bot.run(TOKEN)
Mon programme fonctionne mais quand sur discord j'écris :
§nuit
Mon bot me renvoie
jour
jour
jour
Et pareil si j'écris §jour, le bot répond par :
nuit
nuit
nuit
nuit
Est-ce que quelqu'un sait pourquoi ?