disconce.py在创建通道时不发送消息


@bot.event
async def on_channel_create(channel):
if channel.name.startswith('ticket'):
#send an embed in the channel
await channel.send(embed=discord.Embed(title='Ticket Created', description='Thank you for creating a ticket.', color=0x00ff00))
print('[$] Ticket Created at ' + channel.name)

我的代码应该在制作票证时发送嵌入和日志,但机器人无法识别何时创建通道(以"票证"开头(。

没有on_channel_create事件。您正在查找on_guild_channel_create

最新更新