I need help adding a specific command

Asked Oct 30, 2023·1 reply·Last activity 2 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

I would like that when "!category" was typed, the bot would respond to the current category in the live stream and its active time, I've seen other channels with commands like this, but I can't find anywhere explaining how to do it

1 reply

Hey @Sleek Swan!

If you mean that you want the command to display the amount of time the current category has been on stream, you'll need to use an API as Twitch doesn't provide that data as far as I know. I don't know which API others are using, so you should ask them, or search the web. We can help you set it up once you have a link.

If what you really care about is the stream uptime, and not the amount of time the current category has been on stream, you can use the following command:

$(twitch $(channel) "{{displayName}} has been playing {{game}} for {{uptimeLength}}")