Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link pronouns not showing correctly. #5

Open
H077y opened this issue Mar 15, 2023 · 0 comments
Open

Link pronouns not showing correctly. #5

H077y opened this issue Mar 15, 2023 · 0 comments

Comments

@H077y
Copy link

H077y commented Mar 15, 2023

As you can see below, Lilian does not support links in fields.

Image1

I assume you can see why it's happening, because Lilian is using the raw data given from the API which is a link.

I spent a few days coming up with a solution, but not only will it take a lot of API requests which may end in being ratelimited, but I wrote this in a language that is not similar to TS and may be difficult to read.

Image2

This is what my bot is doing:

  • If the input is a link, it uses the /api/pronouns/{pronoun} endpoint and inputs everything except https://en.pronouns.page/ in the {pronoun} field. It then saves pronoun_subject and pronoun_object.
    It then saves the link.

  • If the input is not a link, it then checks if it begins with :. If yes, it uses the /api/pronouns/{pronoun} and searches for the input including the :. It then saves pronoun_subject and possessive_determiner.
    It then saves the link, replacing every space with %20.

  • If it's none of these, it just uses /api/pronouns/{pronoun} with the input as the {pronoun}, and saves the pronoun_subject and pronoun_object.
    It then saves the link.

  • It then combines everything together to make [{pronoun1}/{pronoun2}]({link}) with the pronouns in order of which was saved first.

The nameself pronoun has to be displayed differently to the other two options, otherwise it would show Name/Name instead of Name/Name's

Again, I know this is probably not a good fix due to ratelimiting; However this is a possible idea that I spent a while coming up with and working on to offer up a working idea.
If you do want to try to read the code, I can send it to you, but it's using a very simplified programming language for a mobile app (Bot Designer For Discord)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant