Fix API request with verify=False
This commit is contained in:
parent
250ed0e40f
commit
36b9f2efda
1 changed files with 2 additions and 2 deletions
4
bot.py
4
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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue