initialencounter / 2022-12-24

GNU Affero General Public License v3.0
42 stars 10 forks source link

Bug(ichess): should trigger only if game is running #33

Closed MaikoTan closed 10 months ago

MaikoTan commented 11 months ago

Add line here

https://github.com/initialencounter/mykoishi/blob/3e2dd4fb96bf565740c1d40db5e78d9aa3aae7d1/plugins/Recreation/ichess/src/index.ts#L45

with this:

  ctx.middleware(async (session, next) => {
+   if (!states[session?.cid]) return
    let position: string = session.content.replace(config.prefix, '')
    if (session.content.startsWith(config.prefix)) {
      if (position?.length > 1) {
        session.execute('ichess ' + position)
        return
      }
    }
    return next()
  })
initialencounter commented 11 months ago

谢谢你!  Thank you!

initialencounter commented 10 months ago

已在 8642c11 中修复