From 36b9f2efda5d4c0f826b4aae70504f7d132fe0a7 Mon Sep 17 00:00:00 2001 From: Pierre Berthe Date: Mon, 12 Feb 2024 23:07:12 +0100 Subject: [PATCH] Fix API request with verify=False --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index d745a9b..b3483f4 100644 --- a/bot.py +++ b/bot.py @@ -85,7 +85,7 @@ class MyClient(discord.Client): @tasks.loop(time=mid) async def quote_task(self): channel = self.get_channel(GENERAL_CHANNEL_ID) - response = get("https://api.quotable.io/random?maxLength=230") + response = get("https://api.quotable.io/random?maxLength=230", verify=False) my_quote = response.json() await channel.send(embed=embed_from_quote(my_quote)) @@ -168,7 +168,7 @@ async def translate(interaction: discord.Interaction, message: discord.Message): @client.tree.command() async def quote(interaction: discord.Interaction): """Sends a random quote.""" - response = get('https://api.quotable.io/random?maxLength=230') + response = get('https://api.quotable.io/random?maxLength=230', verify=False) my_quote = response.json() await interaction.response.send_message(embed=embed_from_quote(my_quote))