summaryrefslogtreecommitdiffstats
path: root/lib/Crawl/Bot.pm
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2013-06-25 15:41:38 -0500
committerNeil Moore <neil@s-z.org>2013-06-25 16:36:01 -0500
commite8e07e2500b51ba65faf4a207bd4965e11d96d4d (patch)
tree383503c61086b47dd5b9520cd865045dc91aaa31 /lib/Crawl/Bot.pm
parent5154444c37381d71db1d2da8a9bc61142cf6ac12 (diff)
downloadcrawlbot-e8e07e2500b51ba65faf4a207bd4965e11d96d4d.tar.gz
crawlbot-e8e07e2500b51ba65faf4a207bd4965e11d96d4d.zip
Add say_main method to say something in the main channel only.
Diffstat (limited to 'lib/Crawl/Bot.pm')
-rw-r--r--lib/Crawl/Bot.pm9
1 files changed, 9 insertions, 0 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;