# Input-box for messages

**URL:** <https://staging-discuss.dev.twitch.com/t/input-box-for-messages/7044>\
**Category:** Chat and IRC\
**Created:** [August 5, 2016, 2:55am UTC](https://staging-discuss.dev.twitch.com/t/input-box-for-messages/7044 "2016-08-05T02:55:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DEVILvenus](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@DEVILvenus](https://staging-discuss.dev.twitch.com/u/DEVILvenus)\
**Post date:** [August 5, 2016, 2:55am UTC](https://staging-discuss.dev.twitch.com/t/input-box-for-messages/7044/1 "2016-08-05T02:55:40Z")

</div>

Hello developers,

I’ve tried to make my own input-box for chat-messages and a button to send the messages to a spefic channel. I’ve tried to embed it into my homepage for almost a week nos but I’m not able to make it work.  
I have created a button and an input-field but I really don’t now how I can use the onclick-event of the button in that way, that it sends the text from the textfield to the chatroom.  
I’ve kinda read the API but I’m really not that deep into js to completly understand it.  
Is anyone out there who could provide me a working example so I can get in my head how it works? It would be great!

---

<div class="post-metadata">

**Author:** ![DallasNChains](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/dallasnchains/32/1608_2.png) [@DallasNChains](https://staging-discuss.dev.twitch.com/u/DallasNChains)\
**Post date:** [August 5, 2016, 4:46pm UTC](https://staging-discuss.dev.twitch.com/t/input-box-for-messages/7044/2 "2016-08-05T16:46:29Z")

</div>

Are you using the [chat embed](https://github.com/justintv/Twitch-API/blob/master/embed-chat.md)? That should include everything you need.

---

<div class="post-metadata">

**Author:** ![DEVILvenus](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@DEVILvenus](https://staging-discuss.dev.twitch.com/u/DEVILvenus)\
**Post date:** [August 5, 2016, 5:07pm UTC](https://staging-discuss.dev.twitch.com/t/input-box-for-messages/7044/3 "2016-08-05T17:07:08Z")

</div>

Kinda. Problem is that I wanted to change the color of the embeded chat but thats not possible in that way.  
So I build myself a frame where I display the messages of the stream but it doesnt have an input-box.

---

<div class="post-metadata">

**Author:** ![DallasNChains](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/dallasnchains/32/1608_2.png) [@DallasNChains](https://staging-discuss.dev.twitch.com/u/DallasNChains)\
**Post date:** [August 5, 2016, 5:34pm UTC](https://staging-discuss.dev.twitch.com/t/input-box-for-messages/7044/4 "2016-08-05T17:34:50Z")

</div>

Sending a message to chat will require that a user be logged in, that you’re connected to IRC, and that you can send the message to the IRC server. You could use the community-created [TMI.js library](https://tmijs.org/) to help with some of this. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [September 4, 2016, 5:34pm UTC](https://staging-discuss.dev.twitch.com/t/input-box-for-messages/7044/5 "2016-09-04T17:34:50Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
