Python 如何在嵌入消息中提及不一致通道

Python 如何在嵌入消息中提及不一致通道,python,discord,discord.py,Python,Discord,Discord.py,在我的embed描述中,我希望将#channel写入的地方替换为提到的频道。我想通过它的id获取这个通道对象;但是,我不知道怎么做 @bot.command() 异步def whois(ctx,成员:discord.member): 嵌入=discord.embed(title=“**\uuuusoport-general-usando-tickets”, description=“**要创建票证,请在#频道\nPara pedir ayuda deberías utilizar el sigu

在我的embed描述中,我希望将
#channel
写入的地方替换为提到的频道。我想通过它的id获取这个通道对象;但是,我不知道怎么做

@bot.command()
异步def whois(ctx,成员:discord.member):
嵌入=discord.embed(title=“**\uuuusoport-general-usando-tickets”,
description=“**要创建票证,请在#频道\nPara pedir ayuda deberías utilizar el siguiente formato:\n中运行`!New`,
color=discord.color.blue())
嵌入.设置页脚(text=“ADN开发”)

您需要使用
bot.get\u频道(id)
。试试这个:

@bot.command()
异步def whois(ctx,成员:discord.member):
通道=机器人获取通道(id)
embed=discord.embed(title=“***\uuu-soport-general-usando-tickets\uuu**”,description=f“**要创建一个票证,请在{channel.notice}中运行“!New”\nPara pedir-ayuda-deberías-utizar el-siguiente-formato:\n”,color=discord.color.blue())
嵌入.设置页脚(text=“ADN开发”)
等待ctx.send(嵌入=嵌入)

但是我应该把频道id放在哪里?@JesusGFX哦,你想用频道id吗?你的问题中没有提到这一点。我已经编辑了我的代码。尝试新代码。模块“discord”没有属性“get_channel”@JesusGFX否否,请再次查看我的代码。我把它从
discord
改为
bot
。完全复制代码,然后重试。该操作有效,但频道不显示。类型显示为:{channel.antify}