One thing is that your indentation is off. You need to add an indent to whatever you put into the command.
If you want to add a delay between messages, put await asyncio.sleep(time)
in your loop, where time
is your delay in seconds.
So, you should have
@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)
await asyncio.sleep(time)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…