Skip to content

PR #31

@Anonym0us33

Description

@Anonym0us33

i tried to make a PR but i got an error
Pull request creation failed. Validation failed: must be a collaborator

        if "https://giphy.com/gifs/" in message_content:
            # Extract the giphy GIF URL from the message content
            start_index = message_content.index("https://giphy.com/gifs/")
            end_index = message_content.find(" ", start_index)
            if end_index == -1:
                tenor_url = message_content[start_index:]
            else:
                tenor_url = message_content[start_index:end_index]
            # Split the URL on forward slashes
            parts = tenor_url.split("/")
            # Extract the relevant words from the URL
            words = parts[-1].split("-")[:-1]
            # Join the words into a sentence
            sentence = " ".join(words)
            message_content = f"{message_content} [{message.author.name} posts an animated {sentence} ]"
            message_content = message_content.replace(tenor_url, "")
            return message_content
 giphy_pattern = re.compile(r'https://giphy.com/gifs/[\w-]+')


        elif giphy_pattern.search(message.content):
            return True

i lost my formatting and explanation of the code that I typed out because of the permission error so here you go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions