Penguin-Spy / powercord-ppl-moe

A Replugged plugin that displays a user's ppl.moe profile as a new tab in the user's modal
GNU General Public License v3.0
8 stars 1 forks source link

Some advice ^^ #3

Closed queer closed 3 years ago

queer commented 3 years ago

Was wondering where all the new API requests came from when there's no real docs anywhere :D

Display the user's badges (Admin, Beta tester, bug reporter [any others?])

Current badges are:

The :bug: badge actually isn't exposed via the API right now, whoops! It'll be fixed when I deploy it later. This is fixed now.

Display the user's latest post? idk but if people want it i'll add it

Be careful with UI if you do this, it caps at 10k chars.


https://github.com/Penguin-Spy/powercord-ppl-moe/blob/993b683fcfd127e9e379ebf52d89109bcc6c386f/index.js#L34

ppl.moe colour is #DB325C, as with all Mewna-umbrella projects.

https://github.com/Penguin-Spy/powercord-ppl-moe/blob/993b683fcfd127e9e379ebf52d89109bcc6c386f/index.js#L35-L37

You can also use https://i.imgur.com/KqbpO1x.png as an icon

I'm waffling over switching all the Mewna branding to this more pixel-art style.

https://github.com/Penguin-Spy/powercord-ppl-moe/blob/993b683fcfd127e9e379ebf52d89109bcc6c386f/index.js#L59-L61

This should be account.unique_url; a user's unique URL is just set to their ID when they're initially created.

queer commented 3 years ago

btw, my profile will always have every feature enabled on it, so you can use that to get the most up-to-date form of API responses.

▶  curl -s https://ppl.moe/api/user/discord/128316294742147072 | jq .
{
  "badges": [
    "admin",
    "bug_hunter",
    "indev"
  ],
  "bio": "i made this ✨\n\nprofessional napper, part-time shit-talker, spare-time tech-complainer\n\ncheck out my [github](https://queer.gg)",
  "id": "da2437375d07d667b673bc205409c19e",
  "info": {
    "birthday": "02-14",
    "gender": "femme",
    "language": "english",
    "location": "out somewhere in the universe",
    "pronouns": "she/her / they/them / it/its",
    "website": "https://amy.gg"
  },
  "last_post": {
    "emotion": "scared",
    "id": "Ir7QCAwOPAe-0UEHOBOYyg",
    "text": "banana."
  },
  "name": "amy",
  "tagline": "i made this",
  "unique_url": "amy"
}
▶  
Penguin-Spy commented 3 years ago

yoo, thanks for the feedback! it's pretty cool to have the actual dev of the website acknowledge my plugin :)

about the color & icon: i just yoinked the color from the website background (and i actually don't know where the color is used in Discord/Powercord, so i hadn't seen what it looked like). I'll use the correct one though, just incase a theme uses it or something. for the icon, I didn't see one anywhere on the website, so i just grabbed your server's icon. i like the pixel art though, i'll use that for sure (it's very cute).

https://github.com/Penguin-Spy/powercord-ppl-moe/blob/993b683fcfd127e9e379ebf52d89109bcc6c386f/index.js#L59-L61 the account.id here is actually referring to discord's terminology, not ppl.moe's. in the fetchAccount function above: https://github.com/Penguin-Spy/powercord-ppl-moe/blob/993b683fcfd127e9e379ebf52d89109bcc6c386f/index.js#L49-L54 i set the "discord id" to be profile.unique_url, so it is using the right value, the terminology is just different.

also thanks for the tip about your profile having all the features and the list of badges, that'll come in handy!

queer commented 3 years ago

i set the "discord id" to be profile.unique_url, so it is using the right value, the terminology is just different.

Ah, okay. Funny terminology strikes again :D

queer commented 3 years ago

it's pretty cool to have the actual dev of the website acknowledge my plugin :)

:heart: