// OnCommand handle the command specified by first argument
OnCommand handle the command specified by first argument
// OnCommand handle the command specified by first argument
func (s *Scene) OnCommand(cmd string, ef EventFn, mw ...Middleware) {
	ef = applyMiddleware(ef, append(s.middlewares, mw...)...)
	s.events = append(s.events, func(ctx Context) bool {
		if ctx.Upd().Message == nil || ctx.Upd().Message.Command() != cmd {
			return false
		}
		ef(ctx)
		return true
	})
}
func ( s * Scene ) OnCommand ( cmd string , ef EventFn , mw ... Middleware ) { ef = applyMiddleware ( ef , append ( s . middlewares , mw ... ) ... ) s . events = append ( s . events , func ( ctx Context ) bool { if ctx . Upd ( ) . Message == nil || ctx . Upd ( ) . Message . Command ( ) != cmd { return false } ef ( ctx ) return true } ) }
OnCommand handle the command specified by first argument
OnCommand handle the command specified by first argument