You are here

public function SlackInterface::sendMessage in Slack 8

Sends a message to a Slack channel.

Parameters

string $message: The message sent to the channel.

string $channel: The channel in the Slack service to send messages.

string $username: The bot name displayed in the channel.

Return value

bool|object Slack response.

Throws

\GuzzleHttp\Exception\GuzzleException

1 method overrides SlackInterface::sendMessage()
Slack::sendMessage in src/Slack.php
Sends a message to a Slack channel.

File

src/SlackInterface.php, line 25

Class

SlackInterface
Interface for the Slack service.

Namespace

Drupal\slack

Code

public function sendMessage($message, $channel = '', $username = '');