Fix Encoding (#234)

Output would randomly show ’ instead of '
This commit is contained in:
Vault108
2021-06-03 12:28:07 -04:00
committed by GitHub
parent 07ee745b9e
commit 3bc65b688e

View File

@@ -17,5 +17,5 @@ class DadJokes(commands.Cog):
"""Gets a random dad joke."""
api = "https://icanhazdadjoke.com/"
async with aiohttp.request("GET", api, headers={"Accept": "text/plain"}) as r:
result = await r.text()
result = await r.text(encoding="UTF-8")
await ctx.send(f"`{result}`")