如何使用discord.py反转文本?

如何使用discord.py反转文本?,discord.py,Discord.py,如何使用discord.py反转文本 >Example: >reverse hi >Output: ih 诸如此类,有什么线索吗?欢迎来到stackoverflow!下次你提问时,请包括你尝试过的代码。我已经有了这个代码,所以我会给你这个,并在代码注释中解释 @client.command() async def reverse(ctx,*,arg=“一个正常的句子”):#如果用户没有给出arg,也就是just>reverse 等待ctx.message.delete()

如何使用discord.py反转文本

>Example: >reverse hi

>Output: ih 

诸如此类,有什么线索吗?

欢迎来到stackoverflow!下次你提问时,请包括你尝试过的代码。我已经有了这个代码,所以我会给你这个,并在代码注释中解释

@client.command()
async def reverse(ctx,*,arg=“一个正常的句子”):#如果用户没有给出arg,也就是just>reverse
等待ctx.message.delete()#删除原始命令消息
wait ctx.send(arg[:-1])#发送向后的句子,在本例中为:ecnetnes lamron A