Bot::Backbone::Service::Role::ChatConsumer - Role for services that listen for chat messages
Any service that needs to listen for chats and react to them will implement this role.
service my_responder => ( service => '=My::Responder', chat => 'jabber', );
This attribute is named
chat during construction. It is used to look up the chat service set in "chat".
This is the Bot::Backbone::Service::Role::Chat that this responder will receive messages from.
This must not be set directly and will be loaded lazily for you from the setting in "chat_name".
Whenever the chat service receives a message, it will pass it on to each registered consumer by passing it to this method.
The method can do whatever it wants here and the return value of this method is ignored.
Be sure to use these versions of the methods. Otherwise any send policies you have set on this class will be ignored.
This adds a bit of code to run before the service's
/initialize. It loads the chat object from the bot and registers this consumer with that chat service.
Andrew Sterling Hanenkamp <firstname.lastname@example.org>
This software is copyright (c) 2016 by Qubling Software LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.