Gets the channel attribute.

@return Channel The channel that the user started typing in.
481145
public function getChannelAttribute()
    {
        foreach ($this->discord->guilds as $guild) {
            if ($guild->channels->has($this->channel_id)) {
                return $guild->channels->get('id', $this->channel_id);
            }
        }
    }
816875
public static ConfigurableChannel of(Channel channel) {
    Assert.isTrue(channel instanceof ConfigurableChannel, "The channel {} was not created by Lyra", channel);
    return (ConfigurableChannel) channel;
  }
540187
protected function _getAttributeMap()
	{
		if( !isset( $this->_attributesMap ) )
		{
			$this->_attributesMap = array();

			foreach( $this->_attributes as $attribute ) {
				$this->_attributesMap[ $attribute->getCode() ] = $attribute;
			}
		}

		return $this->_attributesMap;
	}
743383
final public SelectionKey getKey(SocketChannel channel) {
        if (null == channel) {
            return null;
        }
        return channel.keyFor(this.selector);
    }
1044539
public function getChannels() {
        $response = $this->http()->get('get_channels', [
            'query' => [
                'accountID' => $this->config['accountID'],
                'accountKey' => $this->config['accountKey'],
            ],
        ]);
        return $this->parseResponse($response, true);
    }
43827
def channel(self):
        
        channel = getattr(self.state, "channel", None)
        if channel is None:
            channel = self.state.channel = self.connection.channel()
            if self.confirm_delivery:
                channel.confirm_delivery()

            self.channels.add(channel)
        return channel
1251502
public function getIsActiveAttribute()
    {
        try {
            $activity     = $this->activity;
            $lastActivity = ($activity instanceof UserActivity) ? $activity->last_activity : null;
            $laDate       = Carbon::createFromFormat('Y-m-d H:i:s', $lastActivity);
            return !(Carbon::now()->diffInSeconds($laDate) >= config('antares/users::check_activity_every'));
        } catch (\Exception $e) {
            return false;
        }
    }
997077
def system_channel(self):
        
        channel_id = self._system_channel_id
        return channel_id and self._channels.get(channel_id)
1360369
protected Channel provideChannel() throws IOException {
        if (channel == null || !channel.isOpen()) {
            Connection connection = connectionFactory.newConnection();
            channel = connection.createChannel();
        }
        return channel;
    }
682721
public function getChannelVariables($channel = null)
    {
        if (is_null($channel)) {
            if (!isset($this->keys['channel'])) {
                return $this->getChannelVariables('default');
            } else {
                return $this->getChannelVariables($this->keys['channel']);
            }
        } else {
            $channel = strtolower($channel);
            if (!isset($this->channelVariables[$channel])) {
                return null;
            }
            return $this->channelVariables[$channel];
        }
    }
895915
public function __toAttribute()
	{
		if ( $this->count() ) {
			$attr = null;

			if ( is_string( $this->attribute ) ) {
				$attr = $this->attribute;
			}
			elseif ( $this->attribute instanceof DOMAttr ) {
				$attr = $this->attribute->name;
			}

			if ( $attr ) {
				$values = htmlspecialchars((string) $this, ENT_QUOTES, ini_get('default_charset'), false);
				return sprintf('%1$s="%2$s"', $attr, $values);
			}
		}

		return '';
	}
637326
public function getChannel($channel_id = null)
    {
        $index = $channel_id ?: 'default';
        if (!array_key_exists($index, $this->channels)) {
            $this->channels[$index] = $this->connection->channel($channel_id);
        }
        return $this->channels[$index];
    }
1325855
protected String getDestinationChannelName() {
        if (endpointConfiguration.getChannel() != null) {
            return endpointConfiguration.getChannel().toString();
        } else if (StringUtils.hasText(endpointConfiguration.getChannelName())) {
            return endpointConfiguration.getChannelName();
        } else {
            throw new CitrusRuntimeException("Neither channel name nor channel object is set - " +
                    "please specify destination channel");
        }
    }
498529
public AsteriskChannel getDialedChannel()
    {
        synchronized (dialedChannels)
        {
            for (AsteriskChannel channel : dialedChannels)
            {
                if (channel != null)
                    return channel;
            }
        }
        return null;
    }
4418
public function getChannelType()
    {
        switch ($this->type) {
            case self::TYPE_TEXT:
            case self::TYPE_VOICE:
                return $this->type;
                break;
            default:
                return self::TYPE_TEXT;
                break;
        }
    }
110993
@Override
    public List<Channel> getChannels()
    {
        List<Channel> channels = new LinkedList<>();
        if (_acceptingParty != null)
            channels.add(_acceptingParty);
        if (_originatingParty != null)
            channels.add(_originatingParty);
        if (_transferTargetParty != null)
            channels.add(_transferTargetParty);
        return channels;
    }
365953
@Override
    public Channel getOpenChannelOrFail() throws ChannelClosedException {
        final Channel ch = getChannelOrFail();
        if (ch.isClosingOrClosed()) { // TODO: Since Remoting 2.33, we still need to explicitly declare minimum Remoting version
            throw new ChannelClosedException(new IllegalStateException("The associated channel " + ch + " is closing down or has closed down", ch.getCloseRequestCause()));
        }
        return ch;
    }