Property | Type | Description | |
---|---|---|---|
$bots | A map of bots. | ||
$channels | A map of channels. | ||
$connected | Indicates if the client is connected. | ||
$dms | A map of direct message channels. | ||
$groups | A map of groups. | ||
$lastMessageId | The ID of the last payload sent to Slack. | ||
$pendingMessages | An array of pending messages waiting for successful confirmation from Slack. | ||
$team | The team logged in to. | ||
$users | A map of users. | ||
$websocket | A websocket connection to the Slack API. |
Method | Description | |
---|---|---|
connect ( ) : React\Promise\PromiseInterface | Connects to the real-time messaging server. | |
disconnect ( ) | Disconnects the client. | |
getBotById ( string $id ) : React\Promise\PromiseInterface | Gets a bot by its ID. | |
getBots ( ) : React\Promise\PromiseInterface | Gets all bots in the Slack team. | |
getChannelById ( $id ) | {@inheritDoc} | |
getChannels ( ) | {@inheritDoc} | |
getDMById ( $id ) | {@inheritDoc} | |
getDMs ( ) | {@inheritDoc} | |
getGroupById ( $id ) | {@inheritDoc} | |
getGroups ( ) | {@inheritDoc} | |
getTeam ( ) | {@inheritDoc} | |
getUserById ( $id ) | {@inheritDoc} | |
getUsers ( ) | {@inheritDoc} | |
isConnected ( ) : boolean | Returns whether the client is connected. | |
postMessage ( |
{@inheritDoc} |
Method | Description | |
---|---|---|
onMessage ( Devristo\Phpws\Messaging\WebSocketMessageInterface $message ) | Handles incoming websocket messages, parses them, and emits them as remote events. |
public connect ( ) : React\Promise\PromiseInterface | ||
return | React\Promise\PromiseInterface |
public getBotById ( string $id ) : React\Promise\PromiseInterface | ||
$id | string | A bot ID. |
return | React\Promise\PromiseInterface | A promise for a bot object. |
public getBots ( ) : React\Promise\PromiseInterface | ||
return | React\Promise\PromiseInterface | A promise for an array of bots. |
public isConnected ( ) : boolean | ||
return | boolean |
public postMessage ( |
||
$message |
protected $lastMessageId |
protected $pendingMessages |