Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sent whisper returns emote-sets instead of emotes object #195

Open
scsddeputy opened this issue Dec 4, 2016 · 2 comments
Open

Sent whisper returns emote-sets instead of emotes object #195

scsddeputy opened this issue Dec 4, 2016 · 2 comments
Milestone

Comments

@scsddeputy
Copy link

scsddeputy commented Dec 4, 2016

Actual behaviour:
When sending a whisper the userstate object is different from receiving a whisper. On Received whisper the emotes are an object of the sets, but on a sent whisper the emotes are a string of emote sets

Sending Whisper:

{
    'badges': null,
    'color': '#FFFFFF',
    'display-name': 'Schmoopiie',
    'emote-sets': "0,123,324,3242",
    'message-id': '123',
    'thread-id': '1234567_12345678',
    'turbo': true,
    'user-id': '58355428',
    'user-type': null,
    'badges-raw': null,
    'emotes-raw': '25:0-4',
    'username': 'schmoopiie',
    'message-type': 'whisper'
}

Expected behaviour:

Received Whisper

{
    'badges': null,
    'color': '#FFFFFF',
    'display-name': 'Schmoopiie',
    'emotes': { '25': [ '0-4' ] },
    'message-id': '123',
    'thread-id': '1234567_12345678',
    'turbo': true,
    'user-id': '58355428',
    'user-type': null,
    'badges-raw': null,
    'emotes-raw': '25:0-4',
    'username': 'schmoopiie',
    'message-type': 'whisper'
}

Server configuration

  • Operating system: Windows10
  • Node version (if applicable): 6.9.1
  • NPM version (if applicable):3.10.8
  • tmi.js version:1.1.1
@AlcaDesign
Copy link
Member

AlcaDesign commented Dec 5, 2016

The whisper command merges the this.globaluserstate into the new userstate to be emitted when sending a whisper, hence the emote-set key (reference). It's not set to parse the emotes in the whisper command like the say command does by sending it through client._sendMessage (reference). You can load the parser file using require('tmi.js/lib/parser') (reference) if you're like to make use of it until this is fixed (if it hasn't been already).

@Schmoopiie
Copy link
Member

Schmoopiie commented Apr 15, 2017

AFAIK, Twitch is still not sending information when you are sending a message. This is the reason why we chose to merge, as @AlcaDesign said, the globaluserstate and a few information such as the username and message-type. I am willing to find a workaround for this but only in v2.0.0.

@Schmoopiie Schmoopiie added this to the 2.0.0 milestone Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants