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

fix(Guild): name acronym #4104

Merged
merged 1 commit into from
Apr 20, 2020
Merged

fix(Guild): name acronym #4104

merged 1 commit into from
Apr 20, 2020

Conversation

papaia
Copy link
Contributor

@papaia papaia commented Apr 19, 2020

Please describe the changes this PR makes and why it should be merged:
Fixes the guild name acronym generation to be the same as the one the Discord app uses (taken from DJScias/Discord-Datamining, search the page for t.getAcronym = f to find the definition).

Status

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

Copy link
Contributor

@Fyko Fyko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relevant code for anyone who doesn't want to download the almost 40mb file:

t.getAcronym = function(e) {
	return null != e ? e.replace(/'s /g, " ").replace(/\w+/g, (function(e) {
		return e[0]
	})).replace(/\s/g, "") : ""
}

@iCrawl iCrawl merged commit 97cbbb1 into discordjs:master Apr 20, 2020
@papaia papaia deleted the fix/guild-acronym branch April 20, 2020 20:23
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

Successfully merging this pull request may close these issues.

4 participants