jammerware / margiebot

MargieBot is a .NET library designed to make building bots for Slack fast, easy, and fun.
MIT License
122 stars 42 forks source link

Data at the root level is invalid. #16

Open roschler opened 8 years ago

roschler commented 8 years ago

When I try using the Dictionary API, for which I do have a valid API key, I get an Exception after trying the dictionary request "@botname: define mouth". I put a try/except block around the WebSocket.OnMessage() handler and I see this:

Exception during WebSocket OnMessage() event: Data at the root level is invalid. Line 1, position 1. Data received: {"type":"message","channel":"C","user":"U","text":"<@U>: define mouth","ts":"1456202184.000017","team":"T"}

Obviously the angle bracketed named elements are replacements for the actual values.

I'd be tempted to think it was something to do with the Dictionary API, but unless I'm wrong, this seems to be happening when the bot receives the define request and before it does anything with it.

What is the problem with the message?