mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
Add Guild.defaultChannel. (#646)
* Add Guild.defaultChannel. Closes #643. * Change defaultChannel to a getter.
This commit is contained in:
parent
31bdc4fb1e
commit
9bdf670a14
2 changed files with 10 additions and 1 deletions
File diff suppressed because one or more lines are too long
|
|
@ -226,6 +226,15 @@ class Guild {
|
|||
return this.members.get(this.ownerID);
|
||||
}
|
||||
|
||||
/**
|
||||
* The `#general` GuildChannel of the server.
|
||||
* @type {GuildChannel}
|
||||
* @readonly
|
||||
*/
|
||||
get defaultChannel() {
|
||||
return this.channels.get(this.id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the Guild with new information - e.g. a new name.
|
||||
* @param {GuildEditData} data The data to update the guild with
|
||||
|
|
|
|||
Loading…
Reference in a new issue