tmijs / tmi.js

💬 Javascript library for the Twitch Messaging Interface. (Twitch.tv)
https://tmijs.com
MIT License
1.55k stars 214 forks source link

[V2] Client connection (adds parsing for `identity.auth` and promise for `Client.connect()` #357

Open InzeNL opened 5 years ago

InzeNL commented 5 years ago

identity.auth has three possible types, string, (Client) => string, and () => Promise. This branch implements parsing for the latter two.

identity.auth now only gets an oauth: prefix if it doesn't have one already.

Client.connect() now handles promises. Assumed secureConnect, and data as resolved. Assumed close, and error as rejected. Please verify these are the expected promises for these socket events.

Adds codestyle for JetBrains IDEAs.