【发布时间】:2020-11-09 21:30:12
【问题描述】:
我现在正在使用 discord py 模块,它工作正常,但我希望我的机器人像 mee6 一样在服务器中问候用户
【问题讨论】:
-
欢迎来到 SO。请带上SO tour 并查看how to ask a good question 和minimal reproducible example。
标签: python discord.py
我现在正在使用 discord py 模块,它工作正常,但我希望我的机器人像 mee6 一样在服务器中问候用户
【问题讨论】:
标签: python discord.py
您可以这样使用 on_member_join 事件。
@client.event
async def on_member_join(member):
channel = client.get_channel(CHANNEL_ID)
await channel.send("Welcome to {} {}!".format(member.guild.name, member.display_name))
【讨论】: