matrix-org / matrix-org/mjolnir

Better error handling of powerlevel command

Open
#632 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
445
Forks
75
Avg merge
2d 44m
Merged PRs (30d)
3

Description

I ran `!mjolnir powerlevel @user:domain #channel:server` accidentally just now in our moderation room and forgot the power level.

It returned an error message for every single room we have added to moderate. This was nearly 200 rooms.

A better solution would be to catch the syntax error and advise the user.

If variables != 3, then fail with `Error: powerlevel requries 3 variables user@domain powerlevel #room@server`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the TypeScript handler for the `powerlevel` command and reproduce the invocation with the wrong number of variables. Done means invalid syntax produces the specified error message once, without returning an error for every moderated room.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.