【发布时间】:2022-01-19 10:46:08
【问题描述】:
好吧,我已经尝试了大约一个小时,但我似乎无法弄清楚。
所以我尝试制作一次像 op.ggs 这样的嵌入,但我一直在获取字体大小和超链接。在图 1 中显示“这是你的 op.gg 搜索 Killogee”我希望它是超链接,但是
title = f'Here is your op.gg search for {playerign}', 并且超链接不适用于标题,所以我对该怎么做感到困惑,我尝试过的是,如果我只是输入代码 title= f'[Killogee - Summoner Stats - League of Legends](https://oce.op.gg/summoner/userName=Killogee)' 它会像
如果这有帮助 代码:
if message.content.startswith('$player '):
playerign = (message.content.split('$player ')[1])
playeropgg = discord.Embed(
title = (f'Here is your op.gg search for {playerign}'),
colour = discord.Colour.blue(),
timestamp = datetime.utcnow()
)
playeropgg.set_thumbnail(url='https://images-ext-1.discordapp.net/external/h-KHJTr-6zs_SUMgRzZt_41SMr5SSW41YeSvy-MTMfY/https/opgg-static.akamaized.net/icon/reverse.rectangle.png?width=1051&height=683')
playeropgg.set_author(name='OP.GG Oceania')
playeropgg.add_field(name='\u200b', value=f'**[{playerign} - Summoner Stats - League of Legends]**(https://oce.op.gg/summoner/userName={playerign.replace(" ", "%20")})', inline=False)
playeropgg.set_footer(text=f'Searched for {message.author}')
await message.channel.send(embed=playeropgg)
【问题讨论】:
标签: python discord discord.py