App-RoboBot
view release on metacpan or search on metacpan
lib/App/RoboBot/Network/Slack.pm view on Meta::CPAN
package App::RoboBot::Network::Slack;
$App::RoboBot::Network::Slack::VERSION = '4.004';
use v5.20;
use namespace::autoclean;
use Moose;
use MooseX::SetOnce;
use AnyEvent;
use AnyEvent::SlackRTM;
use Data::Dumper;
use JSON;
use LWP::Simple;
use App::RoboBot::Channel;
use App::RoboBot::Message;
use App::RoboBot::Nick;
extends 'App::RoboBot::Network';
has '+type' => (
default => 'slack',
);
has 'token' => (
is => 'ro',
isa => 'Str',
required => 1,
);
has 'client' => (
is => 'rw',
isa => 'AnyEvent::SlackRTM',
traits => [qw( SetOnce )],
);
has 'keepalive' => (
is => 'rw',
traits => [qw( SetOnce )],
);
has 'ping_payload' => (
is => 'ro',
isa => 'HashRef',
default => sub { { pong => 1 } },
);
has 'start_ts' => (
is => 'ro',
isa => 'Int',
default => sub { time() },
);
has 'profile_cache' => (
is => 'rw',
isa => 'HashRef',
default => sub { {} },
);
has 'channel_cache' => (
is => 'rw',
isa => 'HashRef',
default => sub { {} },
( run in 1.123 second using v1.01-cache-2.11-cpan-39bf76dae61 )