我试图让我的不和谐机器人 DM 每隔几秒(而不是快速连续)发送相同的消息。到目前为止,我已经让我的不和谐机器人根据用户提供的特定次数发送给定的消息。这是我的代码:
@client.command()
async def send(ctx, member: discord.Member, amount=1, *, content=None):
for i in range(amount):
channel = await member.create_dm()
await channel.send(content)
任何帮助将不胜感激!谢谢!