Suggested Api For Mixed Drinks

Hello, I’m fairly new to actually using Nightbot (via Twitch,) rather than interacting with it, and I love utilizing it in the chatroom. I have an idea unless another API could be altered and used in place of this. I think it would be cool if the bot could mix drinks for viewers… Creating the commands is easy, but I’m not sure how the bot could randomly generate a new drink for somebody (like normal bar drinks, i.e Long Island). If you can direct me to a similar API or give me feedback, I’d really appreciate it.

Thank you for reading and being a studmuffin.

Jacob Miller

Instead of an api just use a command using $(eval)

!commands add !drinks Random Drink: $(eval a=["drink 1", "drink 2", "drink 3", "drink 4"];a[Math.floor(Math.random() * a.length)])

To edit: All drink need to be surrounded by quotation marks(") with a comma (,) between them. All editing should take place in the dashboard.

1 Like

Thank you for the help, Aaron. I’ll use this command, and notify you if I have any issues (which I shouldn’t).
Thanks again

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