如何在 discord.py 中嵌入某个频道的用户加入?

时间:2021-01-06 01:45:32

标签: python discord.py

我正在考虑构建自己的机器人,我想知道如何制作一个嵌入内容,每次用户加入服务器时都会发送到特定频道。

1 个答案:

答案 0 :(得分:1)

您需要某种类型的事件,以及您想要发送的嵌入。

这涵盖了这些基础:

@bot.event
async def on_member_join(member):
    channel = bot.get_channel(CHANNEL_ID_HERE)
    embed = discord.Embed(title=..., description=..., colour=...)
    await channel.send(embed=embed)

参考:

相关问题