summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Crawl/Bot.pm9
-rw-r--r--lib/Crawl/Bot/Plugin.pm2
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/Crawl/Bot.pm b/lib/Crawl/Bot.pm
index 135bef7..d78b259 100644
--- a/lib/Crawl/Bot.pm
+++ b/lib/Crawl/Bot.pm
@@ -106,4 +106,13 @@ sub say_all {
) for $self->channels;
}
+sub say_main {
+ my $self = shift;
+ my ($message) = @_;
+ $self->say(
+ channel => ($self->channels)[0],
+ body => $message,
+ );
+}
+
1;
diff --git a/lib/Crawl/Bot/Plugin.pm b/lib/Crawl/Bot/Plugin.pm
index 0661f24..8869fca 100644
--- a/lib/Crawl/Bot/Plugin.pm
+++ b/lib/Crawl/Bot/Plugin.pm
@@ -6,7 +6,7 @@ has bot => (
isa => 'Crawl::Bot',
required => 1,
weak_ref => 1,
- handles => [qw(emote say say_all data_dir)],
+ handles => [qw(emote say say_all say_main data_dir)],
);
# not all plugins require implementations here