如何解决“开始使用”Slack 部分中为新成员提供的欢迎信息
我正在尝试向加入我的 Slack 工作区的新用户的入门部分 (check image) 发送欢迎消息。 此外,我无法访问“开始自定义”部分: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": "Right button","emoji": True
}
}
]
},{
"type": "section","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
)
解决方法
此部分已针对新工作区完全删除。 Here is an official Slack support answer
,目前无法通过 API 访问此部分。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。