public function getChannelAttribute()
    {
        foreach ($this->discord->guilds as $guild) {
            if ($guild->channels->has($this->channel_id)) {
                return $guild->channels->get('id', $this->channel_id);
            }
        }

        if ($this->cache->has("pm_channels.{$this->channel_id}")) {
            return $this->cache->get("pm_channels.{$this->channel_id}");
        }

        return $this->factory->create(Channel::class, [
            'id'   => $this->channel_id,
            'type' => Channel::TYPE_DM,
        ], true);
    }
public function getChannelAttribute()
    {
        foreach ($this->discord->guilds as $guild) {
            if ($guild->channels->has($this->channel_id)) {
                return $guild->channels->get('id', $this->channel_id);
            }
        }

        if ($this->cache->has("pm_channels.{$this->channel_id}")) {
            return $this->cache->get("pm_channels.{$this->channel_id}");
        }

        return $this->factory->create(Channel::class, [
            'id'   => $this->channel_id,
            'type' => Channel::TYPE_DM,
        ], true);
    }
public function getChannelAttribute ( ) { foreach ( $ this -> discord -> guilds as $ guild ) { if ( $ guild -> channels -> has ( $ this -> channel_id ) ) { return $ guild -> channels -> get ( 'id' , $ this -> channel_id ) ; } } if ( $ this -> cache -> has ( "pm_channels.{$this->channel_id}" ) ) { return $ this -> cache -> get ( "pm_channels.{$this->channel_id}" ) ; } return $ this -> factory -> create ( Channel :: class , [ 'id' => $ this -> channel_id , 'type' => Channel :: TYPE_DM , ] , true ) ; }
Returns the channel attribute.

@return Channel The channel the message was sent in.
Returns the channel attribute .