I used the freeCodeCamp tutorial by Beau Carnes but ZenQuotes is not working. I was also recommended aiohttp instead of requests module but aiohttp is not working. Anyone know how to modify Carnes’ tutorial or have documentation on how to use another quotes API for python discord bot?
async def get_quote():
response = requests.get("https://zenquotes.io/api/random")
json_data = json.loads(response.text)
quote = json_data[0]["q"]
return (quote)
@client.command(aliases=["umar"])
async def inspire(ctx):
quote = await get_quote()
await ctx.send(quote)```