Add Guild#nameAcronym

This commit is contained in:
Crawl
2017-08-12 11:50:15 +02:00
parent 5dc83a1b03
commit cd4a69d009

View File

@@ -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}