#πŸ”’ How do I add a minimum delay to each post?

56 messages Β· Page 1 of 1 (latest)

dreamy tree
urban mortarBOT
#

@dreamy tree

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

lament rapids
#

time module

loud acorn
dreamy tree
#

Where would I apply this?

loud acorn
dreamy tree
#

10 is seconds or minutes?

loud acorn
lament rapids
#

wherever you ned a delayfor x seconds sleep for that amount oftime KEEP IN MIND all work ceases for that time

dreamy tree
#

thank you!
Is I had someone write this for me.
Is there a way for me to make it so it goes off my timezone.

As it was posting wrong days

loud acorn
#

@dreamy tree I have given you the code

dreamy tree
#

Thank you

loud acorn
#

And omg I just saw my RAM refresh in real time.

dreamy tree
#

idk wym

loud acorn
lament rapids
#

and thats great code for a beginner well done

dreamy tree
loud acorn
loud acorn
dreamy tree
#

lol

#

Is there a way for me to make it so it goes off my timezone.

As it was posting after midnight which is wrong info then

lament rapids
#

i though bro said hashes were for beginneers

#

time.sleep(RETRY_INTERVAL) code already has it though

lament rapids
#

Yeah there is

dreamy tree
#

doesn't it do it here?

lament rapids
#

if i remebr datetime.datetime.utcnow orsmth wait lemme get the syntax

loud acorn
#

@dreamy tree You will need a new modual for that

#

I think?

lament rapids
#

he has datetime in the code look harder

#

datetime.datetime.utcnow(tz=datetime.UTC)```
loud acorn
#

Did you want your time zone?

loud acorn
lament rapids
#

idk

dreamy tree
lament rapids
#

pasting wouldn't do you gotta edit a bit i think. can you rephrase on what you want to do?

loud acorn
lament rapids
#

i'd leave you to it then, zata i shall take my leave.

loud acorn
#
now = datetime.now(timezone(timedelta(hours=0)))  
start_time = datetime(now.year, now.month, now.day, 8, 0, tzinfo=timezone(timedelta(hours=0)))
end_time = datetime(now.year, now.month, now.day, 22, 0, tzinfo=timezone(timedelta(hours=0)))
#

here is just the part we need

loud acorn
#

alright cya

#

@dreamy tree

dreamy tree
#

Thank you!!

#

Thank you for all your help brother! 🀝

loud acorn
dreamy tree
#

im a tad confused

#

@lament rapids sent me updated code..
But it won't paste into mine properly..

So where do I add the delay for the min seconds delay after each post?

loud acorn
#

@dreamy tree https://pastebin.com/GtnwsT8U

urban mortarBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.