mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
Add Guild#nameAcronym
This commit is contained in:
parent
5dc83a1b03
commit
cd4a69d009
1 changed files with 9 additions and 0 deletions
|
|
@ -263,6 +263,15 @@ class Guild {
|
|||
return Constants.Endpoints.Guild(this).Icon(this.client.options.http.cdn, this.icon);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the acronym that shows up in place of a guild icon
|
||||
* @type {string}
|
||||
* @readonly
|
||||
*/
|
||||
get nameAcronym() {
|
||||
return this.name.replace(/\w+/g, name => name[0]).replace(/\s/g, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* The URL to this guild's splash
|
||||
* @type {?string}
|
||||
|
|
|
|||
Loading…
Reference in a new issue