Giter Site home page Giter Site logo

pluralchum's Introduction


(PluralKit integration for BetterDiscord)



Hey! Is your head FULL OF PEOPLE? Are you an avid PLURALKIT USER?
Does seeing plain white usernames, broken profile popups and BOT tags all day make you want to BREAK THINGS?

Then PLURALCHUM is the plugin for you!


- [ Download - Changelog - Twitter ] -

(requires Zere's Plugin Library)





PluralKit is great. It helps untold numbers of systems communicate over Discord, providing them with robust tools for self-expression.
It's an invaluable resource for plural folk on the internet.

But as you may have noticed... It looks a bit crap, right?



These limitations aren't PK's fault. The bot uses webhooks to create proxy messages, which Discord just doesn't give features like custom name colours to. Nothing to do about it, unfortunately.

Except, of course, if you could mod the client. Enter Pluralchum.



Pluralchum is a plugin for BetterDiscord that utilizes PluralKit's web API to provide better integration for proxied messages.
It brings features like coloured member names and system tags, optional text colouring, a special PK badge for proxied messages, and much* more!

*not actually that much right now but i'm working on it okay





Yeah, it's not perfect. I tried my best, but I am categorically not a web developer. I'm always looking to make it better, and some of these will likely be fixed in due time, but, y'know, be aware of them.


- Major limitations -


1. Member colours aren't updated when changed.
PC has no way of knowing when a member's colour changes. It only gets that information when it asks for an update from PK in the first place!

As a workaround, you can click the PK badge next to a user to request a member info update manually.


2. Member names aren't clickable.
This one was more of a deliberate choice, as to not bite off more than I could chew. At some point, I'd love to give member names and avatars special PK profile popouts when clicked. That's The Big One, baby.


Beyond that, there are likely to be loads of bugs and small issues I haven't spotted. Please don't hesitate to submit an issue if something's wrong, and any contributions are greatly appreciated! (I apologize for my code.)





"This is great!"
- The Entire Cast of Homestuck Several Times Over


"This is gr8!"
- Oh, You Know


"this shitty plugin's crashed my discord like 5 times"
- Satisfied Customer


"I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT I HATE JAVASCRIPT"
- Unsatisfied Programmer


"this is just like chordioid"
- Unsubtle Plug


"I've embedded a virus in this code that will cause your computer to explode in thirty seconds. Run."
-Dirk Strider




disclaimer: i made all of these quotes up because i thought it would be mildly funny

except dirk's that one is real



- by ash taylor -

pluralchum's People

Contributors

666666t avatar ambdroid avatar ariagivens avatar dracoclaw avatar draconizations avatar eritbh avatar estrobiologist avatar programing-monkey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pluralchum's Issues

System tag color not working

Other systems tags appear to be taking their system color as is my settings, but my own tag is remaining uncolored for some reason

Formatting issues

Possible issue created by the new update that broke everything? Normal displaynames now look like this
image

(Just in case the dev is not aware) Plugin needs updating for Discord changes

Yesterday Discord introduced a new auto-update that apparently changed a lot of things in the application. BetterDiscord broke entirely for a short while, and all plugins need to be rewritten. I don't know if the dev is aware of this stuff happening so I'm putting this here. Of course, please take your time on any work that is to be done, and I wish you good luck!

EDIT: Ah I just noticed you tweeted about it. Still, good luck with the rewrite!

zereslibrary dependency seems deprecated

Someone recently made a new betterdiscord theme that relies on pluralchum to work, but installing things fresh is running into an issue. The zereslibrary plugin appears to have broken as of october 2023 due to a discord update and the repos owner has yet to resolve the problem. Is there a workaround or some more recent solution for this stuff?

Issues with emojis in dn's

In some dn's, emojis are being shown as boxes with question marks, despite the exact same emojis working completely fine with other member's dn's.
image
image

suggestion: allow clicking on PK avatars/names to get to user

its something about PK that's always bugged me and i think it would be cool, maybe only if you click on the system name for less ambiguity? idk
perhaps clicking on the member name could bring up their PK description (i think you can access that from the API) and clicking on the system name brings up the system's account

Pluralchum automatically disabling itself.

As the name suggests, Pluralchum is for some reason automatically disabling itself.
image
As you can see in this image^, Pluralchum is active.
I leave that page, however...
image
And when I come back, it's back off.

Dropdown menus not working

Hi,

I'm using Pluralchum, but whenever I try to change the default system tag color to that of a system member's color, the drop-down menus aren't showing up for whatever reason(s).

Please see the attached screenshot for reference.

Thanks,
RFLCTNS

Screenshot 2022-07-31 194208

pluralchum could not be started

TypeError: Modules is not iterable
at Pluralchum.forceMessageRefresh (eval at requireAddon (:4:43355), :225:26)
at Pluralchum.start (eval at requireAddon (:4:43355), :218:10)
at Object.startPlugin (:4:43903)
at Object.startAddon (:4:43696)
at Object.enableAddon (:4:10436)
at Object.toggleAddon (:4:10681)
at Object.togglePlugin (:4:41036)
at A.onChange (:4:101873)
at m.onChange (:4:96985)
at Object.Ye (https://discord.com/assets/2417af15fabc622ecc0f.js:1453:658)
at qe (https://discord.com/assets/2417af15fabc622ecc0f.js:1453:812)
at https://discord.com/assets/2417af15fabc622ecc0f.js:1473:409
at Pr (https://discord.com/assets/2417af15fabc622ecc0f.js:1473:506)
at Mr (https://discord.com/assets/2417af15fabc622ecc0f.js:1473:920)
at https://discord.com/assets/2417af15fabc622ecc0f.js:1479:680
at Ge (https://discord.com/assets/2417af15fabc622ecc0f.js:1561:404)
at https://discord.com/assets/2417af15fabc622ecc0f.js:1475:395
at Br (https://discord.com/assets/2417af15fabc622ecc0f.js:1475:425)
at rn (https://discord.com/assets/2417af15fabc622ecc0f.js:1462:757)
at nn (https://discord.com/assets/2417af15fabc622ecc0f.js:1462:7)
at t.unstable_runWithPriority (https://discord.com/assets/2417af15fabc622ecc0f.js:1662:828)
at Ko (https://discord.com/assets/2417af15fabc622ecc0f.js:1484:117)
at we (https://discord.com/assets/2417af15fabc622ecc0f.js:1561:144)
at en (https://discord.com/assets/2417af15fabc622ecc0f.js:1461:800)
at HTMLDivElement.r (https://discord.com/assets/40b8dd053309f0ba5d75.js:145:559)

slightly incorrect font weights

fair note: this might be a font rendering issue on my system, in which case close this; but on my machine(tm), PK users tend to have slightly wrong font weights/boldness compared to non-PK users. here's a screenshot that shows this (names changed for comparison's sake) - no custom CSS/BD theming is applied.

also note that this is almost definitely nit-picky

image

Other members' colors not loading

Hello! I'm not sure if this is a feature or not, but I downloaded the plugin to be able to see the colors other people set their PluralKit profiles to. I know the colors work for mine, but is there any way to see anyone else's? If it helps, they also have the plugin and have said it works fine. Thank you!

Project license?

TL;DR. Can this project have a license lmao.

I modified pluralchum for personal purposes. Mostly just making the proxy name and tag entirely the same color, so that server settings remain preserved (as it keeps the original webhook's name). And it works nicely!

I have a couple people interested in this edited version, since the lack of server setting preservation is an issue for some of them. I just don't know if I'm allowed to spread around edited versions of this plugin. A license would be nice!

(Also if you're interested I probably could PR a setting that does the exact same thing: removing the different colored system tags so it keeps servernames and tags. Just let me know if that's a thing you'd like to see!)

PK badge has no styling since recent discord update

I can't attach a screenshot right now, but hopefully the title should be clear enough.

Looks like the class names for the bot badge changed with a somewhat recent update, causing the PK badge to be unstyled. Not a huge deal, but I figured I'd open an issue nonetheless.

suggestion: improved replies

there's 2 parts to this one

  1. detect the PK "reply to" embeds and replace them with the native reply thing, you shouldnt even need to make any requests to do this cause the embed already has the text, avatar, and jump link
  2. improve replying to PK messages. maybe auto-react with ❗or auto-add the system tag to the message (if ping is enabled for replying), or allow the user to choose the behavior in plugin settings

Message headers never get updated

I left a comment on your tweet announcing the latest version already but it seems it's not just me who's having this issue.

I downloaded the updated version today, the plugin loads fine, but messageHeaderUpdate() never actually gets called. So no names ever get fetched and updated.

I'm not sure what's going wrong here but considering the comments point out that particular way of getting message headers could break at any moment, I wouldn't be surprised if that happened!

EDIT: I tried on both windows and linux (fedora), discord Stable 157360 (5cea3cf) (a fresh install on both OS's)

Colorful list?

Would it be possible to make the system list be colorful as well? Have each line be that member's color?

Colors will not work on my newly registered system.

Basically as said above, I deleted and re-imported my system so I could have the new ID's, and now pluralchum colors will not work at all with my system, but used to perfectly. It still works with other systems in servers I am in, but not ones with the new ID's.

Role colors on proxied message

I'm not sure how much effort it'd be to implement but I'd appreciate having an option to use an accounts role color for their pk messages in the case that they don't have a system/member color set. (Also having an option to always use it would be nice too.)

Thank you so much!

Seriously, thank you. This plugin works great for me and I love the energy of the readme and the release notes :P

Unable to download plugin library

Whenever I go to the link provided, it gives me "Unable to connect

An error occurred during a connection to betterdiscord.net.

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web."

is the site temporarily down? Ive checked my firewall and connections, and nothing was wrong there.

"PluralChum could not be started"

I've been getting this error everytime i try to turn on the PC plugin manually in the plugins menu of betterdiscord because PC doesn't turn on by itself like my other plugins.
I've tried uninstalling and reinstalling the plugin multiple times to make sure i had to most up to date version, i've tried uninstalling and reinstalling the plugin library as well, and i've even done the 'repair better discord' thing that pops up when you open the installer.
I had this issue once before, but simply uninstalling and reinstalling the plugin a few times fixed the issue, but now nothing seems to work. This issue usually pops up whenever discord updates itself.
Attached is a video of me trying to turn the plugin on, and the plugin library works just fine, so i have no idea why pluralchum just refuses to turn on. I really enjoy using PC so it sucks that i keep running into this issue.
https://github.com/user-attachments/assets/707a380c-1755-487b-81e5-6ff55b4c41cc

Reworking Servernames

Motivation

The servername has a ton of issues that keep popping up. (See: #4, #8, #15, #25) Unicode is really complicated and trying to munge the author name to separate the server name and system tag is kind of nightmarish. Really it would be much easier and better to query the PK API for the servername. However, for safety reasons you need the user's token in order to query that endpoint. So, we need to store the user's tokens.

The Security Issues

PK Tokens are Inherently Insecure

There's many potential issues with storing the user's PK token. Unfortunately tokens are an all or nothing proposition: either you get full access or no access. This makes it impossible at the moment to implement the Principle of Least Privilege. Compromised tokens cannot be revoked per application, the whole token must be regenerated. Together, this means we are taking on a big responsibility by storing tokens.

Encryption

We should at least try to encrypt the tokens while they are on disk so it can't just be read by anyone with read access to the pluralchum config file. The question is: where is the encryption key stored? It has to be accessible at runtime! The best solution as far as I can tell is to use Electron's safeStorage module. It uses the users "secret key" to encrypt/decrypt data. On Mac and Linux this the keychain/keyring. On Windows this is DPAPI.

However, these services are not always available. For instance if the user dismisses the keychain prompt. (Personally, I could not for the life of me get electron to recognize my gnome-keyring installation on arch).

Additionally, if we have access to decryption anybody else locally can probably decrypt too. So it doesn't eliminate risk entirely.

It's important to note too that a BetterDiscord plugin can in principle run arbitrary PK commands. So a lot of the risks kinda exist anyways.

Proposal

I propose that gate the servername feature behind two conditions:

  1. safeStorage encryption is available.
  2. A valid PK token is entered/stored
    Then we can use the PK API to retrieve the servernames, tags, etc. without issue.

Implementation

I've started work on implementing this feature, but wanted to get feedback early.

Alternatives

Do Nothing

We could decide that leaving servernames in the current experimental string munging state is better than having to deal with storing tokens.

Get rid of tag coloring for servernames

This would probably fix ?most? of the servername issues but also kinda defeats the point of the plugin and makes things weirdly inconsistent.

System tags can be incorrectly displayed

image
image

When a system has a servertag enabled, the plugin will often display both the servertag and base system tag, truncating the servertag. This truncation behaviour does not go away when the plugin is disabled and requires a hard refresh to rectify.

image
image
^ how these should appear in vanilla discord
image
image
^ how they appear after the plugin is disabled

Servername enabled causes inconsistent spacing between name and systemtag

Disclaimer: I know servername is buggy! But it's a feature I rely on, and I previously used @Draconizations patched version when running PluralChum to get them working, and they worked perfectly.

In the newest build, servernames do display, but when the setting is enabled, it causes inconsistent spacing between the proxy name and it's systemtag, regardless of whether its a servername or not.

image

First line is a member with a servername enabled - space between the name and » Ouro
Second line is a member with no servername enabled - space between the name and » Ouro
Third and fourth lines are the same members, with the servername setting turned off.

image

First line is a member with a servername enabled - no space between the name and » Ouro Second line is a member with no servername enabled - space between the name and » Ouro

As you can see, it inconsistently applies - the member Starburst always has the space correctly applied, but Tanz does not. Kalashnikov doesn't have the space correctly applied, but Master does. There should not be any excess whitespace in the names, but this is hard to check as you can't as reliably prod the API for servername info.

An ideal implementation for servernames (which is what Draconizations originally applied) would just be to have PluralChum respect the webhook's name and simply colour it, without prodding the API for any other info. This would remove alternate system colour functionality, but we personally don't use this, so it'd be a worthwhile trade-off.

Hope this makes sense! Sorry for any confusing explanation, but hopefully I conveyed it well.

names and tags glitching out in various ways with "use server names" enabled

Sometimes, but not always, there's no space between a member's name and their system tag.
Example:
image

This happens seemingly at random, relatively frequently in the chats I'm in.

EDIT:
All kinds of glitches are happening, actually.
image

EDIT 2:
Disabled server names, cleared cache, restarted Discord and things seem to be okay for now. Will update if things break again.

PK tag doesnt display until hovered over

not sure if this is an issue on my end or what
this plugin modifies the exact thing that you modify but it works instantly so i'd have a look at that
i'll try to learn bdapi and implement some of these myself but for now ill just give it to you lol

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.