matrix-org / matrix-org/mjolnir
Better error handling of powerlevel command
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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