-
Notifications
You must be signed in to change notification settings - Fork 195
Provide a way to change command prefix #42
Comments
Actually that would slightly overlap with #6, depending on what you had in mind. I was considering adding an option for the bot to respond to its name (possibly creating another command type for that, next to the regular, passive and periodic ones), so that'd solve that part, and #6 speaks of using a slash rather than an exclamation mark, so a generic way of enabling changing the prefix would cover both your use cases. |
Hi, thanks for reply. I was wondering how could i make bot to respond to its name like you said above, then i came up with the idea of making bot's name command prefix. İf you mention someone on Slack, user's name will look like |
Having it respond to its own name like that should be possible using a passive command; just have it match on |
@doenietzomoeilijk i tried what you proposed. But passive commands doesnt have arguments like regular commands. I do not want to lose cmd args. Basicly what i want is that a regular command which i can trigger by bots name. |
In that case it'd either have to be a separate command type, or a way to really change the prefix. I'd lean towards the former, since matching on bot name could be a bit more generic (both with and without leading @fabioxgn what's your thoughts on this? |
@doenietzomoeilijk I think that the best way is to handle the prefix on the bot itself instead of creating a separate command type. When I first wrote the bot I had that in mind, that's why the prefix is a constant: Line 15 in e614e12
I think that changing this constant to a function which returns the bot's actual nick would be enough to make it work, than each protocol just have to implement this function. |
@fabioxgn Fair enough, but does that leave us with a way of setting the prefix per protocol? I want a |
@doenietzomoeilijk each protocol by default could respond by name and then allow a custom prefix (as we already do), now the prefix is Maybe on slack, by default the bot could respond to: |
+1 for @fabioxgn's suggestion. In spite of being a newbie go programmer, i would like to help you out with this. So let me know if you dont have enough time to implement this feature. |
The easy way to make this configurable would be to change the |
It will be useful to give ability to override bots command prefix. I want to use prefixs other than "!" character or maybe bots name while i am typing commands.
The text was updated successfully, but these errors were encountered: