mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
feat(Channel): add isText() type guard (#4745)
This commit is contained in:
@@ -97,6 +97,14 @@ class Channel extends Base {
|
||||
return this.client.channels.fetch(this.id, true, force);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether this channel is text-based.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isText() {
|
||||
return 'messages' in this;
|
||||
}
|
||||
|
||||
static create(client, data, guild) {
|
||||
const Structures = require('../util/Structures');
|
||||
let channel;
|
||||
|
||||
Reference in New Issue
Block a user