#usamarashad_best-practices

1 messages ¡ Page 1 of 1 (latest)

sand fieldBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1257325037073989756

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

visual lion
#

Here is a picture of the function I have written

steel atlasBOT
stark warren
#

You need to pass previous phases in the update call

visual lion
#

ok. so I should pass the same phases but update the phase prices only. Correct?

#

isnt that the same thing what im doing ?

stark warren
#

Can you share the request id where you're getting the error? Would need to look

visual lion
#

there is no request ID generated. Line number 788 jumps to an error directly.

stark warren
#

Yes there should be a request id

visual lion
#

req_LrMKHoheFXLamt

stark warren
#

Yeah so in that request, you're trying to change the price on previous phases that have already ended

#

You can't do that

#

That first phase you pass in ended on 6/14

#

And you're passing in a different price

visual lion
#

ok. So I need to make a check for passed phases and not change them. What would be the parameter on which I can base my check on ? the start_date or the end_date or is there some other flag?

stark warren
#

yep check the end_date

#

But you can use same end_date check to find which ones are in the past

visual lion
#

ok i will try checking th end_date and compare it with the current unix timestamp