From 0c5994fce728a78eba1508a9368a942e0c6d1b40 Mon Sep 17 00:00:00 2001 From: dkay Date: Tue, 16 Jun 2026 12:37:10 -0700 Subject: [PATCH 1/2] Fix giphy command --- modules/fun/giphy.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/modules/fun/giphy.py b/modules/fun/giphy.py index 1bc41096..8c4b7d56 100644 --- a/modules/fun/giphy.py +++ b/modules/fun/giphy.py @@ -41,22 +41,9 @@ class Giphy(cogs.BaseCog): SEARCH_LIMIT (int): The max amount of gifs to search for """ - GIPHY_URL: str = "http://api.giphy.com/v1/gifs/search?q={}&api_key={}&limit={}" + GIPHY_URL: str = "https://api.giphy.com/v1/gifs/search?q={}&api_key={}&limit={}" SEARCH_LIMIT: int = 10 - @staticmethod - def parse_url(url: str) -> str: - """Parses the raw API url into a useable gif link - - Args: - url (str): The raw URL from Giphy - - Returns: - str: The direct link to the gif, if it exists - """ - index = url.find("?cid=") - return url[:index] - @auxiliary.with_typing @commands.guild_only() @commands.command( @@ -90,8 +77,7 @@ async def giphy(self: Self, ctx: commands.Context, *, query: str) -> None: embeds = [] for item in data: - url = item.get("images", {}).get("original", {}).get("url") - url = self.parse_url(url) + url = item.get("embed_url", {}) embeds.append(url) await ui.PaginateView().send(ctx.channel, ctx.author, embeds) From fae936fe096d4a0483a0959e075bac561f917e73 Mon Sep 17 00:00:00 2001 From: dkay Date: Tue, 16 Jun 2026 12:38:44 -0700 Subject: [PATCH 2/2] Update changelog --- changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/changelog.md b/changelog.md index eb899500..a054687b 100644 --- a/changelog.md +++ b/changelog.md @@ -8,6 +8,9 @@ Changes since 2026.06.15 ## Fun +### Giphy +- Fixes giphy command not correctly returning the image + ## Internal ## Moderation