TGTGInsighttelegram intelligenceLIVE / telegram public index
← JS Organization
JS Organization avatar

TGINSIGHT POST

Post #456

@jsorganization

JS Organization

Views1,830Post view count
PostedJul 707/07/2024, 09:32 AM
Post content

Post content

Set Bed Time / Restrictions For Command Use Between 12 AM To 6 AM Bangladesh Time πŸ—“ TBC PYTHON CODEπŸ€– Command Name : YOUR COMMAND NAME Code : JS_Organizations = libs.dateandtime.now('Asia/Dhaka') hours = int(JS_Organizations['time'].split(':')[0]) minutes = int(JS_Organizations['time'].split(':')[1]) seconds = int(JS_Organizations['time'].split(':')[2]) bed_time_start = 0 # 12 AM in 24-hour format bed_time_end = 6 # 6 AM in 24-hour format if hours >= bed_time_start and hours < bed_time_end: remaining_hours = bed_time_end - hours - 1 remaining_minutes = 60 - minutes remaining_seconds = 60 - seconds ampm = 'AM' if hours < 12 else 'PM' hours12 = hours % 12 if hours12 == 0: hours12 = 12 remaining_time = f"<b>{remaining_hours} hours, {remaining_minutes} minutes, {remaining_seconds} seconds</b>" user_first_name = message.from_user.first_name message = ( f"<b>πŸ‘‹ Hey {user_first_name}</b>\n" f"<b>β”β”β”β”β”β”β”β”β€’β…β€’Β°β€’βˆβ€’Β°β€’β…β€’β”β”β”β”β”β”β”β”\n" f"It is Bed Time πŸ›οΈ\n" f"So You Cannot Use This Button From 12:00 AM To 6:00 AM in Bangladesh Time\n" f"Current Time: {hours12}:{minutes:02} {ampm}</b>\n" f"<b>β”β”β”β”β”β”β”β”β€’β…β€’Β°β€’βˆβ€’Β°β€’β…β€’β”β”β”β”β”β”β”β”\n" f"Come Back After: {remaining_time}</b>\n" f"<b>β”β”β”β”β”β”β”β”β€’β…β€’Β°β€’βˆβ€’Β°β€’β…β€’β”β”β”β”β”β”β”β”</b>" ) bot.sendMessage(chat_id=message.chat.id, text=message, parse_mode="HTML") else: #YOUR COMMAND Main CODE IS HERE, Or bot.sendMessage("Now Up Time") Paste this code above the code of your command! And enter your code below! You Can Change Your Timezone And Bed Time ⏱ If You Post This In Your Channel. please Mention Our Channel Name For Credit #BedTime#RestrictionTime#Time#TBC#JSOrganization Β© Copyright : @JSOrganization ❓ Question/Error : @itsSowrov