cronokirby / alchemy

A discord library for Elixir
MIT License
152 stars 34 forks source link

MOD: Upgrade hackney & fix crash on startup #120

Closed Zarathustra2 closed 3 years ago

Zarathustra2 commented 3 years ago

For references: https://github.com/edgurgel/httpoison/issues/414

Also:

If we start up multiple instances of the bot at the same time the discord api will rate limit us and we will have to wait for the specified amount of milliseconds.

As the expected keys are not present in the payload, json["url"] will return nil and hence nil <> "?v=6&encoding=json" will crash.

Zarathustra2 commented 3 years ago

@cronokirby This can be now merged. Fixed the pipeline as well as a potential crash which can happen at startup if multiple instances are being spawned at the same time!

Also congrats to 100 Stars! :)

cronokirby commented 3 years ago

Very nice!