Possible bugfix to "TypeError: expected string or buffer"

also bot.py linted