Reputation: 115
Is it possible for datetime to be updated as the program is running? My discord bot will be running 24/7
Code I have
now = datetime.datetime.now()
file.write(redeemkey + " // Discord ID: " + authorID + " - IP: " + response['ipAddress'] + " - Redemed at: " + now.strftime("%Y-%m-%d %H:%M:%S") + "\n")
But that just writes the time that the bot was started and not when the command was actually called
Upvotes: 0
Views: 99
Reputation: 115
I put my now = datetime.datetime.now()
inside an if statement that gets called when the command is called (!redeem
). That overrides it
Upvotes: 1