You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Slackbot "working" but not responding to messages #129
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
AT_BOT = "<@" + BOT_ID + ">"
TypeError: Can't convert 'NoneType' object to str implicitly
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!
Activity
vism2889 commentedon May 2, 2017
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
AT_BOT = "<@" + BOT_ID + ">"
TypeError: Can't convert 'NoneType' object to str implicitly
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!
mattmakai commentedon May 3, 2017
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?
aweher commentedon Nov 20, 2017
I've changed the code this way:
AT_BOT = "<@" + str(BOT_ID) + ">"mattmakai commentedon Nov 20, 2017
does that work though? if your BOT_ID is None, that's a problem