mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user