Add Guild#me (#1384)

* Add Guild#me

(also did minor docs cleanup)

* Don't use Guild#member as there's nothing to resolve

* Update ClientDataResolver.js

* Update Guild.js

* Update Guild.js

* Update Guild.js
This commit is contained in:
aemino
2017-04-30 01:30:59 -07:00
committed by Schuyler Cebulskie
parent 9a5de25d79
commit 5cad25ea69
2 changed files with 11 additions and 2 deletions

View File

@@ -312,7 +312,7 @@ class Guild {
}
/**
* The `@everyone` Role of the guild
* The `@everyone` role of the guild
* @type {Role}
* @readonly
*/
@@ -320,6 +320,15 @@ class Guild {
return this.roles.get(this.id);
}
/**
* The client user as a GuildMember of this guild
* @type {?GuildMember}
* @readonly
*/
get me() {
return this.members.get(this.client.user.id);
}
/**
* Fetches a collection of roles in the current guild sorted by position
* @type {Collection<Snowflake, Role>}