ubiquibot / plugins-wishlist

0 stars 1 forks source link

/help command #17

Closed gentlementlegen closed 1 week ago

gentlementlegen commented 1 month ago

In the v1 of the bot, the /help would help the user to see all available commands with the Bot. The v2 should also offer a similar capability.

It is trickier because now each plugin is capable of handling its own commands. We should find a way to collect all of them and output them in a table, looking like

command description example
/help Outputs help /help

Few possible ways:

0x4007 commented 1 month ago

I think that it should be built into the kernel, and it should parse the active config and generate the available commands.

gentlementlegen commented 1 month ago

@0x4007 I believe so too. Still means the kernel should have a way to query each plugin to know their available commands. Only way I see to avoid querying them is directly reading the command inside the configuration itself. But since it is not mandatory, we could potentially have missing information there.

gentlementlegen commented 2 weeks ago

/help

ubiquibot[bot] commented 2 weeks ago

Available Commands

Command Description Example
/start Assign yourself to the issue. /start
/stop Unassign yourself from the issue. /stop
/help List all available commands. /help
/query Returns the user's wallet, access, and multiplier information. /query @user
/ask Ask a context aware question. /ask is x or y the best approach?
/multiplier Set the task payout multiplier for a specific contributor, and provide a reason for why. /multiplier @user 0.5 "multiplier
reason"
/labels Set access control, for admins only. /labels @user priority time
price
/authorize Approve a label change, for admins only. /authorize
/wallet Register your wallet address for payments. /wallet ubq.eth
gentlementlegen commented 2 weeks ago

We might want to remove @user or escape it in the example since it actually tags a real user here.

gentlementlegen commented 2 weeks ago

/start

ubiquibot[bot] commented 2 weeks ago

DeadlineSat, Jun 15, 5:03 AM UTC
Registered Wallet 0x0fC1b909ba9265A846b82CF4CE352fc3e7EeB2ED
Tips:
0x4007 commented 2 weeks ago

But since it is not mandatory, we could potentially have missing information there.

This help menu is just for slash commands. To register it as a slash command, it should be mandatory to define in the config.

The help menu is not intended to explain every webhook event result.

We might want to remove @user or escape it in the example since it actually tags a real user here.

They know what they were doing when they created the username. It's fine.

gentlementlegen commented 2 weeks ago

@0x4007 I believe for now I will read the command and description from the configuration file and display it in a similar fashion as we have now like https://github.com/ubiquibot/plugins-wishlist/issues/17#issuecomment-2167215039 What would have been cool if plugins would take care of themselves about the help output, is to have help for sub-commands like /help assign that would show a more elaborate description about that specific command.

gentlementlegen commented 2 weeks ago

@0x4007 @whilefoo I had created a plugin repo for this at first, but it appears to me that this one might belong to the kernel because we do not send the whole configuration to invoked plugins afaik (and might not make much sense to do so anyway).

Would that be fine or do you have suggestions?

0x4007 commented 2 weeks ago

Yes I am leaning towards this being in the kernel as well, unless its viable to isolate into its own codebase.

Ideally we have it on a Cloudflare Worker in its own plugin, and then perhaps have it set in the kernel to call it either via hard coding or an environment variable of "built-ins"

whilefoo commented 2 weeks ago

I think having it in the kernel seems most logical since it already has the config and it's not so much code

ubiquibot[bot] commented 1 week ago
+ Evaluating results. Please wait...
ubiquibot[bot] commented 1 week ago

[ 12.8 WXDAI ]

@0x4007
Contributions Overview
ViewContributionCountReward
IssueComment312.8
Conversation Incentives
CommentFormattingRelevanceReward
I think that it should be built into the kernel, and it should p...
2.20.792.2
> But since it is not mandatory, we could potentially have mi...
50.75
Yes I am leaning towards this being in the kernel as well, unles...
5.60.835.6

[ 669.6 WXDAI ]

@gentlementlegen
Contributions Overview
ViewContributionCountReward
IssueSpecification126
IssueTask1600
IssueComment443.6
IssueComment40
Conversation Incentives
CommentFormattingRelevanceReward
In the v1 of the bot, the `/help` would help the user to...
26
li:
  count: 2
  score: "2"
  words: 22
code:
  count: 3
  score: "3"
  words: 3
td:
  count: 3
  score: "3"
  words: 6
126
@0x4007 I believe so too. Still means the kernel should have a w...
11.4
code:
  count: 1
  score: "1"
  words: 1
0.6511.4
We might want to remove `@user` or escape it in the exam...
5
code:
  count: 1
  score: "1"
  words: 1
0.315
@0x4007 I believe for now I will read the command and descriptio...
16
code:
  count: 1
  score: "1"
  words: 2
0.8316
@0x4007 @whilefoo I had created a plugin repo for this at first,...
11.20.6811.2
@0x4007 I believe so too. Still means the kernel should have a w...
-
code:
  count: 1
  score: "0"
  words: 1
0.65-
We might want to remove `@user` or escape it in the exam...
-
code:
  count: 1
  score: "0"
  words: 1
0.31-
@0x4007 I believe for now I will read the command and descriptio...
-
code:
  count: 1
  score: "0"
  words: 2
0.83-
@0x4007 @whilefoo I had created a plugin repo for this at first,...
-0.68-

[ 2.3 WXDAI ]

@whilefoo
Contributions Overview
ViewContributionCountReward
IssueComment12.3
Conversation Incentives
CommentFormattingRelevanceReward
I think having it in the kernel seems most logical since it alre...
2.30.782.3