I'm trying to code a Slack-Bot which is asking for lunch and is taking orders for lunch.
I'm working with this tutorial.
My problem is: I'm trying to run my script in CMD (yes, windows!) but I receive this error:
C:\Users\Dave\PycharmProjects\lunchbot>python lunchbot.py
Traceback (most recent call last):
File "lunchbot.py", line 167, in <module>
if slack_client.rtm_connect(with_team_state=False):
TypeError: rtm_connect() got an unexpected keyword argument 'with_team_state'
This is the part of the code that's not working correctly:
if __name__ == "__main__":
if slack_client.rtm_connect(with_team_state=False):
print("Lunchbot is ready to go!")
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("No connection.")
What actually confuses me is every time I'm trying to run this code in my IDE everything is fine. Does anybody have an idea of what could be wrong?