Skip to content

Instantly share code, notes, and snippets.

@pawa-
Created December 20, 2016 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pawa-/a0144c062f47066b6d02ea03ceff04e0 to your computer and use it in GitHub Desktop.
Save pawa-/a0144c062f47066b6d02ea03ceff04e0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use LINE::Bot::API;
use LINE::Bot::API::Builder::SendMessage;
my $push_to = 'xxx'; # 送信先のグループID
my $channel_secret = 'xxx';
my $channel_access_token = 'xxx';
my $bot = LINE::Bot::API->new(
channel_secret => $channel_secret,
channel_access_token => $channel_access_token,
);
my $messages = LINE::Bot::API::Builder::SendMessage->new;
my $text = <<"EOS";
む、この参加人数では中止だな。
回答感謝する。
EOS
$messages->add_text(text => $text);
$bot->push_message($push_to, $messages->build);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment