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

action command not using /me, instead just puts ACTION at the beginning of message #426

Open
ghost opened this issue Sep 23, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 23, 2020

Actual behaviour:
When using the client.action command(channel, message), instead of sending a /me command to the channel, it simply sends a regular message with the word ACTION added to the front of it.

Expected behaviour:
The action command should send the /me command to the channel with the message.

Error log:
N/A

Insert your error log here

Server configuration

  • Operating system: Windows 10
  • Node version (if applicable):
  • NPM version (if applicable):
  • tmi.js version: 1.5.0
@AlcaDesign
Copy link
Member

client.action is sending \u0001ACTION ${message}\u0001. Are you seeing "ACTION" rendered by the Twitch website or app with no third party extensions? How could I recreate this issue? Screenshots or something?

@ghost
Copy link
Author

ghost commented Sep 24, 2020

Yes, I'm seeing "ACTION" rendered on Twitch as well as the Streamlabs Chatbot. If it's working fine for you, I'm not sure how the issue could be recreated, but I was able to make it work by using this._sendCommand instead of this._sendMessage in commands.js:110. I used /me ${message} as the message parameter and removed the message transformation on line 107 that put the word "ACTION" into it.

@RedEars
Copy link

RedEars commented Feb 26, 2021

I've seen the same issue some times with client.say and could just replicate it. Seems to happen with longer messages. This happens if the text has line breaks.
No third-party extensions installed.

This call does not work/prints ACTION in chat:

 client.say(
channel,
        `/me technosterone test: 1. the main cause of [explosions].
2. any thing [dreaded] that your "teachers" say is "good" for you. soon after, you explode for no reason.
3. what scientists do to make stuff explode.
4. when a sheet of paper explodes into [flames].. monkaThink Por ejemplo: 1. test [sodium] and water.
2. SAT is a test.
3. [Monkeys].
4. you brought your [lighter] to test.`
);

This call works:

client.say(
        channel,
        `/me technosterone test: 1. the main cause of [explosions]. 2. any thing [dreaded] that your "teachers" say is "good" for you. soon after, you explode for no reason. 3. what scientists do to make stuff explode. 4. when a sheet of paper explodes into [flames].. monkaThink Por ejemplo: 1. test [sodium] and water. 2. SAT is a test. 3. [Monkeys]. 4. you brought your [lighter] to test.`
);

So if variables/text inside of the call has line breaks, it does not work and prints out "ACTION"

Screenshots:
screenshot-1614333884
screenshot-1614333909

(The define callback console log output is mine)

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

2 participants