Skip to content

Commit

Permalink
fix(core): do not suggest command on replies
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Sep 10, 2020
1 parent f7ffb75 commit f3a3a19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/koishi-core/src/plugins/suggest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ Session.prototype.$suggest = function $suggest(this: Session, options: SuggestOp

export default function apply(ctx: Context) {
ctx.middleware((session, next) => {
const { $argv, $parsed, $prefix, $appel, messageType } = session
if ($argv || messageType !== 'private' && $prefix === null && !$appel) return next()
const { $argv, $reply, $parsed, $prefix, $appel, messageType } = session
if ($argv || $reply || messageType !== 'private' && $prefix === null && !$appel) return next()
const target = $parsed.split(/\s/, 1)[0].toLowerCase()
if (!target) return next()

Expand Down

0 comments on commit f3a3a19

Please sign in to comment.