简体   繁体   English

使用嵌入命令 Discord.py 提及频道

[英]Mentioning Channel with Embed Command Discord.py

I'm trying to make a command where is sends in embed the channel like #test我正在尝试制作一个命令,其中发送嵌入通道,如#test

Here is my Code这是我的代码

async def embed(ctx):
    embed=discord.Embed(title="How to Verify?", description="To Verify! Go to <!#2132103113>" , color=discord.Color.blue())
    await ctx.send(embed=embed)```

When you mention a channel, whether it is in an embed or not, you can use this format:当您提及频道时,无论是否在嵌入中,您都可以使用以下格式:

<#2132103113>

You can also use:您还可以使用:

channel = client.get_channel(2132103113)
embed=discord.Embed(title="How to Verify?", description=f"To Verify! Go to {channel.mention}" , color=discord.Color.blue())
await ctx.send(embed=embed)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM