我怎样才能将其更改为 hyper link? discord.py
How can i change this to a hyper link? discord.py
我有这个命令来邀请我的机器人到其他服务器,它发送一个嵌入的机器人邀请和支持服务器。我想将实际的 links 更改为超 links,例如可点击的消息,
例如:“邀请我!”它会是蓝色的,您可以单击它转到 link。这是命令
@commands.cooldown(rate=1, per=10.5, type=commands.BucketType.user)
@commands.command(aliases=['joinme', 'botinvite', 'kek'])
async def invite(self, ctx):
""" Invite me to your server """
try:
await ctx.message.delete()
except:
pass
embed = discord.Embed(color=ctx.author.color, timestamp=ctx.message.created_at)
embed.set_author(
name=ctx.bot.user.name, icon_url=ctx.bot.user.avatar_url_as(static_format="png")
)
embed.set_thumbnail(url=ctx.bot.user.avatar_url_as(static_format="png"))
embed.add_field(
name="Bot Invite",
value="https://discord.com/api/oauth2/authorize?client_id=723726581864071178&permissions=1576533239&scope=bot")
embed.add_field(
name=f"Support Server",
value="https://discord.gg/cNRNeaX")
embed.set_thumbnail(url=ctx.author.avatar_url)
try:
await ctx.send(embed=embed)
except Exception as err:
await ctx.send(err)
在嵌入中您应该可以使用降价。
Click [here] (discord.gg/CODE)to join my awesome server!
我有这个命令来邀请我的机器人到其他服务器,它发送一个嵌入的机器人邀请和支持服务器。我想将实际的 links 更改为超 links,例如可点击的消息, 例如:“邀请我!”它会是蓝色的,您可以单击它转到 link。这是命令
@commands.cooldown(rate=1, per=10.5, type=commands.BucketType.user)
@commands.command(aliases=['joinme', 'botinvite', 'kek'])
async def invite(self, ctx):
""" Invite me to your server """
try:
await ctx.message.delete()
except:
pass
embed = discord.Embed(color=ctx.author.color, timestamp=ctx.message.created_at)
embed.set_author(
name=ctx.bot.user.name, icon_url=ctx.bot.user.avatar_url_as(static_format="png")
)
embed.set_thumbnail(url=ctx.bot.user.avatar_url_as(static_format="png"))
embed.add_field(
name="Bot Invite",
value="https://discord.com/api/oauth2/authorize?client_id=723726581864071178&permissions=1576533239&scope=bot")
embed.add_field(
name=f"Support Server",
value="https://discord.gg/cNRNeaX")
embed.set_thumbnail(url=ctx.author.avatar_url)
try:
await ctx.send(embed=embed)
except Exception as err:
await ctx.send(err)
在嵌入中您应该可以使用降价。
Click [here] (discord.gg/CODE)to join my awesome server!