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