运行带有python问题的slack机器人-AttributeError:';网络客户端';对象没有属性';rtm#U读取';

运行带有python问题的slack机器人-AttributeError:';网络客户端';对象没有属性';rtm#U读取';,python,webclient,slack,Python,Webclient,Slack,我的发言如下: 最后是一段完整的代码片段,但最后一部分有一个问题: if __name__ == "__main__": if slack_client.rtm_connect(token = slack_token): print("Starter Bot connected and running!") # Read bot's user ID by calling Web API method `auth.test` starterb

我的发言如下:

最后是一段完整的代码片段,但最后一部分有一个问题:

if __name__ == "__main__":
    if slack_client.rtm_connect(token = slack_token):
        print("Starter Bot connected and running!")
        # Read bot's user ID by calling Web API method `auth.test`
        starterbot_id = slack_client.api_call("auth.test")["user_id"]
        while True:
            command, channel = parse_bot_commands(slack_client.rtm_read())
            if command:
                handle_command(command, channel)
            time.sleep(RTM_READ_DELAY)
    else:
        print("Connection failed. Exception traceback printed above.")
我越来越

Starter Bot connected and running!
Traceback (most recent call last):
  File "slack2.py", line 67, in <module>
    command, channel = parse_bot_commands(slack_client.rtm_read())
Starter机器人已连接并正在运行!
回溯(最近一次呼叫最后一次):
文件“slack2.py”,第67行,在
命令,channel=parse_bot_命令(slack_client.rtm_read())
AttributeError:“WebClient”对象没有属性“rtm\u read”

我已经尝试过重新安装和安装slack客户端,正如前5次谷歌搜索中建议的那样,但仍然存在同样的问题。我的
slackclient==2.5.0
和我的
slack\u client=slack.WebClient(token=slack\u token)

你知道问题出在哪里吗?谢谢你的建议