Вопрос

I'm currently doing a Twitch chat bot using mIRC. Is there a way to check the time left for an assigned variable? That is, how long time it's left until it's removed.

Example:

I have a variable that is set to exist for 120 seconds (set -u120 %myvar itsvalue).
Is there a way to check how much time there's left on that time? So for example if it's 30 seconds left you could return that value somehow and assign it to another variable.

Это было полезно?

Решение

$var(%myvar, 1).secs will return the number of seconds left until it's unset by the u switch. If the variable is not found, it will return $null.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top