| View previous topic :: View next topic |
| Author |
Message |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Mon Sep 06, 2021 2:18 pm Post subject: event countdown till the date |
|
|
i would like to request an event countdown till the event day.. (January - December)
example: https://www.xmasclock.com/ <-- see this link..
let's say, christmas countdown.
- add and set the month/date/year/
- auto show the countdown in the channel once you set the time every 8hours or set a minutes as you like
example auto show:
<BOT> ** Christmas Day ** is in 15 weeks and 4 days left. [ DEC 25 2021 ]
and the following day is:
<BOT> ** Christmas Day ** is in 15 weeks and 3 days left. [ DEC 25 2021 ]
i hope anyone interested in doing the script.
thank you. |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Mon Sep 06, 2021 2:39 pm Post subject: |
|
|
Try this here  _________________ ComputerTech |
|
| Back to top |
|
 |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Mon Sep 06, 2021 3:29 pm Post subject: |
|
|
(need to changed my opinion for better cause)
here are the commands for that script @CompterTech
| Code: |
<BOT> Date.tcl: Store and set channel topics to show birthdays, or store event reminders and show countdowns on command.
<BOT> To input your birthday: .date bday <month> <day> <year> [additional channels]
<BOT> [Additional channels] are extra channels to set birthday topics in (max 5)
<BOT> Default channel #botname is automatically included in the list.
<BOT> Note: Excluded or invalid channels are automatically dropped from the list.
<BOT> Example: .date bday Oct 02 1981 #channel2 #channel3
<BOT> To input an event: .date event <eventname> <month> <day> <year> <time> <description>
<BOT> Example: .date event myevent Feb 10 2001 19:30 Some Business Meeting
<BOT> To view dates:
<BOT> .date bday - show countdown til your birthday in channel.
<BOT> .date bday <username> - show countdown til username's birthday in channel.
<BOT> Note: this is the username as stored in the bot!
<BOT> .date listbdays - show all birthdays.
<BOT> .date nextbday - show the next upcoming birthday(s).
<BOT> .date event eventname - show countdown til eventname in channel.
<BOT> .date listevents - show all of your events.
<BOT> .date listall - show all events, including other peoples.
<BOT> To remove a date:
<BOT> .date remove bday - remove your birthday.
<BOT> .date remove eventname - Remove event by name.
<BOT> Commands can be typed in channel or msg to BOT
<BOT> [end date help]
|
now, i set the event in the #channel
| Code: |
<User> .date event Christmas Dec 25 2021 12:00 Merry Christmas
<BOT> Eventname christmas is set for DEC 25 2021 at 12:00 with desc: Merry Christmas
|
and then i need to type from the channel to show the event
| Code: |
<User> .date event Christmas
<BOT> christmas is in 15 weeks 4 days 23 hours 3 minutes 9 seconds (9500589 sec.), on DEC 25 2021 12:00. Desc: Merry Christmas
|
Now, i want that this event will be set as autos how in the channel, like you set 8hours or 10hours and it shows in the channel.
my suggestion to show is like this (if any better suggestions, that's very nice)
| Code: |
<BOT> *** Christmas Day *** is in 15 weeks 4 days 23 hours 3 minutes 9 seconds, on [ DEC 25 2021 ] | MERRY CHRISTMAS
|
The missing feature of this script is the auto show event in the channel.
Hope someone have a time and help out. thank you. |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
|
| Back to top |
|
 |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Tue Sep 07, 2021 1:20 am Post subject: |
|
|
thanks.
this will do.. and it is working perfect.
how can i set the timer to every 4 hours? |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Tue Sep 07, 2021 7:31 am Post subject: |
|
|
| mabrook wrote: |
...
how can i set the timer to every 4 hours?
|
Possibly some info to work with:
Visit:
https://docs.eggheads.org/mainDocs/tcl-commands.html
and text search to find:
bind cron
Read that. Back when the posts that you are reading - from 2007 - I don't believe that bind cron even existed. It's very handy.
Next, visit:
https://crontab.guru/
as that makes it easy to get the "cron" part of the command set the way you want it. You can experiment on that webpage, plugging in values, etc. You'll see.
I hope this helps. _________________ For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia ! |
|
| Back to top |
|
 |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Tue Sep 07, 2021 11:09 am Post subject: |
|
|
| thank you |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Tue Sep 07, 2021 9:03 pm Post subject: |
|
|
| mabrook wrote: | ...
how can i set the timer to every 4 hours?
|
Try replace the bind time line with this bind cron line... | Code: | | bind cron - {00 */4 * * *} count:down |
_________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
mabrook Halfop

Joined: 14 Jun 2021 Posts: 60
|
Posted: Wed Sep 08, 2021 1:46 am Post subject: |
|
|
thanks Spike^^
it working great..  |
|
| Back to top |
|
 |
|