# Add users to a queue list when they type a command

**URL:** <https://staging-discuss.dev.twitch.com/t/add-users-to-a-queue-list-when-they-type-a-command/27374>\
**Category:** Chat and IRC\
**Created:** [July 27, 2020, 8:35pm UTC](https://staging-discuss.dev.twitch.com/t/add-users-to-a-queue-list-when-they-type-a-command/27374 "2020-07-27T20:35:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![OsvaldoGD](https://avatars.discourse-cdn.com/v4/letter/o/ed8c4c/32.png) [@OsvaldoGD](https://staging-discuss.dev.twitch.com/u/OsvaldoGD)\
**Post date:** [July 27, 2020, 8:36pm UTC](https://staging-discuss.dev.twitch.com/t/add-users-to-a-queue-list-when-they-type-a-command/27374/1 "2020-07-27T20:36:00Z")

</div>

Hi everyone, so i’m asking for guidance on this bot I want to make, first off I would like to know if it’s possible to do it and where I could start looking for info on doing it, if anyone has any concrete ideas of the implementation of it that would be appreciated as well. This is what I want to do  
\*EDIT: I’m planning on doing it in NodeJS

- I want to make a bot that adds a username to a queue list when the user types a command (!match) in the chat
- Add the rest of the message to the queue list. For ex, they would type a code (XXXX#123) and it would be added to an array or something im thinking so it would be displayed like this: (I’m thinking I could do a regex for looking for the code in case they type something else)
  - Username: XXXX#123

- Display this list to the streamer

Optional but preferrable as well: Give a command to the streamer that pops the oldest element of that array so that he can eliminate elements from that list as he goes through them

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [July 27, 2020, 8:48pm UTC](https://staging-discuss.dev.twitch.com/t/add-users-to-a-queue-list-when-they-type-a-command/27374/2 "2020-07-27T20:48:50Z")

</div>

- Pick a language.
- Use an existing Twitch Library to connect to chat or write your own/use your own
- Decide on the command and add programming to add uses whome run the command to said list, along with the data they pass.
- Decide how to get that list to the streamer.

Personally, if I was building this I’d probably do it in NodeJS using my existing bot template. And store the list in redis. Then create a webpage for the streamer to use that displays the contents of the redis list.

---

<div class="post-metadata">

**Author:** ![OsvaldoGD](https://avatars.discourse-cdn.com/v4/letter/o/ed8c4c/32.png) [@OsvaldoGD](https://staging-discuss.dev.twitch.com/u/OsvaldoGD)\
**Post date:** [July 27, 2020, 8:59pm UTC](https://staging-discuss.dev.twitch.com/t/add-users-to-a-queue-list-when-they-type-a-command/27374/3 "2020-07-27T20:59:28Z")

</div>

Thanks a lot for the tips, I was thinking of using NodeJS as well. As for the library do you mean something like “tmi”? I was looking into that on this link ([https://dev.twitch.tv/docs/irc](https://dev.twitch.tv/docs/irc)).

My idea was that he would run this script/project locally in his computer and was thinking of outputting it in terminal or something (hadn’t gotten that far), but reading your reply it seems I would need a DB (even being redis that will not actually store anything permanently) and preferably give him a website that displays this info, I think I better understand what you’re hinting at, he could run all this locally right? no need to host the webpage somewhere else I mean

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://staging-discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [July 27, 2020, 9:52pm UTC](https://staging-discuss.dev.twitch.com/t/add-users-to-a-queue-list-when-they-type-a-command/27374/4 "2020-07-27T21:52:31Z")

</div>

I don’t use TMI I use my own code. So can’t speak to how good it is. But it does seem to be popular.

You could use write a JSON blob to disk, or if you are running it locally, have the bot provide the web page as well, then you don’t need a database at all, unless you want to be crash/restart safe

---

<div class="post-metadata">

**Author:** ![OsvaldoGD](https://avatars.discourse-cdn.com/v4/letter/o/ed8c4c/32.png) [@OsvaldoGD](https://staging-discuss.dev.twitch.com/u/OsvaldoGD)\
**Post date:** [July 27, 2020, 9:56pm UTC](https://staging-discuss.dev.twitch.com/t/add-users-to-a-queue-list-when-they-type-a-command/27374/5 "2020-07-27T21:56:27Z")

</div>

Alright thank you so much again for the help

---

<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:** [August 26, 2020, 9:56pm UTC](https://staging-discuss.dev.twitch.com/t/add-users-to-a-queue-list-when-they-type-a-command/27374/6 "2020-08-26T21:56:27Z")

</div>

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