patch to avoid crash when messages without type are sent
Merge pull request #16 from h0ru5/bot_fixed

patch for bot example to avoid crash when messages without type are sent