简体   繁体   中英

Mentioning Channel with Embed Command Discord.py

I'm trying to make a command where is sends in embed the channel like #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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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