feat(Types): support type-guarding using Channel#type string li… (#3918)

* feat(types): union type for Channels

* feat(Types): union for TextBasedChannelTypes

* fix(Types): use new union types in return values

* Update typings/index.d.ts

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* Update typings/index.d.ts

Co-Authored-By: Sugden <28943913+NotSugden@users.noreply.github.com>

* fix(Types): various minor improvements for Partials

* fix(GuildChannel): partial should return false

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Crawl <icrawltogo@gmail.com>
This commit is contained in:
Ryan Munro
2020-03-15 02:50:43 +11:00
committed by GitHub
parent 44ac5fe6df
commit 69d69f25b9
2 changed files with 54 additions and 27 deletions

View File

@@ -576,6 +576,15 @@ class GuildChannel extends Channel {
return this.permissionsFor(this.client.user).has(Permissions.FLAGS.MANAGE_CHANNELS, false);
}
/**
* Whether this GuildChannel is a partial
* @type {boolean}
* @readonly
*/
get partial() {
return false;
}
/**
* Whether the channel is viewable by the client user
* @type {boolean}