【发布时间】:2021-06-14 19:02:09
【问题描述】:
我正在尝试创建一个命令,该命令将为您创建指向特定站点的链接,但有一个问题,其中有 ' 之类的东西,例如“上帝的旨意”,如果我在命令中使用 '它不会起作用,因为在链接中 ' 被 %27 替换,有没有办法在这个命令中自动将 ' 变成 %27?
@client.command()
async def mlwiki(ctx, *args):
embed = discord.Embed(title="Your Wiki search:", description='**[Results](https://monsterlegends.fandom.com/wiki/{})**'.format('_'.join([arg.capitalize() for arg in args])), color=0x00ff00)
embed.set_footer (text ="Atention!,if you put the terms wrong,the link won't work")
await ctx.reply(embed=embed,mention_author=False)
【问题讨论】:
标签: python python-3.x discord.py