Skip to content

Commit

Permalink
fix(core): trim shortcut message
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Jan 25, 2020
1 parent 7119a58 commit abb7498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/koishi-core/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export class App extends Context {
if (prefix && !nickname) continue
if (!fuzzy && message !== name) continue
if (message.startsWith(name)) {
const _message = message.slice(name.length)
const _message = message.slice(name.length).trim()
if (fuzzy && !nickname && _message.match(/^\S/)) continue
const result: ParsedLine = oneArg
? { rest: '', options: {}, unknown: [], args: [_message.trim()] }
Expand Down

0 comments on commit abb7498

Please sign in to comment.