Bot uses encode so as to not break on invalid input.