Discord 节点常见问题#
¥Discord node common issues
以下是 Discord 节点 的一些常见错误和问题,以及解决或故障排除步骤。
¥Here are some common errors and issues with the Discord node and steps to resolve or troubleshoot them.
向嵌入内容添加额外字段#
¥Add extra fields to embeds
Discord 消息可以选择性地包含嵌入内容,这是一个包含标题、描述、图片、链接等的富预览组件。
¥Discord messages can optionally include embeds, a rich preview component that can include a title, description, image, link, and more.
使用“消息”资源的“发送”操作时,Discord 节点支持嵌入内容。选择添加嵌入内容以设置额外字段,包括描述、作者、标题、URL 和 URL 图片。
¥The Discord node supports embeds when using the Send operation on the Message resource. Select Add Embeds to set extra fields including Description, Author, Title, URL, and URL Image.
要添加默认情况下未包含的字段,请将“输入方法”设置为“原始 JSON”。在此处,向“值”参数添加一个 JSON 对象,定义 字段名称 以及你要包含的值。
¥To add fields that aren't included by default, set Input Method to Raw JSON. From here, add a JSON object to the Value parameter defining the field names and values you want to include.
例如,要包含 footer 和 fields(这两个值在“输入字段”输入法中不可用),你可以使用如下 JSON 对象:
¥For example, to include footer and fields, neither of which are available using the Enter Fields Input Method, you could use a JSON object like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
你可以在 使用 Webhook 和嵌入式内容 Discord 中了解更多关于嵌入的内容。
¥You can learn more about embeds in Using Webhooks and Embeds | Discord.
如果你在使用 Discord 节点嵌入内容时遇到问题,可以使用 HTTP 请求 和你现有的 Discord 凭据,将 POST 重定向到以下 URL:
¥If you experience issues when working with embeds with the Discord node, you can use the HTTP Request with your existing Discord credentials to POST to the following URL:
1 | |
在正文中,像这样将你的嵌入信息包含在消息内容中:
¥In the body, include your embed information in the message content like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | |
提及用户和通道#
¥Mention users and channels
要在 Discord 消息中提及用户和通道,你需要按照 Discord 消息格式指南 的格式设置消息。
¥To mention users and channels in Discord messages, you need to format your message according to Discord's message formatting guidelines.
要提及用户,你需要知道 Discord 用户的用户 ID。请注意,用户 ID 与用户的显示名称不同。同样,你需要一个通道 ID 才能链接到特定通道。
¥To mention a user, you need to know the Discord user's user ID. Keep in mind that the user ID is different from the user's display name. Similarly, you need a channel ID to link to a specific channel.
你可以在 Discord 查找用户/服务器/消息 ID 文档 中学习如何启用开发者模式并复制用户或通道 ID。
¥You can learn how to enable developer mode and copy the user or channel IDs in Discord's documentation on finding User/Server/Message IDs.
获得用户或通道 ID 后,你可以使用以下语法格式化你的消息:
¥Once you have the user or channel ID, you can format your message with the following syntax:
- 用户:
<@USER_ID>
¥User: <@USER_ID>
- 通道:
<#CHANNEL_ID>
¥Channel: <#CHANNEL_ID>
- 角色:
<@&ROLE_ID>
¥Role: <@&ROLE_ID>