async validateDiscordChannelsArg(context, orgId, channelType) {
    if (this.channels.length === 0) {
      return false;
    }

    const guild = context.discordClient.guilds.cache.get(orgId);
    if (guild === undefined) {
      return false;
    }

    const filteredChannels = guild.channels.cache.filter(
      channel => this.channels.includes(channel.id) &&
      (channelType !== undefined || channel.type === channelType));

    return filteredChannels.size !== this.channels.length;
  }
/**
   * Validates that all given channels are existing for the organization and have a proper type (text, voice etc.).
   * @see OrgChannel
   * @param  {Context}          context     the Bot's context
   * @param  {string}           orgId       the organization identifier
   * @param  {string}           channelType the channel type
   * @return {Promise<Boolean>}             true if the validation passed
   */
Validates that all given channels are existing for the organization and have a proper type (text, voice etc.).
Validates that all given channels are existing for the organization and have a proper type ( text voice etc . ) .
async validateDiscordChannelsArg(context, orgId, channelType) {
    if (this.channels.length === 0) {
      return false;
    }
    const guild = context.discordClient.guilds.cache.get(orgId);
    if (guild === undefined) {
      return false;
    }
    const filteredChannels = guild.channels.cache.filter(
      channel => this.channels.includes(channel.id) &&
      (channelType !== undefined || channel.type === channelType));
    return filteredChannels.size !== this.channels.length;
  }
async validateDiscordChannelsArg ( context , orgId , channelType ) { if ( this . channels . length === 0 ) { return false ; } const guild = context . discordClient . guilds . cache . get ( orgId ) ; if ( guild === undefined ) { return false ; } const filteredChannels = guild . channels . cache . filter ( channel => this . channels . includes ( channel . id ) && ( channelType !== undefined || channel . type === channelType ) ) ; return filteredChannels . size !== this . channels . length ; }
Validates that all given channels are existing for the organization and have a proper type (text, voice etc.).
Validates that all given channels are existing for the organization and have a proper type ( text voice etc . ) .