【发布时间】:2021-10-19 21:12:42
【问题描述】:
所以我有这个是为了给新成员写一个欢迎信息。
@bot.event
async def on_member_join(member):
channel = bot.get_channel('channel_id')
await channel.send("insert message")
这适用于机器人吗?如果加入的人是真实用户,这会起作用吗?
【问题讨论】:
-
从文档看来,
Member包括机器人和用户以及许多其他内容,请参阅:discordpy.readthedocs.io/en/stable/api.html#discord.Member
标签: python discord.py