From aa2ff227371bdf5ef873f623e5fb1fd6dda994ed Mon Sep 17 00:00:00 2001 From: Kreusada <67752638+Kreusada@users.noreply.github.com> Date: Sat, 23 Nov 2024 16:40:08 +0000 Subject: [PATCH] [Quotes] v1.3.1 Fix SSL and formatting --- quotes/quotes.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/quotes/quotes.py b/quotes/quotes.py index 51d639282..872ab7736 100644 --- a/quotes/quotes.py +++ b/quotes/quotes.py @@ -9,7 +9,7 @@ class Quotes(commands.Cog): """Get a random quote.""" - __version__ = "1.3.0" + __version__ = "1.3.1" __author__ = "Kreusada" def __init__(self, bot: Red): @@ -32,10 +32,6 @@ async def red_delete_data_for_user(self, **kwargs): async def quote(self, ctx: commands.Context): """Get a random quote.""" await ctx.typing() - try: - async with self.session.get(self.api) as r: - content = await r.json() - except ssl.SSLCertVerificationError: - await ctx.send(warning("Unable to connect to the quotes API.")) - return + async with self.session.get(self.api, ssl=False) as r: + content = (await r.json())[0] await ctx.send(f"From **{content['a']}**\n{content['q']}")