Note-51804-97

Token ID: 1

ERC-721 1 Transfers

Metadata

{
  "title": "我是如何使用huginn的——同步xlog到discord",
  "tags": [
    "post",
    "tool"
  ],
  "sources": [
    "xlog"
  ],
  "external_urls": [
    "https://lotosbin.xlog.app/wo-shi-ru-he-shi-yong-huginn-de--tong-bu-xlog-dao-discord"
  ],
  "date_published": "2023-04-17T15:48:04.502Z",
  "content": "# 我是如何使用huginn的——同步xlog到discord\n## huginn是什么\n> Create agents that monitor and act on your behalf. Your agents are standing by!\nhttps://github.com/huginn/huginn\n\n## 如何部署huginn(docker)\n\n```bash\nmkdir huginn && cd huginn\nvi docker-compose.yml\n```\n这里直接使用内置存储\ndocker-compose.yml\n```yaml\nversion: '3.8'\nservices:\n  app:\n    image: ghcr.io/huginn/huginn\n    ports:\n      - \"3000:3000\"\n    restart: always\n```\n```bash\ndocker compose up -d\n```\n浏览\nhttp://localhost:3000\n\n默认账号 admin/password\n\n## 同步xlog rss到discord\n- 创建一个新的“Agent”,并将 RSS 插件作为 Trigger 选择。\n- 在“RSS Agent”的配置选项中,将“Feed URL”设置为您的 Xlog RSS Feed 的 URL。\n- 配置“Post Agent”插件作为 Action,按照 Discord 提供的说明创建一个新的 Webhook,以将 RSS Feed 数据提交到 Discord。\n- 将“Webhook URL”复制到“Webhook”的配置选项中。\n```json\n {\n  \"post_url\": \"yout discord webhook url\",\n  \"expected_receive_period_in_days\": \"1\",\n  \"content_type\": \"form\",\n  \"method\": \"post\",\n  \"payload\": {\n    \"key\": \"value\",\n    \"something\": \"the event contained {{ somekey }}\"\n  },\n  \"headers\": {},\n  \"emit_events\": \"false\",\n  \"no_merge\": \"false\",\n  \"output_mode\": \"clean\"\n}\n```\n-  配置“Webhook Payload”选项,以将您从 RSS Feed 获取到的每个项目转换为 Discord 可理解的格式。\n- 编辑“Webhook Payload”选项,将其设置为包含适当数据的 JSON 格式。例如:\n\n```json\n  {\n\n    \"embeds\": [{\n\n      \"title\": \"{{title}}\",\n\n      \"description\": \"{{description}}\",\n\n      \"url\": \"{{url}}\",\n\n      \"author\": {\"name\": \"Xlog RSS\"},\n\n      \"timestamp\": \"{{pubDate}}\"\n\n    }]\n\n  }\n```\n测试并启用您的 Agent。",
  "attributes": [
    {
      "value": "wo-shi-ru-he-shi-yong-huginn-de--tong-bu-xlog-dao-discord",
      "trait_type": "xlog_slug"
    }
  ]
}