Code: Select all
on_ready()
Hier ist mein Code:
Code: Select all
import discord
import nest_asyncio
bot_token = "duck" # My token
channel_id = 42 # My channel id
bot = discord.ext.commands.Bot(command_prefix="/",
intents = discord.Intents.default())
@bot.event
async def on_ready():
print('Le haircut checker est connecté !')
channel = bot.get_channel(channel_id)
await channel.send('Le haircut checker est connecté !')
@bot.command(pass_context=True)
async def infos_bot(ctx):
await ctx.send("""Blablabla""")
nest_asyncio.apply() # Don't know why but it debugs the code
bot.run(bot_token)