Archive > 0.2.x Custom/Unofficial Modules
Custom Timers
Wanuarmi:
This will add the commands !timer and !timers to your bot.
You can set a timer by using "!timer 0:5:0 Test" to add a 5 minutes timer and so on.
The script will notify the chat group every 2/1 hours, and 30/15/5 minutes before timer expires.
Also you can use "!timer <ID>" to check remaining time.
Wanuarmi:
help/timer.txt
help/timers.txt
--- Code: ---<font color=CCInfoHeader><pre>timer | <pre>timers</font>
<font color=CCInfoText>Shows current timers.
<font color=CCInfoHeader><pre>timer <HH:MM:SS> <description></font>
<font color=CCInfoText>Sets a timer. The timer will be announced 1 hour, 30 minutes, 15 minutes and 5 minutes before it ends.
<font color=CCInfoHeader><pre>timer del <ID></font>
<font color=CCInfoText>Deletes a timer. Use the ID from the timers list.
--- End code ---
Khalem:
Nice one. Will play with it later :)
Xenixa:
This module is screwed. If there's no Timers in the DB it spams the console with:
Warning: Invalid argument supplied for foreach() in \Bebot\modules\CustomTimers.php on line 69
Also gives the same warning at start up but on line 164.
Suggest you test for Timer entries before you process those code pieces.
Wanuarmi:
try placing
--- Code: ---
if (!empty($this -> timers)) {
}
--- End code ---
around those foreach statements, my php doesnt show warnings
I wonder if anyone else is using this, I used it for about two weeks before posting, and so far I havent had problems with it
btw thanks khalem :) tell me if you guys find other problems with it
im not updating it to fix warnings unless thats the way most windows users have php setted for
Navigation
[0] Message Index
[#] Next page
Go to full version