mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Add Guild.defaultChannel. (#646)
* Add Guild.defaultChannel. Closes #643. * Change defaultChannel to a getter.
This commit is contained in:
committed by
Schuyler Cebulskie
parent
31bdc4fb1e
commit
9bdf670a14
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
|
||||
|
||||
Reference in New Issue
Block a user