Description
Describe the bug
The bitcoin command fails to parse the response since Coindesk have fixed their API.
discord.app_commands.errors.CommandInvokeError: Command 'bitcoin' raised an exception: ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: application/json; charset=utf-8', url=URL('https://api.coindesk.com/v1/bpi/currentprice/BTC.json')
To Reproduce
Run /bitcoin
Expected behavior
An embed with the current price of bitcoin is displayed
Template Version
6.1.0
Additional context
Coindesk seems to have fixed their API to return the correct MIME type. Previously it returned application/javascript
as noted in the code. I would propose removing the explicit content_type
(default application/json
) or setting it to None
to explicitly ignore MIME type.