When to use it
Before an event starts, it shows the time until it starts. While it runs, it shows the time left and a progress bar. When it ends, it goes away.
Your external server sends values through the uchat API, and this plugin draws them. Turn on the plugin, get a key from the API menu on the admin page, and put it on your server.
How to send
Send a JSON body with the Authorization: Bearer {API key} header to POST https://api.uchat.io/v2/rooms/{API room ID}/events. plugin is countdown.
curl -X POST https://api.uchat.io/v2/rooms/room_xxxxxxxxxxxxxxxx/events \
-H "Authorization: Bearer uchat_..." \
-H "Content-Type: application/json" \
-d '{"plugin":"countdown","save":true,"data":["Weekend event","1792400400","1792402200"]}'
dataorder: title, start time, end time (unix seconds, UTC)- It saves times, not the time left, so you don't need to send again. People who join midway see the time left for that moment. To extend, change only the end time and save again.
- With
"save": true, the last value is saved, so people who join later get it when they enter. To take it down, save"data":[]. - It draws only values from the server API, and shows them as plain text.