File: TestBot.pm

package info (click to toggle)
libbot-basicbot-perl 0.93-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 180 kB
  • sloc: perl: 960; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 526 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package TestBot;
use warnings;
use strict;
use base qw( Bot::BasicBot );
use Test::More;

sub connected {
  my $self = shift;
  ok(1, "connected");
  is( $self->nick, "basicbot_$$", "right nick" );
}

# ..now wait for the first tick..

sub tick {
  my $self = shift;
  my $channel = [ $self->channels ]->[0];

  ok(1, "tick");
  $self->say( channel => $channel, body => "Hello $$" );

  ok(1, "now use a notice from within tick");
  $self->notice( channel => $channel, body => "This should be a notice ($$)" );

  exit;
}

1;