Kraigie / nostrum

Elixir Discord Library
https://kraigie.github.io/nostrum/
MIT License
589 stars 125 forks source link

Fix the error caused by trying to cast a datetime to datetime #582

Closed jb3 closed 2 months ago

jb3 commented 2 months ago

Users have reported a state machine error caused by what looks to be the guild upsert process calling the Nostrum.Util.maybe_to_datetime function on a value that is already a datetime.

We can resolve this by just returning datetimes as is from that function if we are passed one as an argument.

jb3 commented 2 months ago

Thanks!