Net::Async::Slack::RTM - realtime messaging support for https://slack.com
This is a basic wrapper for Slack's RTM features.
The realtime messaging API is mostly useful as an event stream. Although it is possible to send messages through this API as well - see "send_message" - the main HTTP API offers more features.
For a full list of events, see https://api.slack.com/events.
This is the stream of events, as a Ryu::Source.
Example usage:
$rtm->events ->filter(type => 'message') ->sprintf_methods('> %s', $_->text) ->say ->await;
Sends a message to a user or channel.
This is limited (by the Slack API) to the default message formatting mode, so it's only useful for simple messages.
Takes the following named parameters:
id - custom message ID (optional)
channel - either a Net::Async::Slack::Channel instance, or a channel ID
You may not need to call these directly. If I'm wrong and you find yourself having to do that, please complain via the usual channels.
Establishes the connection. Called by the top-level Net::Async::Slack instance.
add_child, adopt_future, adopted_futures, can_event, children, configure_unknown, debug_printf, get_loop, invoke_error, invoke_event, loop, make_event_cb, maybe_invoke_event, maybe_make_event_cb, new, notifier_name, parent, remove_child, remove_from_parent
Tom Molesworth <TEAM@cpan.org>
Copyright Tom Molesworth 2016-2023. Licensed under the same terms as Perl itself.
To install Net::Async::Slack, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Async::Slack
CPAN shell
perl -MCPAN -e shell install Net::Async::Slack
For more information on module installation, please visit the detailed CPAN module installation guide.