checks if we or the given user is joined to the specified channel and returns the result
ChannelSyncing is required for this.

@api
@see setChannelSyncing
@param string $channel
@param string $nickname
@return boolean
172891
public function isJoined($channel, $nickname = null)
    {
        if (!$this->_channelsyncing) {
            $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: isJoined() is called '
                .'and the required Channel Syncing is not activated!',
                __FILE__, __LINE__
            );
            return false;
        }

        if (!isset($this->_channels[strtolower($channel)])) {
            if ($nickname !== null) {
                $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: isJoined() is called'
                    .' on a user in a channel we are not joined to!',
                    __FILE__, __LINE__
                );
            }
            return false;
        }

        if ($nickname === null) {
            return true;
        }

        return isset($this->getChannel($channel)->users[strtolower($nickname)]);
    }
385792
public function userSubscriptionChannel($channel, $user, $token = null)
    {
        return $this->sendRequest('GET', 'users/'.$user.'/subscriptions/'.$channel, $this->getToken($token));
    }
1074837
public function startChannel($channel)
    {
        $op = $this->sendStartChannelOperation($channel);

        // waiting for create operation finishes
        $op = $this->awaitOperation($op);

        // true if succeeded
        return $op->getState() == OperationState::Succeeded;
    }
1108689
public function checkUserFollowsChannel($userIdentifier, $channelIdentifier)
    {
        if ($this->apiVersionIsGreaterThanV3()) {
            if (!is_numeric($userIdentifier)) {
                throw new InvalidIdentifierException('user');
            }

            if (!is_numeric($channelIdentifier)) {
                throw new InvalidIdentifierException('channel');
            }
        }

        return $this->get(sprintf('users/%s/follows/channels/%s', $userIdentifier, $channelIdentifier));
    }
1063000
public function channel(string $channel): Observable
    {
        // Only join a channel once
        if (isset($this->channels[$channel])) {
            return $this->channels[$channel];
        }

        // Ensure we only get messages for the given channel
        $channelMessages = $this->messages->filter(function (Event $event) use ($channel) {
            return $event->getChannel() !== '' && $event->getChannel() === $channel;
        });

        $subscribe = $this->connected
            ->do(function () use ($channel) {
                // Subscribe to pusher channel after connected
                $this->send(Event::subscribeOn($channel));
            })
            ->flatMapTo(Observable::empty());

        // Observable representing channel events
        $this->channels[$channel] = $channelMessages
            ->merge($subscribe)
            ->filter([Event::class, 'subscriptionSucceeded'])
            ->retryWhen(function (Observable $errors) {
                return $errors->flatMap(function (Throwable $throwable) {
                    return $this->handleLowLevelError($throwable);
                });
            })
            ->finally(function () use ($channel) {
                // Send unsubscribe event
                $this->send(Event::unsubscribeOn($channel));

                // Remove our channel from the channel list so we don't resubscribe in case we reconnect
                unset($this->channels[$channel]);
            })
            ->singleInstance();

        return $this->channels[$channel];
    }
316675
public function voice($channel, $nickname, $priority = SMARTIRC_MEDIUM)
    {
        return $this->mode($channel, '+v '.$nickname, $priority);
    }
500009
public function joinOnMatch($nickname, UserEventInterface $event, EventQueueInterface $queue)
    {
        if ($nickname == $event->getConnection()->getNickname()
            && ($index = array_search($event->getSource(), $this->channels)) !== false) {
            $queue->ircJoin($this->channels[$index],
                $this->keys ? $this->keys[$index] : null);
        }
    }
135114
public function deleteChannel($channel)
    {
        $op = $this->sendDeleteChannelOperation($channel);

        // waiting for delete operation finishes
        $op = $this->awaitOperation($op);

        // true if succeeded
        return $op->getState() == OperationState::Succeeded;
    }
72609
@Override
    public Channel join(String channelName) {
        if (!connected) {
            throw new NotConnectedException();
        }

        ChannelImpl channel = new ChannelImpl(this, channelName);

        /* Attempt to join */
        if (channel.join()) {
            return channel;
        }

        /* Error while joining */
        return null;
    }
943594
public function op($channel, $nickname, $priority = SMARTIRC_MEDIUM)
    {
        return $this->mode($channel, '+o '.$nickname, $priority);
    }
310549
public function channel($channel)
    {
        $channel = $this->client->get(config('twitch-api.api_url') . '/kraken/channels/' . $channel);

        return $channel->json();
    }
787182
public function addChannel(ChannelOptions $channel)
    {
        $key = $channel->getKey();
        $this->channels[$key] = $channel;
        return $this;
    }
70859
final public function listen(string $channel): Promise
    {
        if (! $this->handle) {
            throw new FailureException('Not connected');
        }

        return $this->send("listen", $channel);
    }
155028
public function channel($channel) {
		if (!isset($channel['link'])) {
			$channel['link'] = '/';
		}
		if (!isset($channel['title'])) {
			$channel['title'] = '';
		}
		if (!isset($channel['description'])) {
			$channel['description'] = '';
		}

		$channel = $this->_prepareOutput($channel);
		return $channel;
	}
1172942
public function channel($channel = null)
    {
        // If the given driver has not been created before, we will create the instances
        // here and cache it so we can return it next time very quickly. If there is
        // already a driver created by this name, we'll just return that instance.
        if (!$this->hasChannel($channel)) {
            $this->addChannel($channel, $this->createChannel($channel));
        }

        return $this->getChannel($channel);
    }
321649
public function sendUpdateChannelOperation(Channel $channel)
    {
        $channelId = $channel->getId();
        Validate::notNull($channelId, 'channelId');

        return $this->_sendOperation(
            $channel,
            "Channels('{$channelId}')",
            Resources::HTTP_MERGE,
            [Resources::STATUS_ACCEPTED, Resources::STATUS_NO_CONTENT]);
    }
552658
public function devoice($channel, $nickname, $priority = SMARTIRC_MEDIUM)
    {
        return $this->mode($channel, '-v '.$nickname, $priority);
    }