Closed lpeabody closed 10 years ago
Bitten by the lack of documentation on that bit. Matchers in plugins have a default prefix /^!/
– which means that the command starts with a !
. hello
turns into !hello
.
Gotcha. Is there an example somehwere that shows how to set the prefix on a matcher?
https://github.com/cinchrb/cinch/blob/master/examples/plugins/custom_prefix.rb for per-plugin prefix. c.plugins.prefix
for a bot-wide prefix. match /.../, prefix: my_prefix
for a per-match prefix.
I'm using Cinch v2.0.11 and Ruby v1.9.3-p484. I have the following code:
My understanding based on the example in the readme from the repo front page is that this should work. However, when the bot connects and I enter "hello" into chat, I get no response. Any idea as to why this could be happening? I'm hoping I'm just missing something painfully obvious. Thanks.