【问题标题】:Welcome message in "Get started" Slack section for new members新成员的“开始”Slack 部分中的欢迎消息
【发布时间】:2021-08-20 09:36:36
【问题描述】:

我正在尝试将欢迎消息发送到 开始使用 部分 (check image),以便新用户加入我的 Slack 工作区。 此外,我无法访问“开始自定义”部分:https://[workspace].slack.com/customize/get-started

我正在收听 team_join 事件,当有新用户加入时我会收到此事件,但我只能通过在频道或私人聊天中发送消息来问候他。

如何将消息、窗口或块放入此部分?

@app.event("team_join")
def ask_for_introduction(logger: logging.Logger, event, say):
    logger.debug(event)
    welcome_channel_id = "#general"
    user_id = event["user"]["id"]
    text = f"Welcome, <@{user_id}>! ????"
    blocks = [
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "Hey there!"
            }
        },
        {
            "type": "actions",
            "elements": [
                {
                    "type": "button",
                    "text": {
                        "type": "plain_text",
                        "text": "Left button",
                        "emoji": True
                    }
                },
                {
                    "type": "button",
                    "text": {
                        "type": "plain_text",
                        "text": "Right button",
                        "emoji": True
                    }
                }
            ]
        },
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "This is a mrkdwn section block :ghost: *this is bold*, and ~this is crossed out~, and <https://google.com|this is a link>"
            }
        }
    ]
    say(
        blocks=blocks,
        text=text,
        channel=welcome_channel_id
    )

【问题讨论】:

    标签: javascript python slack slack-api


    【解决方案1】:

    对于新工作区,此部分已完全删除。 Here is an official Slack support answer

    【讨论】:

      【解决方案2】:

      目前无法通过 API 访问此部分。

      【讨论】:

        猜你喜欢
        • 2021-05-05
        • 2021-01-25
        • 1970-01-01
        • 2021-10-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-03-16
        • 2021-12-24
        相关资源
        最近更新 更多