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

Clients like psi or other libs send non-chat messages without a "type" attribute.
This currently crashes the bot.