如果可能的话,我如何让我的不和谐机器人(在 python 中)向另一个用户和发送命令的人发送消息(告诉他们他们说了什么)?
编辑:已解决,谢谢 Patrick Haugh - https://stackoverflow.com/users/6779307/patrick-haugh 顺便说一句,这是我的代码,以防其他人遇到同样的问题:
@client.command()
async def dm(ctx, user: discord.User, *, message=None):
if message == None:
await ctx.send('You need to put a message')
else:
await user.send(message)
await ctx.channel.purge(limit=1)
await ctx.send('DM Sent')
await ctx.author.send('"' + message + '"' + ' sent to ' + str(user))
# just so i can see every dm (a bit creepy ik but hey it's my bot so i'll do it)
print('"' + message + '"' + ' sent to ' + str(user))