-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Add Guild.acronym #10080
base: master
Are you sure you want to change the base?
Add Guild.acronym #10080
Conversation
I have two main issues with this.
Other than that I'm not sure on the overall merit of the PR. Is this a commonly requested feature? If you do a simple search of |
1 & 2. Fair points. Unfortunately, I don't know how to fix that, as I am very new to regex usage. Reviews are welcome. This is not a requested feature, but I thought it would fit in between the other features, as others pointed out, like |
3717ed6
to
8953938
Compare
From what I understood, I believe |
Unfortunately not, there are edge cases that apply to this, such as "X of Y" and "X's thing". |
Interesting, I just tested the examples you gave on both my mobile and desktop client, and they show up as "XoY" and "Xt", respectively. I ran my code snippet and it did get it right. |
Summary
This PR adds an
acronym
property to Guild that returns the characters that show up when a server has no icon set.The property returns a cached version (
_acronym
) since it rarely, if ever, changes.I got this idea from the discord.js library. I have converted it to Python as is.
Discussion post: https://canary.discord.com/channels/336642139381301249/1279035934192439388
Checklist