【发布时间】:2022-01-06 14:49:51
【问题描述】:
我的机器人欢迎新成员,过了一会儿我如何删除消息?
我的 hello 消息代码:
@client.event
async def on_member_join(member):
channel = client.get_channel(channelID)
await channel.send(f'Hello')
【问题讨论】:
标签: python discord discord.py bots
我的机器人欢迎新成员,过了一会儿我如何删除消息?
我的 hello 消息代码:
@client.event
async def on_member_join(member):
channel = client.get_channel(channelID)
await channel.send(f'Hello')
【问题讨论】:
标签: python discord discord.py bots
使用delete_after kwarg。
例如await channel.send(f'Hello', delete_after=60)
【讨论】: