编写松弛块消息

时间:2019-09-09 21:37:20

标签: python slack

这有效:

    client.chat_postMessage(
           channel=channel,
            thread_ts = thread_ts, 
            blocks= 
            [
            {
            "type": "section",
            "text": {
                "type": "mrkdwn",
               "text": "Danny Torrence left the following review for your property:"
            }
            },
          [ ... and so on... more sections ...]

) 

但这不起作用:

client.chat_postMessage(
           channel=channel,
            thread_ts = thread_ts, 
            blocks=blockmsg
        )       

blockmsg是我在程序前面定义的多行文字。 Slack只是不发布'blockmsg',它是静默的,即没有错误消息。

这里有一些“陷阱”吗?

0 个答案:

没有答案