Skip to content

Commit b35d4bc

Browse files
committed
fix: point out a bug with the ban user command
1 parent 2ae81e9 commit b35d4bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

package/src/utils/patchMessageTextCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export function patchMessageTextCommand(messageText: string, mentionedUserIds: s
2727
* The required format is "/ban @userid reason"
2828
*/
2929
if (trimmedMessageText.startsWith('/ban ')) {
30+
// TODO: There is a bug here. If the name has two words, the reason will be the surname of the user.
3031
const reasonText = trimmedMessageText.split(' ').pop() ?? '';
3132
return `/ban @${mentionedUserIds[0]} ${reasonText}`.trim();
3233
}

0 commit comments

Comments
 (0)