fullstackpython.com
fullstackpython.com copied to clipboard
Slackbot "working" but not responding to messages
Hey Matt! Grateful for the tutorial, and have gotten everything "working" up until the end when i try to actually interact with the bot. At that point it doesn't respond to anything. I'm using python 3.5.0 and have copied and pasted your code exactly and followed the steps of the tutorial from start to finish (except for the bot_token and bot_id which i have swapped with my own) to ensure correctness. Even get the "StarterBot connected and running" message in my terminal after running the script. Thanks for your time!
i tried to mess around with some code, and i think the environment variable was the issue for some reason, after fiddling i got this Traceback:
Traceback (most recent call last):
File "morgstarterbot.py", line 10, in
After the fact i replaced the environment variables with the actual TOKEN and ID and it has since been working like shown near the end of your tutorial. I guess my question at this point is, am i forgetting something when setting up the virtualenv. Thanks again for your time!
hey @vism2889 I haven't tested this code with Python 3.5, however I'm wondering about the BOT_ID. is the value properly set when your bot is running?
I've changed the code this way:
AT_BOT = "<@" + str(BOT_ID) + ">"
does that work though? if your BOT_ID is None, that's a problem