1 year ago
#329922
Hellbringer
Can't send a message to the Twitch chat using JS
I'm trying to make a script in the dev console to get a list of vip users on twitch and find out the date of the last message on the channel. To do this, I need to send a command /vips to the chat, and after receiving the list, send a command /user for each user. But I can't do it in the console, because when I try to enter text using js
document.querySelector('[data-a-target="chat-input"]').value = 'text'
it doesn't show inside the textarea tag (I entered the text 'text' manually).
<textarea data-a-target="chat-input" data-test-selector="chat-input" aria-label="Send message" class="ScInputBase-sc-1wz0osy-0 ScTextArea-sc-1ywwys8-0 fIywXv iMyRUS InjectLayout-sc-588ddc-0 lmkkDK tw-textarea tw-textarea--no-resize" autocomplete="twitch-chat" maxlength="500" placeholder="Send message" rows="2" style="padding-right: 6.5rem; padding-left: 3.8rem;">text</textarea>
The text that I entered is displayed in the chat for a few seconds and then disappears. How can I send a chat message using only the console?
javascript
twitch
0 Answers
Your Answer